@feathersjs/cli 5.0.0-pre.33 → 5.0.0-pre.34
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 +14 -0
- package/lib/app/index.d.ts +2 -2
- package/lib/app/index.js +1 -1
- package/lib/app/index.js.map +1 -1
- package/lib/app/index.ts +1 -0
- package/lib/app/templates/app.test.tpl.js +2 -1
- package/lib/app/templates/app.test.tpl.js.map +1 -1
- package/lib/app/templates/app.test.tpl.ts +4 -1
- package/lib/app/templates/app.tpl.js +12 -10
- package/lib/app/templates/app.tpl.js.map +1 -1
- package/lib/app/templates/app.tpl.ts +12 -10
- package/lib/app/templates/channels.tpl.js +2 -1
- package/lib/app/templates/channels.tpl.js.map +1 -1
- package/lib/app/templates/channels.tpl.ts +2 -1
- package/lib/app/templates/client.tpl.js +2 -1
- package/lib/app/templates/client.tpl.js.map +1 -1
- package/lib/app/templates/client.tpl.ts +2 -1
- package/lib/app/templates/{config.tpl.d.ts → configuration.tpl.d.ts} +0 -0
- package/lib/app/templates/{schemas.tpl.js → configuration.tpl.js} +25 -29
- package/lib/app/templates/configuration.tpl.js.map +1 -0
- package/lib/app/templates/{schemas.tpl.ts → configuration.tpl.ts} +25 -32
- 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/logger.tpl.d.ts +1 -0
- package/lib/app/templates/logger.tpl.js +11 -5
- package/lib/app/templates/logger.tpl.js.map +1 -1
- package/lib/app/templates/logger.tpl.ts +20 -8
- package/lib/app/templates/package.json.tpl.js +5 -2
- package/lib/app/templates/package.json.tpl.js.map +1 -1
- package/lib/app/templates/package.json.tpl.ts +5 -2
- package/lib/app/templates/services.tpl.js +2 -1
- package/lib/app/templates/services.tpl.js.map +1 -1
- package/lib/app/templates/services.tpl.ts +3 -1
- package/lib/app/templates/{schemas.tpl.d.ts → validators.tpl.d.ts} +0 -0
- package/lib/app/templates/validators.tpl.js +36 -0
- package/lib/app/templates/validators.tpl.js.map +1 -0
- package/lib/app/templates/validators.tpl.ts +40 -0
- package/lib/authentication/index.d.ts +1 -1
- package/lib/authentication/templates/authentication.tpl.js +2 -1
- package/lib/authentication/templates/authentication.tpl.js.map +1 -1
- package/lib/authentication/templates/authentication.tpl.ts +2 -1
- package/lib/authentication/templates/client.test.tpl.js +2 -1
- package/lib/authentication/templates/client.test.tpl.js.map +1 -1
- package/lib/authentication/templates/client.test.tpl.ts +2 -1
- package/lib/authentication/templates/knex.tpl.js +2 -2
- package/lib/authentication/templates/knex.tpl.js.map +1 -1
- package/lib/authentication/templates/knex.tpl.ts +2 -2
- package/lib/authentication/templates/schema.json.tpl.js +30 -20
- package/lib/authentication/templates/schema.json.tpl.js.map +1 -1
- package/lib/authentication/templates/schema.json.tpl.ts +37 -21
- package/lib/authentication/templates/schema.typebox.tpl.d.ts +1 -1
- package/lib/authentication/templates/schema.typebox.tpl.js +30 -22
- package/lib/authentication/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/authentication/templates/schema.typebox.tpl.ts +37 -23
- package/lib/commons.d.ts +11 -4
- package/lib/commons.js +9 -1
- package/lib/commons.js.map +1 -1
- package/lib/commons.ts +8 -0
- package/lib/connection/index.d.ts +1 -1
- package/lib/connection/index.js +1 -1
- package/lib/connection/index.ts +1 -1
- package/lib/connection/templates/knex.tpl.js +4 -2
- package/lib/connection/templates/knex.tpl.js.map +1 -1
- package/lib/connection/templates/knex.tpl.ts +6 -2
- package/lib/connection/templates/mongodb.tpl.js +2 -1
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +3 -1
- package/lib/hook/templates/hook.tpl.js +4 -2
- package/lib/hook/templates/hook.tpl.js.map +1 -1
- package/lib/hook/templates/hook.tpl.ts +4 -2
- package/lib/service/index.d.ts +1 -1
- package/lib/service/templates/schema.json.tpl.js +23 -15
- package/lib/service/templates/schema.json.tpl.js.map +1 -1
- package/lib/service/templates/schema.json.tpl.ts +28 -17
- package/lib/service/templates/schema.typebox.tpl.js +21 -15
- package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/service/templates/schema.typebox.tpl.ts +26 -17
- package/lib/service/templates/service.tpl.js +33 -19
- package/lib/service/templates/service.tpl.js.map +1 -1
- package/lib/service/templates/service.tpl.ts +38 -20
- package/lib/service/templates/test.tpl.js +2 -1
- package/lib/service/templates/test.tpl.js.map +1 -1
- package/lib/service/templates/test.tpl.ts +6 -1
- package/lib/service/type/custom.tpl.js +8 -4
- package/lib/service/type/custom.tpl.js.map +1 -1
- package/lib/service/type/custom.tpl.ts +14 -4
- package/lib/service/type/knex.tpl.js +7 -3
- package/lib/service/type/knex.tpl.js.map +1 -1
- package/lib/service/type/knex.tpl.ts +7 -3
- package/lib/service/type/mongodb.tpl.js +5 -2
- package/lib/service/type/mongodb.tpl.js.map +1 -1
- package/lib/service/type/mongodb.tpl.ts +5 -2
- package/package.json +26 -24
- package/lib/app/templates/config.tpl.js +0 -30
- package/lib/app/templates/config.tpl.js.map +0 -1
- package/lib/app/templates/config.tpl.ts +0 -31
- package/lib/app/templates/schemas.tpl.js.map +0 -1
- package/lib/authentication/templates/client.tpl.d.ts +0 -2
- package/lib/authentication/templates/client.tpl.js +0 -14
- package/lib/authentication/templates/client.tpl.js.map +0 -1
- package/lib/authentication/templates/client.tpl.ts +0 -19
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.34",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"bin": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"LICENSE",
|
|
38
38
|
"README.md",
|
|
39
39
|
"lib/**",
|
|
40
|
+
"lib/app/static/.gitignore",
|
|
40
41
|
"bin/**",
|
|
41
42
|
"*.d.ts",
|
|
42
43
|
"*.js"
|
|
@@ -55,34 +56,35 @@
|
|
|
55
56
|
"chalk": "^4.0.1",
|
|
56
57
|
"commander": "^9.4.1",
|
|
57
58
|
"lodash": "^4.17.21",
|
|
58
|
-
"prettier": "^2.
|
|
59
|
+
"prettier": "^2.8.0"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
|
-
"@feathersjs/
|
|
62
|
-
"@feathersjs/authentication
|
|
63
|
-
"@feathersjs/authentication-
|
|
64
|
-
"@feathersjs/authentication-
|
|
65
|
-
"@feathersjs/
|
|
66
|
-
"@feathersjs/
|
|
67
|
-
"@feathersjs/
|
|
68
|
-
"@feathersjs/
|
|
69
|
-
"@feathersjs/
|
|
70
|
-
"@feathersjs/
|
|
71
|
-
"@feathersjs/
|
|
72
|
-
"@feathersjs/
|
|
73
|
-
"@feathersjs/
|
|
74
|
-
"@feathersjs/
|
|
75
|
-
"@feathersjs/
|
|
76
|
-
"@feathersjs/
|
|
77
|
-
"@
|
|
78
|
-
"@types/
|
|
62
|
+
"@feathersjs/adapter-commons": "^5.0.0-pre.34",
|
|
63
|
+
"@feathersjs/authentication": "^5.0.0-pre.34",
|
|
64
|
+
"@feathersjs/authentication-client": "^5.0.0-pre.34",
|
|
65
|
+
"@feathersjs/authentication-local": "^5.0.0-pre.34",
|
|
66
|
+
"@feathersjs/authentication-oauth": "^5.0.0-pre.34",
|
|
67
|
+
"@feathersjs/configuration": "^5.0.0-pre.34",
|
|
68
|
+
"@feathersjs/errors": "^5.0.0-pre.34",
|
|
69
|
+
"@feathersjs/express": "^5.0.0-pre.34",
|
|
70
|
+
"@feathersjs/feathers": "^5.0.0-pre.34",
|
|
71
|
+
"@feathersjs/knex": "^5.0.0-pre.34",
|
|
72
|
+
"@feathersjs/koa": "^5.0.0-pre.34",
|
|
73
|
+
"@feathersjs/mongodb": "^5.0.0-pre.34",
|
|
74
|
+
"@feathersjs/rest-client": "^5.0.0-pre.34",
|
|
75
|
+
"@feathersjs/schema": "^5.0.0-pre.34",
|
|
76
|
+
"@feathersjs/socketio": "^5.0.0-pre.34",
|
|
77
|
+
"@feathersjs/transport-commons": "^5.0.0-pre.34",
|
|
78
|
+
"@feathersjs/typebox": "^5.0.0-pre.34",
|
|
79
|
+
"@types/mocha": "^10.0.1",
|
|
80
|
+
"@types/node": "^18.11.10",
|
|
79
81
|
"@types/prettier": "^2.7.1",
|
|
80
|
-
"axios": "^1.
|
|
82
|
+
"axios": "^1.2.0",
|
|
81
83
|
"mocha": "^10.1.0",
|
|
82
84
|
"shx": "^0.3.4",
|
|
83
85
|
"ts-node": "^10.9.1",
|
|
84
|
-
"type-fest": "^3.
|
|
85
|
-
"typescript": "^4.
|
|
86
|
+
"type-fest": "^3.3.0",
|
|
87
|
+
"typescript": "^4.9.3"
|
|
86
88
|
},
|
|
87
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "42cca600d00f0b3b9d89fa79be30fcd46bc50132"
|
|
88
90
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generate = void 0;
|
|
4
|
-
const pinion_1 = require("@feathershq/pinion");
|
|
5
|
-
const defaultConfig = ({}) => ({
|
|
6
|
-
host: 'localhost',
|
|
7
|
-
port: 3030,
|
|
8
|
-
public: './public/',
|
|
9
|
-
origins: ['http://localhost:3030'],
|
|
10
|
-
paginate: {
|
|
11
|
-
default: 10,
|
|
12
|
-
max: 50
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
const customEnvironment = {
|
|
16
|
-
port: {
|
|
17
|
-
__name: 'PORT',
|
|
18
|
-
__format: 'number'
|
|
19
|
-
},
|
|
20
|
-
host: 'HOSTNAME'
|
|
21
|
-
};
|
|
22
|
-
const testConfig = {
|
|
23
|
-
port: 8998
|
|
24
|
-
};
|
|
25
|
-
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
26
|
-
.then((0, pinion_1.writeJSON)(defaultConfig, (0, pinion_1.toFile)('config', 'default.json')))
|
|
27
|
-
.then((0, pinion_1.writeJSON)(testConfig, (0, pinion_1.toFile)('config', 'test.json')))
|
|
28
|
-
.then((0, pinion_1.writeJSON)(customEnvironment, (0, pinion_1.toFile)('config', 'custom-environment-variables.json')));
|
|
29
|
-
exports.generate = generate;
|
|
30
|
-
//# sourceMappingURL=config.tpl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/config.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,MAAM,aAAa,GAAG,CAAC,EAAuB,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE,UAAU;CACjB,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,IAAI;CACX,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,kBAAS,EAAC,aAAa,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;KAChE,IAAI,CAAC,IAAA,kBAAS,EAAC,UAAU,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;KAC1D,IAAI,CAAC,IAAA,kBAAS,EAAC,iBAAiB,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,mCAAmC,CAAC,CAAC,CAAC,CAAA;AAJjF,QAAA,QAAQ,YAIyE"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { generator, toFile, writeJSON } from '@feathershq/pinion'
|
|
2
|
-
import { AppGeneratorContext } from '../index'
|
|
3
|
-
|
|
4
|
-
const defaultConfig = ({}: AppGeneratorContext) => ({
|
|
5
|
-
host: 'localhost',
|
|
6
|
-
port: 3030,
|
|
7
|
-
public: './public/',
|
|
8
|
-
origins: ['http://localhost:3030'],
|
|
9
|
-
paginate: {
|
|
10
|
-
default: 10,
|
|
11
|
-
max: 50
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const customEnvironment = {
|
|
16
|
-
port: {
|
|
17
|
-
__name: 'PORT',
|
|
18
|
-
__format: 'number'
|
|
19
|
-
},
|
|
20
|
-
host: 'HOSTNAME'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const testConfig = {
|
|
24
|
-
port: 8998
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const generate = (ctx: AppGeneratorContext) =>
|
|
28
|
-
generator(ctx)
|
|
29
|
-
.then(writeJSON(defaultConfig, toFile('config', 'default.json')))
|
|
30
|
-
.then(writeJSON(testConfig, toFile('config', 'test.json')))
|
|
31
|
-
.then(writeJSON(customEnvironment, toFile('config', 'custom-environment-variables.json')))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/schemas.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,iBAAiB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlC,CAAA;AAED,MAAM,yBAAyB,GAC7B,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;CAoBvC,CAAA;AAED,MAAM,4BAA4B,GAChC,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;CAiBvC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CACH,IAAA,sBAAY,EACV,KAAK,EAAE,GAAG,EAAE,EAAE,CACZ,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAC/F,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,eAAe,CAAC,CAC1E,CACF;KACA,IAAI,CACH,IAAA,sBAAY,EACV,iBAAiB,EACjB,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,CACvE,CACF,CAAA;AAdQ,QAAA,QAAQ,YAchB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generate = void 0;
|
|
4
|
-
const pinion_1 = require("@feathershq/pinion");
|
|
5
|
-
const commons_1 = require("../../commons");
|
|
6
|
-
const importTemplate = /* ts */ `import type { AuthenticationService } from '@feathersjs/authentication'
|
|
7
|
-
`;
|
|
8
|
-
const declarationTemplate = ` authentication: Pick<AuthenticationService, 'create' | 'remove'>`;
|
|
9
|
-
const toClientFile = (0, pinion_1.toFile)(({ lib }) => [lib, 'client']);
|
|
10
|
-
const generate = async (ctx) => (0, pinion_1.generator)(ctx)
|
|
11
|
-
.then((0, commons_1.injectSource)(importTemplate, (0, pinion_1.after)('import authenticationClient'), toClientFile))
|
|
12
|
-
.then((0, pinion_1.when)(({ language }) => language === 'ts', (0, commons_1.injectSource)(declarationTemplate, (0, pinion_1.after)('export interface ServiceTypes'), toClientFile)));
|
|
13
|
-
exports.generate = generate;
|
|
14
|
-
//# sourceMappingURL=client.tpl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/authentication/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAmE;AACnE,2CAA4C;AAG5C,MAAM,cAAc,GAAG,QAAQ,CAAC;CAC/B,CAAA;AACD,MAAM,mBAAmB,GAAG,oEAAoE,CAAA;AAEhG,MAAM,YAAY,GAAG,IAAA,eAAM,EAA0B,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA;AAE3E,MAAM,QAAQ,GAAG,KAAK,EAAE,GAA4B,EAAE,EAAE,CAC7D,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,sBAAY,EAAC,cAAc,EAAE,IAAA,cAAK,EAAC,6BAA6B,CAAC,EAAE,YAAY,CAAC,CAAC;KACtF,IAAI,CACH,IAAA,aAAI,EACF,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,EACnC,IAAA,sBAAY,EAAC,mBAAmB,EAAE,IAAA,cAAK,EAAC,+BAA+B,CAAC,EAAE,YAAY,CAAC,CACxF,CACF,CAAA;AARQ,QAAA,QAAQ,YAQhB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { generator, toFile, after, when } from '@feathershq/pinion'
|
|
2
|
-
import { injectSource } from '../../commons'
|
|
3
|
-
import { ServiceGeneratorContext } from '../../service'
|
|
4
|
-
|
|
5
|
-
const importTemplate = /* ts */ `import type { AuthenticationService } from '@feathersjs/authentication'
|
|
6
|
-
`
|
|
7
|
-
const declarationTemplate = ` authentication: Pick<AuthenticationService, 'create' | 'remove'>`
|
|
8
|
-
|
|
9
|
-
const toClientFile = toFile<ServiceGeneratorContext>(({ lib }) => [lib, 'client'])
|
|
10
|
-
|
|
11
|
-
export const generate = async (ctx: ServiceGeneratorContext) =>
|
|
12
|
-
generator(ctx)
|
|
13
|
-
.then(injectSource(importTemplate, after('import authenticationClient'), toClientFile))
|
|
14
|
-
.then(
|
|
15
|
-
when(
|
|
16
|
-
({ language }) => language === 'ts',
|
|
17
|
-
injectSource(declarationTemplate, after('export interface ServiceTypes'), toClientFile)
|
|
18
|
-
)
|
|
19
|
-
)
|