@feathersjs/cli 5.0.0-pre.32 → 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 +26 -0
- package/LICENSE +1 -2
- package/README.md +3 -7
- 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 +13 -7
- package/lib/app/templates/logger.tpl.js.map +1 -1
- package/lib/app/templates/logger.tpl.ts +22 -10
- 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 +2 -2
- package/lib/connection/index.js.map +1 -1
- package/lib/connection/index.ts +2 -2
- 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 +3 -2
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +4 -2
- 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 +27 -25
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knex.tpl.js","sourceRoot":"","sources":["../../../src/service/type/knex.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,iBAAiB,GAAG,CAAC,EACzB,SAAS,EACe,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"knex.tpl.js","sourceRoot":"","sources":["../../../src/service/type/knex.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,iBAAiB,GAAG,CAAC,EACzB,SAAS,EACe,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;mCAIL,SAAS;;;;;;;iCAOX,SAAS;;CAEzC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,EACvB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,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;cACQ,SAAS;cACT,SAAS;cACT,SAAS;cACT,SAAS;CAEvB;;mBAEmB,SAAS,oCAAoC,SAAS;;;;eAI1D,SAAS,mCAAmC,SAAS;wBAC5C,SAAS,KAAK,SAAS,wBAAwB,SAAS;;;;;;sBAM1D,QAAQ,CAAC,QAAQ;aAC1B,QAAQ;;;CAGpB,CAAA;AA7CY,QAAA,QAAQ,YA6CpB;AAEM,MAAM,QAAQ,GAAG,CAAC,GAA4B,EAAE,EAAE,CACvD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CACH,IAAA,sBAAY,EACV,gBAAQ,EACR,IAAA,eAAM,EAA0B,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;KACA,IAAI,CACH,IAAA,sBAAY,EACV,iBAAiB,EACjB,IAAA,eAAM,EAA0B,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC9D,+EAA+E;IAC/E,MAAM,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAElF,OAAO,GAAG,aAAa,IAAI,SAAS,EAAE,CAAA;AACxC,CAAC,CAAC,CACH,CACF,CAAA;AAvBQ,QAAA,QAAQ,YAuBhB"}
|
|
@@ -4,7 +4,8 @@ import { ServiceGeneratorContext } from '../index'
|
|
|
4
4
|
|
|
5
5
|
const migrationTemplate = ({
|
|
6
6
|
kebabPath
|
|
7
|
-
}: ServiceGeneratorContext) => /* ts */
|
|
7
|
+
}: ServiceGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/knexfile.html
|
|
8
|
+
import type { Knex } from 'knex'
|
|
8
9
|
|
|
9
10
|
export async function up(knex: Knex): Promise<void> {
|
|
10
11
|
await knex.schema.createTable('${kebabPath}', table => {
|
|
@@ -25,7 +26,8 @@ export const template = ({
|
|
|
25
26
|
schema,
|
|
26
27
|
fileName,
|
|
27
28
|
relative
|
|
28
|
-
}: ServiceGeneratorContext) => /* ts */
|
|
29
|
+
}: ServiceGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/service.class.html#database-services
|
|
30
|
+
import type { Params } from '@feathersjs/feathers'
|
|
29
31
|
import { KnexService } from '@feathersjs/knex'
|
|
30
32
|
import type { KnexAdapterParams, KnexAdapterOptions } from '@feathersjs/knex'
|
|
31
33
|
|
|
@@ -35,12 +37,14 @@ ${
|
|
|
35
37
|
? `import type {
|
|
36
38
|
${upperName},
|
|
37
39
|
${upperName}Data,
|
|
40
|
+
${upperName}Patch,
|
|
38
41
|
${upperName}Query
|
|
39
42
|
} from './${fileName}.schema'
|
|
40
43
|
`
|
|
41
44
|
: `
|
|
42
45
|
export type ${upperName} = any
|
|
43
46
|
export type ${upperName}Data = any
|
|
47
|
+
export type ${upperName}Patch = any
|
|
44
48
|
export type ${upperName}Query = any
|
|
45
49
|
`
|
|
46
50
|
}
|
|
@@ -50,7 +54,7 @@ export interface ${upperName}Params extends KnexAdapterParams<${upperName}Query>
|
|
|
50
54
|
|
|
51
55
|
// By default calls the standard Knex adapter service methods but can be customized with your own functionality.
|
|
52
56
|
export class ${className}<ServiceParams extends Params = ${upperName}Params>
|
|
53
|
-
extends KnexService<${upperName}, ${upperName}Data, ServiceParams> {
|
|
57
|
+
extends KnexService<${upperName}, ${upperName}Data, ServiceParams, ${upperName}Patch> {
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
export const getOptions = (app: Application): KnexAdapterOptions => {
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = exports.template = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const template = ({ className, upperName, schema, fileName, kebabPath, relative }) => /* ts */
|
|
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
|
|
7
|
+
import type { Params } from '@feathersjs/feathers'
|
|
7
8
|
import { MongoDBService } from \'@feathersjs/mongodb\'
|
|
8
9
|
import type { MongoDBAdapterParams, MongoDBAdapterOptions } from \'@feathersjs/mongodb\'
|
|
9
10
|
|
|
@@ -12,12 +13,14 @@ ${schema
|
|
|
12
13
|
? `import type {
|
|
13
14
|
${upperName},
|
|
14
15
|
${upperName}Data,
|
|
16
|
+
${upperName}Patch,
|
|
15
17
|
${upperName}Query
|
|
16
18
|
} from './${fileName}.schema'
|
|
17
19
|
`
|
|
18
20
|
: `
|
|
19
21
|
export type ${upperName} = any
|
|
20
22
|
export type ${upperName}Data = any
|
|
23
|
+
export type ${upperName}Patch = any
|
|
21
24
|
export type ${upperName}Query = any
|
|
22
25
|
`}
|
|
23
26
|
|
|
@@ -26,7 +29,7 @@ export interface ${upperName}Params extends MongoDBAdapterParams<${upperName}Que
|
|
|
26
29
|
|
|
27
30
|
// By default calls the standard MongoDB adapter service methods but can be customized with your own functionality.
|
|
28
31
|
export class ${className}<ServiceParams extends Params = ${upperName}Params>
|
|
29
|
-
extends MongoDBService<${upperName}, ${upperName}Data, ServiceParams> {
|
|
32
|
+
extends MongoDBService<${upperName}, ${upperName}Data, ServiceParams, ${upperName}Patch> {
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
export const getOptions = (app: Application): MongoDBAdapterOptions => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAGrC,MAAM,QAAQ,GAAG,CAAC,EACvB,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACgB,EAAE,EAAE,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"mongodb.tpl.js","sourceRoot":"","sources":["../../../src/service/type/mongodb.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAGrC,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;cACQ,SAAS;cACT,SAAS;cACT,SAAS;cACT,SAAS;CAEvB;;mBAEmB,SAAS,uCAAuC,SAAS;;;;eAI7D,SAAS,mCAAmC,SAAS;2BACzC,SAAS,KAAK,SAAS,wBAAwB,SAAS;;;;;;gEAMnB,SAAS;;;CAGxE,CAAA;AA5CY,QAAA,QAAQ,YA4CpB;AAEM,MAAM,QAAQ,GAAG,CAAC,GAA4B,EAAE,EAAE,CACvD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,gBAAQ,EACR,IAAA,eAAM,EAA0B,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;AAXU,QAAA,QAAQ,YAWlB"}
|
|
@@ -9,7 +9,8 @@ export const template = ({
|
|
|
9
9
|
fileName,
|
|
10
10
|
kebabPath,
|
|
11
11
|
relative
|
|
12
|
-
}: ServiceGeneratorContext) => /* ts */
|
|
12
|
+
}: ServiceGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/service.class.html#database-services
|
|
13
|
+
import type { Params } from '@feathersjs/feathers'
|
|
13
14
|
import { MongoDBService } from \'@feathersjs/mongodb\'
|
|
14
15
|
import type { MongoDBAdapterParams, MongoDBAdapterOptions } from \'@feathersjs/mongodb\'
|
|
15
16
|
|
|
@@ -19,12 +20,14 @@ ${
|
|
|
19
20
|
? `import type {
|
|
20
21
|
${upperName},
|
|
21
22
|
${upperName}Data,
|
|
23
|
+
${upperName}Patch,
|
|
22
24
|
${upperName}Query
|
|
23
25
|
} from './${fileName}.schema'
|
|
24
26
|
`
|
|
25
27
|
: `
|
|
26
28
|
export type ${upperName} = any
|
|
27
29
|
export type ${upperName}Data = any
|
|
30
|
+
export type ${upperName}Patch = any
|
|
28
31
|
export type ${upperName}Query = any
|
|
29
32
|
`
|
|
30
33
|
}
|
|
@@ -34,7 +37,7 @@ export interface ${upperName}Params extends MongoDBAdapterParams<${upperName}Que
|
|
|
34
37
|
|
|
35
38
|
// By default calls the standard MongoDB adapter service methods but can be customized with your own functionality.
|
|
36
39
|
export class ${className}<ServiceParams extends Params = ${upperName}Params>
|
|
37
|
-
extends MongoDBService<${upperName}, ${upperName}Data, ServiceParams> {
|
|
40
|
+
extends MongoDBService<${upperName}, ${upperName}Data, ServiceParams, ${upperName}Patch> {
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
export const getOptions = (app: Application): MongoDBAdapterOptions => {
|
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": "^
|
|
81
|
-
"mocha": "^10.
|
|
82
|
+
"axios": "^1.2.0",
|
|
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
|
-
)
|