vona-cli-set-api 1.0.239 → 1.0.242
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/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-base/src/.metadata/index.ts +2 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/src/.metadata/index.ts +2 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/.metadata/index.ts +16 -0
- package/dist/lib/bean/toolsMetadata/generateOnions.js +43 -36
- package/package.json +2 -2
|
@@ -22,6 +22,7 @@ declare module 'vona-module-home-base' {
|
|
|
22
22
|
export interface ServiceMenu {
|
|
23
23
|
get $beanFullName(): 'home-base.service.menu';
|
|
24
24
|
get $onionName(): 'home-base:menu';
|
|
25
|
+
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
/** service: end */
|
|
@@ -62,6 +63,7 @@ declare module 'vona-module-home-base' {
|
|
|
62
63
|
export interface ControllerMenu {
|
|
63
64
|
get $beanFullName(): 'home-base.controller.menu';
|
|
64
65
|
get $onionName(): 'home-base:menu';
|
|
66
|
+
get $onionOptions(): IControllerOptionsMenu;
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
/** controller: end */
|
|
@@ -22,6 +22,7 @@ declare module 'vona-module-home-index' {
|
|
|
22
22
|
export interface MetaPrintTip {
|
|
23
23
|
get $beanFullName(): 'home-index.meta.printTip';
|
|
24
24
|
get $onionName(): 'home-index:printTip';
|
|
25
|
+
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
/** meta: end */
|
|
@@ -47,6 +48,7 @@ declare module 'vona-module-home-index' {
|
|
|
47
48
|
export interface ControllerHome {
|
|
48
49
|
get $beanFullName(): 'home-index.controller.home';
|
|
49
50
|
get $onionName(): 'home-index:home';
|
|
51
|
+
get $onionOptions(): IControllerOptionsHome;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
/** controller: end */
|
|
@@ -91,6 +91,7 @@ declare module 'vona-module-home-user' {
|
|
|
91
91
|
export interface ModelRole {
|
|
92
92
|
get $beanFullName(): 'home-user.model.role';
|
|
93
93
|
get $onionName(): 'home-user:role';
|
|
94
|
+
get $onionOptions(): IModelOptionsRole;
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
export interface ModelRoleUser {
|
|
@@ -101,6 +102,7 @@ declare module 'vona-module-home-user' {
|
|
|
101
102
|
export interface ModelRoleUser {
|
|
102
103
|
get $beanFullName(): 'home-user.model.roleUser';
|
|
103
104
|
get $onionName(): 'home-user:roleUser';
|
|
105
|
+
get $onionOptions(): IModelOptionsRoleUser;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
export interface ModelUser {
|
|
@@ -111,6 +113,7 @@ declare module 'vona-module-home-user' {
|
|
|
111
113
|
export interface ModelUser {
|
|
112
114
|
get $beanFullName(): 'home-user.model.user';
|
|
113
115
|
get $onionName(): 'home-user:user';
|
|
116
|
+
get $onionOptions(): IModelOptionsUser;
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
/** model: end */
|
|
@@ -256,6 +259,7 @@ declare module 'vona-module-home-user' {
|
|
|
256
259
|
export interface ServicePassportAdapter {
|
|
257
260
|
get $beanFullName(): 'home-user.service.passportAdapter';
|
|
258
261
|
get $onionName(): 'home-user:passportAdapter';
|
|
262
|
+
|
|
259
263
|
}
|
|
260
264
|
|
|
261
265
|
export interface ServiceRoleAdapter {
|
|
@@ -266,6 +270,7 @@ declare module 'vona-module-home-user' {
|
|
|
266
270
|
export interface ServiceRoleAdapter {
|
|
267
271
|
get $beanFullName(): 'home-user.service.roleAdapter';
|
|
268
272
|
get $onionName(): 'home-user:roleAdapter';
|
|
273
|
+
|
|
269
274
|
}
|
|
270
275
|
|
|
271
276
|
export interface ServiceUserAdapter {
|
|
@@ -276,6 +281,7 @@ declare module 'vona-module-home-user' {
|
|
|
276
281
|
export interface ServiceUserAdapter {
|
|
277
282
|
get $beanFullName(): 'home-user.service.userAdapter';
|
|
278
283
|
get $onionName(): 'home-user:userAdapter';
|
|
284
|
+
|
|
279
285
|
}
|
|
280
286
|
}
|
|
281
287
|
/** service: end */
|
|
@@ -328,6 +334,7 @@ declare module 'vona-module-home-user' {
|
|
|
328
334
|
export interface EventListenerActivate {
|
|
329
335
|
get $beanFullName(): 'home-user.eventListener.activate';
|
|
330
336
|
get $onionName(): 'home-user:activate';
|
|
337
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
331
338
|
}
|
|
332
339
|
|
|
333
340
|
export interface EventListenerEmailConfirmCallback {
|
|
@@ -338,6 +345,7 @@ declare module 'vona-module-home-user' {
|
|
|
338
345
|
export interface EventListenerEmailConfirmCallback {
|
|
339
346
|
get $beanFullName(): 'home-user.eventListener.emailConfirmCallback';
|
|
340
347
|
get $onionName(): 'home-user:emailConfirmCallback';
|
|
348
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
341
349
|
}
|
|
342
350
|
|
|
343
351
|
export interface EventListenerPasswordResetCallback {
|
|
@@ -348,6 +356,7 @@ declare module 'vona-module-home-user' {
|
|
|
348
356
|
export interface EventListenerPasswordResetCallback {
|
|
349
357
|
get $beanFullName(): 'home-user.eventListener.passwordResetCallback';
|
|
350
358
|
get $onionName(): 'home-user:passwordResetCallback';
|
|
359
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
351
360
|
}
|
|
352
361
|
|
|
353
362
|
export interface EventListenerRegister {
|
|
@@ -358,6 +367,7 @@ declare module 'vona-module-home-user' {
|
|
|
358
367
|
export interface EventListenerRegister {
|
|
359
368
|
get $beanFullName(): 'home-user.eventListener.register';
|
|
360
369
|
get $onionName(): 'home-user:register';
|
|
370
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
361
371
|
}
|
|
362
372
|
}
|
|
363
373
|
/** eventListener: end */
|
|
@@ -385,6 +395,7 @@ declare module 'vona-module-home-user' {
|
|
|
385
395
|
export interface MetaIndex {
|
|
386
396
|
get $beanFullName(): 'home-user.meta.index';
|
|
387
397
|
get $onionName(): 'home-user:index';
|
|
398
|
+
get $onionOptions(): IMetaOptionsIndex;
|
|
388
399
|
}
|
|
389
400
|
|
|
390
401
|
export interface MetaVersion {
|
|
@@ -395,6 +406,7 @@ declare module 'vona-module-home-user' {
|
|
|
395
406
|
export interface MetaVersion {
|
|
396
407
|
get $beanFullName(): 'home-user.meta.version';
|
|
397
408
|
get $onionName(): 'home-user:version';
|
|
409
|
+
|
|
398
410
|
}
|
|
399
411
|
}
|
|
400
412
|
/** meta: end */
|
|
@@ -469,6 +481,7 @@ declare module 'vona-module-home-user' {
|
|
|
469
481
|
export interface ControllerPassport {
|
|
470
482
|
get $beanFullName(): 'home-user.controller.passport';
|
|
471
483
|
get $onionName(): 'home-user:passport';
|
|
484
|
+
get $onionOptions(): IControllerOptionsPassport;
|
|
472
485
|
}
|
|
473
486
|
}
|
|
474
487
|
/** controller: end */
|
|
@@ -527,6 +540,7 @@ declare module 'vona-module-home-user' {
|
|
|
527
540
|
export interface ZodRefineEmailUnique {
|
|
528
541
|
get $beanFullName(): 'home-user.zodRefine.emailUnique';
|
|
529
542
|
get $onionName(): 'home-user:emailUnique';
|
|
543
|
+
get $onionOptions(): IZodRefineOptionsEmailUnique;
|
|
530
544
|
}
|
|
531
545
|
|
|
532
546
|
export interface ZodRefinePasswordConfirm {
|
|
@@ -537,6 +551,7 @@ declare module 'vona-module-home-user' {
|
|
|
537
551
|
export interface ZodRefinePasswordConfirm {
|
|
538
552
|
get $beanFullName(): 'home-user.zodRefine.passwordConfirm';
|
|
539
553
|
get $onionName(): 'home-user:passwordConfirm';
|
|
554
|
+
get $onionOptions(): IZodRefineOptionsPasswordConfirm;
|
|
540
555
|
}
|
|
541
556
|
|
|
542
557
|
export interface ZodRefineUsernameUnique {
|
|
@@ -547,6 +562,7 @@ declare module 'vona-module-home-user' {
|
|
|
547
562
|
export interface ZodRefineUsernameUnique {
|
|
548
563
|
get $beanFullName(): 'home-user.zodRefine.usernameUnique';
|
|
549
564
|
get $onionName(): 'home-user:usernameUnique';
|
|
565
|
+
get $onionOptions(): IZodRefineOptionsUsernameUnique;
|
|
550
566
|
}
|
|
551
567
|
}
|
|
552
568
|
/** zodRefine: end */
|
|
@@ -21,6 +21,47 @@ export async function generateOnions(sceneName, sceneMeta, moduleName, modulePat
|
|
|
21
21
|
contentExports.push(`export * from '${fileNameJSRelative}';`);
|
|
22
22
|
if (isIgnore)
|
|
23
23
|
continue; // get scope() also can be ignored
|
|
24
|
+
// options
|
|
25
|
+
let onionOptions;
|
|
26
|
+
if (!sceneMeta.optionsNone) {
|
|
27
|
+
// fileInfo
|
|
28
|
+
const fileInfo = extractBeanInfo(sceneName, fileContent, sceneMeta);
|
|
29
|
+
// import options
|
|
30
|
+
if (fileInfo.optionsCustomInterface) {
|
|
31
|
+
contentImports.push(`import type { ${fileInfo.optionsCustomInterface} } from '${fileInfo.optionsCustomInterfaceFrom || fileNameJSRelative}';`);
|
|
32
|
+
}
|
|
33
|
+
// valueOptionsCustomInterface
|
|
34
|
+
let valueOptionsCustomInterface = fileInfo.optionsCustomInterface;
|
|
35
|
+
if (valueOptionsCustomInterface && sceneMeta.optionsCustomInterfaceTemplate) {
|
|
36
|
+
valueOptionsCustomInterface = replaceTemplate(sceneMeta.optionsCustomInterfaceTemplate, { optionsCustomInterface: valueOptionsCustomInterface });
|
|
37
|
+
}
|
|
38
|
+
// record
|
|
39
|
+
if (fileInfo.isGlobal) {
|
|
40
|
+
if (valueOptionsCustomInterface) {
|
|
41
|
+
onionOptions = valueOptionsCustomInterface;
|
|
42
|
+
contentRecordsGlobal.push(`'${beanNameFull}': ${valueOptionsCustomInterface};`);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (sceneMeta.optionsGlobalInterfaceName) {
|
|
46
|
+
onionOptions = sceneMeta.optionsGlobalInterfaceName;
|
|
47
|
+
contentRecordsGlobal.push(`'${beanNameFull}': ${sceneMeta.optionsGlobalInterfaceName};`);
|
|
48
|
+
needImportOptionsGlobalInterface = true;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
contentRecordsGlobal.push(`'${beanNameFull}': never;`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (valueOptionsCustomInterface) {
|
|
57
|
+
onionOptions = valueOptionsCustomInterface;
|
|
58
|
+
contentRecordsLocal.push(`'${beanNameFull}': ${valueOptionsCustomInterface};`);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
contentRecordsLocal.push(`'${beanNameFull}': never;`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
24
65
|
// get scope() also can be ignored
|
|
25
66
|
if (!['entity', 'dto'].includes(sceneName) && !isVirtual) {
|
|
26
67
|
contentScopes.push(`
|
|
@@ -29,49 +70,15 @@ export async function generateOnions(sceneName, sceneMeta, moduleName, modulePat
|
|
|
29
70
|
get scope(): ${scopeModuleName};
|
|
30
71
|
}`);
|
|
31
72
|
if (!isBeanGlobal) {
|
|
73
|
+
const contentOnionOptions = onionOptions ? `get $onionOptions(): ${onionOptions};` : '';
|
|
32
74
|
contentScopes.push(`
|
|
33
75
|
export interface ${className} {
|
|
34
76
|
get $beanFullName(): '${beanFullNameFromOnionName(beanNameFull, sceneName)}';
|
|
35
77
|
get $onionName(): '${beanNameFull}';
|
|
78
|
+
${contentOnionOptions}
|
|
36
79
|
}`);
|
|
37
80
|
}
|
|
38
81
|
}
|
|
39
|
-
if (sceneMeta.optionsNone)
|
|
40
|
-
continue;
|
|
41
|
-
// fileInfo
|
|
42
|
-
const fileInfo = extractBeanInfo(sceneName, fileContent, sceneMeta);
|
|
43
|
-
// import options
|
|
44
|
-
if (fileInfo.optionsCustomInterface) {
|
|
45
|
-
contentImports.push(`import type { ${fileInfo.optionsCustomInterface} } from '${fileInfo.optionsCustomInterfaceFrom || fileNameJSRelative}';`);
|
|
46
|
-
}
|
|
47
|
-
// valueOptionsCustomInterface
|
|
48
|
-
let valueOptionsCustomInterface = fileInfo.optionsCustomInterface;
|
|
49
|
-
if (valueOptionsCustomInterface && sceneMeta.optionsCustomInterfaceTemplate) {
|
|
50
|
-
valueOptionsCustomInterface = replaceTemplate(sceneMeta.optionsCustomInterfaceTemplate, { optionsCustomInterface: valueOptionsCustomInterface });
|
|
51
|
-
}
|
|
52
|
-
// record
|
|
53
|
-
if (fileInfo.isGlobal) {
|
|
54
|
-
if (valueOptionsCustomInterface) {
|
|
55
|
-
contentRecordsGlobal.push(`'${beanNameFull}': ${valueOptionsCustomInterface};`);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
if (sceneMeta.optionsGlobalInterfaceName) {
|
|
59
|
-
contentRecordsGlobal.push(`'${beanNameFull}': ${sceneMeta.optionsGlobalInterfaceName};`);
|
|
60
|
-
needImportOptionsGlobalInterface = true;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
contentRecordsGlobal.push(`'${beanNameFull}': never;`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
if (valueOptionsCustomInterface) {
|
|
69
|
-
contentRecordsLocal.push(`'${beanNameFull}': ${valueOptionsCustomInterface};`);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
contentRecordsLocal.push(`'${beanNameFull}': never;`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
82
|
}
|
|
76
83
|
// middlewareGlobal
|
|
77
84
|
const exportRecordsMiddlewareGlobal = `
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-cli-set-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.242",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"urllib": "^4.6.11",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"vona-core": "^5.0.
|
|
64
|
+
"vona-core": "^5.0.65",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|