vona-cli-set-api 1.0.130 → 1.0.133
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/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/dist/.metadata/index.d.ts +10 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/.metadata/index.ts +11 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/tsconfig.build.tsbuildinfo +1 -1
- package/dist/lib/bean/cli.bin.demo.d.ts +2 -1
- package/dist/lib/bean/cli.bin.demo.js +1 -1
- package/dist/lib/bean/toolsBin/demo.js +12 -2
- package/dist/lib/command/bin.demo.d.ts +4 -0
- package/dist/lib/command/bin.demo.js +4 -0
- package/dist/lib/commands.d.ts +4 -0
- package/package.json +2 -2
- package/templates/app/bootstrap.ejs +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { VonaMetaFlavor } from '@cabloy/module-info';
|
|
1
|
+
import type { VonaMetaFlavor, VonaMetaMode } from '@cabloy/module-info';
|
|
2
2
|
import { BeanCliBase } from '@cabloy/cli';
|
|
3
3
|
declare module '@cabloy/cli' {
|
|
4
4
|
interface ICommandArgv {
|
|
5
|
+
mode?: VonaMetaMode;
|
|
5
6
|
flavor?: VonaMetaFlavor;
|
|
6
7
|
retainRuntime?: boolean;
|
|
7
8
|
}
|
|
@@ -13,7 +13,7 @@ export class CliBinDemo extends BeanCliBase {
|
|
|
13
13
|
}
|
|
14
14
|
async _demo(projectPath) {
|
|
15
15
|
const { argv } = this.context;
|
|
16
|
-
const mode = 'dev';
|
|
16
|
+
const mode = argv.mode || 'dev';
|
|
17
17
|
const flavor = argv.flavor || 'normal';
|
|
18
18
|
const configMeta = { flavor, mode };
|
|
19
19
|
if (!argv.retainRuntime || !fse.existsSync(path.join(projectPath, '.vona'))) {
|
|
@@ -7,8 +7,10 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
7
7
|
return path;
|
|
8
8
|
};
|
|
9
9
|
import path from 'node:path';
|
|
10
|
+
import { sleep } from '@cabloy/utils';
|
|
10
11
|
import fse from 'fs-extra';
|
|
11
|
-
import {
|
|
12
|
+
import { createGeneralApp, pathToHref } from 'vona-core';
|
|
13
|
+
import whyIsNodeRunning from 'why-is-node-running';
|
|
12
14
|
import parser from 'yargs-parser';
|
|
13
15
|
const __template = `import type { IArgv, VonaApplication } from 'vona';
|
|
14
16
|
|
|
@@ -37,5 +39,13 @@ async function demoRun(projectPath) {
|
|
|
37
39
|
const demoInstance = await import(__rewriteRelativeImportExtension(pathToHref(demoFile)));
|
|
38
40
|
await demoInstance.main(app, argv);
|
|
39
41
|
// close
|
|
40
|
-
await
|
|
42
|
+
await app.close();
|
|
43
|
+
// handles
|
|
44
|
+
if (process.env.TEST_WHYISNODERUNNING === 'true') {
|
|
45
|
+
await sleep(2000);
|
|
46
|
+
const handles = process._getActiveHandles();
|
|
47
|
+
if (handles.length > 3) {
|
|
48
|
+
whyIsNodeRunning();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
41
51
|
}
|
package/dist/lib/commands.d.ts
CHANGED
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.133",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"urllib": "^4.6.11",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"vona-core": "^5.0.
|
|
64
|
+
"vona-core": "^5.0.43",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|
|
@@ -4,7 +4,7 @@ import config from './config.ts';
|
|
|
4
4
|
import env from './env.ts';
|
|
5
5
|
<%=appMonkey?"import { AppMonkey } from '../src/backend/config/monkey.ts';":''%>
|
|
6
6
|
|
|
7
|
-
bootstrap({
|
|
7
|
+
export const appBootstrap = bootstrap({
|
|
8
8
|
modulesMeta: () => import('./modules-meta.ts'),
|
|
9
9
|
locales,
|
|
10
10
|
config,
|