@feathersjs/cli 5.0.0-pre.25 → 5.0.0-pre.28
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/CHANGELOG.md +39 -0
- package/lib/app/index.js +1 -1
- package/lib/app/index.js.map +1 -1
- package/lib/app/index.ts +1 -1
- package/lib/app/templates/app.tpl.js +2 -2
- package/lib/app/templates/app.tpl.ts +2 -2
- package/lib/app/templates/client.tpl.js +1 -1
- package/lib/app/templates/client.tpl.ts +1 -1
- package/lib/app/templates/configuration.tpl.js +23 -20
- package/lib/app/templates/configuration.tpl.js.map +1 -1
- package/lib/app/templates/configuration.tpl.ts +23 -20
- package/lib/app/templates/declarations.tpl.js +3 -2
- package/lib/app/templates/declarations.tpl.js.map +1 -1
- package/lib/app/templates/declarations.tpl.ts +3 -2
- package/lib/app/templates/package.json.tpl.js +5 -4
- package/lib/app/templates/package.json.tpl.js.map +1 -1
- package/lib/app/templates/package.json.tpl.ts +5 -4
- package/lib/app/templates/prettierrc.tpl.d.ts +2 -0
- package/lib/app/templates/prettierrc.tpl.js +11 -0
- package/lib/app/templates/prettierrc.tpl.js.map +1 -0
- package/lib/app/templates/prettierrc.tpl.ts +14 -0
- package/lib/app/templates/tsconfig.json.tpl.js +1 -0
- package/lib/app/templates/tsconfig.json.tpl.js.map +1 -1
- package/lib/app/templates/tsconfig.json.tpl.ts +1 -0
- package/lib/authentication/index.d.ts +0 -2
- package/lib/authentication/templates/authentication.tpl.js +3 -3
- package/lib/authentication/templates/authentication.tpl.js.map +1 -1
- package/lib/authentication/templates/authentication.tpl.ts +5 -5
- package/lib/authentication/templates/declarations.tpl.js +1 -1
- package/lib/authentication/templates/declarations.tpl.js.map +1 -1
- package/lib/authentication/templates/declarations.tpl.ts +2 -2
- package/lib/authentication/templates/knex.tpl.js +6 -5
- package/lib/authentication/templates/knex.tpl.js.map +1 -1
- package/lib/authentication/templates/knex.tpl.ts +16 -17
- package/lib/authentication/templates/test.tpl.js +2 -2
- package/lib/authentication/templates/test.tpl.js.map +1 -1
- package/lib/authentication/templates/test.tpl.ts +2 -2
- package/lib/authentication/templates/user.resolver.tpl.js +10 -8
- package/lib/authentication/templates/user.resolver.tpl.js.map +1 -1
- package/lib/authentication/templates/user.resolver.tpl.ts +10 -8
- package/lib/authentication/templates/user.schema.tpl.js +7 -13
- package/lib/authentication/templates/user.schema.tpl.js.map +1 -1
- package/lib/authentication/templates/user.schema.tpl.ts +7 -13
- package/lib/commons.d.ts +19 -9
- package/lib/commons.js +56 -23
- package/lib/commons.js.map +1 -1
- package/lib/commons.ts +87 -26
- package/lib/connection/templates/knex.tpl.js +13 -16
- package/lib/connection/templates/knex.tpl.js.map +1 -1
- package/lib/connection/templates/knex.tpl.ts +18 -20
- package/lib/connection/templates/mongodb.tpl.js +5 -9
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +10 -12
- package/lib/hook/templates/hook.tpl.js +2 -2
- package/lib/hook/templates/hook.tpl.js.map +1 -1
- package/lib/hook/templates/hook.tpl.ts +4 -3
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/index.ts +2 -1
- package/lib/service/index.d.ts +0 -16
- package/lib/service/index.js +3 -8
- package/lib/service/index.js.map +1 -1
- package/lib/service/index.ts +3 -16
- package/lib/service/templates/class.tpl.d.ts +2 -0
- package/lib/service/templates/class.tpl.js +63 -0
- package/lib/service/templates/class.tpl.js.map +1 -0
- package/lib/service/templates/class.tpl.ts +79 -0
- package/lib/service/templates/client.tpl.js +7 -7
- package/lib/service/templates/client.tpl.js.map +1 -1
- package/lib/service/templates/client.tpl.ts +13 -16
- package/lib/service/templates/resolver.tpl.js +4 -4
- package/lib/service/templates/resolver.tpl.js.map +1 -1
- package/lib/service/templates/resolver.tpl.ts +4 -4
- package/lib/service/templates/schema.tpl.js +2 -2
- package/lib/service/templates/schema.tpl.js.map +1 -1
- package/lib/service/templates/schema.tpl.ts +2 -2
- package/lib/service/templates/service.tpl.js +12 -58
- package/lib/service/templates/service.tpl.js.map +1 -1
- package/lib/service/templates/service.tpl.ts +17 -79
- package/lib/service/templates/test.tpl.js +4 -4
- package/lib/service/templates/test.tpl.js.map +1 -1
- package/lib/service/templates/test.tpl.ts +4 -4
- package/lib/service/type/custom.tpl.d.ts +1 -1
- package/lib/service/type/custom.tpl.js +24 -16
- package/lib/service/type/custom.tpl.js.map +1 -1
- package/lib/service/type/custom.tpl.ts +28 -19
- package/lib/service/type/knex.tpl.js +11 -5
- package/lib/service/type/knex.tpl.js.map +1 -1
- package/lib/service/type/knex.tpl.ts +14 -9
- package/lib/service/type/mongodb.tpl.js +11 -5
- package/lib/service/type/mongodb.tpl.js.map +1 -1
- package/lib/service/type/mongodb.tpl.ts +14 -9
- package/package.json +21 -21
|
@@ -15,15 +15,21 @@ export class ${className} extends MongoDBService<${upperName}Result, ${upperName
|
|
|
15
15
|
exports.classCode = classCode;
|
|
16
16
|
const optionTemplate = ({ kebabName }) => ` paginate: app.get('paginate'),
|
|
17
17
|
Model: app.get('mongodbClient').then(db => db.collection('${kebabName}'))`;
|
|
18
|
-
const toServiceFile = (0, pinion_1.toFile)(({ lib, folder, fileName
|
|
18
|
+
const toServiceFile = (0, pinion_1.toFile)(({ lib, folder, fileName }) => [
|
|
19
19
|
lib,
|
|
20
20
|
'services',
|
|
21
21
|
...folder,
|
|
22
|
-
`${fileName}
|
|
22
|
+
`${fileName}.service`
|
|
23
|
+
]);
|
|
24
|
+
const toClassFile = (0, pinion_1.toFile)(({ lib, folder, fileName }) => [
|
|
25
|
+
lib,
|
|
26
|
+
'services',
|
|
27
|
+
...folder,
|
|
28
|
+
`${fileName}.class`
|
|
23
29
|
]);
|
|
24
30
|
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
25
|
-
.then((0,
|
|
26
|
-
.then((0,
|
|
27
|
-
.then((0,
|
|
31
|
+
.then((0, commons_1.injectSource)(exports.classCode, (0, pinion_1.append)(), toClassFile))
|
|
32
|
+
.then((0, commons_1.injectSource)(exports.importTemplate, (0, pinion_1.prepend)(), toClassFile))
|
|
33
|
+
.then((0, commons_1.injectSource)(optionTemplate, (0, pinion_1.after)('const options ='), toServiceFile, false));
|
|
28
34
|
exports.generate = generate;
|
|
29
35
|
//# sourceMappingURL=mongodb.tpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA8E;AAC9E,2CAA4C;AAG/B,QAAA,cAAc,GAAG;kEACoC,CAAA;AAE3D,MAAM,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,SAAS,EAA2B,EAAE,EAAE,CAC7E,oBAAoB,SAAS,uCAAuC,SAAS;;;;eAIhE,SAAS,2BAA2B,SAAS,WAAW,SAAS,SAAS,SAAS;;CAEjG,CAAA;AAPY,QAAA,SAAS,aAOrB;AAED,MAAM,cAAc,GAAG,CAAC,EAAE,SAAS,EAA2B,EAAE,EAAE,CAChE;gEAC8D,SAAS,KAAK,CAAA;AAE9E,MAAM,aAAa,GAAG,IAAA,eAAM,EAA0B,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACnF,GAAG;IACH,UAAU;IACV,GAAG,MAAM;IACT,GAAG,QAAQ,UAAU;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,IAAA,eAAM,EAA0B,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACjF,GAAG;IACH,UAAU;IACV,GAAG,MAAM;IACT,GAAG,QAAQ,QAAQ;CACpB,CAAC,CAAA;AAEK,MAAM,QAAQ,GAAG,CAAC,GAA4B,EAAE,EAAE,CACvD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,sBAAY,EAAC,iBAAS,EAAE,IAAA,eAAM,GAAE,EAAE,WAAW,CAAC,CAAC;KACpD,IAAI,CAAC,IAAA,sBAAY,EAAC,sBAAc,EAAE,IAAA,gBAAO,GAAE,EAAE,WAAW,CAAC,CAAC;KAC1D,IAAI,CAAC,IAAA,sBAAY,EAAC,cAAc,EAAE,IAAA,cAAK,EAAC,iBAAiB,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAA;AAJ1E,QAAA,QAAQ,YAIkE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generator,
|
|
2
|
-
import {
|
|
1
|
+
import { generator, toFile, after, prepend, append } from '@feathershq/pinion'
|
|
2
|
+
import { injectSource } from '../../commons'
|
|
3
3
|
import { ServiceGeneratorContext } from '../index'
|
|
4
4
|
|
|
5
5
|
export const importTemplate = `import { MongoDBService } from \'@feathersjs/mongodb\'
|
|
@@ -18,17 +18,22 @@ const optionTemplate = ({ kebabName }: ServiceGeneratorContext) =>
|
|
|
18
18
|
` paginate: app.get('paginate'),
|
|
19
19
|
Model: app.get('mongodbClient').then(db => db.collection('${kebabName}'))`
|
|
20
20
|
|
|
21
|
-
const toServiceFile = toFile<ServiceGeneratorContext>(({ lib, folder, fileName
|
|
21
|
+
const toServiceFile = toFile<ServiceGeneratorContext>(({ lib, folder, fileName }) => [
|
|
22
22
|
lib,
|
|
23
23
|
'services',
|
|
24
24
|
...folder,
|
|
25
|
-
`${fileName}
|
|
25
|
+
`${fileName}.service`
|
|
26
|
+
])
|
|
27
|
+
|
|
28
|
+
const toClassFile = toFile<ServiceGeneratorContext>(({ lib, folder, fileName }) => [
|
|
29
|
+
lib,
|
|
30
|
+
'services',
|
|
31
|
+
...folder,
|
|
32
|
+
`${fileName}.class`
|
|
26
33
|
])
|
|
27
34
|
|
|
28
35
|
export const generate = (ctx: ServiceGeneratorContext) =>
|
|
29
36
|
generator(ctx)
|
|
30
|
-
.then(
|
|
31
|
-
|
|
32
|
-
)
|
|
33
|
-
.then(inject(getSource(importTemplate), prepend(), toServiceFile))
|
|
34
|
-
.then(inject(optionTemplate, after('const options ='), toServiceFile))
|
|
37
|
+
.then(injectSource(classCode, append(), toClassFile))
|
|
38
|
+
.then(injectSource(importTemplate, prepend(), toClassFile))
|
|
39
|
+
.then(injectSource(optionTemplate, after('const options ='), toServiceFile, false))
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/cli",
|
|
3
3
|
"description": "The command line interface for creating Feathers applications",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.28",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"bin": {
|
|
@@ -54,34 +54,34 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@feathershq/pinion": "^0.3.
|
|
57
|
+
"@feathershq/pinion": "^0.3.4",
|
|
58
58
|
"chalk": "^4.0.1",
|
|
59
59
|
"lodash": "^4.17.21",
|
|
60
60
|
"prettier": "^2.7.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@feathersjs/authentication": "^5.0.0-pre.
|
|
64
|
-
"@feathersjs/authentication-local": "^5.0.0-pre.
|
|
65
|
-
"@feathersjs/authentication-oauth": "^5.0.0-pre.
|
|
66
|
-
"@feathersjs/configuration": "^5.0.0-pre.
|
|
67
|
-
"@feathersjs/errors": "^5.0.0-pre.
|
|
68
|
-
"@feathersjs/express": "^5.0.0-pre.
|
|
69
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
70
|
-
"@feathersjs/knex": "^5.0.0-pre.
|
|
71
|
-
"@feathersjs/koa": "^5.0.0-pre.
|
|
72
|
-
"@feathersjs/mongodb": "^5.0.0-pre.
|
|
73
|
-
"@feathersjs/schema": "^5.0.0-pre.
|
|
74
|
-
"@feathersjs/socketio": "^5.0.0-pre.
|
|
75
|
-
"@feathersjs/transport-commons": "^5.0.0-pre.
|
|
63
|
+
"@feathersjs/authentication": "^5.0.0-pre.28",
|
|
64
|
+
"@feathersjs/authentication-local": "^5.0.0-pre.28",
|
|
65
|
+
"@feathersjs/authentication-oauth": "^5.0.0-pre.28",
|
|
66
|
+
"@feathersjs/configuration": "^5.0.0-pre.28",
|
|
67
|
+
"@feathersjs/errors": "^5.0.0-pre.28",
|
|
68
|
+
"@feathersjs/express": "^5.0.0-pre.28",
|
|
69
|
+
"@feathersjs/feathers": "^5.0.0-pre.28",
|
|
70
|
+
"@feathersjs/knex": "^5.0.0-pre.28",
|
|
71
|
+
"@feathersjs/koa": "^5.0.0-pre.28",
|
|
72
|
+
"@feathersjs/mongodb": "^5.0.0-pre.28",
|
|
73
|
+
"@feathersjs/schema": "^5.0.0-pre.28",
|
|
74
|
+
"@feathersjs/socketio": "^5.0.0-pre.28",
|
|
75
|
+
"@feathersjs/transport-commons": "^5.0.0-pre.28",
|
|
76
76
|
"@types/mocha": "^9.1.1",
|
|
77
|
-
"@types/node": "^
|
|
78
|
-
"@types/prettier": "^2.6.
|
|
77
|
+
"@types/node": "^18.6.3",
|
|
78
|
+
"@types/prettier": "^2.6.4",
|
|
79
79
|
"axios": "^0.27.2",
|
|
80
80
|
"mocha": "^10.0.0",
|
|
81
81
|
"shx": "^0.3.4",
|
|
82
|
-
"ts-node": "^10.
|
|
83
|
-
"type-fest": "^2.
|
|
84
|
-
"typescript": "^4.7.
|
|
82
|
+
"ts-node": "^10.9.1",
|
|
83
|
+
"type-fest": "^2.18.0",
|
|
84
|
+
"typescript": "^4.7.4"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "bf8e54fddc14d688ba8f505e72c9630a71656ff1"
|
|
87
87
|
}
|