@tsed/cli 3.26.0-beta.1 → 3.26.0

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"Features.js","sourceRoot":"","sources":["../../../src/services/Features.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,kEAA6D;AAEhD,QAAA,iCAAiC,GAAG;IAC/C;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;aACjB;SACF;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB;YACvB,YAAY,EAAE;gBACZ,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE;YACL,IAAI,EAAE,kBAAkB;YACxB,YAAY,EAAE;gBACZ,EAAE,EAAE,QAAQ;aACb;SACF;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE;YACL,IAAI,EAAE,kBAAkB;YACxB,YAAY,EAAE;gBACZ,WAAW,EAAE,QAAQ;aACtB;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE;YACL,IAAI,EAAE,gBAAgB;YACtB,YAAY,EAAE;gBACZ,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE;YACL,IAAI,EAAE,wBAAwB;YAC9B,YAAY,EAAE;gBACZ,gBAAgB,EAAE,QAAQ;aAC3B;SACF;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB;SACxB;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE;YACL,IAAI,EAAE,sBAAsB;SAC7B;KACF;IACD;QACE,IAAI,EAA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C,sDAAsD;AACtD,WAAW;AACX,UAAU;AACV,oDAAoD;AACpD,wBAAwB;AACxB,kCAAkC;AAClC,sCAAsC;AACtC,qDAAqD;AACrD,WAAW;AACX,UAAU;AACV,gDAAgD;AAChD,4BAA4B;AAC5B,uCAAuC;AACvC,sCAAsC;AACtC,8CAA8C;AAC9C,WAAW;AACX,UAAU;AACV,0CAA0C;AAC1C,wBAAwB;AACxB,mCAAmC;AACnC,uCAAuC;AACvC,0CAA0C;AAC1C,WAAW;AACX,UAAU;AACV,uDAAuD;AACvD,gCAAgC;AAChC,4BAA4B;AAC5B,oCAAoC;AACpC,wBAAwB;AACxB,WAAW;AACX,UAAU;AACV,uDAAuD;AACvD,gCAAgC;AAChC,4BAA4B;AAC5B,oCAAoC;AACpC,wBAAwB;AACxB,WAAW;AACX,UAAU;AACV,kDAAkD;AAClD,wBAAwB;AACxB,kCAAkC;AAClC,yCAAyC;AACzC,UAAU;AACV,SAAS;AACT,MAAM;AACN,MAAM","sourcesContent":["import {ProjectConvention} from \"../interfaces\";\nimport {isPlatform} from \"../commands/init/utils/isPlatform\";\n\nexport const FEATURES_TYPEORM_CONNECTION_TYPES = [\n {\n name: \"MySQL\",\n value: {\n type: \"typeorm:mysql\",\n dependencies: {\n mysql2: \"latest\"\n }\n }\n },\n {\n name: \"MariaDB\",\n value: {\n type: \"typeorm:mariadb\",\n dependencies: {\n mariadb: \"latest\"\n }\n }\n },\n {\n name: \"Postgres\",\n value: {\n type: \"typeorm:postgres\",\n dependencies: {\n pg: \"latest\"\n }\n }\n },\n {\n name: \"CockRoachDB\",\n value: {\n type: \"typeorm:postgres\",\n dependencies: {\n cockroachdb: \"latest\"\n }\n }\n },\n {\n name: \"SQLite\",\n value: {\n type: \"typeorm:sqlite\",\n dependencies: {\n sqlite3: \"latest\"\n }\n }\n },\n {\n name: \"Better SQLite3\",\n value: {\n type: \"typeorm:better-sqlite3\",\n dependencies: {\n \"better-sqlite3\": \"latest\"\n }\n }\n },\n {\n name: \"Cordova\",\n value: {\n type: \"typeorm:cordova\"\n }\n },\n {\n name: \"NativeScript\",\n value: {\n type: \"typeorm:nativescript\"\n }\n },\n {\n name: \"Oracle\",\n value: {\n type: \"typeorm:oracle\",\n dependencies: {\n oracledb: \"latest\"\n }\n }\n },\n {\n name: \"MsSQL\",\n value: {\n type: \"typeorm:mssql\",\n dependencies: {\n mssql: \"latest\"\n }\n }\n },\n {\n name: \"MongoDB\",\n value: {\n type: \"typeorm:mongodb\",\n dependencies: {\n mongodb: \"latest\"\n }\n }\n },\n {\n name: \"SQL.js\",\n value: {\n type: \"typeorm:sqljs\",\n dependencies: {}\n }\n },\n {\n name: \"ReactNative\",\n value: {\n type: \"typeorm:reactnative\",\n dependencies: {}\n }\n },\n {\n name: \"Expo\",\n value: {\n type: \"typeorm:expo\",\n dependencies: {}\n }\n }\n];\n\nconst babelDevDependencies = {\n \"@babel/cli\": \"latest\",\n \"@babel/core\": \"latest\",\n \"@babel/node\": \"latest\",\n \"@babel/plugin-proposal-class-properties\": \"latest\",\n \"@babel/plugin-proposal-decorators\": \"latest\",\n \"@babel/preset-env\": \"latest\",\n \"@babel/preset-typescript\": \"latest\",\n \"babel-plugin-transform-typescript-metadata\": \"latest\",\n \"babel-watch\": \"latest\"\n};\n\nconst platformChoices = [\n {\n name: \"Express.js\",\n checked: true,\n value: \"express\"\n },\n {\n name: \"Koa.js\",\n checked: false,\n value: \"koa\"\n }\n];\n\nconst conventionChoices = [\n {\n name: \"Ts.ED\",\n checked: true,\n value: ProjectConvention.DEFAULT\n },\n {\n name: \"Angular\",\n checked: false,\n value: ProjectConvention.ANGULAR\n }\n];\n\nconst featureChoices = (cliVersion: string) => [\n {\n name: \"TypeGraphQL\",\n value: {\n type: \"graphql\",\n dependencies: {\n \"@tsed/typegraphql\": \"{{tsedVersion}}\"\n },\n devDependencies: {\n \"@tsed/cli-plugin-typegraphql\": cliVersion\n }\n }\n },\n {\n name: \"Database\",\n value: {type: \"db\"}\n },\n {\n name: \"Passport.js\",\n when: isPlatform(\"express\"),\n value: {\n type: \"passportjs\",\n devDependencies: {\n \"@tsed/cli-plugin-passport\": cliVersion\n }\n }\n },\n {\n name: \"Socket.io\",\n value: {\n type: \"socketio\",\n dependencies: {\n \"@tsed/socketio\": \"{{tsedVersion}}\",\n \"socket.io\": \"latest\"\n }\n }\n },\n {\n name: \"Swagger\",\n value: {\n type: \"swagger\",\n dependencies: {\n \"@tsed/swagger\": \"{{tsedVersion}}\"\n }\n }\n },\n {\n name: \"OpenID Connect provider\",\n value: {\n type: \"oidc\",\n devDependencies: {\n \"@tsed/cli-plugin-oidc-provider\": cliVersion\n }\n }\n },\n {\n name: \"Testing\",\n value: {\n type: \"testing\",\n dependencies: {},\n devDependencies: {\n \"@types/supertest\": \"latest\",\n supertest: \"latest\"\n }\n }\n },\n {\n name: \"Linter\",\n value: {\n type: \"linter\"\n }\n },\n {\n name: \"Bundler\",\n value: {\n type: \"bundler\"\n }\n },\n {\n name: \"Commands\",\n value: {\n type: \"commands\",\n dependencies: {\n \"@tsed/cli-core\": cliVersion\n },\n devDependencies: {\n \"@types/inquirer\": \"latest\"\n }\n }\n }\n];\n\nconst featuresDbChoices = (cliVersion: string) => [\n {\n name: \"Prisma\",\n value: {\n type: \"prisma\",\n devDependencies: {\n \"@tsed/cli-plugin-prisma\": cliVersion\n }\n }\n },\n {\n name: \"Mongoose\",\n value: {\n type: \"mongoose\",\n devDependencies: {\n \"@tsed/cli-plugin-mongoose\": cliVersion\n }\n }\n },\n {\n name: \"TypeORM\",\n value: {\n type: \"typeorm\",\n devDependencies: {\n \"@tsed/cli-plugin-typeorm\": cliVersion\n }\n }\n }\n];\n\nconst featuresTestingChoices = (cliVersion: string) => [\n {\n name: \"Jest\",\n value: {\n type: \"jest\",\n devDependencies: {\n \"@tsed/cli-plugin-jest\": cliVersion\n }\n }\n },\n {\n name: \"Mocha + Chai + Sinon\",\n value: {\n type: \"mocha\",\n devDependencies: {\n \"@tsed/cli-plugin-mocha\": cliVersion\n }\n }\n }\n];\n\nconst featuresLinterChoices = (cliVersion: string) => [\n {\n name: \"EsLint\",\n checked: true,\n value: {\n type: \"eslint\",\n devDependencies: {\n \"@tsed/cli-plugin-eslint\": cliVersion\n }\n }\n }\n];\n\nconst featuresExtraLinterChoices = [\n {\n name: \"Prettier\",\n value: {\n type: \"prettier\"\n }\n },\n {\n name: \"Lint on commit\",\n value: {\n type: \"lintstaged\"\n }\n }\n];\n\nconst featuresBundlerChoices = [\n {\n name: \"Babel\",\n value: {\n type: \"babel\",\n devDependencies: {\n ...babelDevDependencies\n }\n }\n },\n {\n name: \"Webpack\",\n value: {\n type: \"babel:webpack\",\n devDependencies: {\n ...babelDevDependencies,\n \"babel-loader\": \"latest\",\n webpack: \"latest\",\n \"webpack-cli\": \"latest\"\n }\n }\n }\n];\n\nconst packageManagerChoices = [\n {\n name: \"Yarn\",\n checked: true,\n value: \"yarn\"\n },\n {\n name: \"NPM\",\n checked: false,\n value: \"npm\"\n },\n {\n name: \"PNPM - experimental\",\n checked: false,\n value: \"pnpm\"\n }\n];\n\nexport const parseFeaturesFile = (features: Record<string, any>, cliVersion: string) => {\n return {\n platform: features.platform,\n convention: features.convention,\n features: [\n ...featureChoices(cliVersion)\n .map((v) => v.value)\n .filter((v) => features.features.filter((v: string | Record<string, any>) => typeof v === \"string\").includes(v.type)),\n ...features.features.filter((v: string | Record<string, any>) => typeof v === \"object\")\n ],\n featuresDB: featuresDbChoices(cliVersion).find((v) => v.value.type === features.featuresDB)?.value,\n featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.find((v) => v.value.type === features.featuresTypeORM)?.value,\n featuresTesting: featuresTestingChoices(cliVersion).find((v) => v.value.type === features.featuresTesting)?.value,\n featuresLinter: featuresLinterChoices(cliVersion).find((v) => v.value.type === features.featuresLinter)?.value,\n featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value).filter((v) => features.featuresExtraLinter?.includes(v.type)),\n featuresBundler: featuresBundlerChoices.find((v) => v.value.type === features.featuresBundlerChoices)?.value,\n packageManager: features.packageManager\n };\n};\n\nexport const getFeaturesChoicesValues = (cliVersion: string) => {\n return {\n platform: platformChoices.map((v) => v.value),\n convention: conventionChoices.map((v) => v.value),\n features: featureChoices(cliVersion).map((v) => v.value.type),\n featuresDB: featuresDbChoices(cliVersion).map((v) => v.value.type),\n featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.map((v) => v.value.type),\n featuresTesting: featuresTestingChoices(cliVersion).map((v) => v.value.type),\n featuresLinter: featuresLinterChoices(cliVersion).map((v) => v.value.type),\n featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value.type),\n featuresBundler: featuresBundlerChoices.map((v) => v.value.type),\n packageManager: packageManagerChoices.map((v) => v.value)\n };\n};\n//\n// registerProvider({\n// provide: Features,\n// deps: [CliPackageJson],\n// useFactory(cliPackageJson: CliPackageJson) {\n// const cliVersion = cliPackageJson.version;\n//\n// return [\n// {\n// message: \"Choose the target platform:\",\n// type: \"list\",\n// name: \"platform\",\n// choices: platformChoices\n// },\n// {\n// message: \"Choose the architecture for your project:\",\n// type: \"list\",\n// name: \"architecture\",\n// choices: [\n// {\n// name: \"Ts.ED\",\n// checked: true,\n// value: ArchitectureConvention.DEFAULT\n// },\n// {\n// name: \"feature\",\n// checked: false,\n// value: ArchitectureConvention.FEATURE\n// }\n// ]\n// },\n// {\n// message: \"Choose the convention file styling:\",\n// type: \"list\",\n// name: \"convention\",\n// choices: conventionChoices\n// },\n// {\n// type: \"checkbox\",\n// name: \"features\",\n// message: \"Check the features needed for your project\",\n// choices: featureChoices(cliVersion)\n// },\n// {\n// message: \"Choose a ORM manager\",\n// type: \"list\",\n// name: \"featuresDB\",\n// when: hasFeature(\"db\"),\n// choices: featuresDbChoices(cliVersion)\n// },\n// {\n// type: \"list\",\n// name: \"featuresTypeORM\",\n// message: \"Which TypeORM you want to install?\",\n// choices: FEATURES_TYPEORM_CONNECTION_TYPES,\n// when: hasValue(\"featuresDB.type\", \"typeorm\")\n// },\n// // {\n// // type: \"password\",\n// // name: \"GH_TOKEN\",\n// // message:\n// // \"Enter GH_TOKEN to use the premium @tsedio/prisma package or leave blank (see https://tsed.io/tutorials/prisma-client.html)\",\n// // when: hasValue(\"featuresDB.type\", \"prisma\")\n// // },\n// {\n// message: \"Choose unit framework\",\n// type: \"list\",\n// name: \"featuresTesting\",\n// when: hasFeature(\"testing\"),\n// choices: featuresTestingChoices(cliVersion)\n// },\n// {\n// message: \"Choose linter tools framework\",\n// type: \"list\",\n// name: \"featuresLinter\",\n// when: hasFeature(\"linter\"),\n// choices: featuresLinterChoices(cliVersion)\n// },\n// {\n// message: \"Choose extra linter tools\",\n// type: \"checkbox\",\n// name: \"featuresExtraLinter\",\n// when: hasFeature(\"linter\"),\n// choices: featuresExtraLinterChoices\n// },\n// {\n// message: \"Choose your bundler\",\n// type: \"list\",\n// name: \"featuresBundler\",\n// when: hasFeature(\"bundler\"),\n// choices: featuresBundlerChoices\n// },\n// {\n// message: \"Choose the OIDC base path server\",\n// name: \"oidcBasePath\",\n// default: \"/oidc\",\n// when: hasFeature(\"oidc\"),\n// type: \"input\"\n// },\n// {\n// message: \"Choose the OIDC base path server\",\n// name: \"oidcBasePath\",\n// default: \"/oidc\",\n// when: hasFeature(\"oidc\"),\n// type: \"input\"\n// },\n// {\n// message: \"Choose the package manager:\",\n// type: \"list\",\n// name: \"packageManager\",\n// choices: packageManagerChoices\n// }\n// ];\n// }\n// });\n"]}
@@ -1,508 +0,0 @@
1
- import { ProjectConvention } from "../interfaces.js";
2
- import { isPlatform } from "../commands/init/utils/isPlatform.js";
3
- export const FEATURES_TYPEORM_CONNECTION_TYPES = [
4
- {
5
- name: "MySQL",
6
- value: {
7
- type: "typeorm:mysql",
8
- dependencies: {
9
- mysql2: "latest"
10
- }
11
- }
12
- },
13
- {
14
- name: "MariaDB",
15
- value: {
16
- type: "typeorm:mariadb",
17
- dependencies: {
18
- mariadb: "latest"
19
- }
20
- }
21
- },
22
- {
23
- name: "Postgres",
24
- value: {
25
- type: "typeorm:postgres",
26
- dependencies: {
27
- pg: "latest"
28
- }
29
- }
30
- },
31
- {
32
- name: "CockRoachDB",
33
- value: {
34
- type: "typeorm:postgres",
35
- dependencies: {
36
- cockroachdb: "latest"
37
- }
38
- }
39
- },
40
- {
41
- name: "SQLite",
42
- value: {
43
- type: "typeorm:sqlite",
44
- dependencies: {
45
- sqlite3: "latest"
46
- }
47
- }
48
- },
49
- {
50
- name: "Better SQLite3",
51
- value: {
52
- type: "typeorm:better-sqlite3",
53
- dependencies: {
54
- "better-sqlite3": "latest"
55
- }
56
- }
57
- },
58
- {
59
- name: "Cordova",
60
- value: {
61
- type: "typeorm:cordova"
62
- }
63
- },
64
- {
65
- name: "NativeScript",
66
- value: {
67
- type: "typeorm:nativescript"
68
- }
69
- },
70
- {
71
- name: "Oracle",
72
- value: {
73
- type: "typeorm:oracle",
74
- dependencies: {
75
- oracledb: "latest"
76
- }
77
- }
78
- },
79
- {
80
- name: "MsSQL",
81
- value: {
82
- type: "typeorm:mssql",
83
- dependencies: {
84
- mssql: "latest"
85
- }
86
- }
87
- },
88
- {
89
- name: "MongoDB",
90
- value: {
91
- type: "typeorm:mongodb",
92
- dependencies: {
93
- mongodb: "latest"
94
- }
95
- }
96
- },
97
- {
98
- name: "SQL.js",
99
- value: {
100
- type: "typeorm:sqljs",
101
- dependencies: {}
102
- }
103
- },
104
- {
105
- name: "ReactNative",
106
- value: {
107
- type: "typeorm:reactnative",
108
- dependencies: {}
109
- }
110
- },
111
- {
112
- name: "Expo",
113
- value: {
114
- type: "typeorm:expo",
115
- dependencies: {}
116
- }
117
- }
118
- ];
119
- const babelDevDependencies = {
120
- "@babel/cli": "latest",
121
- "@babel/core": "latest",
122
- "@babel/node": "latest",
123
- "@babel/plugin-proposal-class-properties": "latest",
124
- "@babel/plugin-proposal-decorators": "latest",
125
- "@babel/preset-env": "latest",
126
- "@babel/preset-typescript": "latest",
127
- "babel-plugin-transform-typescript-metadata": "latest",
128
- "babel-watch": "latest"
129
- };
130
- const platformChoices = [
131
- {
132
- name: "Express.js",
133
- checked: true,
134
- value: "express"
135
- },
136
- {
137
- name: "Koa.js",
138
- checked: false,
139
- value: "koa"
140
- }
141
- ];
142
- const conventionChoices = [
143
- {
144
- name: "Ts.ED",
145
- checked: true,
146
- value: ProjectConvention.DEFAULT
147
- },
148
- {
149
- name: "Angular",
150
- checked: false,
151
- value: ProjectConvention.ANGULAR
152
- }
153
- ];
154
- const featureChoices = (cliVersion) => [
155
- {
156
- name: "TypeGraphQL",
157
- value: {
158
- type: "graphql",
159
- dependencies: {
160
- "@tsed/typegraphql": "{{tsedVersion}}"
161
- },
162
- devDependencies: {
163
- "@tsed/cli-plugin-typegraphql": cliVersion
164
- }
165
- }
166
- },
167
- {
168
- name: "Database",
169
- value: { type: "db" }
170
- },
171
- {
172
- name: "Passport.js",
173
- when: isPlatform("express"),
174
- value: {
175
- type: "passportjs",
176
- devDependencies: {
177
- "@tsed/cli-plugin-passport": cliVersion
178
- }
179
- }
180
- },
181
- {
182
- name: "Socket.io",
183
- value: {
184
- type: "socketio",
185
- dependencies: {
186
- "@tsed/socketio": "{{tsedVersion}}",
187
- "socket.io": "latest"
188
- }
189
- }
190
- },
191
- {
192
- name: "Swagger",
193
- value: {
194
- type: "swagger",
195
- dependencies: {
196
- "@tsed/swagger": "{{tsedVersion}}"
197
- }
198
- }
199
- },
200
- {
201
- name: "OpenID Connect provider",
202
- value: {
203
- type: "oidc",
204
- devDependencies: {
205
- "@tsed/cli-plugin-oidc-provider": cliVersion
206
- }
207
- }
208
- },
209
- {
210
- name: "Testing",
211
- value: {
212
- type: "testing",
213
- dependencies: {},
214
- devDependencies: {
215
- "@types/supertest": "latest",
216
- supertest: "latest"
217
- }
218
- }
219
- },
220
- {
221
- name: "Linter",
222
- value: {
223
- type: "linter"
224
- }
225
- },
226
- {
227
- name: "Bundler",
228
- value: {
229
- type: "bundler"
230
- }
231
- },
232
- {
233
- name: "Commands",
234
- value: {
235
- type: "commands",
236
- dependencies: {
237
- "@tsed/cli-core": cliVersion
238
- },
239
- devDependencies: {
240
- "@types/inquirer": "latest"
241
- }
242
- }
243
- }
244
- ];
245
- const featuresDbChoices = (cliVersion) => [
246
- {
247
- name: "Prisma",
248
- value: {
249
- type: "prisma",
250
- devDependencies: {
251
- "@tsed/cli-plugin-prisma": cliVersion
252
- }
253
- }
254
- },
255
- {
256
- name: "Mongoose",
257
- value: {
258
- type: "mongoose",
259
- devDependencies: {
260
- "@tsed/cli-plugin-mongoose": cliVersion
261
- }
262
- }
263
- },
264
- {
265
- name: "TypeORM",
266
- value: {
267
- type: "typeorm",
268
- devDependencies: {
269
- "@tsed/cli-plugin-typeorm": cliVersion
270
- }
271
- }
272
- }
273
- ];
274
- const featuresTestingChoices = (cliVersion) => [
275
- {
276
- name: "Jest",
277
- value: {
278
- type: "jest",
279
- devDependencies: {
280
- "@tsed/cli-plugin-jest": cliVersion
281
- }
282
- }
283
- },
284
- {
285
- name: "Mocha + Chai + Sinon",
286
- value: {
287
- type: "mocha",
288
- devDependencies: {
289
- "@tsed/cli-plugin-mocha": cliVersion
290
- }
291
- }
292
- }
293
- ];
294
- const featuresLinterChoices = (cliVersion) => [
295
- {
296
- name: "EsLint",
297
- checked: true,
298
- value: {
299
- type: "eslint",
300
- devDependencies: {
301
- "@tsed/cli-plugin-eslint": cliVersion
302
- }
303
- }
304
- }
305
- ];
306
- const featuresExtraLinterChoices = [
307
- {
308
- name: "Prettier",
309
- value: {
310
- type: "prettier"
311
- }
312
- },
313
- {
314
- name: "Lint on commit",
315
- value: {
316
- type: "lintstaged"
317
- }
318
- }
319
- ];
320
- const featuresBundlerChoices = [
321
- {
322
- name: "Babel",
323
- value: {
324
- type: "babel",
325
- devDependencies: {
326
- ...babelDevDependencies
327
- }
328
- }
329
- },
330
- {
331
- name: "Webpack",
332
- value: {
333
- type: "babel:webpack",
334
- devDependencies: {
335
- ...babelDevDependencies,
336
- "babel-loader": "latest",
337
- webpack: "latest",
338
- "webpack-cli": "latest"
339
- }
340
- }
341
- }
342
- ];
343
- const packageManagerChoices = [
344
- {
345
- name: "Yarn",
346
- checked: true,
347
- value: "yarn"
348
- },
349
- {
350
- name: "NPM",
351
- checked: false,
352
- value: "npm"
353
- },
354
- {
355
- name: "PNPM - experimental",
356
- checked: false,
357
- value: "pnpm"
358
- }
359
- ];
360
- export const parseFeaturesFile = (features, cliVersion) => {
361
- return {
362
- platform: features.platform,
363
- convention: features.convention,
364
- features: [
365
- ...featureChoices(cliVersion)
366
- .map((v) => v.value)
367
- .filter((v) => features.features.filter((v) => typeof v === "string").includes(v.type)),
368
- ...features.features.filter((v) => typeof v === "object")
369
- ],
370
- featuresDB: featuresDbChoices(cliVersion).find((v) => v.value.type === features.featuresDB)?.value,
371
- featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.find((v) => v.value.type === features.featuresTypeORM)?.value,
372
- featuresTesting: featuresTestingChoices(cliVersion).find((v) => v.value.type === features.featuresTesting)?.value,
373
- featuresLinter: featuresLinterChoices(cliVersion).find((v) => v.value.type === features.featuresLinter)?.value,
374
- featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value).filter((v) => features.featuresExtraLinter?.includes(v.type)),
375
- featuresBundler: featuresBundlerChoices.find((v) => v.value.type === features.featuresBundlerChoices)?.value,
376
- packageManager: features.packageManager
377
- };
378
- };
379
- export const getFeaturesChoicesValues = (cliVersion) => {
380
- return {
381
- platform: platformChoices.map((v) => v.value),
382
- convention: conventionChoices.map((v) => v.value),
383
- features: featureChoices(cliVersion).map((v) => v.value.type),
384
- featuresDB: featuresDbChoices(cliVersion).map((v) => v.value.type),
385
- featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.map((v) => v.value.type),
386
- featuresTesting: featuresTestingChoices(cliVersion).map((v) => v.value.type),
387
- featuresLinter: featuresLinterChoices(cliVersion).map((v) => v.value.type),
388
- featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value.type),
389
- featuresBundler: featuresBundlerChoices.map((v) => v.value.type),
390
- packageManager: packageManagerChoices.map((v) => v.value)
391
- };
392
- };
393
- //
394
- // registerProvider({
395
- // provide: Features,
396
- // deps: [CliPackageJson],
397
- // useFactory(cliPackageJson: CliPackageJson) {
398
- // const cliVersion = cliPackageJson.version;
399
- //
400
- // return [
401
- // {
402
- // message: "Choose the target platform:",
403
- // type: "list",
404
- // name: "platform",
405
- // choices: platformChoices
406
- // },
407
- // {
408
- // message: "Choose the architecture for your project:",
409
- // type: "list",
410
- // name: "architecture",
411
- // choices: [
412
- // {
413
- // name: "Ts.ED",
414
- // checked: true,
415
- // value: ArchitectureConvention.DEFAULT
416
- // },
417
- // {
418
- // name: "feature",
419
- // checked: false,
420
- // value: ArchitectureConvention.FEATURE
421
- // }
422
- // ]
423
- // },
424
- // {
425
- // message: "Choose the convention file styling:",
426
- // type: "list",
427
- // name: "convention",
428
- // choices: conventionChoices
429
- // },
430
- // {
431
- // type: "checkbox",
432
- // name: "features",
433
- // message: "Check the features needed for your project",
434
- // choices: featureChoices(cliVersion)
435
- // },
436
- // {
437
- // message: "Choose a ORM manager",
438
- // type: "list",
439
- // name: "featuresDB",
440
- // when: hasFeature("db"),
441
- // choices: featuresDbChoices(cliVersion)
442
- // },
443
- // {
444
- // type: "list",
445
- // name: "featuresTypeORM",
446
- // message: "Which TypeORM you want to install?",
447
- // choices: FEATURES_TYPEORM_CONNECTION_TYPES,
448
- // when: hasValue("featuresDB.type", "typeorm")
449
- // },
450
- // // {
451
- // // type: "password",
452
- // // name: "GH_TOKEN",
453
- // // message:
454
- // // "Enter GH_TOKEN to use the premium @tsedio/prisma package or leave blank (see https://tsed.io/tutorials/prisma-client.html)",
455
- // // when: hasValue("featuresDB.type", "prisma")
456
- // // },
457
- // {
458
- // message: "Choose unit framework",
459
- // type: "list",
460
- // name: "featuresTesting",
461
- // when: hasFeature("testing"),
462
- // choices: featuresTestingChoices(cliVersion)
463
- // },
464
- // {
465
- // message: "Choose linter tools framework",
466
- // type: "list",
467
- // name: "featuresLinter",
468
- // when: hasFeature("linter"),
469
- // choices: featuresLinterChoices(cliVersion)
470
- // },
471
- // {
472
- // message: "Choose extra linter tools",
473
- // type: "checkbox",
474
- // name: "featuresExtraLinter",
475
- // when: hasFeature("linter"),
476
- // choices: featuresExtraLinterChoices
477
- // },
478
- // {
479
- // message: "Choose your bundler",
480
- // type: "list",
481
- // name: "featuresBundler",
482
- // when: hasFeature("bundler"),
483
- // choices: featuresBundlerChoices
484
- // },
485
- // {
486
- // message: "Choose the OIDC base path server",
487
- // name: "oidcBasePath",
488
- // default: "/oidc",
489
- // when: hasFeature("oidc"),
490
- // type: "input"
491
- // },
492
- // {
493
- // message: "Choose the OIDC base path server",
494
- // name: "oidcBasePath",
495
- // default: "/oidc",
496
- // when: hasFeature("oidc"),
497
- // type: "input"
498
- // },
499
- // {
500
- // message: "Choose the package manager:",
501
- // type: "list",
502
- // name: "packageManager",
503
- // choices: packageManagerChoices
504
- // }
505
- // ];
506
- // }
507
- // });
508
- //# sourceMappingURL=Features.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Features.js","sourceRoot":"","sources":["../../../src/services/Features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAC;AAE7D,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;aACjB;SACF;KACF;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB;YACvB,YAAY,EAAE;gBACZ,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE;YACL,IAAI,EAAE,kBAAkB;YACxB,YAAY,EAAE;gBACZ,EA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C9B,oDAAoD;AACpD,cAAc;AACd,YAAY;AACZ,WAAW;AACX,UAAU;AACV,0DAA0D;AAC1D,wBAAwB;AACxB,8BAA8B;AAC9B,qCAAqC;AACrC,WAAW;AACX,UAAU;AACV,4BAA4B;AAC5B,4BAA4B;AAC5B,iEAAiE;AACjE,8CAA8C;AAC9C,WAAW;AACX,UAAU;AACV,2CAA2C;AAC3C,wBAAwB;AACxB,8BAA8B;AAC9B,kCAAkC;AAClC,iDAAiD;AACjD,WAAW;AACX,UAAU;AACV,wBAAwB;AACxB,mCAAmC;AACnC,yDAAyD;AACzD,sDAAsD;AACtD,uDAAuD;AACvD,WAAW;AACX,aAAa;AACb,+BAA+B;AAC/B,+BAA+B;AAC/B,sBAAsB;AACtB,6IAA6I;AAC7I,yDAAyD;AACzD,cAAc;AACd,UAAU;AACV,4CAA4C;AAC5C,wBAAwB;AACxB,mCAAmC;AACnC,uCAAuC;AACvC,sDAAsD;AACtD,WAAW;AACX,UAAU;AACV,oDAAoD;AACpD,wBAAwB;AACxB,kCAAkC;AAClC,sCAAsC;AACtC,qDAAqD;AACrD,WAAW;AACX,UAAU;AACV,gDAAgD;AAChD,4BAA4B;AAC5B,uCAAuC;AACvC,sCAAsC;AACtC,8CAA8C;AAC9C,WAAW;AACX,UAAU;AACV,0CAA0C;AAC1C,wBAAwB;AACxB,mCAAmC;AACnC,uCAAuC;AACvC,0CAA0C;AAC1C,WAAW;AACX,UAAU;AACV,uDAAuD;AACvD,gCAAgC;AAChC,4BAA4B;AAC5B,oCAAoC;AACpC,wBAAwB;AACxB,WAAW;AACX,UAAU;AACV,uDAAuD;AACvD,gCAAgC;AAChC,4BAA4B;AAC5B,oCAAoC;AACpC,wBAAwB;AACxB,WAAW;AACX,UAAU;AACV,kDAAkD;AAClD,wBAAwB;AACxB,kCAAkC;AAClC,yCAAyC;AACzC,UAAU;AACV,SAAS;AACT,MAAM;AACN,MAAM","sourcesContent":["import {ProjectConvention} from \"../interfaces\";\nimport {isPlatform} from \"../commands/init/utils/isPlatform\";\n\nexport const FEATURES_TYPEORM_CONNECTION_TYPES = [\n {\n name: \"MySQL\",\n value: {\n type: \"typeorm:mysql\",\n dependencies: {\n mysql2: \"latest\"\n }\n }\n },\n {\n name: \"MariaDB\",\n value: {\n type: \"typeorm:mariadb\",\n dependencies: {\n mariadb: \"latest\"\n }\n }\n },\n {\n name: \"Postgres\",\n value: {\n type: \"typeorm:postgres\",\n dependencies: {\n pg: \"latest\"\n }\n }\n },\n {\n name: \"CockRoachDB\",\n value: {\n type: \"typeorm:postgres\",\n dependencies: {\n cockroachdb: \"latest\"\n }\n }\n },\n {\n name: \"SQLite\",\n value: {\n type: \"typeorm:sqlite\",\n dependencies: {\n sqlite3: \"latest\"\n }\n }\n },\n {\n name: \"Better SQLite3\",\n value: {\n type: \"typeorm:better-sqlite3\",\n dependencies: {\n \"better-sqlite3\": \"latest\"\n }\n }\n },\n {\n name: \"Cordova\",\n value: {\n type: \"typeorm:cordova\"\n }\n },\n {\n name: \"NativeScript\",\n value: {\n type: \"typeorm:nativescript\"\n }\n },\n {\n name: \"Oracle\",\n value: {\n type: \"typeorm:oracle\",\n dependencies: {\n oracledb: \"latest\"\n }\n }\n },\n {\n name: \"MsSQL\",\n value: {\n type: \"typeorm:mssql\",\n dependencies: {\n mssql: \"latest\"\n }\n }\n },\n {\n name: \"MongoDB\",\n value: {\n type: \"typeorm:mongodb\",\n dependencies: {\n mongodb: \"latest\"\n }\n }\n },\n {\n name: \"SQL.js\",\n value: {\n type: \"typeorm:sqljs\",\n dependencies: {}\n }\n },\n {\n name: \"ReactNative\",\n value: {\n type: \"typeorm:reactnative\",\n dependencies: {}\n }\n },\n {\n name: \"Expo\",\n value: {\n type: \"typeorm:expo\",\n dependencies: {}\n }\n }\n];\n\nconst babelDevDependencies = {\n \"@babel/cli\": \"latest\",\n \"@babel/core\": \"latest\",\n \"@babel/node\": \"latest\",\n \"@babel/plugin-proposal-class-properties\": \"latest\",\n \"@babel/plugin-proposal-decorators\": \"latest\",\n \"@babel/preset-env\": \"latest\",\n \"@babel/preset-typescript\": \"latest\",\n \"babel-plugin-transform-typescript-metadata\": \"latest\",\n \"babel-watch\": \"latest\"\n};\n\nconst platformChoices = [\n {\n name: \"Express.js\",\n checked: true,\n value: \"express\"\n },\n {\n name: \"Koa.js\",\n checked: false,\n value: \"koa\"\n }\n];\n\nconst conventionChoices = [\n {\n name: \"Ts.ED\",\n checked: true,\n value: ProjectConvention.DEFAULT\n },\n {\n name: \"Angular\",\n checked: false,\n value: ProjectConvention.ANGULAR\n }\n];\n\nconst featureChoices = (cliVersion: string) => [\n {\n name: \"TypeGraphQL\",\n value: {\n type: \"graphql\",\n dependencies: {\n \"@tsed/typegraphql\": \"{{tsedVersion}}\"\n },\n devDependencies: {\n \"@tsed/cli-plugin-typegraphql\": cliVersion\n }\n }\n },\n {\n name: \"Database\",\n value: {type: \"db\"}\n },\n {\n name: \"Passport.js\",\n when: isPlatform(\"express\"),\n value: {\n type: \"passportjs\",\n devDependencies: {\n \"@tsed/cli-plugin-passport\": cliVersion\n }\n }\n },\n {\n name: \"Socket.io\",\n value: {\n type: \"socketio\",\n dependencies: {\n \"@tsed/socketio\": \"{{tsedVersion}}\",\n \"socket.io\": \"latest\"\n }\n }\n },\n {\n name: \"Swagger\",\n value: {\n type: \"swagger\",\n dependencies: {\n \"@tsed/swagger\": \"{{tsedVersion}}\"\n }\n }\n },\n {\n name: \"OpenID Connect provider\",\n value: {\n type: \"oidc\",\n devDependencies: {\n \"@tsed/cli-plugin-oidc-provider\": cliVersion\n }\n }\n },\n {\n name: \"Testing\",\n value: {\n type: \"testing\",\n dependencies: {},\n devDependencies: {\n \"@types/supertest\": \"latest\",\n supertest: \"latest\"\n }\n }\n },\n {\n name: \"Linter\",\n value: {\n type: \"linter\"\n }\n },\n {\n name: \"Bundler\",\n value: {\n type: \"bundler\"\n }\n },\n {\n name: \"Commands\",\n value: {\n type: \"commands\",\n dependencies: {\n \"@tsed/cli-core\": cliVersion\n },\n devDependencies: {\n \"@types/inquirer\": \"latest\"\n }\n }\n }\n];\n\nconst featuresDbChoices = (cliVersion: string) => [\n {\n name: \"Prisma\",\n value: {\n type: \"prisma\",\n devDependencies: {\n \"@tsed/cli-plugin-prisma\": cliVersion\n }\n }\n },\n {\n name: \"Mongoose\",\n value: {\n type: \"mongoose\",\n devDependencies: {\n \"@tsed/cli-plugin-mongoose\": cliVersion\n }\n }\n },\n {\n name: \"TypeORM\",\n value: {\n type: \"typeorm\",\n devDependencies: {\n \"@tsed/cli-plugin-typeorm\": cliVersion\n }\n }\n }\n];\n\nconst featuresTestingChoices = (cliVersion: string) => [\n {\n name: \"Jest\",\n value: {\n type: \"jest\",\n devDependencies: {\n \"@tsed/cli-plugin-jest\": cliVersion\n }\n }\n },\n {\n name: \"Mocha + Chai + Sinon\",\n value: {\n type: \"mocha\",\n devDependencies: {\n \"@tsed/cli-plugin-mocha\": cliVersion\n }\n }\n }\n];\n\nconst featuresLinterChoices = (cliVersion: string) => [\n {\n name: \"EsLint\",\n checked: true,\n value: {\n type: \"eslint\",\n devDependencies: {\n \"@tsed/cli-plugin-eslint\": cliVersion\n }\n }\n }\n];\n\nconst featuresExtraLinterChoices = [\n {\n name: \"Prettier\",\n value: {\n type: \"prettier\"\n }\n },\n {\n name: \"Lint on commit\",\n value: {\n type: \"lintstaged\"\n }\n }\n];\n\nconst featuresBundlerChoices = [\n {\n name: \"Babel\",\n value: {\n type: \"babel\",\n devDependencies: {\n ...babelDevDependencies\n }\n }\n },\n {\n name: \"Webpack\",\n value: {\n type: \"babel:webpack\",\n devDependencies: {\n ...babelDevDependencies,\n \"babel-loader\": \"latest\",\n webpack: \"latest\",\n \"webpack-cli\": \"latest\"\n }\n }\n }\n];\n\nconst packageManagerChoices = [\n {\n name: \"Yarn\",\n checked: true,\n value: \"yarn\"\n },\n {\n name: \"NPM\",\n checked: false,\n value: \"npm\"\n },\n {\n name: \"PNPM - experimental\",\n checked: false,\n value: \"pnpm\"\n }\n];\n\nexport const parseFeaturesFile = (features: Record<string, any>, cliVersion: string) => {\n return {\n platform: features.platform,\n convention: features.convention,\n features: [\n ...featureChoices(cliVersion)\n .map((v) => v.value)\n .filter((v) => features.features.filter((v: string | Record<string, any>) => typeof v === \"string\").includes(v.type)),\n ...features.features.filter((v: string | Record<string, any>) => typeof v === \"object\")\n ],\n featuresDB: featuresDbChoices(cliVersion).find((v) => v.value.type === features.featuresDB)?.value,\n featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.find((v) => v.value.type === features.featuresTypeORM)?.value,\n featuresTesting: featuresTestingChoices(cliVersion).find((v) => v.value.type === features.featuresTesting)?.value,\n featuresLinter: featuresLinterChoices(cliVersion).find((v) => v.value.type === features.featuresLinter)?.value,\n featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value).filter((v) => features.featuresExtraLinter?.includes(v.type)),\n featuresBundler: featuresBundlerChoices.find((v) => v.value.type === features.featuresBundlerChoices)?.value,\n packageManager: features.packageManager\n };\n};\n\nexport const getFeaturesChoicesValues = (cliVersion: string) => {\n return {\n platform: platformChoices.map((v) => v.value),\n convention: conventionChoices.map((v) => v.value),\n features: featureChoices(cliVersion).map((v) => v.value.type),\n featuresDB: featuresDbChoices(cliVersion).map((v) => v.value.type),\n featuresTypeORM: FEATURES_TYPEORM_CONNECTION_TYPES.map((v) => v.value.type),\n featuresTesting: featuresTestingChoices(cliVersion).map((v) => v.value.type),\n featuresLinter: featuresLinterChoices(cliVersion).map((v) => v.value.type),\n featuresExtraLinter: featuresExtraLinterChoices.map((v) => v.value.type),\n featuresBundler: featuresBundlerChoices.map((v) => v.value.type),\n packageManager: packageManagerChoices.map((v) => v.value)\n };\n};\n//\n// registerProvider({\n// provide: Features,\n// deps: [CliPackageJson],\n// useFactory(cliPackageJson: CliPackageJson) {\n// const cliVersion = cliPackageJson.version;\n//\n// return [\n// {\n// message: \"Choose the target platform:\",\n// type: \"list\",\n// name: \"platform\",\n// choices: platformChoices\n// },\n// {\n// message: \"Choose the architecture for your project:\",\n// type: \"list\",\n// name: \"architecture\",\n// choices: [\n// {\n// name: \"Ts.ED\",\n// checked: true,\n// value: ArchitectureConvention.DEFAULT\n// },\n// {\n// name: \"feature\",\n// checked: false,\n// value: ArchitectureConvention.FEATURE\n// }\n// ]\n// },\n// {\n// message: \"Choose the convention file styling:\",\n// type: \"list\",\n// name: \"convention\",\n// choices: conventionChoices\n// },\n// {\n// type: \"checkbox\",\n// name: \"features\",\n// message: \"Check the features needed for your project\",\n// choices: featureChoices(cliVersion)\n// },\n// {\n// message: \"Choose a ORM manager\",\n// type: \"list\",\n// name: \"featuresDB\",\n// when: hasFeature(\"db\"),\n// choices: featuresDbChoices(cliVersion)\n// },\n// {\n// type: \"list\",\n// name: \"featuresTypeORM\",\n// message: \"Which TypeORM you want to install?\",\n// choices: FEATURES_TYPEORM_CONNECTION_TYPES,\n// when: hasValue(\"featuresDB.type\", \"typeorm\")\n// },\n// // {\n// // type: \"password\",\n// // name: \"GH_TOKEN\",\n// // message:\n// // \"Enter GH_TOKEN to use the premium @tsedio/prisma package or leave blank (see https://tsed.io/tutorials/prisma-client.html)\",\n// // when: hasValue(\"featuresDB.type\", \"prisma\")\n// // },\n// {\n// message: \"Choose unit framework\",\n// type: \"list\",\n// name: \"featuresTesting\",\n// when: hasFeature(\"testing\"),\n// choices: featuresTestingChoices(cliVersion)\n// },\n// {\n// message: \"Choose linter tools framework\",\n// type: \"list\",\n// name: \"featuresLinter\",\n// when: hasFeature(\"linter\"),\n// choices: featuresLinterChoices(cliVersion)\n// },\n// {\n// message: \"Choose extra linter tools\",\n// type: \"checkbox\",\n// name: \"featuresExtraLinter\",\n// when: hasFeature(\"linter\"),\n// choices: featuresExtraLinterChoices\n// },\n// {\n// message: \"Choose your bundler\",\n// type: \"list\",\n// name: \"featuresBundler\",\n// when: hasFeature(\"bundler\"),\n// choices: featuresBundlerChoices\n// },\n// {\n// message: \"Choose the OIDC base path server\",\n// name: \"oidcBasePath\",\n// default: \"/oidc\",\n// when: hasFeature(\"oidc\"),\n// type: \"input\"\n// },\n// {\n// message: \"Choose the OIDC base path server\",\n// name: \"oidcBasePath\",\n// default: \"/oidc\",\n// when: hasFeature(\"oidc\"),\n// type: \"input\"\n// },\n// {\n// message: \"Choose the package manager:\",\n// type: \"list\",\n// name: \"packageManager\",\n// choices: packageManagerChoices\n// }\n// ];\n// }\n// });\n"]}