vona-cli-set-api 1.0.293 → 1.0.296

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.
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.171"
49
+ "vona": "^5.0.173"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
@@ -0,0 +1,14 @@
1
+ import type { IModule } from '@cabloy/module-info';
2
+ import type { IMonkeyModule, IMonkeySystem } from 'vona';
3
+ import { BeanSimple } from 'vona';
4
+
5
+ export class AppMonkey extends BeanSimple implements IMonkeyModule, IMonkeySystem {
6
+ async moduleLoading(_module: IModule) {}
7
+ async moduleLoaded(_module: IModule) {}
8
+ async configLoaded(_module: IModule, _config: any) {}
9
+ async appStart() {}
10
+ async appReady() {}
11
+ async appStarted() {}
12
+ async appClose() {}
13
+ async appClosed() {}
14
+ }
@@ -0,0 +1,8 @@
1
+ import { BeanCliBase } from '@cabloy/cli';
2
+ declare module '@cabloy/cli' {
3
+ interface ICommandArgv {
4
+ }
5
+ }
6
+ export declare class CliInitAppMonkey extends BeanCliBase {
7
+ execute(): Promise<void>;
8
+ }
@@ -0,0 +1,24 @@
1
+ import path from 'node:path';
2
+ import { BeanCliBase } from '@cabloy/cli';
3
+ import fse from 'fs-extra';
4
+ import { __ThisSetName__ } from "../this.js";
5
+ export class CliInitAppMonkey extends BeanCliBase {
6
+ async execute() {
7
+ const { argv } = this.context;
8
+ // super
9
+ await super.execute();
10
+ // target dir
11
+ const targetDir = path.join(argv.projectPath, 'src/backend/config');
12
+ const monkeyFile = path.join(targetDir, 'monkey.ts');
13
+ if (fse.existsSync(monkeyFile)) {
14
+ throw new Error('app monkey exists');
15
+ }
16
+ // render boilerplate
17
+ await this.template.renderBoilerplateAndSnippets({
18
+ targetDir,
19
+ setName: __ThisSetName__,
20
+ snippetsPath: null,
21
+ boilerplatePath: 'init/appMonkey/boilerplate',
22
+ });
23
+ }
24
+ }
@@ -11,6 +11,7 @@ import { CliCreateProject } from './bean/cli.create.project.ts';
11
11
  import { CliCreateSuite } from './bean/cli.create.suite.ts';
12
12
  import { CliCreateTest } from './bean/cli.create.test.ts';
13
13
  import { CliDefaultList } from './bean/cli.default.list.ts';
14
+ import { CliInitAppMonkey } from './bean/cli.init.appMonkey.ts';
14
15
  import { CliInitConfig } from './bean/cli.init.config.ts';
15
16
  import { CliInitConstant } from './bean/cli.init.constant.ts';
16
17
  import { CliInitError } from './bean/cli.init.error.ts';
@@ -46,6 +47,7 @@ export declare const beans: {
46
47
  'init.static': typeof CliInitStatic;
47
48
  'init.lib': typeof CliInitLib;
48
49
  'init.types': typeof CliInitTypes;
50
+ 'init.appMonkey': typeof CliInitAppMonkey;
49
51
  'tools.deps': typeof CliToolsDeps;
50
52
  'tools.metadata': typeof CliToolsMetadata;
51
53
  'tools.crud': typeof CliToolsCrud;
package/dist/lib/beans.js CHANGED
@@ -11,6 +11,7 @@ import { CliCreateProject } from "./bean/cli.create.project.js";
11
11
  import { CliCreateSuite } from "./bean/cli.create.suite.js";
12
12
  import { CliCreateTest } from "./bean/cli.create.test.js";
13
13
  import { CliDefaultList } from "./bean/cli.default.list.js";
14
+ import { CliInitAppMonkey } from "./bean/cli.init.appMonkey.js";
14
15
  import { CliInitConfig } from "./bean/cli.init.config.js";
15
16
  import { CliInitConstant } from "./bean/cli.init.constant.js";
16
17
  import { CliInitError } from "./bean/cli.init.error.js";
@@ -46,6 +47,7 @@ export const beans = {
46
47
  'init.static': CliInitStatic,
47
48
  'init.lib': CliInitLib,
48
49
  'init.types': CliInitTypes,
50
+ 'init.appMonkey': CliInitAppMonkey,
49
51
  'tools.deps': CliToolsDeps,
50
52
  'tools.metadata': CliToolsMetadata,
51
53
  'tools.crud': CliToolsCrud,
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ bean: string;
3
+ info: {
4
+ version: string;
5
+ title: string;
6
+ usage: string;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export default {
2
+ bean: 'init.appMonkey',
3
+ info: {
4
+ version: '5.0.0',
5
+ title: 'Cli: Init: App Monkey',
6
+ usage: 'vona :init:appMonkey',
7
+ },
8
+ // options: null,
9
+ // groups: null,
10
+ };
@@ -415,6 +415,14 @@ export declare const commands: {
415
415
  usage: string;
416
416
  };
417
417
  };
418
+ appMonkey: {
419
+ bean: string;
420
+ info: {
421
+ version: string;
422
+ title: string;
423
+ usage: string;
424
+ };
425
+ };
418
426
  };
419
427
  refactor: {};
420
428
  tools: {
@@ -11,6 +11,7 @@ import createProject from "./command/create.project.js";
11
11
  import createSuite from "./command/create.suite.js";
12
12
  import createTest from "./command/create.test.js";
13
13
  import defaultList from "./command/default.list.js";
14
+ import initAppMonkey from "./command/init.appMonkey.js";
14
15
  import initConfig from "./command/init.config.js";
15
16
  import initConstant from "./command/init.constant.js";
16
17
  import initError from "./command/init.error.js";
@@ -53,6 +54,7 @@ export const commands = {
53
54
  static: initStatic,
54
55
  lib: initLib,
55
56
  types: initTypes,
57
+ appMonkey: initAppMonkey,
56
58
  },
57
59
  refactor: {},
58
60
  tools: {
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.293",
4
+ "version": "1.0.296",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -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.74",
64
+ "vona-core": "^5.0.75",
65
65
  "why-is-node-running": "^3.2.2",
66
66
  "yargs-parser": "^21.1.1"
67
67
  },