midway-model-gen 0.0.1
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/.idea/codeStyles/Project.xml +57 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/test.iml +8 -0
- package/.idea/vcs.xml +6 -0
- package/CHANGELOG.md +161 -0
- package/CONTRIBUTING.md +51 -0
- package/DEVELOPER.md +30 -0
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/USECASES.md +53 -0
- package/bin/typeorm-model-generator +6 -0
- package/dist/package.json +106 -0
- package/dist/src/Engine.d.ts +7 -0
- package/dist/src/Engine.js +47 -0
- package/dist/src/IConnectionOptions.d.ts +14 -0
- package/dist/src/IConnectionOptions.js +22 -0
- package/dist/src/IGenerationOptions.d.ts +24 -0
- package/dist/src/IGenerationOptions.js +33 -0
- package/dist/src/ModelCustomization.d.ts +4 -0
- package/dist/src/ModelCustomization.js +256 -0
- package/dist/src/ModelGeneration.d.ts +4 -0
- package/dist/src/ModelGeneration.js +247 -0
- package/dist/src/NamingStrategy.d.ts +10 -0
- package/dist/src/NamingStrategy.js +61 -0
- package/dist/src/Utils.d.ts +6 -0
- package/dist/src/Utils.js +68 -0
- package/dist/src/drivers/AbstractDriver.d.ts +30 -0
- package/dist/src/drivers/AbstractDriver.js +258 -0
- package/dist/src/drivers/MariaDbDriver.d.ts +4 -0
- package/dist/src/drivers/MariaDbDriver.js +11 -0
- package/dist/src/drivers/MssqlDriver.d.ts +25 -0
- package/dist/src/drivers/MssqlDriver.js +408 -0
- package/dist/src/drivers/MysqlDriver.d.ts +27 -0
- package/dist/src/drivers/MysqlDriver.js +439 -0
- package/dist/src/drivers/OracleDriver.d.ts +25 -0
- package/dist/src/drivers/OracleDriver.js +316 -0
- package/dist/src/drivers/PostgresDriver.d.ts +31 -0
- package/dist/src/drivers/PostgresDriver.js +542 -0
- package/dist/src/drivers/SqliteDriver.d.ts +28 -0
- package/dist/src/drivers/SqliteDriver.js +308 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +667 -0
- package/dist/src/library.d.ts +11 -0
- package/dist/src/library.js +14 -0
- package/dist/src/models/Column.d.ts +24 -0
- package/dist/src/models/Column.js +3 -0
- package/dist/src/models/Entity.d.ts +21 -0
- package/dist/src/models/Entity.js +3 -0
- package/dist/src/models/Index.d.ts +9 -0
- package/dist/src/models/Index.js +3 -0
- package/dist/src/models/Relation.d.ts +11 -0
- package/dist/src/models/Relation.js +3 -0
- package/dist/src/models/RelationId.d.ts +5 -0
- package/dist/src/models/RelationId.js +3 -0
- package/dist/src/models/RelationInternal.d.ts +11 -0
- package/dist/src/models/RelationInternal.js +3 -0
- package/dist/src/templates/entity.mst +47 -0
- package/dist/src/templates/index.mst +5 -0
- package/dist/src/templates/ormconfig.mst +17 -0
- package/dist/src/templates/tsconfig.mst +10 -0
- package/npminstall-debug.log +175 -0
- package/package.json +106 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColumnType } from "typeorm";
|
|
2
|
+
export declare type Column = {
|
|
3
|
+
tscType: string;
|
|
4
|
+
tscName: string;
|
|
5
|
+
type: ColumnType | string;
|
|
6
|
+
isUsedInRelationAsOwner?: true;
|
|
7
|
+
isUsedInRelationAsReferenced?: true;
|
|
8
|
+
primary?: boolean;
|
|
9
|
+
generated?: true | "increment" | "uuid";
|
|
10
|
+
default?: string;
|
|
11
|
+
options: {
|
|
12
|
+
name: string;
|
|
13
|
+
length?: number;
|
|
14
|
+
width?: number;
|
|
15
|
+
nullable?: boolean;
|
|
16
|
+
unique?: boolean;
|
|
17
|
+
precision?: number;
|
|
18
|
+
scale?: number;
|
|
19
|
+
unsigned?: boolean;
|
|
20
|
+
enum?: string[];
|
|
21
|
+
array?: boolean;
|
|
22
|
+
comment?: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Column } from "./Column";
|
|
2
|
+
import { Relation } from "./Relation";
|
|
3
|
+
import { Index } from "./Index";
|
|
4
|
+
import { RelationId } from "./RelationId";
|
|
5
|
+
export declare type Entity = {
|
|
6
|
+
sqlName: string;
|
|
7
|
+
tscName: string;
|
|
8
|
+
database?: string;
|
|
9
|
+
schema?: string;
|
|
10
|
+
columns: Column[];
|
|
11
|
+
relationIds: RelationId[];
|
|
12
|
+
relations: Relation[];
|
|
13
|
+
indices: Index[];
|
|
14
|
+
fileName: string;
|
|
15
|
+
fileImports: {
|
|
16
|
+
entityName: string;
|
|
17
|
+
fileName: string;
|
|
18
|
+
}[];
|
|
19
|
+
activeRecord?: true;
|
|
20
|
+
generateConstructor?: true;
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JoinColumnOptions, RelationOptions } from "typeorm";
|
|
2
|
+
import { JoinTableMultipleColumnsOptions } from "typeorm/decorator/options/JoinTableMultipleColumnsOptions";
|
|
3
|
+
export declare type Relation = {
|
|
4
|
+
relationType: "OneToOne" | "OneToMany" | "ManyToOne" | "ManyToMany";
|
|
5
|
+
relatedTable: string;
|
|
6
|
+
relatedField: string;
|
|
7
|
+
fieldName: string;
|
|
8
|
+
relationOptions?: RelationOptions;
|
|
9
|
+
joinColumnOptions?: Required<JoinColumnOptions>[];
|
|
10
|
+
joinTableOptions?: JoinTableMultipleColumnsOptions;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnDeleteType } from "typeorm/metadata/types/OnDeleteType";
|
|
2
|
+
import { OnUpdateType } from "typeorm/metadata/types/OnUpdateType";
|
|
3
|
+
import { Entity } from "./Entity";
|
|
4
|
+
export declare type RelationInternal = {
|
|
5
|
+
ownerTable: Entity;
|
|
6
|
+
relatedTable: Entity;
|
|
7
|
+
ownerColumns: string[];
|
|
8
|
+
relatedColumns: string[];
|
|
9
|
+
onDelete?: OnDeleteType;
|
|
10
|
+
onUpdate?: OnUpdateType;
|
|
11
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{{#*inline "Index"}}
|
|
2
|
+
@Index("{{name}}",[{{#columns}}"{{toPropertyName .}}",{{/columns~}}],{ {{json options}} })
|
|
3
|
+
{{/inline}}
|
|
4
|
+
{{#*inline "Import"}}
|
|
5
|
+
import {{localImport (toEntityName entityName)}} from './{{toFileName fileName}}'
|
|
6
|
+
{{/inline}}
|
|
7
|
+
{{#*inline "Column"}}
|
|
8
|
+
{{#generated}}@PrimaryGeneratedColumn({ type:"{{type}}", {{/generated}}{{^generated}}@Column("{{type}}",{ {{#primary}}primary:{{primary}},{{/primary}}{{/generated}}{{json options}}{{#default}},default: {{.}},{{/default}} })
|
|
9
|
+
{{printPropertyVisibility}}{{toPropertyName tscName}}{{strictMode}}:{{tscType}}{{#if options.nullable}} | null{{/if}};
|
|
10
|
+
|
|
11
|
+
{{/inline}}
|
|
12
|
+
{{#*inline "JoinColumnOptions"}}
|
|
13
|
+
{ name: "{{name}}", referencedColumnName: "{{toPropertyName referencedColumnName}}" },
|
|
14
|
+
{{/inline}}
|
|
15
|
+
{{#*inline "Relation"}}
|
|
16
|
+
@{{relationType}}(()=>{{toEntityName relatedTable}},{{toPropertyName relatedTable}}=>{{toPropertyName relatedTable}}.{{toPropertyName relatedField}}{{#if relationOptions}},{ {{json relationOptions}} }{{/if}})
|
|
17
|
+
{{#if joinColumnOptions}}@JoinColumn([{{#joinColumnOptions}}{{> JoinColumnOptions}}{{/joinColumnOptions}}]){{/if}}
|
|
18
|
+
{{#joinTableOptions}}@JoinTable({ name:"{{name}}", joinColumns:[{{#joinColumns}}{{> JoinColumnOptions}}{{/joinColumns}}],inverseJoinColumns:[{{#inverseJoinColumns}}{{> JoinColumnOptions}}{{/inverseJoinColumns}}],{{#database}}database:"{{.}}",{{/database}}{{#schema}}schema:"{{.}}"{{/schema}} }){{/joinTableOptions}}
|
|
19
|
+
{{printPropertyVisibility}}{{toPropertyName fieldName}}{{strictMode}}:{{toRelation (toEntityName relatedTable) relationType}};
|
|
20
|
+
|
|
21
|
+
{{/inline}}
|
|
22
|
+
{{#*inline "RelationId"}}
|
|
23
|
+
@RelationId(({{toPropertyName entityName}}:{{toEntityName entityName}})=>{{toPropertyName entityName}}.{{toPropertyName relationField}})
|
|
24
|
+
{{printPropertyVisibility}}{{toPropertyName fieldName}}{{strictMode}}:{{fieldType}};
|
|
25
|
+
|
|
26
|
+
{{/inline}}
|
|
27
|
+
{{#*inline "Constructor"}}
|
|
28
|
+
{{printPropertyVisibility}}constructor(init?: Partial<{{toEntityName entityName}}>) {
|
|
29
|
+
{{#activeRecord}}super();
|
|
30
|
+
{{/activeRecord}}Object.assign(this, init);
|
|
31
|
+
}
|
|
32
|
+
{{/inline}}
|
|
33
|
+
{{#*inline "Entity"}}
|
|
34
|
+
{{#indices}}{{> Index}}{{/indices~}}
|
|
35
|
+
@Entity("{{sqlName}}"{{#schema}} ,{schema:"{{.}}"{{#if ../database}}, database:"{{../database}}"{{/if}} } {{/schema}})
|
|
36
|
+
export {{defaultExport}} class {{toEntityName tscName}}{{#activeRecord}} extends BaseEntity{{/activeRecord}} {
|
|
37
|
+
|
|
38
|
+
{{#columns}}{{> Column}}{{/columns~}}
|
|
39
|
+
{{#relations}}{{> Relation}}{{/relations~}}
|
|
40
|
+
{{#relationIds}}{{> RelationId entityName=../tscName}}{{/relationIds~}}
|
|
41
|
+
{{#if generateConstructor}}{{>Constructor entityName=tscName}}{{/if~}}
|
|
42
|
+
}
|
|
43
|
+
{{/inline}}
|
|
44
|
+
import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";
|
|
45
|
+
{{#fileImports}}{{> Import}}{{/fileImports}}
|
|
46
|
+
|
|
47
|
+
{{> Entity}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "default",
|
|
4
|
+
"type": "{{databaseType}}",
|
|
5
|
+
"host": "{{host}}",
|
|
6
|
+
"port": {{port}},
|
|
7
|
+
"username": "{{user}}",
|
|
8
|
+
"password": "{{password}}",
|
|
9
|
+
"database": "{{databaseName}}",{{#schemaName}}
|
|
10
|
+
"schema": "{{.}}",{{/schemaName}}{{#instanceName}}
|
|
11
|
+
"extra": { "instanceName": "{{.}}" },{{/instanceName}}
|
|
12
|
+
"synchronize": false,
|
|
13
|
+
"entities": [
|
|
14
|
+
"entities/*.js"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
root: 'D:\\OmniKit\\typeorm-model-generator-master\\test',
|
|
3
|
+
registry: 'https://registry.npmmirror.com',
|
|
4
|
+
pkgs: [],
|
|
5
|
+
production: false,
|
|
6
|
+
cacheStrict: false,
|
|
7
|
+
cacheDir: 'C:\\Users\\admin\\.npminstall_tarball',
|
|
8
|
+
env: {
|
|
9
|
+
npm_config_registry: 'https://registry.npmmirror.com',
|
|
10
|
+
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\admin\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\admin\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"]}',
|
|
11
|
+
npm_config_user_agent: 'npminstall/7.12.0 npm/? node/v22.22.0 win32 x64',
|
|
12
|
+
npm_config_cache: 'C:\\Users\\admin\\.npminstall_tarball',
|
|
13
|
+
NODE: 'd:\\nvm4w\\nodejs\\node.exe',
|
|
14
|
+
npm_node_execpath: 'd:\\nvm4w\\nodejs\\node.exe',
|
|
15
|
+
npm_execpath: 'C:\\Users\\admin\\AppData\\Local\\nvm\\v22.22.0\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
|
|
16
|
+
npm_config_userconfig: 'C:\\Users\\admin\\.cnpmrc',
|
|
17
|
+
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
|
|
18
|
+
npm_config_r: 'https://registry.npmmirror.com',
|
|
19
|
+
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
|
20
|
+
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
|
21
|
+
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
|
22
|
+
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
|
23
|
+
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
|
24
|
+
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
|
25
|
+
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
|
26
|
+
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
|
27
|
+
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
|
28
|
+
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
|
29
|
+
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries',
|
|
30
|
+
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
|
31
|
+
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
|
32
|
+
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
|
33
|
+
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
|
34
|
+
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
|
35
|
+
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
|
36
|
+
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
|
37
|
+
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
|
|
38
|
+
npm_rootpath: 'D:\\OmniKit\\typeorm-model-generator-master\\test',
|
|
39
|
+
INIT_CWD: 'D:\\OmniKit\\typeorm-model-generator-master\\test'
|
|
40
|
+
},
|
|
41
|
+
binaryMirrors: {
|
|
42
|
+
ENVS: {
|
|
43
|
+
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
|
44
|
+
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
|
|
45
|
+
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
|
|
46
|
+
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
|
|
47
|
+
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
|
|
48
|
+
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
|
|
49
|
+
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
|
|
50
|
+
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
|
|
51
|
+
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
|
|
52
|
+
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
|
|
53
|
+
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries',
|
|
54
|
+
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
|
|
55
|
+
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
|
|
56
|
+
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
|
|
57
|
+
RE2_DOWNLOAD_SKIP_PATH: 'true',
|
|
58
|
+
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
|
|
59
|
+
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
|
|
60
|
+
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
|
|
61
|
+
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
|
|
62
|
+
},
|
|
63
|
+
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
|
|
64
|
+
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
|
|
65
|
+
'@tensorflow/tfjs-node': {
|
|
66
|
+
replaceHostFiles: [Array],
|
|
67
|
+
replaceHostRegExpMap: [Object],
|
|
68
|
+
replaceHostMap: [Object]
|
|
69
|
+
},
|
|
70
|
+
cypress: {
|
|
71
|
+
host: 'https://cdn.npmmirror.com/binaries/cypress',
|
|
72
|
+
newPlatforms: [Object]
|
|
73
|
+
},
|
|
74
|
+
'utf-8-validate': {
|
|
75
|
+
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
|
|
76
|
+
},
|
|
77
|
+
xprofiler: {
|
|
78
|
+
remote_path: './xprofiler/v{version}/',
|
|
79
|
+
host: 'https://cdn.npmmirror.com/binaries'
|
|
80
|
+
},
|
|
81
|
+
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
|
|
82
|
+
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
|
|
83
|
+
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
|
|
84
|
+
sqlite3: {
|
|
85
|
+
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
|
|
86
|
+
remote_path: 'v{version}'
|
|
87
|
+
},
|
|
88
|
+
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
|
|
89
|
+
grpc: {
|
|
90
|
+
host: 'https://cdn.npmmirror.com/binaries',
|
|
91
|
+
remote_path: '{name}/v{version}'
|
|
92
|
+
},
|
|
93
|
+
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
|
|
94
|
+
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
|
|
95
|
+
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
|
|
96
|
+
'flow-bin': {
|
|
97
|
+
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
|
|
98
|
+
host: 'https://cdn.npmmirror.com/binaries/flow/v'
|
|
99
|
+
},
|
|
100
|
+
'jpegtran-bin': {
|
|
101
|
+
replaceHost: [Array],
|
|
102
|
+
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
|
|
103
|
+
},
|
|
104
|
+
'cwebp-bin': {
|
|
105
|
+
replaceHost: [Array],
|
|
106
|
+
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
|
|
107
|
+
},
|
|
108
|
+
'zopflipng-bin': {
|
|
109
|
+
replaceHost: [Array],
|
|
110
|
+
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
|
|
111
|
+
},
|
|
112
|
+
'optipng-bin': {
|
|
113
|
+
replaceHost: [Array],
|
|
114
|
+
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
|
|
115
|
+
},
|
|
116
|
+
mozjpeg: {
|
|
117
|
+
replaceHost: [Array],
|
|
118
|
+
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
|
|
119
|
+
},
|
|
120
|
+
gifsicle: {
|
|
121
|
+
replaceHost: [Array],
|
|
122
|
+
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
|
|
123
|
+
},
|
|
124
|
+
'pngquant-bin': {
|
|
125
|
+
replaceHost: [Array],
|
|
126
|
+
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
|
|
127
|
+
replaceHostMap: [Object]
|
|
128
|
+
},
|
|
129
|
+
'pngcrush-bin': {
|
|
130
|
+
replaceHost: [Array],
|
|
131
|
+
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
|
|
132
|
+
},
|
|
133
|
+
'jpeg-recompress-bin': {
|
|
134
|
+
replaceHost: [Array],
|
|
135
|
+
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
|
|
136
|
+
},
|
|
137
|
+
'advpng-bin': {
|
|
138
|
+
replaceHost: [Array],
|
|
139
|
+
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
|
|
140
|
+
},
|
|
141
|
+
'pngout-bin': {
|
|
142
|
+
replaceHost: [Array],
|
|
143
|
+
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
|
|
144
|
+
},
|
|
145
|
+
'jpegoptim-bin': {
|
|
146
|
+
replaceHost: [Array],
|
|
147
|
+
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
|
|
148
|
+
},
|
|
149
|
+
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
|
|
150
|
+
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
|
|
151
|
+
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' }
|
|
152
|
+
},
|
|
153
|
+
forbiddenLicenses: null,
|
|
154
|
+
flatten: false,
|
|
155
|
+
proxy: undefined,
|
|
156
|
+
prune: false,
|
|
157
|
+
disableFallbackStore: false,
|
|
158
|
+
workspacesMap: Map(0) {},
|
|
159
|
+
enableWorkspace: false,
|
|
160
|
+
workspaceRoot: 'D:\\OmniKit\\typeorm-model-generator-master\\test',
|
|
161
|
+
isWorkspaceRoot: true,
|
|
162
|
+
isWorkspacePackage: false,
|
|
163
|
+
offline: false,
|
|
164
|
+
strictSSL: true,
|
|
165
|
+
ignoreScripts: false,
|
|
166
|
+
foregroundScripts: false,
|
|
167
|
+
ignoreOptionalDependencies: false,
|
|
168
|
+
detail: false,
|
|
169
|
+
forceLinkLatest: false,
|
|
170
|
+
trace: false,
|
|
171
|
+
engineStrict: false,
|
|
172
|
+
registryOnly: false,
|
|
173
|
+
client: false,
|
|
174
|
+
autoFixVersion: [Function: autoFixVersion]
|
|
175
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "midway-model-gen",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Generates models for TypeORM from existing databases.",
|
|
5
|
+
"bin": "bin/typeorm-model-generator",
|
|
6
|
+
"main": "./dist/src/library.js",
|
|
7
|
+
"types": "./dist/src/library.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "ts-node ./src/index.ts",
|
|
10
|
+
"build": "npm run clean && tsc && ncp src/templates/ dist/src/templates/ && ncp package.json dist/package.json",
|
|
11
|
+
"prepare": "npm run build",
|
|
12
|
+
"pretest": "tsc --noEmit",
|
|
13
|
+
"test": "nyc --reporter=lcov ts-node ./node_modules/mocha/bin/_mocha test/**/*.test.ts --config test/configs/mocha.json -- --bail",
|
|
14
|
+
"posttest": "eslint ./src/**/*.ts ./test/**/*.ts",
|
|
15
|
+
"clean": "rimraf coverage output dist",
|
|
16
|
+
"prettier": "prettier --write ./src/*.ts ./src/**/*.ts"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/Kononnable/typeorm-model-generator.git"
|
|
21
|
+
},
|
|
22
|
+
"author": "Kononnable",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/Kononnable/typeorm-model-generator/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/Kononnable/typeorm-model-generator#readme",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"change-case": "^4.1.2",
|
|
30
|
+
"fs-extra": "^9.1.0",
|
|
31
|
+
"handlebars": "^4.7.7",
|
|
32
|
+
"inquirer": "^7.3.3",
|
|
33
|
+
"mssql": "^6.3.2",
|
|
34
|
+
"mysql2": "^2.3.0",
|
|
35
|
+
"pg": "^8.7.1",
|
|
36
|
+
"pluralize": "^8.0.0",
|
|
37
|
+
"prettier": "^2.3.2",
|
|
38
|
+
"reflect-metadata": "^0.1.13",
|
|
39
|
+
"sqlite3": "^5.0.2",
|
|
40
|
+
"typeorm": "^0.2.37",
|
|
41
|
+
"yargs": "^16.2.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/array.prototype.flatmap": "^1.2.2",
|
|
45
|
+
"@types/chai": "^4.2.21",
|
|
46
|
+
"@types/chai-as-promised": "^7.1.4",
|
|
47
|
+
"@types/chai-subset": "^1.3.3",
|
|
48
|
+
"@types/eslint": "^7.28.0",
|
|
49
|
+
"@types/fs-extra": "^9.0.12",
|
|
50
|
+
"@types/handlebars": "^4.1.0",
|
|
51
|
+
"@types/inquirer": "^7.3.3",
|
|
52
|
+
"@types/mocha": "^8.2.3",
|
|
53
|
+
"@types/mssql": "^6.0.8",
|
|
54
|
+
"@types/mysql": "^2.15.19",
|
|
55
|
+
"@types/node": "^14.17.15",
|
|
56
|
+
"@types/oracledb": "^5.2.1",
|
|
57
|
+
"@types/pg": "^7.14.11",
|
|
58
|
+
"@types/pluralize": "0.0.29",
|
|
59
|
+
"@types/prettier": "^2.3.2",
|
|
60
|
+
"@types/sinon": "^9.0.11",
|
|
61
|
+
"@types/sqlite3": "^3.1.7",
|
|
62
|
+
"@types/yargs": "^15.0.14",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^3.7.1",
|
|
64
|
+
"@typescript-eslint/parser": "^3.7.1",
|
|
65
|
+
"@typescript-eslint/typescript-estree": "^3.7.1",
|
|
66
|
+
"array.prototype.flatmap": "^1.2.4",
|
|
67
|
+
"chai": "^4.3.4",
|
|
68
|
+
"chai-as-promised": "^7.1.1",
|
|
69
|
+
"chai-subset": "^1.6.0",
|
|
70
|
+
"codecov": "^3.8.3",
|
|
71
|
+
"dotenv": "^8.6.0",
|
|
72
|
+
"eslint": "^7.32.0",
|
|
73
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
74
|
+
"eslint-config-prettier": "^6.15.0",
|
|
75
|
+
"eslint-plugin-import": "^2.24.2",
|
|
76
|
+
"husky": "^4.3.8",
|
|
77
|
+
"lint-staged": "^10.5.4",
|
|
78
|
+
"mocha": "^8.4.0",
|
|
79
|
+
"ncp": "^2.0.0",
|
|
80
|
+
"nyc": "^15.1.0",
|
|
81
|
+
"rimraf": "^3.0.2",
|
|
82
|
+
"sinon": "^9.2.4",
|
|
83
|
+
"sinon-chai": "^3.7.0",
|
|
84
|
+
"ts-node": "^9.1.1",
|
|
85
|
+
"typescript": "^4.4.2",
|
|
86
|
+
"yn": "^4.0.0"
|
|
87
|
+
},
|
|
88
|
+
"husky": {
|
|
89
|
+
"hooks": {
|
|
90
|
+
"pre-commit": "npm run prettier && git update-index --again"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"nyc": {
|
|
94
|
+
"check-coverage": false,
|
|
95
|
+
"all": true,
|
|
96
|
+
"extension": [
|
|
97
|
+
".ts",
|
|
98
|
+
".tsx"
|
|
99
|
+
],
|
|
100
|
+
"lines": "50",
|
|
101
|
+
"include": [
|
|
102
|
+
"src/**/!(*.test.*).[tj]s?(x)"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"__npminstall_done": false
|
|
106
|
+
}
|