@mikro-orm/entity-generator 7.0.0-dev.30 → 7.0.0-dev.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DefineEntitySourceFile.d.ts +5 -0
- package/DefineEntitySourceFile.js +146 -0
- package/EntityGenerator.d.ts +2 -1
- package/EntityGenerator.js +132 -47
- package/EntitySchemaSourceFile.d.ts +3 -2
- package/EntitySchemaSourceFile.js +52 -37
- package/NativeEnumSourceFile.d.ts +16 -0
- package/NativeEnumSourceFile.js +47 -0
- package/README.md +2 -0
- package/SourceFile.d.ts +8 -1
- package/SourceFile.js +292 -102
- package/package.json +32 -32
- package/tsconfig.build.tsbuildinfo +1 -0
package/README.md
CHANGED
|
@@ -381,6 +381,8 @@ See also the list of contributors who [participated](https://github.com/mikro-or
|
|
|
381
381
|
|
|
382
382
|
Please ⭐️ this repository if this project helped you!
|
|
383
383
|
|
|
384
|
+
> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan).
|
|
385
|
+
|
|
384
386
|
## 📝 License
|
|
385
387
|
|
|
386
388
|
Copyright © 2018 [Martin Adámek](https://github.com/b4nan).
|
package/SourceFile.d.ts
CHANGED
|
@@ -9,9 +9,15 @@ export declare class SourceFile {
|
|
|
9
9
|
protected readonly platform: Platform;
|
|
10
10
|
protected readonly options: GenerateOptions;
|
|
11
11
|
protected readonly coreImports: Set<string>;
|
|
12
|
+
protected readonly decoratorImports: Set<string>;
|
|
12
13
|
protected readonly entityImports: Set<string>;
|
|
14
|
+
protected readonly enumImports: Map<string, string[]>;
|
|
13
15
|
constructor(meta: EntityMetadata, namingStrategy: NamingStrategy, platform: Platform, options: GenerateOptions);
|
|
14
16
|
generate(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Convert index column options to quoted output format.
|
|
19
|
+
*/
|
|
20
|
+
private getColumnOptions;
|
|
15
21
|
protected getIndexOptions(index: EntityMetadata['indexes'][number], isAtEntityLevel?: boolean): IndexOptions<Dictionary, string>;
|
|
16
22
|
protected getUniqueOptions(index: EntityMetadata['uniques'][number], isAtEntityLevel?: boolean): UniqueOptions<Dictionary, string>;
|
|
17
23
|
protected generateImports(): string;
|
|
@@ -30,11 +36,12 @@ export declare class SourceFile {
|
|
|
30
36
|
protected getCommonDecoratorOptions(options: Dictionary, prop: EntityProperty): void;
|
|
31
37
|
private propTypeBreakdowns;
|
|
32
38
|
private breakdownOfIType;
|
|
33
|
-
protected getScalarPropertyDecoratorOptions(options: Dictionary, prop: EntityProperty): void;
|
|
39
|
+
protected getScalarPropertyDecoratorOptions(options: Dictionary, prop: EntityProperty, quote?: boolean): void;
|
|
34
40
|
protected getManyToManyDecoratorOptions(options: Dictionary, prop: EntityProperty): void;
|
|
35
41
|
protected getOneToManyDecoratorOptions(options: Dictionary, prop: EntityProperty): void;
|
|
36
42
|
protected getEmbeddedPropertyDeclarationOptions(options: Dictionary, prop: EntityProperty): void;
|
|
37
43
|
protected getForeignKeyDecoratorOptions(options: OneToOneOptions<any, any>, prop: EntityProperty): void;
|
|
38
44
|
protected getDecoratorType(prop: EntityProperty): string;
|
|
39
45
|
protected referenceCoreImport(identifier: string): string;
|
|
46
|
+
protected referenceDecoratorImport(identifier: string): string;
|
|
40
47
|
}
|