@feathersjs/generators 5.0.13 → 5.0.15
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 +12 -0
- package/lib/app/index.d.ts +19 -27
- package/lib/app/index.js +25 -30
- package/lib/app/index.js.map +1 -1
- package/lib/app/index.ts +17 -8
- package/lib/app/templates/app.test.tpl.d.ts +5 -2
- package/lib/app/templates/app.test.tpl.js +3 -7
- package/lib/app/templates/app.test.tpl.js.map +1 -1
- package/lib/app/templates/app.test.tpl.ts +4 -4
- package/lib/app/templates/app.tpl.d.ts +1 -1
- package/lib/app/templates/app.tpl.js +3 -7
- package/lib/app/templates/app.tpl.js.map +1 -1
- package/lib/app/templates/app.tpl.ts +4 -4
- package/lib/app/templates/channels.tpl.d.ts +1 -1
- package/lib/app/templates/channels.tpl.js +3 -7
- package/lib/app/templates/channels.tpl.js.map +1 -1
- package/lib/app/templates/channels.tpl.ts +4 -4
- package/lib/app/templates/client.test.tpl.d.ts +1 -1
- package/lib/app/templates/client.test.tpl.js +3 -7
- package/lib/app/templates/client.test.tpl.js.map +1 -1
- package/lib/app/templates/client.test.tpl.ts +4 -4
- package/lib/app/templates/client.tpl.d.ts +1 -1
- package/lib/app/templates/client.tpl.js +3 -7
- package/lib/app/templates/client.tpl.js.map +1 -1
- package/lib/app/templates/client.tpl.ts +4 -4
- package/lib/app/templates/configuration.tpl.d.ts +1 -1
- package/lib/app/templates/configuration.tpl.js +7 -11
- package/lib/app/templates/configuration.tpl.js.map +1 -1
- package/lib/app/templates/configuration.tpl.ts +4 -4
- package/lib/app/templates/declarations.tpl.d.ts +1 -1
- package/lib/app/templates/declarations.tpl.js +2 -6
- package/lib/app/templates/declarations.tpl.js.map +1 -1
- package/lib/app/templates/declarations.tpl.ts +3 -3
- package/lib/app/templates/index.html.tpl.d.ts +5 -2
- package/lib/app/templates/index.html.tpl.js +2 -6
- package/lib/app/templates/index.html.tpl.js.map +1 -1
- package/lib/app/templates/index.html.tpl.ts +3 -3
- package/lib/app/templates/index.tpl.d.ts +1 -1
- package/lib/app/templates/index.tpl.js +3 -7
- package/lib/app/templates/index.tpl.js.map +1 -1
- package/lib/app/templates/index.tpl.ts +4 -4
- package/lib/app/templates/logger.tpl.d.ts +1 -1
- package/lib/app/templates/logger.tpl.js +6 -10
- package/lib/app/templates/logger.tpl.js.map +1 -1
- package/lib/app/templates/logger.tpl.ts +4 -4
- package/lib/app/templates/package.json.tpl.d.ts +5 -2
- package/lib/app/templates/package.json.tpl.js +2 -6
- package/lib/app/templates/package.json.tpl.js.map +1 -1
- package/lib/app/templates/package.json.tpl.ts +3 -3
- package/lib/app/templates/prettierrc.tpl.d.ts +1 -1
- package/lib/app/templates/prettierrc.tpl.js +5 -9
- package/lib/app/templates/prettierrc.tpl.js.map +1 -1
- package/lib/app/templates/prettierrc.tpl.ts +4 -4
- package/lib/app/templates/readme.md.tpl.d.ts +5 -2
- package/lib/app/templates/readme.md.tpl.js +2 -6
- package/lib/app/templates/readme.md.tpl.js.map +1 -1
- package/lib/app/templates/readme.md.tpl.ts +3 -3
- package/lib/app/templates/services.tpl.d.ts +1 -1
- package/lib/app/templates/services.tpl.js +3 -7
- package/lib/app/templates/services.tpl.js.map +1 -1
- package/lib/app/templates/services.tpl.ts +4 -4
- package/lib/app/templates/tsconfig.json.tpl.d.ts +1 -1
- package/lib/app/templates/tsconfig.json.tpl.js +3 -7
- package/lib/app/templates/tsconfig.json.tpl.js.map +1 -1
- package/lib/app/templates/tsconfig.json.tpl.ts +3 -3
- package/lib/app/templates/validators.tpl.d.ts +1 -1
- package/lib/app/templates/validators.tpl.js +3 -7
- package/lib/app/templates/validators.tpl.js.map +1 -1
- package/lib/app/templates/validators.tpl.ts +4 -4
- package/lib/authentication/index.d.ts +10 -10
- package/lib/authentication/index.js +16 -19
- package/lib/authentication/index.js.map +1 -1
- package/lib/authentication/index.ts +65 -56
- package/lib/authentication/templates/authentication.tpl.d.ts +1 -1
- package/lib/authentication/templates/authentication.tpl.js +11 -15
- package/lib/authentication/templates/authentication.tpl.js.map +1 -1
- package/lib/authentication/templates/authentication.tpl.ts +5 -5
- package/lib/authentication/templates/client.test.tpl.d.ts +1 -1
- package/lib/authentication/templates/client.test.tpl.js +7 -11
- package/lib/authentication/templates/client.test.tpl.js.map +1 -1
- package/lib/authentication/templates/client.test.tpl.ts +5 -5
- package/lib/authentication/templates/config.tpl.d.ts +1 -1
- package/lib/authentication/templates/config.tpl.js +8 -15
- package/lib/authentication/templates/config.tpl.js.map +1 -1
- package/lib/authentication/templates/config.tpl.ts +3 -3
- package/lib/authentication/templates/declarations.tpl.d.ts +1 -1
- package/lib/authentication/templates/declarations.tpl.js +5 -9
- package/lib/authentication/templates/declarations.tpl.js.map +1 -1
- package/lib/authentication/templates/declarations.tpl.ts +3 -3
- package/lib/commons.d.ts +10 -2
- package/lib/commons.js +43 -76
- package/lib/commons.js.map +1 -1
- package/lib/commons.ts +22 -4
- package/lib/connection/index.d.ts +1 -1
- package/lib/connection/index.js +24 -30
- package/lib/connection/index.js.map +1 -1
- package/lib/connection/index.ts +10 -4
- package/lib/connection/templates/knex.tpl.d.ts +1 -1
- package/lib/connection/templates/knex.tpl.js +13 -20
- package/lib/connection/templates/knex.tpl.js.map +1 -1
- package/lib/connection/templates/knex.tpl.ts +4 -4
- package/lib/connection/templates/mongodb.tpl.d.ts +1 -1
- package/lib/connection/templates/mongodb.tpl.js +10 -14
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +4 -4
- package/lib/hook/index.d.ts +6 -6
- package/lib/hook/index.js +13 -17
- package/lib/hook/index.js.map +1 -1
- package/lib/hook/index.ts +7 -3
- package/lib/hook/templates/hook.tpl.d.ts +1 -1
- package/lib/hook/templates/hook.tpl.js +3 -7
- package/lib/hook/templates/hook.tpl.js.map +1 -1
- package/lib/hook/templates/hook.tpl.ts +4 -4
- package/lib/index.d.ts +7 -7
- package/lib/index.js +7 -36
- package/lib/index.js.map +1 -1
- package/lib/index.ts +7 -7
- package/lib/service/index.d.ts +1 -1
- package/lib/service/index.js +27 -31
- package/lib/service/index.js.map +1 -1
- package/lib/service/index.ts +94 -92
- package/lib/service/templates/client.tpl.d.ts +1 -1
- package/lib/service/templates/client.tpl.js +4 -8
- package/lib/service/templates/client.tpl.js.map +1 -1
- package/lib/service/templates/client.tpl.ts +4 -4
- package/lib/service/templates/schema.json.tpl.d.ts +1 -1
- package/lib/service/templates/schema.json.tpl.js +10 -14
- package/lib/service/templates/schema.json.tpl.js.map +1 -1
- package/lib/service/templates/schema.json.tpl.ts +4 -4
- package/lib/service/templates/schema.typebox.tpl.d.ts +1 -1
- package/lib/service/templates/schema.typebox.tpl.js +8 -12
- package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/service/templates/schema.typebox.tpl.ts +4 -4
- package/lib/service/templates/service.tpl.d.ts +1 -1
- package/lib/service/templates/service.tpl.js +9 -14
- package/lib/service/templates/service.tpl.js.map +1 -1
- package/lib/service/templates/service.tpl.ts +4 -4
- package/lib/service/templates/shared.tpl.d.ts +1 -1
- package/lib/service/templates/shared.tpl.js +3 -7
- package/lib/service/templates/shared.tpl.js.map +1 -1
- package/lib/service/templates/shared.tpl.ts +4 -4
- package/lib/service/templates/test.tpl.d.ts +1 -1
- package/lib/service/templates/test.tpl.js +3 -7
- 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 +4 -9
- package/lib/service/type/custom.tpl.js.map +1 -1
- package/lib/service/type/custom.tpl.ts +4 -4
- package/lib/service/type/knex.tpl.d.ts +1 -1
- package/lib/service/type/knex.tpl.js +6 -11
- package/lib/service/type/knex.tpl.js.map +1 -1
- package/lib/service/type/knex.tpl.ts +4 -4
- package/lib/service/type/mongodb.tpl.d.ts +1 -1
- package/lib/service/type/mongodb.tpl.js +4 -9
- package/lib/service/type/mongodb.tpl.js.map +1 -1
- package/lib/service/type/mongodb.tpl.ts +4 -4
- package/package.json +31 -30
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { renderSource, yyyymmddhhmmss } from '../../commons'
|
|
3
|
-
import { ServiceGeneratorContext } from '../index'
|
|
1
|
+
import { toFile } from '@featherscloud/pinion'
|
|
2
|
+
import { renderSource, yyyymmddhhmmss } from '../../commons.js'
|
|
3
|
+
import { ServiceGeneratorContext } from '../index.js'
|
|
4
4
|
|
|
5
5
|
const migrationTemplate = ({
|
|
6
6
|
kebabPath,
|
|
@@ -85,7 +85,7 @@ export const getOptions = (app: Application): KnexAdapterOptions => {
|
|
|
85
85
|
`
|
|
86
86
|
|
|
87
87
|
export const generate = (ctx: ServiceGeneratorContext) =>
|
|
88
|
-
|
|
88
|
+
Promise.resolve(ctx)
|
|
89
89
|
.then(
|
|
90
90
|
renderSource(
|
|
91
91
|
template,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ServiceGeneratorContext } from '../index';
|
|
1
|
+
import { ServiceGeneratorContext } from '../index.js';
|
|
2
2
|
export declare const template: ({ className, upperName, schema, fileName, kebabPath, relative }: ServiceGeneratorContext) => string;
|
|
3
3
|
export declare const generate: (ctx: ServiceGeneratorContext) => Promise<ServiceGeneratorContext>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const pinion_1 = require("@feathershq/pinion");
|
|
5
|
-
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({ className, upperName, schema, fileName, kebabPath, relative }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/service.class.html#database-services
|
|
1
|
+
import { toFile } from '@featherscloud/pinion';
|
|
2
|
+
import { renderSource } from '../../commons.js';
|
|
3
|
+
export const template = ({ className, upperName, schema, fileName, kebabPath, relative }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/service.class.html#database-services
|
|
7
4
|
import type { Params } from '@feathersjs/feathers'
|
|
8
5
|
import { MongoDBService } from \'@feathersjs/mongodb\'
|
|
9
6
|
import type { MongoDBAdapterParams, MongoDBAdapterOptions } from \'@feathersjs/mongodb\'
|
|
@@ -41,12 +38,10 @@ export const getOptions = (app: Application): MongoDBAdapterOptions => {
|
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
`;
|
|
44
|
-
|
|
45
|
-
const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(exports.template, (0, pinion_1.toFile)(({ lib, folder, fileName }) => [
|
|
41
|
+
export const generate = (ctx) => Promise.resolve(ctx).then(renderSource(template, toFile(({ lib, folder, fileName }) => [
|
|
46
42
|
lib,
|
|
47
43
|
'services',
|
|
48
44
|
...folder,
|
|
49
45
|
`${fileName}.class`
|
|
50
46
|
])));
|
|
51
|
-
exports.generate = generate;
|
|
52
47
|
//# sourceMappingURL=mongodb.tpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACgB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;oCAKJ,QAAQ;EAE1C,MAAM;IACJ,CAAC,CAAC;IACF,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;YACD,QAAQ;CACnB;IACG,CAAC,CAAC;OACC,SAAS;OACT,SAAS;OACT,SAAS;OACT,SAAS;CAEhB;;gBAEgB,SAAS,KAAK,SAAS,SAAS,SAAS,UAAU,SAAS;;mBAEzD,SAAS,uCAAuC,SAAS;;;;eAI7D,SAAS,mCAAmC,SAAS;2BACzC,SAAS,KAAK,SAAS,SAAS,SAAS,WAAW,SAAS;;;;;;gEAMxB,SAAS;;;CAGxE,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAA4B,EAAE,EAAE,CACvD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,YAAY,CACV,QAAQ,EACR,MAAM,CAA0B,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC7D,GAAG;IACH,UAAU;IACV,GAAG,MAAM;IACT,GAAG,QAAQ,QAAQ;CACpB,CAAC,CACH,CACF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { renderSource } from '../../commons'
|
|
3
|
-
import { ServiceGeneratorContext } from '../index'
|
|
1
|
+
import { toFile } from '@featherscloud/pinion'
|
|
2
|
+
import { renderSource } from '../../commons.js'
|
|
3
|
+
import { ServiceGeneratorContext } from '../index.js'
|
|
4
4
|
|
|
5
5
|
export const template = ({
|
|
6
6
|
className,
|
|
@@ -51,7 +51,7 @@ export const getOptions = (app: Application): MongoDBAdapterOptions => {
|
|
|
51
51
|
`
|
|
52
52
|
|
|
53
53
|
export const generate = (ctx: ServiceGeneratorContext) =>
|
|
54
|
-
|
|
54
|
+
Promise.resolve(ctx).then(
|
|
55
55
|
renderSource(
|
|
56
56
|
template,
|
|
57
57
|
toFile<ServiceGeneratorContext>(({ lib, folder, fileName }) => [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/generators",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.15",
|
|
4
4
|
"description": "Feathers CLI core generators, powered by Pinion",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"keywords": [
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">= 16"
|
|
31
31
|
},
|
|
32
|
-
"main": "lib/",
|
|
32
|
+
"main": "lib/index.js",
|
|
33
33
|
"types": "lib/",
|
|
34
|
+
"type": "module",
|
|
34
35
|
"files": [
|
|
35
36
|
"CHANGELOG.md",
|
|
36
37
|
"LICENSE",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"scripts": {
|
|
44
45
|
"prepublish": "npm run compile",
|
|
45
46
|
"compile": "shx rm -rf lib/ && tsc && shx cp -r src/. lib/",
|
|
46
|
-
"test": "npm run compile && mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
|
|
47
|
+
"test": "npm run compile && mocha --config ../../.mocharc.json --require tsx --recursive test/**.test.ts test/**/*.test.ts"
|
|
47
48
|
},
|
|
48
49
|
"directories": {
|
|
49
50
|
"lib": "lib"
|
|
@@ -52,45 +53,45 @@
|
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"chalk": "^
|
|
56
|
+
"@featherscloud/pinion": "^0.5.0",
|
|
57
|
+
"chalk": "^5.3.0",
|
|
57
58
|
"lodash": "^4.17.21",
|
|
58
|
-
"prettier": "^3.
|
|
59
|
+
"prettier": "^3.2.4",
|
|
59
60
|
"typescript": "^5.3.3"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"@feathersjs/adapter-commons": "^5.0.
|
|
63
|
-
"@feathersjs/authentication": "^5.0.
|
|
64
|
-
"@feathersjs/authentication-client": "^5.0.
|
|
65
|
-
"@feathersjs/authentication-local": "^5.0.
|
|
66
|
-
"@feathersjs/authentication-oauth": "^5.0.
|
|
67
|
-
"@feathersjs/configuration": "^5.0.
|
|
68
|
-
"@feathersjs/errors": "^5.0.
|
|
69
|
-
"@feathersjs/express": "^5.0.
|
|
70
|
-
"@feathersjs/feathers": "^5.0.
|
|
71
|
-
"@feathersjs/knex": "^5.0.
|
|
72
|
-
"@feathersjs/koa": "^5.0.
|
|
73
|
-
"@feathersjs/mongodb": "^5.0.
|
|
74
|
-
"@feathersjs/rest-client": "^5.0.
|
|
75
|
-
"@feathersjs/schema": "^5.0.
|
|
76
|
-
"@feathersjs/socketio": "^5.0.
|
|
77
|
-
"@feathersjs/transport-commons": "^5.0.
|
|
78
|
-
"@feathersjs/typebox": "^5.0.
|
|
63
|
+
"@feathersjs/adapter-commons": "^5.0.15",
|
|
64
|
+
"@feathersjs/authentication": "^5.0.15",
|
|
65
|
+
"@feathersjs/authentication-client": "^5.0.15",
|
|
66
|
+
"@feathersjs/authentication-local": "^5.0.15",
|
|
67
|
+
"@feathersjs/authentication-oauth": "^5.0.15",
|
|
68
|
+
"@feathersjs/configuration": "^5.0.15",
|
|
69
|
+
"@feathersjs/errors": "^5.0.15",
|
|
70
|
+
"@feathersjs/express": "^5.0.15",
|
|
71
|
+
"@feathersjs/feathers": "^5.0.15",
|
|
72
|
+
"@feathersjs/knex": "^5.0.15",
|
|
73
|
+
"@feathersjs/koa": "^5.0.15",
|
|
74
|
+
"@feathersjs/mongodb": "^5.0.15",
|
|
75
|
+
"@feathersjs/rest-client": "^5.0.15",
|
|
76
|
+
"@feathersjs/schema": "^5.0.15",
|
|
77
|
+
"@feathersjs/socketio": "^5.0.15",
|
|
78
|
+
"@feathersjs/transport-commons": "^5.0.15",
|
|
79
|
+
"@feathersjs/typebox": "^5.0.15",
|
|
79
80
|
"@types/mocha": "^10.0.6",
|
|
80
|
-
"@types/node": "^20.
|
|
81
|
+
"@types/node": "^20.11.5",
|
|
81
82
|
"@types/prettier": "^2.7.3",
|
|
82
|
-
"axios": "^1.6.
|
|
83
|
+
"axios": "^1.6.5",
|
|
83
84
|
"knex": "^3.1.0",
|
|
84
85
|
"mocha": "^10.2.0",
|
|
85
86
|
"mongodb": "^6.3.0",
|
|
86
|
-
"mssql": "^10.0.
|
|
87
|
+
"mssql": "^10.0.2",
|
|
87
88
|
"mysql": "^2.18.1",
|
|
88
89
|
"pg": "^8.11.3",
|
|
89
90
|
"shx": "^0.3.4",
|
|
90
|
-
"sqlite3": "^5.1.
|
|
91
|
-
"
|
|
92
|
-
"type-fest": "^4.
|
|
91
|
+
"sqlite3": "^5.1.7",
|
|
92
|
+
"tsx": "^4.7.0",
|
|
93
|
+
"type-fest": "^4.9.0",
|
|
93
94
|
"typescript": "^5.3.3"
|
|
94
95
|
},
|
|
95
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "a39910e534c5685aa9093b395ca1625ee8b187a6"
|
|
96
97
|
}
|