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.
- package/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/init/appMonkey/boilerplate/monkey.ts +14 -0
- package/dist/lib/bean/cli.init.appMonkey.d.ts +8 -0
- package/dist/lib/bean/cli.init.appMonkey.js +24 -0
- package/dist/lib/beans.d.ts +2 -0
- package/dist/lib/beans.js +2 -0
- package/dist/lib/command/init.appMonkey.d.ts +9 -0
- package/dist/lib/command/init.appMonkey.js +10 -0
- package/dist/lib/commands.d.ts +8 -0
- package/dist/lib/commands.js +2 -0
- package/package.json +2 -2
|
@@ -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,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
|
+
}
|
package/dist/lib/beans.d.ts
CHANGED
|
@@ -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,
|
package/dist/lib/commands.d.ts
CHANGED
package/dist/lib/commands.js
CHANGED
|
@@ -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.
|
|
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.
|
|
64
|
+
"vona-core": "^5.0.75",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|