vona-cli-set-api 1.0.301 → 1.0.305

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.
@@ -45,7 +45,7 @@ src/backend/typing/mine.d.ts
45
45
  !/docker-compose/output/app/vona/.gitkeep
46
46
  !/docker-compose/output/app/dist/.gitkeep
47
47
 
48
- /src/backend/demo
48
+ /src/backend/play
49
49
  /src/backend/app
50
50
  /src/backend/logs
51
51
  /src/backend/run
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "scripts": {
26
26
  "init": "pnpm install --no-frozen-lockfile && npm run prerun && pnpm install --no-frozen-lockfile && pnpm dedupe",
27
- "demo": "vona :bin:demo --flavor=demo --dummy",
27
+ "play": "vona :bin:play --flavor=play --dummy",
28
28
  "db:reset": "npm run prerun && vona :bin:dbReset --flavor=normal",
29
29
  "dev": "npm run prerun && vona :bin:dev --workers=2 --flavor=normal",
30
30
  "dev:one": "npm run prerun && vona :bin:dev --workers=1 --flavor=normal",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.176"
49
+ "vona": "^5.0.178"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
@@ -1,5 +1,6 @@
1
1
  import type { VonaLocaleOptional } from 'vona';
2
2
 
3
- export default {
4
- modules: {},
5
- } as VonaLocaleOptional;
3
+ const locale: VonaLocaleOptional = {};
4
+ locale.modules = {};
5
+
6
+ export default locale;
@@ -1,5 +1,6 @@
1
1
  import type { VonaLocaleOptional } from 'vona';
2
2
 
3
- export default {
4
- modules: {},
5
- } as VonaLocaleOptional;
3
+ const locale: VonaLocaleOptional = {};
4
+ locale.modules = {};
5
+
6
+ export default locale;
@@ -4,7 +4,7 @@
4
4
  "noEmit": true
5
5
  },
6
6
  "references": [],
7
- "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/demo", "src/backend/typing"],
7
+ "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/play", "src/backend/typing"],
8
8
  "exclude": [],
9
9
  "ts-node": {
10
10
  "swc": true
@@ -7,9 +7,9 @@ export interface IEntityOptions<%=argv.resourceNameCapitalize%> extends IDecorat
7
7
 
8
8
  @Entity<IEntityOptions<%=argv.resourceNameCapitalize%>>('<%=argv.moduleResourceName%>', { openapi: { title: $locale('<%=argv.resourceNameCapitalize%>') } })
9
9
  export class Entity<%=argv.resourceNameCapitalize%> extends EntityBase {
10
- @Api.field(v.openapi({ title: $locale('Name') }), v.default(''), v.min(3))
10
+ @Api.field(v.title($locale('Name')), v.default(''), v.min(3))
11
11
  name: string;
12
12
 
13
- @Api.field(v.openapi({ title: $locale('Description') }), v.optional())
13
+ @Api.field(v.title($locale('Description')), v.optional())
14
14
  description?: string;
15
15
  }
@@ -7,8 +7,8 @@ declare module '@cabloy/cli' {
7
7
  retainRuntime?: boolean;
8
8
  }
9
9
  }
10
- export declare class CliBinDemo extends BeanCliBase {
10
+ export declare class CliBinPlay extends BeanCliBase {
11
11
  execute(): Promise<void>;
12
- _demo(projectPath: string): Promise<void>;
12
+ _play(projectPath: string): Promise<void>;
13
13
  _run(projectPath: string): Promise<void>;
14
14
  }
@@ -3,19 +3,19 @@ import { BeanCliBase } from '@cabloy/cli';
3
3
  import fse from 'fs-extra';
4
4
  import { getImportEsm } from "../utils.js";
5
5
  import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
6
- export class CliBinDemo extends BeanCliBase {
6
+ export class CliBinPlay extends BeanCliBase {
7
7
  async execute() {
8
8
  const { argv } = this.context;
9
9
  // super
10
10
  await super.execute();
11
11
  const projectPath = argv.projectPath;
12
12
  // test
13
- await this._demo(projectPath);
13
+ await this._play(projectPath);
14
14
  }
15
- async _demo(projectPath) {
15
+ async _play(projectPath) {
16
16
  const { argv } = this.context;
17
17
  const mode = argv.mode || 'dev';
18
- const flavor = argv.flavor || 'demo';
18
+ const flavor = argv.flavor || 'play';
19
19
  const configMeta = { flavor, mode };
20
20
  if (!argv.retainRuntime || !fse.existsSync(path.join(projectPath, '.vona'))) {
21
21
  const configOptions = {
@@ -29,15 +29,15 @@ export class CliBinDemo extends BeanCliBase {
29
29
  }
30
30
  async _run(projectPath) {
31
31
  // testFile
32
- let testFile = path.join(import.meta.dirname, './toolsBin/demo.ts');
32
+ let testFile = path.join(import.meta.dirname, './toolsBin/play.ts');
33
33
  if (!fse.existsSync(testFile)) {
34
- testFile = path.join(import.meta.dirname, './toolsBin/demo.js');
34
+ testFile = path.join(import.meta.dirname, './toolsBin/play.js');
35
35
  }
36
36
  // run
37
37
  let args = [];
38
38
  args = args.concat([getImportEsm(), testFile, projectPath]);
39
39
  // args = args.concat(['--experimental-transform-types', getImportEsm(), testFile, projectPath]);
40
- const pos = process.argv.indexOf(':bin:demo');
40
+ const pos = process.argv.indexOf(':bin:play');
41
41
  if (pos > -1) {
42
42
  args = args.concat(process.argv.slice(pos + 1));
43
43
  }
@@ -29,18 +29,18 @@ if (argv._[0]?.endsWith('.ts')) {
29
29
  else {
30
30
  mainFile = 'index.ts';
31
31
  }
32
- await demoRun(projectPath);
33
- async function demoRun(projectPath) {
32
+ await playRun(projectPath);
33
+ async function playRun(projectPath) {
34
34
  // create
35
35
  const app = await createGeneralApp(projectPath);
36
- // demo
37
- const demoFile = path.join(projectPath, `src/backend/demo/${mainFile}`);
38
- if (!fse.existsSync(demoFile)) {
39
- await fse.outputFile(demoFile, __template);
36
+ // play
37
+ const playFile = path.join(projectPath, `src/backend/play/${mainFile}`);
38
+ if (!fse.existsSync(playFile)) {
39
+ await fse.outputFile(playFile, __template);
40
40
  }
41
41
  // run
42
- const demoInstance = await import(__rewriteRelativeImportExtension(pathToHref(demoFile)));
43
- await demoInstance.main(app, argv);
42
+ const playInstance = await import(__rewriteRelativeImportExtension(pathToHref(playFile)));
43
+ await playInstance.main(app, argv);
44
44
  // close
45
45
  await app.close();
46
46
  // handles
@@ -1,8 +1,8 @@
1
1
  import { CliBinBuild } from './bean/cli.bin.build.ts';
2
2
  import { CliBinBuildModule } from './bean/cli.bin.buildModule.ts';
3
3
  import { CliBinDbReset } from './bean/cli.bin.dbReset.ts';
4
- import { CliBinDemo } from './bean/cli.bin.demo.ts';
5
4
  import { CliBinDev } from './bean/cli.bin.dev.ts';
5
+ import { CliBinPlay } from './bean/cli.bin.play.ts';
6
6
  import { CliBinTest } from './bean/cli.bin.test.ts';
7
7
  import { CliBinTsc } from './bean/cli.bin.tsc.ts';
8
8
  import { CliCreateBean } from './bean/cli.create.bean.ts';
@@ -29,7 +29,7 @@ export declare const beans: {
29
29
  'bin.build': typeof CliBinBuild;
30
30
  'bin.buildModule': typeof CliBinBuildModule;
31
31
  'bin.dbReset': typeof CliBinDbReset;
32
- 'bin.demo': typeof CliBinDemo;
32
+ 'bin.play': typeof CliBinPlay;
33
33
  'bin.dev': typeof CliBinDev;
34
34
  'bin.test': typeof CliBinTest;
35
35
  'bin.tsc': typeof CliBinTsc;
package/dist/lib/beans.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CliBinBuild } from "./bean/cli.bin.build.js";
2
2
  import { CliBinBuildModule } from "./bean/cli.bin.buildModule.js";
3
3
  import { CliBinDbReset } from "./bean/cli.bin.dbReset.js";
4
- import { CliBinDemo } from "./bean/cli.bin.demo.js";
5
4
  import { CliBinDev } from "./bean/cli.bin.dev.js";
5
+ import { CliBinPlay } from "./bean/cli.bin.play.js";
6
6
  import { CliBinTest } from "./bean/cli.bin.test.js";
7
7
  import { CliBinTsc } from "./bean/cli.bin.tsc.js";
8
8
  import { CliCreateBean } from "./bean/cli.create.bean.js";
@@ -29,7 +29,7 @@ export const beans = {
29
29
  'bin.build': CliBinBuild,
30
30
  'bin.buildModule': CliBinBuildModule,
31
31
  'bin.dbReset': CliBinDbReset,
32
- 'bin.demo': CliBinDemo,
32
+ 'bin.play': CliBinPlay,
33
33
  'bin.dev': CliBinDev,
34
34
  'bin.test': CliBinTest,
35
35
  'bin.tsc': CliBinTsc,
@@ -1,9 +1,9 @@
1
1
  export default {
2
- bean: 'bin.demo',
2
+ bean: 'bin.play',
3
3
  info: {
4
4
  version: '5.0.0',
5
- title: 'Cli: Bin: Demo',
6
- usage: 'vona :bin:demo [index.ts] [--flavor=] [--retainRuntime=]',
5
+ title: 'Cli: Bin: Play',
6
+ usage: 'vona :bin:play [index.ts] [--flavor=] [--retainRuntime=]',
7
7
  },
8
8
  options: {
9
9
  mode: {
@@ -70,7 +70,7 @@ export declare const commands: {
70
70
  };
71
71
  };
72
72
  };
73
- demo: {
73
+ dev: {
74
74
  bean: string;
75
75
  info: {
76
76
  version: string;
@@ -78,7 +78,7 @@ export declare const commands: {
78
78
  usage: string;
79
79
  };
80
80
  options: {
81
- mode: {
81
+ workers: {
82
82
  description: string;
83
83
  type: string;
84
84
  };
@@ -86,13 +86,9 @@ export declare const commands: {
86
86
  description: string;
87
87
  type: string;
88
88
  };
89
- retainRuntime: {
90
- description: string;
91
- type: string;
92
- };
93
89
  };
94
90
  };
95
- dev: {
91
+ play: {
96
92
  bean: string;
97
93
  info: {
98
94
  version: string;
@@ -100,7 +96,7 @@ export declare const commands: {
100
96
  usage: string;
101
97
  };
102
98
  options: {
103
- workers: {
99
+ mode: {
104
100
  description: string;
105
101
  type: string;
106
102
  };
@@ -108,6 +104,10 @@ export declare const commands: {
108
104
  description: string;
109
105
  type: string;
110
106
  };
107
+ retainRuntime: {
108
+ description: string;
109
+ type: string;
110
+ };
111
111
  };
112
112
  };
113
113
  test: {
@@ -1,8 +1,8 @@
1
1
  import binBuild from "./command/bin.build.js";
2
2
  import binBuildModule from "./command/bin.buildModule.js";
3
3
  import binDbReset from "./command/bin.dbReset.js";
4
- import binDemo from "./command/bin.demo.js";
5
4
  import binDev from "./command/bin.dev.js";
5
+ import binPlay from "./command/bin.play.js";
6
6
  import binTest from "./command/bin.test.js";
7
7
  import binTsc from "./command/bin.tsc.js";
8
8
  import createBean from "./command/create.bean.js";
@@ -32,8 +32,8 @@ export const commands = {
32
32
  build: binBuild,
33
33
  buildModule: binBuildModule,
34
34
  dbReset: binDbReset,
35
- demo: binDemo,
36
35
  dev: binDev,
36
+ play: binPlay,
37
37
  test: binTest,
38
38
  tsc: binTsc,
39
39
  },
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.301",
4
+ "version": "1.0.305",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -31,11 +31,11 @@
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.51",
34
+ "@cabloy/cli": "^3.0.52",
35
35
  "@cabloy/dotenv": "^1.1.10",
36
36
  "@cabloy/extend": "^3.1.10",
37
- "@cabloy/module-glob": "^5.2.28",
38
- "@cabloy/module-info": "^1.3.28",
37
+ "@cabloy/module-glob": "^5.2.29",
38
+ "@cabloy/module-info": "^1.3.29",
39
39
  "@cabloy/word-utils": "^2.0.1",
40
40
  "@lcov-viewer/cli": "^1.3.0",
41
41
  "@rollup/plugin-alias": "^5.1.1",
@@ -61,7 +61,7 @@
61
61
  "ts-node-maintained": "^10.9.6",
62
62
  "urllib": "^4.6.11",
63
63
  "uuid": "^11.1.0",
64
- "vona-core": "^5.0.76",
64
+ "vona-core": "^5.0.78",
65
65
  "why-is-node-running": "^3.2.2",
66
66
  "yargs-parser": "^21.1.1"
67
67
  },
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "noEmit": true
5
5
  },
6
- "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/demo", "src/backend/typing"],
6
+ "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/play", "src/backend/typing"],
7
7
  "exclude": [],
8
8
  "ts-node": {
9
9
  "swc": true
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "noEmit": true
5
5
  },
6
- "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/demo", "src/backend/typing"],
6
+ "include": [".vona/**/*.ts", "src/backend/package.json", "src/backend/config", "src/backend/play", "src/backend/typing"],
7
7
  "exclude": [],
8
8
  "ts-node": {
9
9
  "swc": true
File without changes