@feathersjs/generators 5.0.0-pre.37 → 5.0.0-pre.38
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 +7 -0
- package/README.md +0 -1
- package/lib/app/index.d.ts +38 -5
- package/lib/app/index.js +11 -21
- package/lib/app/index.js.map +1 -1
- package/lib/app/index.ts +18 -41
- package/lib/app/templates/app.tpl.js +10 -9
- package/lib/app/templates/app.tpl.js.map +1 -1
- package/lib/app/templates/app.tpl.ts +12 -9
- package/lib/app/templates/channels.tpl.js +1 -6
- package/lib/app/templates/channels.tpl.js.map +1 -1
- package/lib/app/templates/channels.tpl.ts +7 -9
- package/lib/app/templates/client.test.tpl.js +1 -1
- package/lib/app/templates/client.test.tpl.js.map +1 -1
- package/lib/app/templates/client.test.tpl.ts +4 -2
- package/lib/app/templates/client.tpl.js +1 -1
- package/lib/app/templates/client.tpl.js.map +1 -1
- package/lib/app/templates/client.tpl.ts +7 -4
- package/lib/app/templates/configuration.tpl.js +7 -4
- package/lib/app/templates/configuration.tpl.js.map +1 -1
- package/lib/app/templates/configuration.tpl.ts +14 -8
- package/lib/app/templates/declarations.tpl.js +4 -2
- package/lib/app/templates/declarations.tpl.js.map +1 -1
- package/lib/app/templates/declarations.tpl.ts +7 -2
- package/lib/app/templates/package.json.tpl.js +9 -3
- package/lib/app/templates/package.json.tpl.js.map +1 -1
- package/lib/app/templates/package.json.tpl.ts +9 -2
- package/lib/authentication/index.d.ts +3 -38
- package/lib/authentication/index.js +8 -23
- package/lib/authentication/index.js.map +1 -1
- package/lib/authentication/index.ts +58 -75
- package/lib/authentication/templates/authentication.tpl.js +4 -4
- 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 +5 -5
- package/lib/authentication/templates/client.test.tpl.js.map +1 -1
- package/lib/authentication/templates/client.test.tpl.ts +11 -7
- package/lib/commons.d.ts +19 -3
- package/lib/commons.js +19 -1
- package/lib/commons.js.map +1 -1
- package/lib/commons.ts +24 -3
- package/lib/connection/index.d.ts +3 -20
- package/lib/connection/index.js +13 -10
- package/lib/connection/index.js.map +1 -1
- package/lib/connection/index.ts +58 -50
- package/lib/connection/templates/knex.tpl.js +10 -1
- package/lib/connection/templates/knex.tpl.js.map +1 -1
- package/lib/connection/templates/knex.tpl.ts +6 -0
- package/lib/connection/templates/mongodb.tpl.js +8 -8
- package/lib/connection/templates/mongodb.tpl.js.map +1 -1
- package/lib/connection/templates/mongodb.tpl.ts +11 -9
- package/lib/service/index.d.ts +4 -0
- package/lib/service/index.js +82 -73
- package/lib/service/index.js.map +1 -1
- package/lib/service/index.ts +94 -74
- package/lib/service/templates/client.tpl.js +2 -3
- package/lib/service/templates/client.tpl.js.map +1 -1
- package/lib/service/templates/client.tpl.ts +14 -14
- package/lib/service/templates/schema.json.tpl.js +43 -22
- package/lib/service/templates/schema.json.tpl.js.map +1 -1
- package/lib/service/templates/schema.json.tpl.ts +56 -22
- package/lib/service/templates/schema.typebox.tpl.js +46 -11
- package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
- package/lib/service/templates/schema.typebox.tpl.ts +63 -11
- package/lib/service/templates/service.tpl.d.ts +1 -1
- package/lib/service/templates/service.tpl.js +6 -2
- package/lib/service/templates/service.tpl.js.map +1 -1
- package/lib/service/templates/service.tpl.ts +11 -2
- package/lib/service/templates/shared.tpl.js +2 -2
- package/lib/service/templates/shared.tpl.js.map +1 -1
- package/lib/service/templates/shared.tpl.ts +13 -10
- package/lib/service/type/custom.tpl.js +1 -1
- package/lib/service/type/custom.tpl.js.map +1 -1
- package/lib/service/type/custom.tpl.ts +1 -1
- package/lib/service/type/knex.tpl.js +13 -3
- package/lib/service/type/knex.tpl.js.map +1 -1
- package/lib/service/type/knex.tpl.ts +19 -3
- package/lib/service/type/mongodb.tpl.js +1 -1
- package/lib/service/type/mongodb.tpl.js.map +1 -1
- package/lib/service/type/mongodb.tpl.ts +1 -1
- package/package.json +23 -23
- package/lib/authentication/templates/knex.tpl.d.ts +0 -2
- package/lib/authentication/templates/knex.tpl.js +0 -37
- package/lib/authentication/templates/knex.tpl.js.map +0 -1
- package/lib/authentication/templates/knex.tpl.ts +0 -56
- package/lib/authentication/templates/schema.json.tpl.d.ts +0 -2
- package/lib/authentication/templates/schema.json.tpl.js +0 -109
- package/lib/authentication/templates/schema.json.tpl.js.map +0 -1
- package/lib/authentication/templates/schema.json.tpl.ts +0 -132
- package/lib/authentication/templates/schema.typebox.tpl.d.ts +0 -3
- package/lib/authentication/templates/schema.typebox.tpl.js +0 -87
- package/lib/authentication/templates/schema.typebox.tpl.js.map +0 -1
- package/lib/authentication/templates/schema.typebox.tpl.ts +0 -109
package/lib/service/index.js
CHANGED
|
@@ -7,86 +7,94 @@ exports.generate = void 0;
|
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const pinion_1 = require("@feathershq/pinion");
|
|
9
9
|
const commons_1 = require("../commons");
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
11
|
const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
11
12
|
.then((0, commons_1.initializeBaseContext)())
|
|
12
13
|
.then((0, commons_1.checkPreconditions)())
|
|
13
|
-
.then((0, pinion_1.prompt)(({ name, path, type, schema, authentication, isEntityService, feathers }) =>
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
.then((0, pinion_1.prompt)(({ name, path, type, schema, authentication, isEntityService, feathers, lib, language }) => {
|
|
15
|
+
const sqlDisabled = commons_1.DATABASE_TYPES.every((name) => name === 'mongodb' || name === 'other' || !(0, commons_1.fileExists)(lib, `${name}.${language}`));
|
|
16
|
+
const mongodbDisabled = !(0, commons_1.fileExists)(lib, `mongodb.${language}`);
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
name: 'name',
|
|
20
|
+
type: 'input',
|
|
21
|
+
when: !name,
|
|
22
|
+
message: 'What is the name of your service?',
|
|
23
|
+
validate: (input) => {
|
|
24
|
+
if (!input || input === 'authentication') {
|
|
25
|
+
return 'Invalid service name';
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'path',
|
|
32
|
+
type: 'input',
|
|
33
|
+
when: !path,
|
|
34
|
+
message: 'Which path should the service be registered on?',
|
|
35
|
+
default: (answers) => `${lodash_1.default.kebabCase(answers.name)}`,
|
|
36
|
+
validate: (input) => {
|
|
37
|
+
if (!input || input === 'authentication') {
|
|
38
|
+
return 'Invalid service path';
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
35
41
|
}
|
|
36
|
-
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'authentication',
|
|
45
|
+
type: 'confirm',
|
|
46
|
+
when: authentication === undefined && !isEntityService,
|
|
47
|
+
message: 'Does this service require authentication?'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'type',
|
|
51
|
+
type: 'list',
|
|
52
|
+
when: !type,
|
|
53
|
+
message: 'What database is the service using?',
|
|
54
|
+
default: (0, commons_1.getDatabaseAdapter)(feathers === null || feathers === void 0 ? void 0 : feathers.database),
|
|
55
|
+
choices: [
|
|
56
|
+
{
|
|
57
|
+
value: 'knex',
|
|
58
|
+
name: `SQL${sqlDisabled ? chalk_1.default.gray(' (connection not available)') : ''}`,
|
|
59
|
+
disabled: sqlDisabled
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: 'mongodb',
|
|
63
|
+
name: `MongoDB${mongodbDisabled ? chalk_1.default.gray(' (connection not available)') : ''}`,
|
|
64
|
+
disabled: mongodbDisabled
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: 'custom',
|
|
68
|
+
name: 'A custom service'
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'schema',
|
|
74
|
+
type: 'list',
|
|
75
|
+
when: schema === undefined,
|
|
76
|
+
message: 'Which schema definition format do you want to use?',
|
|
77
|
+
suffix: chalk_1.default.grey(' Schemas allow to type, validate, secure and populate data'),
|
|
78
|
+
default: feathers === null || feathers === void 0 ? void 0 : feathers.schema,
|
|
79
|
+
choices: (answers) => [
|
|
80
|
+
{
|
|
81
|
+
value: 'typebox',
|
|
82
|
+
name: `TypeBox ${chalk_1.default.gray(' (recommended)')}`
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: 'json',
|
|
86
|
+
name: 'JSON schema'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: false,
|
|
90
|
+
name: `No schema${answers.type !== 'custom' ? chalk_1.default.gray(' (not recommended with a database)') : ''}`
|
|
91
|
+
}
|
|
92
|
+
]
|
|
37
93
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
name: 'authentication',
|
|
41
|
-
type: 'confirm',
|
|
42
|
-
when: authentication === undefined && !isEntityService,
|
|
43
|
-
message: 'Does this service require authentication?'
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'type',
|
|
47
|
-
type: 'list',
|
|
48
|
-
when: !type,
|
|
49
|
-
message: 'What kind of service is it?',
|
|
50
|
-
default: (0, commons_1.getDatabaseAdapter)(feathers === null || feathers === void 0 ? void 0 : feathers.database),
|
|
51
|
-
choices: [
|
|
52
|
-
{
|
|
53
|
-
value: 'knex',
|
|
54
|
-
name: 'SQL'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
value: 'mongodb',
|
|
58
|
-
name: 'MongoDB'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: 'custom',
|
|
62
|
-
name: 'A custom service'
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: 'schema',
|
|
68
|
-
type: 'list',
|
|
69
|
-
when: schema === undefined,
|
|
70
|
-
message: 'Which schema definition format do you want to use?',
|
|
71
|
-
default: feathers === null || feathers === void 0 ? void 0 : feathers.schema,
|
|
72
|
-
choices: [
|
|
73
|
-
{
|
|
74
|
-
value: 'typebox',
|
|
75
|
-
name: 'TypeBox'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
value: 'json',
|
|
79
|
-
name: 'JSON schema'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
value: false,
|
|
83
|
-
name: 'No schema'
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
]))
|
|
94
|
+
];
|
|
95
|
+
}))
|
|
88
96
|
.then(async (ctx) => {
|
|
89
|
-
const { name, path, type } = ctx;
|
|
97
|
+
const { name, path, type, authStrategies = [] } = ctx;
|
|
90
98
|
const kebabName = lodash_1.default.kebabCase(name);
|
|
91
99
|
const camelName = lodash_1.default.camelCase(name);
|
|
92
100
|
const upperName = lodash_1.default.upperFirst(camelName);
|
|
@@ -107,6 +115,7 @@ const generate = (ctx) => (0, pinion_1.generator)(ctx)
|
|
|
107
115
|
camelName,
|
|
108
116
|
kebabPath,
|
|
109
117
|
relative,
|
|
118
|
+
authStrategies,
|
|
110
119
|
...ctx
|
|
111
120
|
};
|
|
112
121
|
})
|
package/lib/service/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,+CAAmF;AAEnF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,+C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L,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,MAAM;QACN,QAAQ;QACR,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,QAAQ;QACR,cAAc;QACd,GAAG,GAAG;KACP,CAAA;AACH,CAAC,CAAC;KACD,IAAI,CAAC,IAAA,sBAAa,EAA0B,SAAS,EAAE,WAAW,CAAC,CAAC;KACpE,IAAI,CAAC,IAAA,qBAAY,EAA0B,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAA;AA9HnF,QAAA,QAAQ,YA8H2E"}
|
package/lib/service/index.ts
CHANGED
|
@@ -3,10 +3,13 @@ import { generator, runGenerator, runGenerators, prompt } from '@feathershq/pini
|
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
checkPreconditions,
|
|
6
|
+
DATABASE_TYPES,
|
|
6
7
|
FeathersBaseContext,
|
|
8
|
+
fileExists,
|
|
7
9
|
getDatabaseAdapter,
|
|
8
10
|
initializeBaseContext
|
|
9
11
|
} from '../commons'
|
|
12
|
+
import chalk from 'chalk'
|
|
10
13
|
|
|
11
14
|
export interface ServiceGeneratorContext extends FeathersBaseContext {
|
|
12
15
|
/**
|
|
@@ -65,6 +68,10 @@ export interface ServiceGeneratorContext extends FeathersBaseContext {
|
|
|
65
68
|
* Set to true if this service is for an authentication entity
|
|
66
69
|
*/
|
|
67
70
|
isEntityService?: boolean
|
|
71
|
+
/**
|
|
72
|
+
* The authentication strategies (if it is an entity service)
|
|
73
|
+
*/
|
|
74
|
+
authStrategies: string[]
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
/**
|
|
@@ -81,87 +88,99 @@ export const generate = (ctx: ServiceGeneratorArguments) =>
|
|
|
81
88
|
.then(checkPreconditions())
|
|
82
89
|
.then(
|
|
83
90
|
prompt<ServiceGeneratorArguments, ServiceGeneratorContext>(
|
|
84
|
-
({ name, path, type, schema, authentication, isEntityService, feathers }) =>
|
|
85
|
-
|
|
86
|
-
name
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
message: 'What is the name of your service?',
|
|
90
|
-
validate: (input) => {
|
|
91
|
-
if (!input || input === 'authentication') {
|
|
92
|
-
return 'Invalid service name'
|
|
93
|
-
}
|
|
91
|
+
({ name, path, type, schema, authentication, isEntityService, feathers, lib, language }) => {
|
|
92
|
+
const sqlDisabled = DATABASE_TYPES.every(
|
|
93
|
+
(name) => name === 'mongodb' || name === 'other' || !fileExists(lib, `${name}.${language}`)
|
|
94
|
+
)
|
|
95
|
+
const mongodbDisabled = !fileExists(lib, `mongodb.${language}`)
|
|
94
96
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (!input || input === 'authentication') {
|
|
106
|
-
return 'Invalid service path'
|
|
107
|
-
}
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
name: 'name',
|
|
100
|
+
type: 'input',
|
|
101
|
+
when: !name,
|
|
102
|
+
message: 'What is the name of your service?',
|
|
103
|
+
validate: (input) => {
|
|
104
|
+
if (!input || input === 'authentication') {
|
|
105
|
+
return 'Invalid service name'
|
|
106
|
+
}
|
|
108
107
|
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'authentication',
|
|
114
|
-
type: 'confirm',
|
|
115
|
-
when: authentication === undefined && !isEntityService,
|
|
116
|
-
message: 'Does this service require authentication?'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: 'type',
|
|
120
|
-
type: 'list',
|
|
121
|
-
when: !type,
|
|
122
|
-
message: 'What kind of service is it?',
|
|
123
|
-
default: getDatabaseAdapter(feathers?.database),
|
|
124
|
-
choices: [
|
|
125
|
-
{
|
|
126
|
-
value: 'knex',
|
|
127
|
-
name: 'SQL'
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
value: 'mongodb',
|
|
131
|
-
name: 'MongoDB'
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
value: 'custom',
|
|
135
|
-
name: 'A custom service'
|
|
108
|
+
return true
|
|
136
109
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
{
|
|
151
|
-
value: 'json',
|
|
152
|
-
name: 'JSON schema'
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
value: false,
|
|
156
|
-
name: 'No schema'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'path',
|
|
113
|
+
type: 'input',
|
|
114
|
+
when: !path,
|
|
115
|
+
message: 'Which path should the service be registered on?',
|
|
116
|
+
default: (answers: ServiceGeneratorArguments) => `${_.kebabCase(answers.name)}`,
|
|
117
|
+
validate: (input) => {
|
|
118
|
+
if (!input || input === 'authentication') {
|
|
119
|
+
return 'Invalid service path'
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return true
|
|
157
123
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'authentication',
|
|
127
|
+
type: 'confirm',
|
|
128
|
+
when: authentication === undefined && !isEntityService,
|
|
129
|
+
message: 'Does this service require authentication?'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'type',
|
|
133
|
+
type: 'list',
|
|
134
|
+
when: !type,
|
|
135
|
+
message: 'What database is the service using?',
|
|
136
|
+
default: getDatabaseAdapter(feathers?.database),
|
|
137
|
+
choices: [
|
|
138
|
+
{
|
|
139
|
+
value: 'knex',
|
|
140
|
+
name: `SQL${sqlDisabled ? chalk.gray(' (connection not available)') : ''}`,
|
|
141
|
+
disabled: sqlDisabled
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
value: 'mongodb',
|
|
145
|
+
name: `MongoDB${mongodbDisabled ? chalk.gray(' (connection not available)') : ''}`,
|
|
146
|
+
disabled: mongodbDisabled
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
value: 'custom',
|
|
150
|
+
name: 'A custom service'
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'schema',
|
|
156
|
+
type: 'list',
|
|
157
|
+
when: schema === undefined,
|
|
158
|
+
message: 'Which schema definition format do you want to use?',
|
|
159
|
+
suffix: chalk.grey(' Schemas allow to type, validate, secure and populate data'),
|
|
160
|
+
default: feathers?.schema,
|
|
161
|
+
choices: (answers: ServiceGeneratorContext) => [
|
|
162
|
+
{
|
|
163
|
+
value: 'typebox',
|
|
164
|
+
name: `TypeBox ${chalk.gray(' (recommended)')}`
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
value: 'json',
|
|
168
|
+
name: 'JSON schema'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
value: false,
|
|
172
|
+
name: `No schema${
|
|
173
|
+
answers.type !== 'custom' ? chalk.gray(' (not recommended with a database)') : ''
|
|
174
|
+
}`
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
161
180
|
)
|
|
162
181
|
)
|
|
163
182
|
.then(async (ctx): Promise<ServiceGeneratorContext> => {
|
|
164
|
-
const { name, path, type } = ctx
|
|
183
|
+
const { name, path, type, authStrategies = [] } = ctx
|
|
165
184
|
const kebabName = _.kebabCase(name)
|
|
166
185
|
const camelName = _.camelCase(name)
|
|
167
186
|
const upperName = _.upperFirst(camelName)
|
|
@@ -184,6 +203,7 @@ export const generate = (ctx: ServiceGeneratorArguments) =>
|
|
|
184
203
|
camelName,
|
|
185
204
|
kebabPath,
|
|
186
205
|
relative,
|
|
206
|
+
authStrategies,
|
|
187
207
|
...ctx
|
|
188
208
|
}
|
|
189
209
|
})
|
|
@@ -14,8 +14,7 @@ export type {
|
|
|
14
14
|
`;
|
|
15
15
|
const registrationTemplate = ({ camelName }) => ` client.configure(${camelName}Client)`;
|
|
16
16
|
const toClientFile = (0, pinion_1.toFile)(({ lib }) => [lib, 'client']);
|
|
17
|
-
const generate = async (ctx) => (0, pinion_1.generator)(ctx)
|
|
18
|
-
.then((0, commons_1.injectSource)(registrationTemplate, (0, pinion_1.before)('return client'), toClientFile))
|
|
19
|
-
.then((0, commons_1.injectSource)(importTemplate, (0, pinion_1.after)(({ language }) => language === 'ts' ? 'import type { AuthenticationClientOptions }' : 'import authenticationClient'), toClientFile));
|
|
17
|
+
const generate = async (ctx) => (0, pinion_1.generator)(ctx);
|
|
20
18
|
exports.generate = generate;
|
|
19
|
+
(0, pinion_1.when)(({ lib, language }) => (0, commons_1.fileExists)(lib, `client.${language}`), (0, commons_1.injectSource)(registrationTemplate, (0, pinion_1.before)('return client'), toClientFile), (0, commons_1.injectSource)(importTemplate, (0, pinion_1.after)(({ language }) => language === 'ts' ? 'import type { AuthenticationClientOptions }' : 'import authenticationClient'), toClientFile));
|
|
21
20
|
//# sourceMappingURL=client.tpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/service/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/service/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA2E;AAC3E,2CAAwD;AAGxD,MAAM,cAAc,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAA2B,EAAE,EAAE,CAAC,QAAQ,CAAC;WAC9F,SAAS,6BAA6B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ;;IAEzE,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;qBACQ,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ;CAChD,CAAA;AAED,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAA2B,EAAE,EAAE,CACtE,sBAAsB,SAAS,SAAS,CAAA;AAE1C,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,CAAC,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAA;AAAjE,QAAA,QAAQ,YAAyD;AAC9E,IAAA,aAAI,EACF,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,oBAAU,EAAC,GAAG,EAAE,UAAU,QAAQ,EAAE,CAAC,EAC5D,IAAA,sBAAY,EAAC,oBAAoB,EAAE,IAAA,eAAM,EAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EACzE,IAAA,sBAAY,EACV,cAAc,EACd,IAAA,cAAK,EAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC9C,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,6CAA6C,CAAC,CAAC,CAAC,6BAA6B,CAClG,EACD,YAAY,CACb,CACF,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generator, toFile, after, before } from '@feathershq/pinion'
|
|
2
|
-
import { injectSource } from '../../commons'
|
|
1
|
+
import { generator, toFile, after, before, when } from '@feathershq/pinion'
|
|
2
|
+
import { fileExists, injectSource } from '../../commons'
|
|
3
3
|
import { ServiceGeneratorContext } from '../index'
|
|
4
4
|
|
|
5
5
|
const importTemplate = ({ upperName, folder, fileName, camelName }: ServiceGeneratorContext) => /* ts */ `
|
|
@@ -17,15 +17,15 @@ const registrationTemplate = ({ camelName }: ServiceGeneratorContext) =>
|
|
|
17
17
|
|
|
18
18
|
const toClientFile = toFile<ServiceGeneratorContext>(({ lib }) => [lib, 'client'])
|
|
19
19
|
|
|
20
|
-
export const generate = async (ctx: ServiceGeneratorContext) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
export const generate = async (ctx: ServiceGeneratorContext) => generator(ctx)
|
|
21
|
+
when<ServiceGeneratorContext>(
|
|
22
|
+
({ lib, language }) => fileExists(lib, `client.${language}`),
|
|
23
|
+
injectSource(registrationTemplate, before('return client'), toClientFile),
|
|
24
|
+
injectSource(
|
|
25
|
+
importTemplate,
|
|
26
|
+
after<ServiceGeneratorContext>(({ language }) =>
|
|
27
|
+
language === 'ts' ? 'import type { AuthenticationClientOptions }' : 'import authenticationClient'
|
|
28
|
+
),
|
|
29
|
+
toClientFile
|
|
30
|
+
)
|
|
31
|
+
)
|
|
@@ -3,9 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.generate = void 0;
|
|
4
4
|
const pinion_1 = require("@feathershq/pinion");
|
|
5
5
|
const commons_1 = require("../../commons");
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const authFieldsTemplate = (authStrategies) => authStrategies
|
|
7
|
+
.map((name) => name === 'local'
|
|
8
|
+
? ` email: { type: 'string' },
|
|
9
|
+
password: { type: 'string' }`
|
|
10
|
+
: ` ${name}Id: { type: 'string' }`)
|
|
11
|
+
.join(',\n');
|
|
12
|
+
const template = ({ camelName, upperName, relative, authStrategies, isEntityService, type, cwd, lib }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/service.schemas.html
|
|
13
|
+
import { resolve, getValidator, querySyntax } from '@feathersjs/schema'${type === 'mongodb'
|
|
14
|
+
? `
|
|
15
|
+
import { ObjectIdSchema } from '@feathersjs/schema'`
|
|
16
|
+
: ''}
|
|
8
17
|
import type { FromSchema } from '@feathersjs/schema'
|
|
18
|
+
${(0, commons_1.localTemplate)(authStrategies, `import { passwordHash } from '@feathersjs/authentication-local'`)}
|
|
9
19
|
|
|
10
20
|
import type { HookContext } from '${relative}/declarations'
|
|
11
21
|
import { dataValidator, queryValidator } from '${relative}/${(0, commons_1.fileExists)(cwd, lib, 'schemas') ? 'schemas/' : '' // This is for legacy backwards compatibility
|
|
@@ -16,42 +26,39 @@ export const ${camelName}Schema = {
|
|
|
16
26
|
$id: '${upperName}',
|
|
17
27
|
type: 'object',
|
|
18
28
|
additionalProperties: false,
|
|
19
|
-
required: [ '${type === 'mongodb' ? '_id' : 'id'}', 'text' ],
|
|
29
|
+
required: [ '${type === 'mongodb' ? '_id' : 'id'}', ${(0, commons_1.localTemplate)(authStrategies, `'email'`, `'text'`)} ],
|
|
20
30
|
properties: {
|
|
21
|
-
${type === 'mongodb'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
: `id: {
|
|
27
|
-
type: 'number'
|
|
28
|
-
},`}
|
|
29
|
-
text: {
|
|
30
|
-
type: 'string'
|
|
31
|
-
}
|
|
31
|
+
${type === 'mongodb' ? `_id: ObjectIdSchema(),` : `id: { type: 'number' },`}
|
|
32
|
+
${isEntityService
|
|
33
|
+
? authFieldsTemplate(authStrategies)
|
|
34
|
+
: `
|
|
35
|
+
text: { type: 'string' }`}
|
|
32
36
|
}
|
|
33
37
|
} as const
|
|
34
38
|
export type ${upperName} = FromSchema<typeof ${camelName}Schema>
|
|
35
39
|
export const ${camelName}Validator = getValidator(${camelName}Schema, dataValidator)
|
|
36
40
|
export const ${camelName}Resolver = resolve<${upperName}, HookContext>({})
|
|
37
41
|
|
|
38
|
-
export const ${camelName}ExternalResolver = resolve<${upperName}, HookContext>({
|
|
42
|
+
export const ${camelName}ExternalResolver = resolve<${upperName}, HookContext>({
|
|
43
|
+
${(0, commons_1.localTemplate)(authStrategies, `// The password should never be visible externally
|
|
44
|
+
password: async () => undefined`)}
|
|
45
|
+
})
|
|
39
46
|
|
|
40
47
|
// Schema for creating new data
|
|
41
48
|
export const ${camelName}DataSchema = {
|
|
42
49
|
$id: '${upperName}Data',
|
|
43
50
|
type: 'object',
|
|
44
51
|
additionalProperties: false,
|
|
45
|
-
required: [ 'text' ],
|
|
52
|
+
required: [ ${(0, commons_1.localTemplate)(authStrategies, `'email'`, `'text'`)} ],
|
|
46
53
|
properties: {
|
|
47
|
-
|
|
48
|
-
type: 'string'
|
|
49
|
-
}
|
|
54
|
+
...${camelName}Schema.properties
|
|
50
55
|
}
|
|
51
56
|
} as const
|
|
52
57
|
export type ${upperName}Data = FromSchema<typeof ${camelName}DataSchema>
|
|
53
58
|
export const ${camelName}DataValidator = getValidator(${camelName}DataSchema, dataValidator)
|
|
54
|
-
export const ${camelName}DataResolver = resolve<${upperName}Data, HookContext>({
|
|
59
|
+
export const ${camelName}DataResolver = resolve<${upperName}Data, HookContext>({
|
|
60
|
+
${(0, commons_1.localTemplate)(authStrategies, `password: passwordHash({ strategy: 'local' })`)}
|
|
61
|
+
})
|
|
55
62
|
|
|
56
63
|
// Schema for updating existing data
|
|
57
64
|
export const ${camelName}PatchSchema = {
|
|
@@ -65,7 +72,9 @@ export const ${camelName}PatchSchema = {
|
|
|
65
72
|
} as const
|
|
66
73
|
export type ${upperName}Patch = FromSchema<typeof ${camelName}PatchSchema>
|
|
67
74
|
export const ${camelName}PatchValidator = getValidator(${camelName}PatchSchema, dataValidator)
|
|
68
|
-
export const ${camelName}PatchResolver = resolve<${upperName}Patch, HookContext>({
|
|
75
|
+
export const ${camelName}PatchResolver = resolve<${upperName}Patch, HookContext>({
|
|
76
|
+
${(0, commons_1.localTemplate)(authStrategies, `password: passwordHash({ strategy: 'local' })`)}
|
|
77
|
+
})
|
|
69
78
|
|
|
70
79
|
// Schema for allowed query properties
|
|
71
80
|
export const ${camelName}QuerySchema = {
|
|
@@ -78,7 +87,19 @@ export const ${camelName}QuerySchema = {
|
|
|
78
87
|
} as const
|
|
79
88
|
export type ${upperName}Query = FromSchema<typeof ${camelName}QuerySchema>
|
|
80
89
|
export const ${camelName}QueryValidator = getValidator(${camelName}QuerySchema, queryValidator)
|
|
81
|
-
export const ${camelName}QueryResolver = resolve<${upperName}Query, HookContext>({
|
|
90
|
+
export const ${camelName}QueryResolver = resolve<${upperName}Query, HookContext>({
|
|
91
|
+
${isEntityService
|
|
92
|
+
? `
|
|
93
|
+
// If there is a user (e.g. with authentication), they are only allowed to see their own data
|
|
94
|
+
${type === 'mongodb' ? '_id' : 'id'}: async (value, user, context) => {
|
|
95
|
+
if (context.params.user) {
|
|
96
|
+
return context.params.user.${type === 'mongodb' ? '_id' : 'id'}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return value
|
|
100
|
+
}`
|
|
101
|
+
: ''}
|
|
102
|
+
})
|
|
82
103
|
`;
|
|
83
104
|
const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.when)(({ schema }) => schema === 'json', (0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib, folder, fileName }) => [
|
|
84
105
|
lib,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.json.tpl.js","sourceRoot":"","sources":["../../../src/service/templates/schema.json.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"schema.json.tpl.js","sourceRoot":"","sources":["../../../src/service/templates/schema.json.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA4D;AAC5D,2CAAuE;AAGvE,MAAM,kBAAkB,GAAG,CAAC,cAAwB,EAAE,EAAE,CACtD,cAAc;KACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACZ,IAAI,KAAK,OAAO;IACd,CAAC,CAAC;iCACuB;IACzB,CAAC,CAAC,OAAO,IAAI,wBAAwB,CACxC;KACA,IAAI,CAAC,KAAK,CAAC,CAAA;AAEh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