vona-cli-set-api 1.0.8 → 1.0.12
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/module/boilerplate/_package.json +27 -7
- package/cli/templates/create/module/boilerplate/_tsconfig.build.json +8 -0
- package/cli/templates/create/module/boilerplate/_tsconfig.json +2 -3
- package/cli/templates/create/module/snippets/package.json.ts +17 -0
- package/cli/templates/create/module/snippets/tsconfig.json.ts +19 -0
- package/cli/templates/create/project/basic/boilerplate/.editorconfig +9 -0
- package/cli/templates/create/project/basic/boilerplate/.gitattributes +2 -0
- package/cli/templates/create/project/basic/boilerplate/.vscode/extensions.json +4 -0
- package/cli/templates/create/project/basic/boilerplate/.vscode/settings.json +45 -0
- package/cli/templates/create/project/basic/boilerplate/.vscode/vona.code-snippets +51 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env +59 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env.local +0 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env.prod +26 -0
- package/cli/templates/create/project/basic/boilerplate/env/.env.test +0 -0
- package/cli/templates/create/project/basic/boilerplate/eslint.config.mjs +16 -0
- package/cli/templates/create/project/basic/boilerplate/package.original.json +45 -0
- package/cli/templates/create/project/basic/boilerplate/pnpm-workspace.yaml +7 -0
- package/cli/templates/create/project/basic/boilerplate/scripts/app-init.sh +4 -0
- package/cli/templates/create/project/basic/boilerplate/scripts/wait-for-it.sh +156 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.local.ts +10 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.prod.ts +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.test.ts +10 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/config/config.ts +10 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/locale/en-us.ts +5 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/locale/zh-cn.ts +5 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/config/locales.ts +7 -0
- package/cli/templates/create/project/basic/boilerplate/src/backend/typing/env.d.ts +5 -0
- package/cli/templates/create/project/basic/boilerplate/src/module/.gitkeep +0 -0
- package/cli/templates/create/project/basic/boilerplate/src/module-vendor/.gitkeep +0 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/.gitkeep +0 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite-vendor/.gitkeep +0 -0
- package/cli/templates/create/project/basic/boilerplate/tsconfig.base.esm.json +10 -0
- package/cli/templates/create/project/basic/boilerplate/tsconfig.base.json +3 -0
- package/cli/templates/create/project/basic/boilerplate/tsconfig.json +12 -0
- package/cli/templates/create/suite/_package.json +2 -2
- package/cli/templates/create/suite/_tsconfig.json +2 -2
- package/cli/templates/create/test/boilerplate/{{name}}.test.ts +11 -0
- package/cli/templates/init/config/boilerplate/config/config.ts +5 -0
- package/cli/templates/init/constant/boilerplate/config/constants.ts +1 -0
- package/cli/templates/init/error/boilerplate/config/errors.ts +1 -0
- package/cli/templates/init/locale/boilerplate/config/locale/en-us.ts +1 -0
- package/cli/templates/init/locale/boilerplate/config/locale/zh-cn.ts +1 -0
- package/cli/templates/init/main/boilerplate/main.ts +2 -1
- package/cli/templates/init/monkey/boilerplate/monkey.ts +3 -1
- package/cli/templates/init/static/boilerplate/static/img/vona.png +0 -0
- package/cli/templates/tools/crud/boilerplate/src/controller/{{resourceName}}.ts_ +43 -0
- package/cli/templates/tools/crud/boilerplate/src/dto/{{resourceName}}Create.ts_ +9 -0
- package/cli/templates/tools/crud/boilerplate/src/dto/{{resourceName}}Update.ts_ +9 -0
- package/cli/templates/tools/crud/boilerplate/src/entity/{{resourceName}}.ts_ +15 -0
- package/cli/templates/tools/crud/boilerplate/src/model/{{resourceName}}.ts_ +5 -0
- package/cli/templates/tools/crud/boilerplate/src/service/{{resourceName}}.ts_ +32 -0
- package/cli/templates/tools/crud/boilerplate/test/{{resourceName}}.test.ts_ +46 -0
- package/cli/templates/tools/crud/snippets/1-package.json.ts +16 -0
- package/cli/templates/tools/crud/snippets/2-meta.version.ts +42 -0
- package/cli/templates/tools/crud/snippets/3-en-us.ts +27 -0
- package/cli/templates/tools/crud/snippets/4-zh-cn.ts +10 -0
- package/cli/templates/tools/crud/utils.ts +20 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/bean/cli.bin.build.d.ts +15 -0
- package/dist/lib/bean/cli.bin.build.js +139 -0
- package/dist/lib/bean/cli.bin.dbReset.d.ts +13 -0
- package/dist/lib/bean/cli.bin.dbReset.js +46 -0
- package/dist/lib/bean/cli.bin.demo.d.ts +12 -0
- package/dist/lib/bean/cli.bin.demo.js +50 -0
- package/dist/lib/bean/cli.bin.dev.d.ts +14 -0
- package/dist/lib/bean/cli.bin.dev.js +53 -0
- package/dist/lib/bean/cli.bin.test.d.ts +15 -0
- package/dist/lib/bean/cli.bin.test.js +67 -0
- package/dist/lib/bean/{cli.tools.build.d.ts → cli.bin.tsc.d.ts} +2 -3
- package/dist/lib/bean/{cli.tools.build.js → cli.bin.tsc.js} +13 -5
- package/dist/lib/bean/cli.create.bean.d.ts +3 -4
- package/dist/lib/bean/cli.create.bean.js +42 -28
- package/dist/lib/bean/cli.create.module.d.ts +1 -2
- package/dist/lib/bean/cli.create.module.js +3 -4
- package/dist/lib/bean/cli.create.project.d.ts +26 -0
- package/dist/lib/bean/cli.create.project.js +115 -0
- package/dist/lib/bean/cli.create.suite.d.ts +1 -2
- package/dist/lib/bean/cli.create.suite.js +5 -9
- package/dist/lib/bean/cli.create.test.d.ts +15 -0
- package/dist/lib/bean/cli.create.test.js +39 -0
- package/dist/lib/bean/cli.default.list.d.ts +0 -1
- package/dist/lib/bean/cli.default.list.js +0 -1
- package/dist/lib/bean/cli.init.config.d.ts +8 -0
- package/dist/lib/bean/cli.init.config.js +36 -0
- package/dist/lib/bean/cli.init.constant.d.ts +8 -0
- package/dist/lib/bean/cli.init.constant.js +36 -0
- package/dist/lib/bean/cli.init.error.d.ts +8 -0
- package/dist/lib/bean/cli.init.error.js +47 -0
- package/dist/lib/bean/cli.init.locale.d.ts +8 -0
- package/dist/lib/bean/cli.init.locale.js +36 -0
- package/dist/lib/bean/cli.init.main.d.ts +0 -1
- package/dist/lib/bean/cli.init.main.js +2 -3
- package/dist/lib/bean/cli.init.monkey.d.ts +0 -1
- package/dist/lib/bean/cli.init.monkey.js +8 -10
- package/dist/lib/bean/cli.init.static.d.ts +8 -0
- package/dist/lib/bean/cli.init.static.js +36 -0
- package/dist/lib/bean/cli.tools.crud.d.ts +15 -0
- package/dist/lib/bean/cli.tools.crud.js +42 -0
- package/dist/lib/bean/cli.tools.deps.d.ts +2 -10
- package/dist/lib/bean/cli.tools.deps.js +16 -123
- package/dist/lib/bean/cli.tools.metadata.d.ts +1 -1
- package/dist/lib/bean/cli.tools.metadata.js +71 -32
- package/dist/lib/bean/toolsBin/configUtils.d.ts +7 -0
- package/dist/lib/bean/toolsBin/configUtils.js +56 -0
- package/dist/lib/bean/toolsBin/dbReset.d.ts +1 -0
- package/dist/lib/bean/toolsBin/dbReset.js +8 -0
- package/dist/lib/bean/toolsBin/demo.d.ts +1 -0
- package/dist/lib/bean/toolsBin/demo.js +41 -0
- package/dist/lib/bean/toolsBin/generateEntryFiles.d.ts +4 -0
- package/dist/lib/bean/toolsBin/generateEntryFiles.js +75 -0
- package/dist/lib/bean/toolsBin/generateVonaMeta.d.ts +10 -0
- package/dist/lib/bean/toolsBin/generateVonaMeta.js +17 -0
- package/dist/lib/bean/toolsBin/test.d.ts +1 -0
- package/dist/lib/bean/toolsBin/test.js +121 -0
- package/dist/lib/bean/toolsBin/types.d.ts +5 -0
- package/dist/lib/bean/toolsBin/types.js +1 -0
- package/dist/lib/bean/toolsMetadata/generateBeanGenerals.d.ts +2 -0
- package/dist/lib/bean/toolsMetadata/generateBeanGenerals.js +33 -0
- package/dist/lib/bean/toolsMetadata/generateBeans.d.ts +2 -2
- package/dist/lib/bean/toolsMetadata/generateBeans.js +33 -21
- package/dist/lib/bean/toolsMetadata/generateConfig.d.ts +3 -4
- package/dist/lib/bean/toolsMetadata/generateConfig.js +12 -14
- package/dist/lib/bean/toolsMetadata/generateMetadataCustom.d.ts +3 -0
- package/dist/lib/bean/toolsMetadata/generateMetadataCustom.js +23 -0
- package/dist/lib/bean/toolsMetadata/generateMonkey.d.ts +2 -3
- package/dist/lib/bean/toolsMetadata/generateMonkey.js +3 -4
- package/dist/lib/bean/toolsMetadata/generateOnions.d.ts +2 -0
- package/dist/lib/bean/toolsMetadata/generateOnions.js +90 -0
- package/dist/lib/bean/toolsMetadata/generateScope.d.ts +1 -4
- package/dist/lib/bean/toolsMetadata/generateScope.js +43 -16
- package/dist/lib/bean/toolsMetadata/generateScopeResources.d.ts +2 -0
- package/dist/lib/bean/toolsMetadata/generateScopeResources.js +29 -0
- package/dist/lib/bean/toolsMetadata/generateScopeResourcesMeta.d.ts +2 -0
- package/dist/lib/bean/toolsMetadata/generateScopeResourcesMeta.js +13 -0
- package/dist/lib/bean/toolsMetadata/utils.d.ts +9 -0
- package/dist/lib/bean/toolsMetadata/utils.js +82 -0
- package/dist/lib/beans.d.ts +36 -11
- package/dist/lib/beans.js +36 -11
- package/dist/lib/command/bin.build.d.ts +19 -0
- package/dist/lib/command/bin.build.js +18 -0
- package/dist/lib/command/bin.dbReset.d.ts +15 -0
- package/dist/lib/command/bin.dbReset.js +14 -0
- package/dist/lib/command/bin.demo.d.ts +15 -0
- package/dist/lib/command/bin.demo.js +14 -0
- package/dist/lib/command/bin.dev.d.ts +19 -0
- package/dist/lib/command/bin.dev.js +18 -0
- package/dist/lib/command/bin.test.d.ts +19 -0
- package/dist/lib/command/bin.test.js +18 -0
- package/dist/lib/command/{tools.build.d.ts → bin.tsc.d.ts} +0 -1
- package/dist/lib/command/{tools.build.js → bin.tsc.js} +3 -4
- package/dist/lib/command/create.bean.d.ts +0 -1
- package/dist/lib/command/create.bean.js +0 -1
- package/dist/lib/command/create.module.d.ts +0 -1
- package/dist/lib/command/create.module.js +0 -1
- package/dist/lib/command/create.project.d.ts +45 -0
- package/dist/lib/command/create.project.js +43 -0
- package/dist/lib/command/create.suite.d.ts +0 -1
- package/dist/lib/command/create.suite.js +0 -1
- package/dist/lib/command/create.test.d.ts +34 -0
- package/dist/lib/command/create.test.js +33 -0
- package/dist/lib/command/default.list.d.ts +0 -1
- package/dist/lib/command/default.list.js +0 -1
- package/dist/lib/command/init.config.d.ts +9 -0
- package/dist/lib/command/init.config.js +10 -0
- package/dist/lib/command/init.constant.d.ts +9 -0
- package/dist/lib/command/init.constant.js +10 -0
- package/dist/lib/command/init.error.d.ts +9 -0
- package/dist/lib/command/init.error.js +10 -0
- package/dist/lib/command/init.locale.d.ts +9 -0
- package/dist/lib/command/init.locale.js +10 -0
- package/dist/lib/command/init.main.d.ts +0 -1
- package/dist/lib/command/init.main.js +0 -1
- package/dist/lib/command/init.monkey.d.ts +0 -1
- package/dist/lib/command/init.monkey.js +0 -1
- package/dist/lib/command/init.static.d.ts +9 -0
- package/dist/lib/command/init.static.js +10 -0
- package/dist/lib/command/tools.crud.d.ts +34 -0
- package/dist/lib/command/tools.crud.js +33 -0
- package/dist/lib/command/tools.deps.d.ts +1 -11
- package/dist/lib/command/tools.deps.js +2 -12
- package/dist/lib/command/tools.metadata.d.ts +0 -1
- package/dist/lib/command/tools.metadata.js +0 -1
- package/dist/lib/commands.d.ts +237 -13
- package/dist/lib/commands.js +38 -11
- package/dist/lib/this.d.ts +0 -1
- package/dist/lib/this.js +0 -1
- package/dist/lib/utils.d.ts +15 -0
- package/dist/lib/utils.js +63 -0
- package/dist/typings.d.ts +0 -1
- package/dist/typings.js +0 -1
- package/package.json +50 -26
- package/templates/app/app.ejs +15 -0
- package/templates/app/bootstrap.ejs +13 -0
- package/templates/app/vona-modules-meta.ejs +49 -0
- package/templates/config/_tsconfig_project.json +12 -0
- package/templates/config/_tsconfig_source.json +40 -0
- package/templates/test/done-only.test.ts +3 -0
- package/templates/test/done.test.ts +3 -0
- package/cli/templates/create/bean/boilerplate/{{sceneName}}.{{beanName}}.ts_ +0 -4
- package/cli/templates/create/module/snippets/package.json.cjs +0 -11
- package/cli/templates/create/module/snippets/tsconfig.json.cjs +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/bean/cli.create.bean.d.ts.map +0 -1
- package/dist/lib/bean/cli.create.bean.js.map +0 -1
- package/dist/lib/bean/cli.create.module.d.ts.map +0 -1
- package/dist/lib/bean/cli.create.module.js.map +0 -1
- package/dist/lib/bean/cli.create.suite.d.ts.map +0 -1
- package/dist/lib/bean/cli.create.suite.js.map +0 -1
- package/dist/lib/bean/cli.default.list.d.ts.map +0 -1
- package/dist/lib/bean/cli.default.list.js.map +0 -1
- package/dist/lib/bean/cli.init.main.d.ts.map +0 -1
- package/dist/lib/bean/cli.init.main.js.map +0 -1
- package/dist/lib/bean/cli.init.monkey.d.ts.map +0 -1
- package/dist/lib/bean/cli.init.monkey.js.map +0 -1
- package/dist/lib/bean/cli.tools.build.d.ts.map +0 -1
- package/dist/lib/bean/cli.tools.build.js.map +0 -1
- package/dist/lib/bean/cli.tools.deps.d.ts.map +0 -1
- package/dist/lib/bean/cli.tools.deps.js.map +0 -1
- package/dist/lib/bean/cli.tools.metadata.d.ts.map +0 -1
- package/dist/lib/bean/cli.tools.metadata.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateAtoms.d.ts +0 -2
- package/dist/lib/bean/toolsMetadata/generateAtoms.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateAtoms.js +0 -24
- package/dist/lib/bean/toolsMetadata/generateAtoms.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateBeans.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateBeans.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateConfig.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateConfig.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateControllers.d.ts +0 -2
- package/dist/lib/bean/toolsMetadata/generateControllers.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateControllers.js +0 -24
- package/dist/lib/bean/toolsMetadata/generateControllers.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateEntities.d.ts +0 -2
- package/dist/lib/bean/toolsMetadata/generateEntities.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateEntities.js +0 -24
- package/dist/lib/bean/toolsMetadata/generateEntities.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateModels.d.ts +0 -2
- package/dist/lib/bean/toolsMetadata/generateModels.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateModels.js +0 -34
- package/dist/lib/bean/toolsMetadata/generateModels.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateMonkey.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateMonkey.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateScope.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateScope.js.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateServices.d.ts +0 -2
- package/dist/lib/bean/toolsMetadata/generateServices.d.ts.map +0 -1
- package/dist/lib/bean/toolsMetadata/generateServices.js +0 -54
- package/dist/lib/bean/toolsMetadata/generateServices.js.map +0 -1
- package/dist/lib/beans.d.ts.map +0 -1
- package/dist/lib/beans.js.map +0 -1
- package/dist/lib/command/create.bean.d.ts.map +0 -1
- package/dist/lib/command/create.bean.js.map +0 -1
- package/dist/lib/command/create.module.d.ts.map +0 -1
- package/dist/lib/command/create.module.js.map +0 -1
- package/dist/lib/command/create.suite.d.ts.map +0 -1
- package/dist/lib/command/create.suite.js.map +0 -1
- package/dist/lib/command/default.list.d.ts.map +0 -1
- package/dist/lib/command/default.list.js.map +0 -1
- package/dist/lib/command/init.main.d.ts.map +0 -1
- package/dist/lib/command/init.main.js.map +0 -1
- package/dist/lib/command/init.monkey.d.ts.map +0 -1
- package/dist/lib/command/init.monkey.js.map +0 -1
- package/dist/lib/command/tools.build.d.ts.map +0 -1
- package/dist/lib/command/tools.build.js.map +0 -1
- package/dist/lib/command/tools.deps.d.ts.map +0 -1
- package/dist/lib/command/tools.deps.js.map +0 -1
- package/dist/lib/command/tools.metadata.d.ts.map +0 -1
- package/dist/lib/command/tools.metadata.js.map +0 -1
- package/dist/lib/commands.d.ts.map +0 -1
- package/dist/lib/commands.js.map +0 -1
- package/dist/lib/this.d.ts.map +0 -1
- package/dist/lib/this.js.map +0 -1
- package/dist/typings.d.ts.map +0 -1
- package/dist/typings.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export declare function generateConfig(modulePath: string): Promise<"" | "/** config: begin */\nexport * from '../config/config.
|
|
2
|
-
export declare function generateConstant(modulePath: string): Promise<"" | "/** constant: begin */\nexport * from '../config/constants.
|
|
1
|
+
export declare function generateConfig(modulePath: string): Promise<"" | "/** config: begin */\nexport * from '../config/config.ts';\nimport type { config } from '../config/config.ts';\n/** config: end */\n">;
|
|
2
|
+
export declare function generateConstant(modulePath: string): Promise<"" | "/** constant: begin */\nexport * from '../config/constants.ts';\nimport { constants } from '../config/constants.ts';\n/** constant: end */\n">;
|
|
3
3
|
export declare function generateLocale(modulePath: string): Promise<string>;
|
|
4
|
-
export declare function generateError(modulePath: string): Promise<"" | "/** error: begin */\nexport * from '../config/errors.
|
|
5
|
-
//# sourceMappingURL=generateConfig.d.ts.map
|
|
4
|
+
export declare function generateError(modulePath: string): Promise<"" | "/** error: begin */\nexport * from '../config/errors.ts';\nimport type { Errors } from '../config/errors.ts';\n/** error: end */\n">;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import path from 'path';
|
|
1
|
+
import path from 'node:path';
|
|
2
2
|
import fse from 'fs-extra';
|
|
3
|
-
import
|
|
3
|
+
import { globby } from 'globby';
|
|
4
4
|
export async function generateConfig(modulePath) {
|
|
5
5
|
const configFile = path.join(modulePath, 'src/config/config.ts');
|
|
6
6
|
if (!fse.existsSync(configFile))
|
|
7
7
|
return '';
|
|
8
8
|
// combine
|
|
9
9
|
const content = `/** config: begin */
|
|
10
|
-
export * from '../config/config.
|
|
11
|
-
import { config } from '../config/config.
|
|
10
|
+
export * from '../config/config.ts';
|
|
11
|
+
import type { config } from '../config/config.ts';
|
|
12
12
|
/** config: end */
|
|
13
13
|
`;
|
|
14
14
|
return content;
|
|
@@ -19,24 +19,23 @@ export async function generateConstant(modulePath) {
|
|
|
19
19
|
return '';
|
|
20
20
|
// combine
|
|
21
21
|
const content = `/** constant: begin */
|
|
22
|
-
export * from '../config/constants.
|
|
23
|
-
import { constants } from '../config/constants.
|
|
22
|
+
export * from '../config/constants.ts';
|
|
23
|
+
import { constants } from '../config/constants.ts';
|
|
24
24
|
/** constant: end */
|
|
25
25
|
`;
|
|
26
26
|
return content;
|
|
27
27
|
}
|
|
28
28
|
export async function generateLocale(modulePath) {
|
|
29
|
-
const
|
|
30
|
-
const files = await eggBornUtils.tools.globbyAsync(pattern);
|
|
29
|
+
const files = await globby('src/config/locale/*.ts', { cwd: modulePath });
|
|
31
30
|
if (files.length === 0)
|
|
32
31
|
return '';
|
|
33
32
|
files.sort();
|
|
34
33
|
const contentImports = [];
|
|
35
34
|
const contentLocales = [];
|
|
36
35
|
for (const file of files) {
|
|
37
|
-
const localeName = path.basename(file
|
|
38
|
-
const className =
|
|
39
|
-
contentImports.push(`import ${className} from '../config/locale/${localeName}.
|
|
36
|
+
const localeName = path.basename(file, '.ts');
|
|
37
|
+
const className = `locale_${localeName.replace('-', '_')}`;
|
|
38
|
+
contentImports.push(`import ${className} from '../config/locale/${localeName}.ts';`);
|
|
40
39
|
contentLocales.push(`'${localeName}': ${className},`);
|
|
41
40
|
}
|
|
42
41
|
// combine
|
|
@@ -55,10 +54,9 @@ export async function generateError(modulePath) {
|
|
|
55
54
|
return '';
|
|
56
55
|
// combine
|
|
57
56
|
const content = `/** error: begin */
|
|
58
|
-
export * from '../config/errors.
|
|
59
|
-
import { Errors } from '../config/errors.
|
|
57
|
+
export * from '../config/errors.ts';
|
|
58
|
+
import type { Errors } from '../config/errors.ts';
|
|
60
59
|
/** error: end */
|
|
61
60
|
`;
|
|
62
61
|
return content;
|
|
63
62
|
}
|
|
64
|
-
//# sourceMappingURL=generateConfig.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { BeanCliBase } from '@cabloy/cli';
|
|
2
|
+
import type { OnionSceneMeta } from '@cabloy/module-info';
|
|
3
|
+
export declare function generateMetadataCustom(cli: BeanCliBase, sceneName: string, sceneMeta: OnionSceneMeta, moduleName: string, modulePath: string): Promise<any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
3
|
+
import { globBeanFiles } from "./utils.js";
|
|
4
|
+
export async function generateMetadataCustom(cli, sceneName, sceneMeta, moduleName, modulePath) {
|
|
5
|
+
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
6
|
+
const globFiles = await globBeanFiles(sceneName, sceneMeta, moduleName, modulePath);
|
|
7
|
+
if (globFiles.length === 0)
|
|
8
|
+
return '';
|
|
9
|
+
// custom
|
|
10
|
+
const jsFile = path.join(sceneMeta.module.root, sceneMeta.metadataCustom);
|
|
11
|
+
return await cli.helper.importDynamic(jsFile, async (instance) => {
|
|
12
|
+
const options = {
|
|
13
|
+
cli,
|
|
14
|
+
sceneName,
|
|
15
|
+
sceneNameCapitalize,
|
|
16
|
+
sceneMeta,
|
|
17
|
+
moduleName,
|
|
18
|
+
modulePath,
|
|
19
|
+
globFiles,
|
|
20
|
+
};
|
|
21
|
+
return await instance.default(options);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export declare function generateMonkey(modulePath: string): Promise<"" | "/** monkey: begin */\nexport * from '../monkey.
|
|
2
|
-
export declare function generateMain(modulePath: string): Promise<"" | "/** main: begin */\nexport * from '../main.
|
|
3
|
-
//# sourceMappingURL=generateMonkey.d.ts.map
|
|
1
|
+
export declare function generateMonkey(modulePath: string): Promise<"" | "/** monkey: begin */\nexport * from '../monkey.ts';\n/** monkey: end */\n">;
|
|
2
|
+
export declare function generateMain(modulePath: string): Promise<"" | "/** main: begin */\nexport * from '../main.ts';\n/** main: end */\n">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import path from 'path';
|
|
1
|
+
import path from 'node:path';
|
|
2
2
|
import fse from 'fs-extra';
|
|
3
3
|
export async function generateMonkey(modulePath) {
|
|
4
4
|
const monkeyFile = path.join(modulePath, 'src/monkey.ts');
|
|
@@ -6,7 +6,7 @@ export async function generateMonkey(modulePath) {
|
|
|
6
6
|
return '';
|
|
7
7
|
// combine
|
|
8
8
|
const content = `/** monkey: begin */
|
|
9
|
-
export * from '../monkey.
|
|
9
|
+
export * from '../monkey.ts';
|
|
10
10
|
/** monkey: end */
|
|
11
11
|
`;
|
|
12
12
|
return content;
|
|
@@ -17,9 +17,8 @@ export async function generateMain(modulePath) {
|
|
|
17
17
|
return '';
|
|
18
18
|
// combine
|
|
19
19
|
const content = `/** main: begin */
|
|
20
|
-
export * from '../main.
|
|
20
|
+
export * from '../main.ts';
|
|
21
21
|
/** main: end */
|
|
22
22
|
`;
|
|
23
23
|
return content;
|
|
24
24
|
}
|
|
25
|
-
//# sourceMappingURL=generateMonkey.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
2
|
+
import { extractBeanInfo, getScopeModuleName, globBeanFiles } from "./utils.js";
|
|
3
|
+
export async function generateOnions(sceneName, sceneMeta, moduleName, modulePath) {
|
|
4
|
+
const scopeModuleName = getScopeModuleName(moduleName);
|
|
5
|
+
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
6
|
+
const globFiles = await globBeanFiles(sceneName, sceneMeta, moduleName, modulePath);
|
|
7
|
+
if (globFiles.length === 0)
|
|
8
|
+
return '';
|
|
9
|
+
//
|
|
10
|
+
const contentExports = [];
|
|
11
|
+
const contentScopes = [];
|
|
12
|
+
const contentImports = [];
|
|
13
|
+
const contentRecordsGlobal = [];
|
|
14
|
+
const contentRecordsLocal = [];
|
|
15
|
+
let needImportOptionsGlobalInterface;
|
|
16
|
+
for (const globFile of globFiles) {
|
|
17
|
+
const { fileContent, fileNameJSRelative, className, beanNameFull, isIgnore, isVirtual } = globFile;
|
|
18
|
+
contentExports.push(`export * from '${fileNameJSRelative}';`);
|
|
19
|
+
if (isIgnore)
|
|
20
|
+
continue; // get scope() also can be ignored
|
|
21
|
+
// get scope() also can be ignored
|
|
22
|
+
if (!['entity', 'dto'].includes(sceneName) && !isVirtual) {
|
|
23
|
+
contentScopes.push(`
|
|
24
|
+
export interface ${className} {
|
|
25
|
+
/** @internal */
|
|
26
|
+
get scope(): ${scopeModuleName};
|
|
27
|
+
}`);
|
|
28
|
+
}
|
|
29
|
+
if (sceneMeta.optionsNone)
|
|
30
|
+
continue;
|
|
31
|
+
// fileInfo
|
|
32
|
+
const fileInfo = extractBeanInfo(sceneName, fileContent, sceneMeta);
|
|
33
|
+
// import options
|
|
34
|
+
if (fileInfo.optionsCustomInterface) {
|
|
35
|
+
contentImports.push(`import type { ${fileInfo.optionsCustomInterface} } from '${fileInfo.optionsCustomInterfaceFrom || fileNameJSRelative}';`);
|
|
36
|
+
}
|
|
37
|
+
// record
|
|
38
|
+
if (fileInfo.isGlobal) {
|
|
39
|
+
if (fileInfo.optionsCustomInterface) {
|
|
40
|
+
contentRecordsGlobal.push(`'${beanNameFull}': ${fileInfo.optionsCustomInterface};`);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
if (sceneMeta.optionsGlobalInterfaceName) {
|
|
44
|
+
contentRecordsGlobal.push(`'${beanNameFull}': ${sceneMeta.optionsGlobalInterfaceName};`);
|
|
45
|
+
needImportOptionsGlobalInterface = true;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
contentRecordsGlobal.push(`'${beanNameFull}': never;`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
if (fileInfo.optionsCustomInterface) {
|
|
54
|
+
contentRecordsLocal.push(`'${beanNameFull}': ${fileInfo.optionsCustomInterface};`);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
contentRecordsLocal.push(`'${beanNameFull}': never;`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// middlewareGlobal
|
|
62
|
+
const exportRecordsMiddlewareGlobal = `
|
|
63
|
+
export interface I${sceneNameCapitalize}Record${sceneMeta.hasLocal ? 'Global' : ''} {
|
|
64
|
+
${contentRecordsGlobal.join('\n')}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
// middlewareLocal
|
|
68
|
+
const exportRecordsMiddlewareLocal = `
|
|
69
|
+
export interface I${sceneNameCapitalize}RecordLocal {
|
|
70
|
+
${contentRecordsLocal.join('\n')}
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
// combine
|
|
74
|
+
const content = `/** ${sceneName}: begin */
|
|
75
|
+
${contentExports.join('\n')}
|
|
76
|
+
${contentImports.join('\n')}
|
|
77
|
+
${needImportOptionsGlobalInterface
|
|
78
|
+
? `import { type ${sceneMeta.optionsGlobalInterfaceName} } from '${sceneMeta.optionsGlobalInterfaceFrom || 'vona'}';`
|
|
79
|
+
: "import 'vona';"}
|
|
80
|
+
declare module '${sceneMeta.optionsGlobalInterfaceFrom || 'vona'}' {
|
|
81
|
+
${contentRecordsGlobal.length > 0 ? exportRecordsMiddlewareGlobal : ''}
|
|
82
|
+
${contentRecordsLocal.length > 0 ? exportRecordsMiddlewareLocal : ''}
|
|
83
|
+
}
|
|
84
|
+
declare module 'vona-module-${moduleName}' {
|
|
85
|
+
${contentScopes.join('\n')}
|
|
86
|
+
}
|
|
87
|
+
/** ${sceneName}: end */
|
|
88
|
+
`;
|
|
89
|
+
return content;
|
|
90
|
+
}
|
|
@@ -3,8 +3,5 @@ export interface GenerateScopeOptions {
|
|
|
3
3
|
errors: string;
|
|
4
4
|
locales: string;
|
|
5
5
|
constants: string;
|
|
6
|
-
services: string;
|
|
7
|
-
models: string;
|
|
8
6
|
}
|
|
9
|
-
export declare function generateScope(moduleName: string, relativeNameCapitalize: string, options: GenerateScopeOptions): Promise<string>;
|
|
10
|
-
//# sourceMappingURL=generateScope.d.ts.map
|
|
7
|
+
export declare function generateScope(moduleName: string, relativeNameCapitalize: string, scopeResources: Record<string, boolean>, options: GenerateScopeOptions): Promise<string>;
|
|
@@ -1,25 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export async function generateScope(moduleName, relativeNameCapitalize, options) {
|
|
1
|
+
import { relativeNameToCapitalize } from '@cabloy/module-info';
|
|
2
|
+
export async function generateScope(moduleName, relativeNameCapitalize, scopeResources, options) {
|
|
3
3
|
// scopeVariable
|
|
4
4
|
const parts = moduleName.split('-');
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const scopeVariable = parts[0] === 'a' ? parts[1] : relativeNameToCapitalize(moduleName, false);
|
|
6
|
+
const contentImports = [];
|
|
7
|
+
const contentRecords = [];
|
|
8
|
+
// basic
|
|
9
|
+
contentImports.push('BeanScopeBase');
|
|
10
|
+
// util
|
|
11
|
+
contentImports.push('type BeanScopeUtil');
|
|
12
|
+
contentRecords.push('util: BeanScopeUtil;');
|
|
13
|
+
//
|
|
14
|
+
if (options.config) {
|
|
15
|
+
contentImports.push('type TypeModuleConfig');
|
|
16
|
+
contentRecords.push('config: TypeModuleConfig<typeof config>;');
|
|
17
|
+
}
|
|
18
|
+
if (options.errors) {
|
|
19
|
+
contentImports.push('type TypeModuleErrors');
|
|
20
|
+
contentRecords.push('error: TypeModuleErrors<typeof Errors>;');
|
|
21
|
+
}
|
|
22
|
+
if (options.locales) {
|
|
23
|
+
contentImports.push('type TypeModuleLocales');
|
|
24
|
+
contentImports.push('type TypeLocaleBase');
|
|
25
|
+
contentRecords.push('locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;');
|
|
26
|
+
}
|
|
27
|
+
if (options.constants) {
|
|
28
|
+
contentImports.push('type TypeModuleConstants');
|
|
29
|
+
contentRecords.push('constant: TypeModuleConstants<typeof constants>;');
|
|
30
|
+
}
|
|
31
|
+
// loop
|
|
32
|
+
for (const sceneName in scopeResources) {
|
|
33
|
+
contentRecords.push(`${sceneName}: ${scopeResources[sceneName]};`);
|
|
34
|
+
}
|
|
7
35
|
// combine
|
|
8
36
|
const content = `/** scope: begin */
|
|
9
|
-
import {
|
|
37
|
+
import { ${contentImports.join(', ')} } from 'vona';
|
|
38
|
+
import { Scope } from '${moduleName === 'a-bean' ? '../lib/scope.ts' : 'vona-module-a-bean'}';
|
|
10
39
|
|
|
11
40
|
@Scope()
|
|
12
41
|
export class ScopeModule${relativeNameCapitalize} extends BeanScopeBase {}
|
|
13
42
|
|
|
14
|
-
export interface ScopeModule${relativeNameCapitalize}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
${options.errors ? 'typeof Errors' : 'any'},
|
|
18
|
-
${options.locales ? '(typeof locales)[TypeLocaleBase]' : 'any'},
|
|
19
|
-
${options.constants ? 'typeof constants' : 'any'},
|
|
20
|
-
${options.services ? 'IModuleService' : 'any'},
|
|
21
|
-
${options.models ? 'IModuleModel' : 'any'},
|
|
22
|
-
> {}
|
|
43
|
+
export interface ScopeModule${relativeNameCapitalize} {
|
|
44
|
+
${contentRecords.join('\n')}
|
|
45
|
+
}
|
|
23
46
|
|
|
24
47
|
import 'vona';
|
|
25
48
|
declare module 'vona' {
|
|
@@ -27,7 +50,7 @@ declare module 'vona' {
|
|
|
27
50
|
'${moduleName}': ScopeModule${relativeNameCapitalize};
|
|
28
51
|
}
|
|
29
52
|
|
|
30
|
-
export interface
|
|
53
|
+
export interface IBeanScopeContainer {
|
|
31
54
|
${scopeVariable}: ScopeModule${relativeNameCapitalize};
|
|
32
55
|
}
|
|
33
56
|
|
|
@@ -43,8 +66,12 @@ declare module 'vona' {
|
|
|
43
66
|
}`
|
|
44
67
|
: ''}
|
|
45
68
|
}
|
|
69
|
+
${options.locales
|
|
70
|
+
? `\nexport function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): \`${moduleName}::\${K}\` {
|
|
71
|
+
return \`${moduleName}::\${key}\`;
|
|
72
|
+
}`
|
|
73
|
+
: ''}
|
|
46
74
|
/** scope: end */
|
|
47
75
|
`;
|
|
48
76
|
return content;
|
|
49
77
|
}
|
|
50
|
-
//# sourceMappingURL=generateScope.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
2
|
+
import { globBeanFiles } from "./utils.js";
|
|
3
|
+
export async function generateScopeResources(sceneName, sceneMeta, moduleName, modulePath) {
|
|
4
|
+
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
5
|
+
const globFiles = await globBeanFiles(sceneName, sceneMeta, moduleName, modulePath);
|
|
6
|
+
if (globFiles.length === 0)
|
|
7
|
+
return '';
|
|
8
|
+
//
|
|
9
|
+
const contentImports = [];
|
|
10
|
+
const contentRecords = [];
|
|
11
|
+
for (const globFile of globFiles) {
|
|
12
|
+
const { fileNameJSRelative, className, beanName, isIgnore } = globFile;
|
|
13
|
+
if (isIgnore)
|
|
14
|
+
continue;
|
|
15
|
+
contentImports.push(`import type { ${className} } from '${fileNameJSRelative}';`);
|
|
16
|
+
contentRecords.push(`'${beanName}': ${className};`);
|
|
17
|
+
}
|
|
18
|
+
if (contentImports.length === 0)
|
|
19
|
+
return '';
|
|
20
|
+
// combine
|
|
21
|
+
const content = `/** ${sceneName}: begin */
|
|
22
|
+
${contentImports.join('\n')}
|
|
23
|
+
export interface IModule${sceneNameCapitalize} {
|
|
24
|
+
${contentRecords.join('\n')}
|
|
25
|
+
}
|
|
26
|
+
/** ${sceneName}: end */
|
|
27
|
+
`;
|
|
28
|
+
return content;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
2
|
+
import { globby } from 'globby';
|
|
3
|
+
export async function generateScopeResourcesMeta(metaName, _metaMeta, _sceneName, _sceneMeta, _moduleName, modulePath) {
|
|
4
|
+
const files = await globby(`src/bean/meta.${metaName}.ts`, { cwd: modulePath });
|
|
5
|
+
if (files.length === 0)
|
|
6
|
+
return '';
|
|
7
|
+
// combine
|
|
8
|
+
const content = `/** meta ${metaName}: begin */
|
|
9
|
+
import type { Meta${toUpperCaseFirstChar(metaName)} } from '../bean/meta.${metaName}.ts';
|
|
10
|
+
/** meta ${metaName}: end */
|
|
11
|
+
`;
|
|
12
|
+
return content;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IGlobBeanFile, OnionSceneMeta } from '@cabloy/module-info';
|
|
2
|
+
export declare function checkIgnoreOfParts(parts: string[]): boolean;
|
|
3
|
+
export declare function getScopeModuleName(moduleName: string): string;
|
|
4
|
+
export declare function globBeanFiles(sceneName: string, sceneMeta: OnionSceneMeta, moduleName: string, modulePath: string): Promise<IGlobBeanFile[]>;
|
|
5
|
+
export declare function extractBeanInfo(sceneName: string, fileContent: string, sceneMeta: OnionSceneMeta): {
|
|
6
|
+
optionsCustomInterface: string | undefined;
|
|
7
|
+
optionsCustomInterfaceFrom: string | undefined;
|
|
8
|
+
isGlobal: boolean | RegExpMatchArray | null;
|
|
9
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { stringToCapitalize, toUpperCaseFirstChar } from '@cabloy/word-utils';
|
|
3
|
+
import fse from 'fs-extra';
|
|
4
|
+
import { globby } from 'globby';
|
|
5
|
+
export function checkIgnoreOfParts(parts) {
|
|
6
|
+
const indexLast = parts.length - 1;
|
|
7
|
+
if (parts[indexLast].endsWith('_')) {
|
|
8
|
+
parts[indexLast] = parts[indexLast].substring(0, parts[indexLast].length - 1);
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
export function getScopeModuleName(moduleName) {
|
|
14
|
+
return `ScopeModule${stringToCapitalize(moduleName, '-')}`;
|
|
15
|
+
}
|
|
16
|
+
export async function globBeanFiles(sceneName, sceneMeta, moduleName, modulePath) {
|
|
17
|
+
const result = [];
|
|
18
|
+
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
19
|
+
const pattern = sceneMeta.sceneIsolate
|
|
20
|
+
? `src/${sceneName}/*.ts`
|
|
21
|
+
: `src/bean/${sceneName}.*.ts`;
|
|
22
|
+
const files = await globby(pattern, { cwd: modulePath });
|
|
23
|
+
if (files.length === 0)
|
|
24
|
+
return result;
|
|
25
|
+
files.sort();
|
|
26
|
+
for (const file of files) {
|
|
27
|
+
const filePath = path.join(modulePath, file);
|
|
28
|
+
const fileName = path.basename(file);
|
|
29
|
+
if (fileName.startsWith('_'))
|
|
30
|
+
continue;
|
|
31
|
+
const parts = fileName.split('.').slice(0, -1);
|
|
32
|
+
if (sceneMeta.sceneIsolate && parts.length !== 1)
|
|
33
|
+
continue;
|
|
34
|
+
if (!sceneMeta.sceneIsolate && parts.length < 2)
|
|
35
|
+
continue;
|
|
36
|
+
const isIgnore = checkIgnoreOfParts(parts);
|
|
37
|
+
const fileNameJS = fileName; // fileName.replace('.ts', '.js');
|
|
38
|
+
const fileNameJSRelative = sceneMeta.sceneIsolate ? `../${sceneName}/${fileNameJS}` : `../bean/${fileNameJS}`;
|
|
39
|
+
const className = (sceneMeta.sceneIsolate ? sceneNameCapitalize : '') + parts.map(item => toUpperCaseFirstChar(item)).join('');
|
|
40
|
+
const beanName = parts[parts.length - 1];
|
|
41
|
+
const beanNameFull = `${moduleName}:${beanName}`;
|
|
42
|
+
const fileContent = isIgnore ? '' : fse.readFileSync(filePath).toString();
|
|
43
|
+
const isVirtual = fileContent.includes('@Virtual()');
|
|
44
|
+
result.push({
|
|
45
|
+
sceneName,
|
|
46
|
+
sceneNameCapitalize,
|
|
47
|
+
file: filePath,
|
|
48
|
+
fileContent,
|
|
49
|
+
fileName,
|
|
50
|
+
fileNameJS,
|
|
51
|
+
fileNameJSRelative,
|
|
52
|
+
className,
|
|
53
|
+
beanName,
|
|
54
|
+
beanNameFull,
|
|
55
|
+
isIgnore,
|
|
56
|
+
isVirtual,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
export function extractBeanInfo(sceneName, fileContent, sceneMeta) {
|
|
62
|
+
const sceneNameCapitalize = toUpperCaseFirstChar(sceneName);
|
|
63
|
+
// optionsCustomInterface
|
|
64
|
+
let optionsCustomInterface;
|
|
65
|
+
let optionsCustomInterfaceFrom;
|
|
66
|
+
let reg = new RegExp(`@${sceneNameCapitalize}<(I${sceneNameCapitalize}Options[^>]*)>`);
|
|
67
|
+
let matches = fileContent.match(reg);
|
|
68
|
+
if (matches) {
|
|
69
|
+
optionsCustomInterface = matches[1];
|
|
70
|
+
// optionsCustomInterfaceFrom
|
|
71
|
+
reg = new RegExp(`import type {[\\s\\S]*?${optionsCustomInterface}[, ][\\s\\S]*?} from '([^']*)'`);
|
|
72
|
+
matches = fileContent.match(reg);
|
|
73
|
+
if (matches) {
|
|
74
|
+
optionsCustomInterfaceFrom = matches[1];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// isGlobal
|
|
78
|
+
const isGlobal = sceneMeta.hasLocal
|
|
79
|
+
? fileContent.match(/@.*?\(\{([\s\S]*?)global: true([\s\S]*?)\}([\s\S]*?)\)\s*export class/)
|
|
80
|
+
: true;
|
|
81
|
+
return { optionsCustomInterface, optionsCustomInterfaceFrom, isGlobal };
|
|
82
|
+
}
|
package/dist/lib/beans.d.ts
CHANGED
|
@@ -1,21 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { CliBinBuild } from './bean/cli.bin.build.ts';
|
|
2
|
+
import { CliBinDbReset } from './bean/cli.bin.dbReset.ts';
|
|
3
|
+
import { CliBinDemo } from './bean/cli.bin.demo.ts';
|
|
4
|
+
import { CliBinDev } from './bean/cli.bin.dev.ts';
|
|
5
|
+
import { CliBinTest } from './bean/cli.bin.test.ts';
|
|
6
|
+
import { CliBinTsc } from './bean/cli.bin.tsc.ts';
|
|
7
|
+
import { CliCreateBean } from './bean/cli.create.bean.ts';
|
|
8
|
+
import { CliCreateModule } from './bean/cli.create.module.ts';
|
|
9
|
+
import { CliCreateProject } from './bean/cli.create.project.ts';
|
|
10
|
+
import { CliCreateSuite } from './bean/cli.create.suite.ts';
|
|
11
|
+
import { CliCreateTest } from './bean/cli.create.test.ts';
|
|
12
|
+
import { CliDefaultList } from './bean/cli.default.list.ts';
|
|
13
|
+
import { CliInitConfig } from './bean/cli.init.config.ts';
|
|
14
|
+
import { CliInitConstant } from './bean/cli.init.constant.ts';
|
|
15
|
+
import { CliInitError } from './bean/cli.init.error.ts';
|
|
16
|
+
import { CliInitLocale } from './bean/cli.init.locale.ts';
|
|
17
|
+
import { CliInitMain } from './bean/cli.init.main.ts';
|
|
18
|
+
import { CliInitMonkey } from './bean/cli.init.monkey.ts';
|
|
19
|
+
import { CliInitStatic } from './bean/cli.init.static.ts';
|
|
20
|
+
import { CliToolsCrud } from './bean/cli.tools.crud.ts';
|
|
21
|
+
import { CliToolsDeps } from './bean/cli.tools.deps.ts';
|
|
22
|
+
import { CliToolsMetadata } from './bean/cli.tools.metadata.ts';
|
|
10
23
|
export declare const beans: {
|
|
11
24
|
'default.list': typeof CliDefaultList;
|
|
25
|
+
'bin.build': typeof CliBinBuild;
|
|
26
|
+
'bin.dbReset': typeof CliBinDbReset;
|
|
27
|
+
'bin.demo': typeof CliBinDemo;
|
|
28
|
+
'bin.dev': typeof CliBinDev;
|
|
29
|
+
'bin.test': typeof CliBinTest;
|
|
30
|
+
'bin.tsc': typeof CliBinTsc;
|
|
12
31
|
'create.suite': typeof CliCreateSuite;
|
|
13
32
|
'create.bean': typeof CliCreateBean;
|
|
14
33
|
'create.module': typeof CliCreateModule;
|
|
34
|
+
'create.project': typeof CliCreateProject;
|
|
35
|
+
'create.test': typeof CliCreateTest;
|
|
36
|
+
'init.config': typeof CliInitConfig;
|
|
37
|
+
'init.constant': typeof CliInitConstant;
|
|
38
|
+
'init.error': typeof CliInitError;
|
|
39
|
+
'init.locale': typeof CliInitLocale;
|
|
15
40
|
'init.monkey': typeof CliInitMonkey;
|
|
16
41
|
'init.main': typeof CliInitMain;
|
|
42
|
+
'init.static': typeof CliInitStatic;
|
|
17
43
|
'tools.deps': typeof CliToolsDeps;
|
|
18
44
|
'tools.metadata': typeof CliToolsMetadata;
|
|
19
|
-
'tools.
|
|
45
|
+
'tools.crud': typeof CliToolsCrud;
|
|
20
46
|
};
|
|
21
|
-
//# sourceMappingURL=beans.d.ts.map
|
package/dist/lib/beans.js
CHANGED
|
@@ -1,21 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { CliBinBuild } from "./bean/cli.bin.build.js";
|
|
2
|
+
import { CliBinDbReset } from "./bean/cli.bin.dbReset.js";
|
|
3
|
+
import { CliBinDemo } from "./bean/cli.bin.demo.js";
|
|
4
|
+
import { CliBinDev } from "./bean/cli.bin.dev.js";
|
|
5
|
+
import { CliBinTest } from "./bean/cli.bin.test.js";
|
|
6
|
+
import { CliBinTsc } from "./bean/cli.bin.tsc.js";
|
|
7
|
+
import { CliCreateBean } from "./bean/cli.create.bean.js";
|
|
8
|
+
import { CliCreateModule } from "./bean/cli.create.module.js";
|
|
9
|
+
import { CliCreateProject } from "./bean/cli.create.project.js";
|
|
10
|
+
import { CliCreateSuite } from "./bean/cli.create.suite.js";
|
|
11
|
+
import { CliCreateTest } from "./bean/cli.create.test.js";
|
|
12
|
+
import { CliDefaultList } from "./bean/cli.default.list.js";
|
|
13
|
+
import { CliInitConfig } from "./bean/cli.init.config.js";
|
|
14
|
+
import { CliInitConstant } from "./bean/cli.init.constant.js";
|
|
15
|
+
import { CliInitError } from "./bean/cli.init.error.js";
|
|
16
|
+
import { CliInitLocale } from "./bean/cli.init.locale.js";
|
|
17
|
+
import { CliInitMain } from "./bean/cli.init.main.js";
|
|
18
|
+
import { CliInitMonkey } from "./bean/cli.init.monkey.js";
|
|
19
|
+
import { CliInitStatic } from "./bean/cli.init.static.js";
|
|
20
|
+
import { CliToolsCrud } from "./bean/cli.tools.crud.js";
|
|
21
|
+
import { CliToolsDeps } from "./bean/cli.tools.deps.js";
|
|
22
|
+
import { CliToolsMetadata } from "./bean/cli.tools.metadata.js";
|
|
10
23
|
export const beans = {
|
|
11
24
|
'default.list': CliDefaultList,
|
|
25
|
+
'bin.build': CliBinBuild,
|
|
26
|
+
'bin.dbReset': CliBinDbReset,
|
|
27
|
+
'bin.demo': CliBinDemo,
|
|
28
|
+
'bin.dev': CliBinDev,
|
|
29
|
+
'bin.test': CliBinTest,
|
|
30
|
+
'bin.tsc': CliBinTsc,
|
|
12
31
|
'create.suite': CliCreateSuite,
|
|
13
32
|
'create.bean': CliCreateBean,
|
|
14
33
|
'create.module': CliCreateModule,
|
|
34
|
+
'create.project': CliCreateProject,
|
|
35
|
+
'create.test': CliCreateTest,
|
|
36
|
+
'init.config': CliInitConfig,
|
|
37
|
+
'init.constant': CliInitConstant,
|
|
38
|
+
'init.error': CliInitError,
|
|
39
|
+
'init.locale': CliInitLocale,
|
|
15
40
|
'init.monkey': CliInitMonkey,
|
|
16
41
|
'init.main': CliInitMain,
|
|
42
|
+
'init.static': CliInitStatic,
|
|
17
43
|
'tools.deps': CliToolsDeps,
|
|
18
44
|
'tools.metadata': CliToolsMetadata,
|
|
19
|
-
'tools.
|
|
45
|
+
'tools.crud': CliToolsCrud,
|
|
20
46
|
};
|
|
21
|
-
//# sourceMappingURL=beans.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
bean: string;
|
|
3
|
+
info: {
|
|
4
|
+
version: string;
|
|
5
|
+
title: string;
|
|
6
|
+
usage: string;
|
|
7
|
+
};
|
|
8
|
+
options: {
|
|
9
|
+
workers: {
|
|
10
|
+
description: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
flavor: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
bean: 'bin.build',
|
|
3
|
+
info: {
|
|
4
|
+
version: '5.0.0',
|
|
5
|
+
title: 'Cli: Tools: Bin',
|
|
6
|
+
usage: 'vona :bin:build [--workers=] [--flavor=] [--sourcemap=]',
|
|
7
|
+
},
|
|
8
|
+
options: {
|
|
9
|
+
workers: {
|
|
10
|
+
description: 'workers',
|
|
11
|
+
type: 'number',
|
|
12
|
+
},
|
|
13
|
+
flavor: {
|
|
14
|
+
description: 'flavor',
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|