vona-cli-set-api 1.0.388 → 1.0.391
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/docker-compose.yml +2 -2
- package/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/pnpm-workspace.yaml +5 -5
- package/cli/templates/tools/crud/boilerplate/src/entity/{{resourceName}}.ts_ +1 -1
- package/cli/templates/tools/crud/snippets/2-meta.index.ts +2 -0
- package/cli/templates/tools/crud/snippets/2-meta.version.ts +2 -0
- package/cli/templates/tools/crud/snippets/3-en-us.ts +6 -1
- package/dist/lib/bean/cli.bin.dev.js +2 -2
- package/dist/lib/bean/cli.create.bean.js +3 -1
- package/dist/lib/bean/cli.create.project.js +2 -0
- package/dist/lib/bean/cli.init.config.js +3 -1
- package/dist/lib/bean/cli.init.constant.js +3 -1
- package/dist/lib/bean/cli.init.error.js +3 -1
- package/dist/lib/bean/cli.init.lib.js +3 -1
- package/dist/lib/bean/cli.init.locale.js +3 -1
- package/dist/lib/bean/cli.init.main.js +3 -1
- package/dist/lib/bean/cli.init.monkey.js +3 -1
- package/dist/lib/bean/cli.init.static.js +3 -1
- package/dist/lib/bean/cli.init.types.js +3 -1
- package/dist/lib/bean/cli.tools.crud.js +5 -1
- package/package.json +2 -2
|
@@ -39,12 +39,12 @@ services:
|
|
|
39
39
|
shm_size: 128mb
|
|
40
40
|
# or set shared memory limit when deploy via swarm stack
|
|
41
41
|
volumes:
|
|
42
|
-
- ./docker-compose/data/pg:/var/lib/postgresql/data
|
|
42
|
+
- ./docker-compose/data/pg:/var/lib/postgresql/data
|
|
43
43
|
environment:
|
|
44
44
|
POSTGRES_DB: <%=argv.name%>
|
|
45
45
|
POSTGRES_USER: <%=argv.DATABASE_CLIENT_PG_USER%>
|
|
46
46
|
POSTGRES_PASSWORD: '<%=argv.DATABASE_CLIENT_PG_PASSWORD%>'
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
mysql:
|
|
49
49
|
image: mysql:8.1
|
|
50
50
|
command:
|
|
@@ -8,7 +8,7 @@ packages:
|
|
|
8
8
|
|
|
9
9
|
hoist: true
|
|
10
10
|
hoistWorkspacePackages: true
|
|
11
|
-
linkWorkspacePackages:
|
|
11
|
+
linkWorkspacePackages: deep
|
|
12
12
|
preferWorkspacePackages: true
|
|
13
13
|
autoInstallPeers: true
|
|
14
14
|
publicHoistPattern:
|
|
@@ -16,13 +16,13 @@ publicHoistPattern:
|
|
|
16
16
|
- '*@babel*'
|
|
17
17
|
- '*eslint*'
|
|
18
18
|
- '*types*'
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- lerna
|
|
20
|
+
- vona
|
|
21
21
|
- '*vona*'
|
|
22
|
-
-
|
|
22
|
+
- cabloy
|
|
23
23
|
- '@cabloy'
|
|
24
24
|
- '*cabloy*'
|
|
25
25
|
- '*@cabloy*'
|
|
26
26
|
- '*why-is-node-running*'
|
|
27
27
|
- '*ts-node*'
|
|
28
|
-
-
|
|
28
|
+
- zod
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
-
import { Entity, EntityBase } from 'vona-module-a-orm';
|
|
3
2
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
3
|
+
import { Entity, EntityBase } from 'vona-module-a-orm';
|
|
4
4
|
import { $locale } from '../.metadata/index.ts';
|
|
5
5
|
|
|
6
6
|
export interface IEntityOptions<%=argv.resourceNameCapitalize%> extends IDecoratorEntityOptions {}
|
|
@@ -17,7 +17,12 @@ export default metadataCustomSnippet({
|
|
|
17
17
|
language: 'gogo',
|
|
18
18
|
init: async ({ cli, argv, targetFile }) => {
|
|
19
19
|
await catchError(() => {
|
|
20
|
-
return cli.helper.invokeCli([
|
|
20
|
+
return cli.helper.invokeCli([
|
|
21
|
+
':init:locale',
|
|
22
|
+
argv.module,
|
|
23
|
+
'--nometadata',
|
|
24
|
+
'--noformat',
|
|
25
|
+
], {
|
|
21
26
|
cwd: argv.projectPath,
|
|
22
27
|
});
|
|
23
28
|
});
|
|
@@ -51,7 +51,9 @@ export class CliCreateBean extends BeanCliBase {
|
|
|
51
51
|
boilerplatePath: boilerplateName,
|
|
52
52
|
});
|
|
53
53
|
// tools.metadata
|
|
54
|
-
|
|
54
|
+
if (!argv.nometadata) {
|
|
55
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
_getBoilerplatesOrSnippets(type, custom) {
|
|
57
59
|
const type2 = custom ? `${type}${toUpperCaseFirstChar(custom)}` : type;
|
|
@@ -31,6 +31,8 @@ export class CliInitConfig extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/config/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -31,6 +31,8 @@ export class CliInitConstant extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/constant/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -42,6 +42,8 @@ export class CliInitError extends BeanCliBase {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
// tools.metadata
|
|
45
|
-
|
|
45
|
+
if (!argv.nometadata) {
|
|
46
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
47
|
+
}
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -31,6 +31,8 @@ export class CliInitLib extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/lib/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -31,6 +31,8 @@ export class CliInitLocale extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/locale/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -31,6 +31,8 @@ export class CliInitMain extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/main/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -33,7 +33,9 @@ export class CliInitMonkey extends BeanCliBase {
|
|
|
33
33
|
// set vonaModule.capabilities.monkey: true
|
|
34
34
|
await this._setPackageInfo(targetDir);
|
|
35
35
|
// tools.metadata
|
|
36
|
-
|
|
36
|
+
if (!argv.nometadata) {
|
|
37
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
async _setPackageInfo(modulePath) {
|
|
39
41
|
const pkgFile = path.join(modulePath, 'package.json');
|
|
@@ -31,6 +31,8 @@ export class CliInitStatic extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/static/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// // tools.metadata
|
|
34
|
-
//
|
|
34
|
+
// if (!argv.nometadata) {
|
|
35
|
+
// await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
// }
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -31,6 +31,8 @@ export class CliInitTypes extends BeanCliBase {
|
|
|
31
31
|
boilerplatePath: 'init/types/boilerplate',
|
|
32
32
|
});
|
|
33
33
|
// tools.metadata
|
|
34
|
-
|
|
34
|
+
if (!argv.nometadata) {
|
|
35
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -8,6 +8,8 @@ export class CliToolsCrud extends BeanCliBase {
|
|
|
8
8
|
const { argv } = this.context;
|
|
9
9
|
// super
|
|
10
10
|
await super.execute();
|
|
11
|
+
// noformat
|
|
12
|
+
argv.noformat = true;
|
|
11
13
|
// module name/info
|
|
12
14
|
const moduleName = argv.module;
|
|
13
15
|
argv.moduleInfo = this.helper.parseModuleInfo(moduleName);
|
|
@@ -37,6 +39,8 @@ export class CliToolsCrud extends BeanCliBase {
|
|
|
37
39
|
boilerplatePath: 'tools/crud/boilerplate',
|
|
38
40
|
});
|
|
39
41
|
// tools.metadata
|
|
40
|
-
|
|
42
|
+
if (!argv.nometadata) {
|
|
43
|
+
await this.helper.invokeCli([':tools:metadata', moduleName], { cwd: argv.projectPath });
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
}
|
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.391",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
32
32
|
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
33
33
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
34
|
-
"@cabloy/cli": "^3.0.
|
|
34
|
+
"@cabloy/cli": "^3.0.63",
|
|
35
35
|
"@cabloy/dotenv": "^1.1.10",
|
|
36
36
|
"@cabloy/extend": "^3.1.10",
|
|
37
37
|
"@cabloy/module-glob": "^5.2.33",
|