vona-cli-set-api 1.0.438 → 1.0.442
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 +2 -1
- package/cli/templates/create/project/basic/boilerplate/tsconfig.base.esm.json +2 -1
- package/cli/templates/tools/crud/boilerplate/src/controller/{{resourceName}}.ts_ +5 -5
- package/cli/templates/tools/crud/boilerplate/src/dto/{{{resourceName}}Query.ts_ → {{resourceName}}Query.tsx_} +1 -1
- package/cli/templates/tools/crud/boilerplate/src/model/{{resourceName}}.ts_ +1 -1
- package/cli/templates/tools/crud/boilerplate/src/service/{{resourceName}}.ts_ +4 -4
- package/dist/index.js +52 -19
- package/package.json +7 -6
- /package/cli/templates/tools/crud/boilerplate/src/dto/{{{resourceName}}Create.ts_ → {{resourceName}}Create.tsx_} +0 -0
- /package/cli/templates/tools/crud/boilerplate/src/dto/{{{resourceName}}QueryRes.ts_ → {{resourceName}}QueryRes.tsx_} +0 -0
- /package/cli/templates/tools/crud/boilerplate/src/dto/{{{resourceName}}Update.ts_ → {{resourceName}}Update.tsx_} +0 -0
- /package/cli/templates/tools/crud/boilerplate/src/entity/{{{resourceName}}.ts_ → {{resourceName}}.tsx_} +0 -0
|
@@ -5,11 +5,11 @@ import type { Model<%=argv.resourceNameCapitalize%> } from '../model/<%=argv.res
|
|
|
5
5
|
import { BeanBase } from 'vona';
|
|
6
6
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
7
7
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
8
|
-
import { Dto<%=argv.resourceNameCapitalize%>Create } from '../dto/<%=argv.resourceName%>Create.
|
|
9
|
-
import { Dto<%=argv.resourceNameCapitalize%>Query } from '../dto/<%=argv.resourceName%>Query.
|
|
10
|
-
import { Dto<%=argv.resourceNameCapitalize%>QueryRes } from '../dto/<%=argv.resourceName%>QueryRes.
|
|
11
|
-
import { Dto<%=argv.resourceNameCapitalize%>Update } from '../dto/<%=argv.resourceName%>Update.
|
|
12
|
-
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.
|
|
8
|
+
import { Dto<%=argv.resourceNameCapitalize%>Create } from '../dto/<%=argv.resourceName%>Create.tsx';
|
|
9
|
+
import { Dto<%=argv.resourceNameCapitalize%>Query } from '../dto/<%=argv.resourceName%>Query.tsx';
|
|
10
|
+
import { Dto<%=argv.resourceNameCapitalize%>QueryRes } from '../dto/<%=argv.resourceName%>QueryRes.tsx';
|
|
11
|
+
import { Dto<%=argv.resourceNameCapitalize%>Update } from '../dto/<%=argv.resourceName%>Update.tsx';
|
|
12
|
+
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.tsx';
|
|
13
13
|
|
|
14
14
|
export interface IControllerOptions<%=argv.resourceNameCapitalize%> extends IDecoratorControllerOptions {}
|
|
15
15
|
|
|
@@ -2,7 +2,7 @@ import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
|
2
2
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
3
3
|
import { $Dto } from 'vona-module-a-orm';
|
|
4
4
|
import { Dto } from 'vona-module-a-web';
|
|
5
|
-
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.
|
|
5
|
+
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.tsx';
|
|
6
6
|
|
|
7
7
|
export interface IDtoOptions<%=argv.resourceNameCapitalize%>Query extends IDecoratorDtoOptions {}
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
2
|
import { BeanModelBase, Model } from 'vona-module-a-orm';
|
|
3
|
-
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.
|
|
3
|
+
import { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.tsx';
|
|
4
4
|
|
|
5
5
|
export interface IModelOptions<%=argv.resourceNameCapitalize%> extends IDecoratorModelOptions<Entity<%=argv.resourceNameCapitalize%>> {}
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TableIdentity } from 'table-identity';
|
|
2
2
|
import type { IQueryParams } from 'vona-module-a-orm';
|
|
3
|
-
import type { Dto<%=argv.resourceNameCapitalize%>Create } from '../dto/<%=argv.resourceName%>Create.
|
|
4
|
-
import type { Dto<%=argv.resourceNameCapitalize%>QueryRes } from '../dto/<%=argv.resourceName%>QueryRes.
|
|
5
|
-
import type { Dto<%=argv.resourceNameCapitalize%>Update } from '../dto/<%=argv.resourceName%>Update.
|
|
6
|
-
import type { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.
|
|
3
|
+
import type { Dto<%=argv.resourceNameCapitalize%>Create } from '../dto/<%=argv.resourceName%>Create.tsx';
|
|
4
|
+
import type { Dto<%=argv.resourceNameCapitalize%>QueryRes } from '../dto/<%=argv.resourceName%>QueryRes.tsx';
|
|
5
|
+
import type { Dto<%=argv.resourceNameCapitalize%>Update } from '../dto/<%=argv.resourceName%>Update.tsx';
|
|
6
|
+
import type { Entity<%=argv.resourceNameCapitalize%> } from '../entity/<%=argv.resourceName%>.tsx';
|
|
7
7
|
import type { Model<%=argv.resourceNameCapitalize%> } from '../model/<%=argv.resourceName%>.ts';
|
|
8
8
|
import { BeanBase } from 'vona';
|
|
9
9
|
import { Service } from 'vona-module-a-bean';
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import jsonImport from '@rollup/plugin-json';
|
|
|
7
7
|
import resolveImport from '@rollup/plugin-node-resolve';
|
|
8
8
|
import replaceImport from '@rollup/plugin-replace';
|
|
9
9
|
import terserImport from '@rollup/plugin-terser';
|
|
10
|
+
import typescriptImport from '@rollup/plugin-typescript';
|
|
10
11
|
import fse from 'fs-extra';
|
|
11
12
|
import { globby } from 'globby';
|
|
12
13
|
import { rimraf } from 'rimraf';
|
|
@@ -312,6 +313,7 @@ async function generateVonaMeta(configMeta, configOptions) {
|
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
const commonjs$2 = commonjsImport;
|
|
316
|
+
const typescript$1 = typescriptImport;
|
|
315
317
|
const resolve$2 = resolveImport;
|
|
316
318
|
// const swc = swcImport as any as typeof swcImport.default;
|
|
317
319
|
const json$2 = jsonImport;
|
|
@@ -415,8 +417,9 @@ class CliBinBuild extends BeanCliBase {
|
|
|
415
417
|
replacement: 'vona-shared'
|
|
416
418
|
});
|
|
417
419
|
}
|
|
420
|
+
const sourceMap = process.env.BUILD_SOURCEMAP === 'true';
|
|
418
421
|
const replaceValues = generateConfigDefine(env, ['NODE_ENV', 'META_MODE', 'META_FLAVOR']);
|
|
419
|
-
const
|
|
422
|
+
const babelPluginVonaBeanModule = getAbsolutePathOfModule('babel-plugin-vona-bean-module', '');
|
|
420
423
|
const babelPluginTransformTypescriptMetadata = getAbsolutePathOfModule('babel-plugin-transform-typescript-metadata', '');
|
|
421
424
|
const babelPluginProposalDecorators = getAbsolutePathOfModule('@babel/plugin-proposal-decorators', '');
|
|
422
425
|
const babelPluginTransformClassProperties = getAbsolutePathOfModule('@babel/plugin-transform-class-properties', '');
|
|
@@ -428,14 +431,23 @@ class CliBinBuild extends BeanCliBase {
|
|
|
428
431
|
}), replace({
|
|
429
432
|
values: replaceValues,
|
|
430
433
|
preventAssignment: false
|
|
431
|
-
}), json$2(), commonjs$2(),
|
|
432
|
-
|
|
434
|
+
}), json$2(), commonjs$2(), typescript$1({
|
|
435
|
+
module: 'nodenext',
|
|
436
|
+
compilerOptions: {
|
|
437
|
+
noCheck: true,
|
|
438
|
+
declaration: false,
|
|
439
|
+
composite: false,
|
|
440
|
+
sourceMap
|
|
441
|
+
},
|
|
442
|
+
outputToFilesystem: false
|
|
443
|
+
}), babel$2({
|
|
444
|
+
include: '**/*.ts(x)?',
|
|
433
445
|
extensions: ['.ts', '.tsx'],
|
|
434
446
|
babelHelpers: 'bundled',
|
|
435
447
|
skipPreflightCheck: true,
|
|
436
448
|
babelrc: false,
|
|
437
449
|
configFile: false,
|
|
438
|
-
plugins: [[
|
|
450
|
+
plugins: [[babelPluginVonaBeanModule, {
|
|
439
451
|
brandName: 'vona'
|
|
440
452
|
}], [babelPluginTransformTypescriptMetadata], [babelPluginProposalDecorators, {
|
|
441
453
|
version: 'legacy'
|
|
@@ -463,7 +475,7 @@ class CliBinBuild extends BeanCliBase {
|
|
|
463
475
|
dir: outDir,
|
|
464
476
|
// file: path.join(projectPath, 'dist/index.js'),
|
|
465
477
|
format: 'esm',
|
|
466
|
-
sourcemap:
|
|
478
|
+
sourcemap: sourceMap,
|
|
467
479
|
// https://github.com/rollup/rollup/issues/4166
|
|
468
480
|
inlineDynamicImports: false // should not true
|
|
469
481
|
};
|
|
@@ -506,22 +518,27 @@ class CliBinBuildGeneral extends BeanCliBase {
|
|
|
506
518
|
argv
|
|
507
519
|
} = this.context;
|
|
508
520
|
const aliasEntries = [];
|
|
521
|
+
const sourceMap = argv.sourcemap;
|
|
522
|
+
const babelPluginTransformTypescriptMetadata = getAbsolutePathOfModule('babel-plugin-transform-typescript-metadata', '');
|
|
523
|
+
const babelPluginProposalDecorators = getAbsolutePathOfModule('@babel/plugin-proposal-decorators', '');
|
|
524
|
+
const babelPluginTransformClassProperties = getAbsolutePathOfModule('@babel/plugin-transform-class-properties', '');
|
|
525
|
+
const babelPluginTransformTypescript = getAbsolutePathOfModule('@babel/plugin-transform-typescript', '');
|
|
509
526
|
const plugins = [alias$1({
|
|
510
527
|
entries: aliasEntries
|
|
511
528
|
}), resolve$1({
|
|
512
529
|
preferBuiltins: true
|
|
513
530
|
}), json$1(), commonjs$1(), babel$1({
|
|
514
|
-
include: '**/*.ts',
|
|
531
|
+
include: '**/*.ts(x)?',
|
|
515
532
|
extensions: ['.ts', '.tsx'],
|
|
516
533
|
babelHelpers: 'bundled',
|
|
517
534
|
skipPreflightCheck: true,
|
|
518
535
|
babelrc: false,
|
|
519
536
|
configFile: false,
|
|
520
|
-
plugins: [[
|
|
537
|
+
plugins: [[babelPluginTransformTypescriptMetadata], [babelPluginProposalDecorators, {
|
|
521
538
|
version: 'legacy'
|
|
522
|
-
}], [
|
|
539
|
+
}], [babelPluginTransformClassProperties, {
|
|
523
540
|
loose: true
|
|
524
|
-
}], [
|
|
541
|
+
}], [babelPluginTransformTypescript]]
|
|
525
542
|
})];
|
|
526
543
|
if (argv.minify) {
|
|
527
544
|
plugins.push(terser$1({
|
|
@@ -547,7 +564,7 @@ class CliBinBuildGeneral extends BeanCliBase {
|
|
|
547
564
|
dir: path.join(projectPath, 'dist'),
|
|
548
565
|
// file: path.join(projectPath, 'dist/index.js'),
|
|
549
566
|
format: 'esm',
|
|
550
|
-
sourcemap:
|
|
567
|
+
sourcemap: sourceMap,
|
|
551
568
|
// https://github.com/rollup/rollup/issues/4166
|
|
552
569
|
inlineDynamicImports: true
|
|
553
570
|
};
|
|
@@ -565,6 +582,7 @@ class CliBinBuildGeneral extends BeanCliBase {
|
|
|
565
582
|
}
|
|
566
583
|
|
|
567
584
|
const commonjs = commonjsImport;
|
|
585
|
+
const typescript = typescriptImport;
|
|
568
586
|
const resolve = resolveImport;
|
|
569
587
|
// const swc = swcImport as any as typeof swcImport.default;
|
|
570
588
|
const json = jsonImport;
|
|
@@ -596,24 +614,39 @@ class CliBinBuildModule extends BeanCliBase {
|
|
|
596
614
|
replacement: 'vona-shared'
|
|
597
615
|
});
|
|
598
616
|
}
|
|
617
|
+
const sourceMap = argv.sourcemap;
|
|
618
|
+
const babelPluginVonaBeanModule = getAbsolutePathOfModule('babel-plugin-vona-bean-module', '');
|
|
619
|
+
const babelPluginTransformTypescriptMetadata = getAbsolutePathOfModule('babel-plugin-transform-typescript-metadata', '');
|
|
620
|
+
const babelPluginProposalDecorators = getAbsolutePathOfModule('@babel/plugin-proposal-decorators', '');
|
|
621
|
+
const babelPluginTransformClassProperties = getAbsolutePathOfModule('@babel/plugin-transform-class-properties', '');
|
|
622
|
+
const babelPluginTransformTypescript = getAbsolutePathOfModule('@babel/plugin-transform-typescript', '');
|
|
599
623
|
const plugins = [alias({
|
|
600
624
|
entries: aliasEntries
|
|
601
625
|
}), resolve({
|
|
602
626
|
preferBuiltins: true
|
|
603
|
-
}), json(), commonjs(),
|
|
604
|
-
|
|
627
|
+
}), json(), commonjs(), typescript({
|
|
628
|
+
module: 'nodenext',
|
|
629
|
+
compilerOptions: {
|
|
630
|
+
noCheck: true,
|
|
631
|
+
declaration: false,
|
|
632
|
+
composite: false,
|
|
633
|
+
sourceMap
|
|
634
|
+
},
|
|
635
|
+
outputToFilesystem: false
|
|
636
|
+
}), babel({
|
|
637
|
+
include: '**/*.ts(x)?',
|
|
605
638
|
extensions: ['.ts', '.tsx'],
|
|
606
639
|
babelHelpers: 'bundled',
|
|
607
640
|
skipPreflightCheck: true,
|
|
608
641
|
babelrc: false,
|
|
609
642
|
configFile: false,
|
|
610
|
-
plugins: [[
|
|
643
|
+
plugins: [[babelPluginVonaBeanModule, {
|
|
611
644
|
brandName: 'vona'
|
|
612
|
-
}], [
|
|
645
|
+
}], [babelPluginTransformTypescriptMetadata], [babelPluginProposalDecorators, {
|
|
613
646
|
version: 'legacy'
|
|
614
|
-
}], [
|
|
647
|
+
}], [babelPluginTransformClassProperties, {
|
|
615
648
|
loose: true
|
|
616
|
-
}], [
|
|
649
|
+
}], [babelPluginTransformTypescript]]
|
|
617
650
|
})];
|
|
618
651
|
if (argv.minify) {
|
|
619
652
|
plugins.push(terser({
|
|
@@ -639,7 +672,7 @@ class CliBinBuildModule extends BeanCliBase {
|
|
|
639
672
|
dir: path.join(projectPath, 'dist'),
|
|
640
673
|
// file: path.join(projectPath, 'dist/index.js'),
|
|
641
674
|
format: 'esm',
|
|
642
|
-
sourcemap:
|
|
675
|
+
sourcemap: sourceMap,
|
|
643
676
|
// https://github.com/rollup/rollup/issues/4166
|
|
644
677
|
inlineDynamicImports: true
|
|
645
678
|
};
|
|
@@ -751,7 +784,7 @@ class CliBinDev extends BeanCliBase {
|
|
|
751
784
|
// execArgs: ['--experimental-transform-types', getImportEsm(), '--trace-deprecation'],
|
|
752
785
|
// signal: 'SIGHUP',
|
|
753
786
|
watch: ['packages-utils', 'packages-vona', './src'],
|
|
754
|
-
ignore: ['**/node_modules/**', '**/dist/**', '**/test/**/*.test.ts', 'src/backend/play/**', 'src/backend/typing/**', '**/src/config/errors.ts', '**/src/config/locale/*.ts', '**/src/config/config.ts', '**/src/config/constants.ts', '**/src/types/**', '**/src/controller/*.ts', '**/src/model/*.ts', '**/src/service/*.ts', '**/src/bean/*.*.ts']
|
|
787
|
+
ignore: ['**/node_modules/**', '**/dist/**', '**/test/**/*.test.ts', 'src/backend/play/**', 'src/backend/typing/**', '**/src/config/errors.ts', '**/src/config/locale/*.ts', '**/src/config/config.ts', '**/src/config/constants.ts', '**/src/types/**', '**/src/controller/*.ts', '**/src/model/*.ts', '**/src/service/*.ts', '**/src/bean/*.*.ts', '**/src/dto/*.ts(x)?', '**/src/entity/*.ts(x)?']
|
|
755
788
|
});
|
|
756
789
|
nodemon.on('quit', () => {
|
|
757
790
|
closed = true;
|
|
@@ -2048,7 +2081,7 @@ function getScopeModuleName(moduleName) {
|
|
|
2048
2081
|
async function globBeanFiles(sceneName, sceneMeta, moduleName, modulePath) {
|
|
2049
2082
|
const result = [];
|
|
2050
2083
|
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
2051
|
-
const pattern = sceneMeta.sceneIsolate ? `src/${sceneName}/*.ts
|
|
2084
|
+
const pattern = sceneMeta.sceneIsolate ? `src/${sceneName}/*.ts(x)?` : `src/bean/${sceneName}.*.ts(x)?`;
|
|
2052
2085
|
const files = await globby(pattern, {
|
|
2053
2086
|
cwd: modulePath
|
|
2054
2087
|
});
|
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.442",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
34
34
|
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
35
35
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
36
|
-
"@cabloy/cli": "^3.0.
|
|
36
|
+
"@cabloy/cli": "^3.0.77",
|
|
37
37
|
"@cabloy/dotenv": "^1.1.12",
|
|
38
38
|
"@cabloy/extend": "^3.1.11",
|
|
39
|
-
"@cabloy/module-glob": "^5.2.
|
|
39
|
+
"@cabloy/module-glob": "^5.2.36",
|
|
40
40
|
"@cabloy/module-info": "^1.3.32",
|
|
41
|
-
"@cabloy/utils": "^
|
|
41
|
+
"@cabloy/utils": "^2.0.1",
|
|
42
42
|
"@cabloy/word-utils": "^2.0.1",
|
|
43
43
|
"@lcov-viewer/cli": "^1.3.0",
|
|
44
44
|
"@rollup/plugin-alias": "^5.1.1",
|
|
@@ -48,8 +48,9 @@
|
|
|
48
48
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
49
|
"@rollup/plugin-replace": "^6.0.2",
|
|
50
50
|
"@rollup/plugin-terser": "^0.4.4",
|
|
51
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
52
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
52
|
-
"babel-plugin-
|
|
53
|
+
"babel-plugin-vona-bean-module": "^1.0.1",
|
|
53
54
|
"chalk": "^3.0.0",
|
|
54
55
|
"cli-table3": "^0.6.5",
|
|
55
56
|
"compressing": "^1.10.0",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"ts-node-maintained": "^10.9.6",
|
|
65
66
|
"urllib": "^4.6.11",
|
|
66
67
|
"uuid": "^11.1.0",
|
|
67
|
-
"vona-core": "^5.0.
|
|
68
|
+
"vona-core": "^5.0.111",
|
|
68
69
|
"why-is-node-running": "^3.2.2",
|
|
69
70
|
"yargs-parser": "^22.0.0"
|
|
70
71
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|