From fca274aca495251b9b74a51f99f4e15c6fae5a4c Mon Sep 17 00:00:00 2001 From: Omer Morad Date: Sat, 21 Aug 2021 10:45:39 +0300 Subject: [PATCH] fix: fix broken packages because of 'types' (instead common) (#94) * fix(mockingbird-ts): fix dependencies to work with common instead of types * fix(parser): fix dependencies to work with common instead of types * fix(reflect): fix dependencies to work with common instead of types --- packages/mockingbird/src/index.ts | 2 +- packages/mockingbird/src/lib/builder/mock-builder.ts | 4 ++-- packages/mockingbird/src/lib/builder/mock-producer.ts | 2 +- packages/mockingbird/src/lib/builder/types.ts | 2 +- packages/mockingbird/src/lib/factory/mock-factory.ts | 2 +- .../src/types/mock-decorator-factory-options.interface.ts | 2 +- .../mockingbird/src/types/mock-generator-options.interface.ts | 2 +- packages/parser/src/handlers/array-value-handler.test.ts | 2 +- packages/parser/src/handlers/array-value-handler.ts | 2 +- packages/parser/src/handlers/callback-value-handler.test.ts | 2 +- packages/parser/src/handlers/callback-value-handler.ts | 2 +- packages/parser/src/handlers/enum-value-handler.test.ts | 2 +- packages/parser/src/handlers/primitive-value-handler.test.ts | 2 +- .../parser/src/handlers/single-class-value-handler.test.ts | 2 +- packages/parser/src/lib/analyzer/class-analyzer.ts | 2 +- packages/parser/src/lib/parser/class-parser.test.ts | 2 +- packages/parser/src/lib/parser/class-parser.ts | 2 +- packages/parser/src/types/types.ts | 2 +- packages/reflect/src/decorators/mock.decorator.ts | 2 +- packages/reflect/src/lib/class-reflector.ts | 2 +- packages/reflect/src/lib/property-decorator-value.ts | 2 +- packages/reflect/src/types/mock-options.type.ts | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/mockingbird/src/index.ts b/packages/mockingbird/src/index.ts index bdce1ab1..308e7edd 100644 --- a/packages/mockingbird/src/index.ts +++ b/packages/mockingbird/src/index.ts @@ -1,5 +1,5 @@ export * from '@mockinbird/parser'; -export * from '@mockinbird/types'; +export * from '@mockinbird/common'; export { Mock, MockOptions } from '@mockinbird/reflect'; diff --git a/packages/mockingbird/src/lib/builder/mock-builder.ts b/packages/mockingbird/src/lib/builder/mock-builder.ts index 795fc201..672c9246 100644 --- a/packages/mockingbird/src/lib/builder/mock-builder.ts +++ b/packages/mockingbird/src/lib/builder/mock-builder.ts @@ -1,5 +1,5 @@ -import { ClassLiteral, Class } from '@mockinbird/types'; -import { GeneratedMock, Keys, Mutations } from './types'; +import { ClassLiteral, Class } from '@mockinbird/common'; +import { Keys, Mutations } from './types'; import { MockProducer } from './mock-producer'; import { MockGenerator } from '../generator/mock-generator'; diff --git a/packages/mockingbird/src/lib/builder/mock-producer.ts b/packages/mockingbird/src/lib/builder/mock-producer.ts index e55620d9..f3f34651 100644 --- a/packages/mockingbird/src/lib/builder/mock-producer.ts +++ b/packages/mockingbird/src/lib/builder/mock-producer.ts @@ -1,4 +1,4 @@ -import { Class } from '@mockinbird/types'; +import { Class } from '@mockinbird/common'; import { MockGenerator } from '../generator/mock-generator'; import { Keys, Mutations } from './types'; diff --git a/packages/mockingbird/src/lib/builder/types.ts b/packages/mockingbird/src/lib/builder/types.ts index 3445f31a..9f88e010 100644 --- a/packages/mockingbird/src/lib/builder/types.ts +++ b/packages/mockingbird/src/lib/builder/types.ts @@ -1,5 +1,5 @@ import { ParserConfig } from '@mockinbird/parser'; -import { ClassLiteral } from '@mockinbird/types'; +import { ClassLiteral } from '@mockinbird/common'; export type GeneratedMock = TClass | ClassLiteral | TClass[] | ClassLiteral[]; diff --git a/packages/mockingbird/src/lib/factory/mock-factory.ts b/packages/mockingbird/src/lib/factory/mock-factory.ts index ec8d23fb..b1ac3723 100644 --- a/packages/mockingbird/src/lib/factory/mock-factory.ts +++ b/packages/mockingbird/src/lib/factory/mock-factory.ts @@ -1,4 +1,4 @@ -import { Faker, Class } from '@mockinbird/types'; +import { Faker, Class } from '@mockinbird/common'; import { ClassParser } from '@mockinbird/parser'; import { MockBuilder } from '../builder'; import { MockGenerator } from '../generator/mock-generator'; diff --git a/packages/mockingbird/src/types/mock-decorator-factory-options.interface.ts b/packages/mockingbird/src/types/mock-decorator-factory-options.interface.ts index 8b12d394..41ace27d 100644 --- a/packages/mockingbird/src/types/mock-decorator-factory-options.interface.ts +++ b/packages/mockingbird/src/types/mock-decorator-factory-options.interface.ts @@ -1,4 +1,4 @@ -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; export interface MockDecoratorFactoryOptions { count: number; diff --git a/packages/mockingbird/src/types/mock-generator-options.interface.ts b/packages/mockingbird/src/types/mock-generator-options.interface.ts index 1881e3a1..ed6385f8 100644 --- a/packages/mockingbird/src/types/mock-generator-options.interface.ts +++ b/packages/mockingbird/src/types/mock-generator-options.interface.ts @@ -1,4 +1,4 @@ -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; import { ParserConfig } from '@mockinbird/parser'; export interface MockGeneratorOptions extends ParserConfig { diff --git a/packages/parser/src/handlers/array-value-handler.test.ts b/packages/parser/src/handlers/array-value-handler.test.ts index 4ce5f5f0..8d9e0e76 100644 --- a/packages/parser/src/handlers/array-value-handler.test.ts +++ b/packages/parser/src/handlers/array-value-handler.test.ts @@ -1,5 +1,5 @@ import { Property, PropertyDecoratorValue } from '@mockinbird/reflect'; -import { Class, Faker, MultiClass } from '@mockinbird/types'; +import { Class, Faker, MultiClass } from '@mockinbird/common'; import { ArrayValueHandler } from './array-value-handler'; describe('ArrayValueHandler Unit Test', () => { diff --git a/packages/parser/src/handlers/array-value-handler.ts b/packages/parser/src/handlers/array-value-handler.ts index bcc3f06f..3647eab4 100644 --- a/packages/parser/src/handlers/array-value-handler.ts +++ b/packages/parser/src/handlers/array-value-handler.ts @@ -1,6 +1,6 @@ import { isPrimitive } from '@mockinbird/common'; import { Property } from '@mockinbird/reflect'; -import { ExactValue, MultiClass } from '@mockinbird/types'; +import { ExactValue, MultiClass } from '@mockinbird/common'; import { PrimitiveHandlerAbstract } from './primitive-handler-abstract'; import { ValueHandler } from '../types/value-handler.interface'; import { ClassAnalyzer } from '../lib/analyzer/class-analyzer'; diff --git a/packages/parser/src/handlers/callback-value-handler.test.ts b/packages/parser/src/handlers/callback-value-handler.test.ts index ca819c15..7570a0f6 100644 --- a/packages/parser/src/handlers/callback-value-handler.test.ts +++ b/packages/parser/src/handlers/callback-value-handler.test.ts @@ -1,5 +1,5 @@ import { Property, PropertyDecoratorValue } from '@mockinbird/reflect'; -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; import { CallbackValueHandler } from './callback-value-handler'; describe('CallbackValueHandler Unit', () => { diff --git a/packages/parser/src/handlers/callback-value-handler.ts b/packages/parser/src/handlers/callback-value-handler.ts index 0268b3ba..75905d70 100644 --- a/packages/parser/src/handlers/callback-value-handler.ts +++ b/packages/parser/src/handlers/callback-value-handler.ts @@ -1,5 +1,5 @@ import { Property } from '@mockinbird/reflect'; -import { Callback } from '@mockinbird/types'; +import { Callback } from '@mockinbird/common'; import { AbstractValueHandler } from './abstract-value-handler'; import { ValueHandler } from '../types/value-handler.interface'; diff --git a/packages/parser/src/handlers/enum-value-handler.test.ts b/packages/parser/src/handlers/enum-value-handler.test.ts index bf45b4f8..c158c09c 100644 --- a/packages/parser/src/handlers/enum-value-handler.test.ts +++ b/packages/parser/src/handlers/enum-value-handler.test.ts @@ -1,4 +1,4 @@ -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; import { Property, PropertyDecoratorValue } from '@mockinbird/reflect'; import { EnumValueHandler } from './enum-value-handler'; diff --git a/packages/parser/src/handlers/primitive-value-handler.test.ts b/packages/parser/src/handlers/primitive-value-handler.test.ts index 286abf9a..a648050d 100644 --- a/packages/parser/src/handlers/primitive-value-handler.test.ts +++ b/packages/parser/src/handlers/primitive-value-handler.test.ts @@ -1,4 +1,4 @@ -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; import { Property, PropertyDecoratorValue } from '@mockinbird/reflect'; import { PrimitiveValueHandler } from './primitive-value-handler'; diff --git a/packages/parser/src/handlers/single-class-value-handler.test.ts b/packages/parser/src/handlers/single-class-value-handler.test.ts index 9302fc9b..1912e278 100644 --- a/packages/parser/src/handlers/single-class-value-handler.test.ts +++ b/packages/parser/src/handlers/single-class-value-handler.test.ts @@ -1,5 +1,5 @@ import { Property, PropertyDecoratorValue } from '@mockinbird/reflect'; -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; import { SingleClassValueHandler } from './single-class-value-handler'; describe('SingleClassValueHandler Unit', () => { diff --git a/packages/parser/src/lib/analyzer/class-analyzer.ts b/packages/parser/src/lib/analyzer/class-analyzer.ts index 9dccf5ae..93c88f28 100644 --- a/packages/parser/src/lib/analyzer/class-analyzer.ts +++ b/packages/parser/src/lib/analyzer/class-analyzer.ts @@ -1,5 +1,5 @@ import { ClassPropsReflection, ClassReflector, Property } from '@mockinbird/reflect'; -import { Class, Faker } from '@mockinbird/types'; +import { Class, Faker } from '@mockinbird/common'; import { MutationsCallback, ParserConfig, ParsingStrategy } from '../../types/types'; import { ValueHandler } from '../../types/value-handler.interface'; import { EnumValueHandler } from '../../handlers/enum-value-handler'; diff --git a/packages/parser/src/lib/parser/class-parser.test.ts b/packages/parser/src/lib/parser/class-parser.test.ts index 6cb8ac61..d307e939 100644 --- a/packages/parser/src/lib/parser/class-parser.test.ts +++ b/packages/parser/src/lib/parser/class-parser.test.ts @@ -1,6 +1,6 @@ import { Mock } from '@mockinbird/reflect'; import { ClassParser } from './class-parser'; -import { Faker } from '@mockinbird/types'; +import { Faker } from '@mockinbird/common'; describe('ClassParser Integration Test', () => { class Child { diff --git a/packages/parser/src/lib/parser/class-parser.ts b/packages/parser/src/lib/parser/class-parser.ts index 6db18006..dfe763ba 100644 --- a/packages/parser/src/lib/parser/class-parser.ts +++ b/packages/parser/src/lib/parser/class-parser.ts @@ -1,4 +1,4 @@ -import { Faker, Class } from '@mockinbird/types'; +import { Faker, Class } from '@mockinbird/common'; import { ParserConfig } from '../../types/types'; import { ClassAnalyzer } from '../analyzer/class-analyzer'; diff --git a/packages/parser/src/types/types.ts b/packages/parser/src/types/types.ts index 46ad9172..40820d7f 100644 --- a/packages/parser/src/types/types.ts +++ b/packages/parser/src/types/types.ts @@ -1,4 +1,4 @@ -import { Faker, OptionalClassValues } from '@mockinbird/types'; +import { Faker, OptionalClassValues } from '@mockinbird/common'; export type MutationsCallback = (faker: Faker) => OptionalClassValues; diff --git a/packages/reflect/src/decorators/mock.decorator.ts b/packages/reflect/src/decorators/mock.decorator.ts index ef0f565f..f0b3a78d 100644 --- a/packages/reflect/src/decorators/mock.decorator.ts +++ b/packages/reflect/src/decorators/mock.decorator.ts @@ -1,5 +1,5 @@ import 'reflect-metadata'; -import { Callback, EnumObject, ExactValue, MultiClass } from '@mockinbird/types'; +import { Callback, EnumObject, ExactValue, MultiClass } from '@mockinbird/common'; import { Class, decorateProperty } from '@plumier/reflect'; import { MockOptions } from '../types'; diff --git a/packages/reflect/src/lib/class-reflector.ts b/packages/reflect/src/lib/class-reflector.ts index 9fade9d3..a0be78f1 100644 --- a/packages/reflect/src/lib/class-reflector.ts +++ b/packages/reflect/src/lib/class-reflector.ts @@ -1,5 +1,5 @@ import reflect, { ClassReflection, PropertyReflection } from '@plumier/reflect'; -import { Class } from '@mockinbird/types'; +import { Class } from '@mockinbird/common'; import { MockOptions } from '../types'; import { MOCK_DECORATOR_NAME } from '../decorators/mock.decorator'; import { Property } from './property'; diff --git a/packages/reflect/src/lib/property-decorator-value.ts b/packages/reflect/src/lib/property-decorator-value.ts index f866b3b5..ecf675fe 100644 --- a/packages/reflect/src/lib/property-decorator-value.ts +++ b/packages/reflect/src/lib/property-decorator-value.ts @@ -1,4 +1,4 @@ -import { MultiClass } from '@mockinbird/types'; +import { MultiClass } from '@mockinbird/common'; import { MockOptions } from '../types/mock-options.type'; export interface PropertyDecoratorValue { diff --git a/packages/reflect/src/types/mock-options.type.ts b/packages/reflect/src/types/mock-options.type.ts index ab98e160..40d5aa67 100644 --- a/packages/reflect/src/types/mock-options.type.ts +++ b/packages/reflect/src/types/mock-options.type.ts @@ -1,3 +1,3 @@ -import { Callback, EnumObject, ExactValue, MultiClass, Class } from '@mockinbird/types'; +import { Callback, EnumObject, ExactValue, MultiClass, Class } from '@mockinbird/common'; export type MockOptions = Callback | ExactValue | Class | EnumObject | MultiClass;