vona-cli-set-api 1.0.67 → 1.0.72

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.
@@ -0,0 +1,76 @@
1
+ node_modules
2
+ miniprogram_npm
3
+ /typings/core
4
+ /coverage
5
+ **/dist/
6
+ /dist-releases
7
+ /docs-api
8
+ /run
9
+
10
+ .idea
11
+ .DS_Store
12
+
13
+ *.tsbuildinfo
14
+
15
+ *.log
16
+ *.logs
17
+ *.swp
18
+ *.tmp
19
+ *.rdb
20
+
21
+ # vona core related directories
22
+ .vona
23
+ .app
24
+
25
+ # mine .env files
26
+ env/.env*.mine
27
+ /src/backend/config/config/config*.mine.ts
28
+ /src/backend/typing/modules.d.ts
29
+ **/.metadata/modules.d.ts
30
+ src/backend/typing/mine.d.ts
31
+
32
+ # auto created
33
+ .rollup.cache
34
+ .temp-dynamic-*
35
+ /cabloy.json
36
+ /package.json
37
+
38
+ /docker-compose
39
+ !/docker-compose/config
40
+ !/docker-compose/data/mysql/.gitkeep
41
+ !/docker-compose/data/pg/.gitkeep
42
+ !/docker-compose/data/redis/.gitkeep
43
+ !/docker-compose/logs/app/.gitkeep
44
+ !/docker-compose/logs/nginx/.gitkeep
45
+ !/docker-compose/output/app/vona/.gitkeep
46
+ !/docker-compose/output/app/dist/.gitkeep
47
+
48
+ /src/backend/demo
49
+ /src/backend/app
50
+ /src/backend/logs
51
+ /src/backend/run
52
+
53
+ /src/suite/*
54
+ !/src/suite/.gitkeep
55
+ !/src/suite/a-base
56
+ !/src/suite/a-cms
57
+ !/src/suite/a-flow
58
+ !/src/suite/a-home
59
+ !/src/suite/test-party
60
+
61
+ /src/suite-vendor/*
62
+ !/src/suite-vendor/.gitkeep
63
+ !/src/suite-vendor/a-vona
64
+ !/src/suite-vendor/test-vona
65
+
66
+ /src/module-vendor/*
67
+ !/src/module-vendor/.gitkeep
68
+
69
+ # package-lock.json
70
+ # yarn.lock
71
+
72
+ .vscode/sftp.json
73
+ .sync-config.cson
74
+ sftp-config.json
75
+ sftp-config-.json
76
+ /.assets
@@ -2,6 +2,7 @@ import EslintConfig from '@cabloy/lint/api/eslint.js';
2
2
 
3
3
  export default EslintConfig({
4
4
  ignores: [
5
+ '**/*.md',
5
6
  '**/*.d.ts',
6
7
  '**/node_modules/**',
7
8
  '**/dist/**',
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.36"
49
+ "vona": "^5.0.39"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
15
+ else
16
+ exec node "$basedir/../clean-package/bin/main.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
15
+ else
16
+ exec node "$basedir/../clean-package/bin/main.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
15
+ else
16
+ exec node "$basedir/../clean-package/bin/main.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
17
+ fi
@@ -3,6 +3,7 @@ import { BeanCliBase } from '@cabloy/cli';
3
3
  declare module '@cabloy/cli' {
4
4
  interface ICommandArgv {
5
5
  flavor?: VonaMetaFlavor;
6
+ retainRuntime?: boolean;
6
7
  }
7
8
  }
8
9
  export declare class CliBinDemo extends BeanCliBase {
@@ -16,7 +16,7 @@ export class CliBinDemo extends BeanCliBase {
16
16
  const mode = 'local';
17
17
  const flavor = argv.flavor || 'normal';
18
18
  const configMeta = { flavor, mode };
19
- if (!fse.existsSync(path.join(projectPath, '.vona'))) {
19
+ if (!argv.retainRuntime || !fse.existsSync(path.join(projectPath, '.vona'))) {
20
20
  const configOptions = {
21
21
  appDir: projectPath,
22
22
  runtimeDir: '.vona',
@@ -11,5 +11,6 @@ export declare class CliBinTest extends BeanCliBase {
11
11
  execute(): Promise<void>;
12
12
  _test(projectPath: string): Promise<void>;
13
13
  _run(projectPath: string, modulesMeta: Awaited<ReturnType<typeof glob>>): Promise<void>;
14
+ _outputCoverageReportViewer(projectPath: string): Promise<void>;
14
15
  _combineTestPatterns(projectPath: string, modulesMeta: Awaited<ReturnType<typeof glob>>): string[];
15
16
  }
@@ -2,6 +2,7 @@ import path from 'node:path';
2
2
  import { BeanCliBase } from '@cabloy/cli';
3
3
  import fse from 'fs-extra';
4
4
  import { rimraf } from 'rimraf';
5
+ import { getAbsolutePathOfModule } from "../utils.js";
5
6
  import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
6
7
  export class CliBinTest extends BeanCliBase {
7
8
  async execute() {
@@ -24,6 +25,9 @@ export class CliBinTest extends BeanCliBase {
24
25
  };
25
26
  const { modulesMeta } = await generateVonaMeta(configMeta, configOptions);
26
27
  await this._run(projectPath, modulesMeta);
28
+ if (argv.coverage) {
29
+ await this._outputCoverageReportViewer(projectPath);
30
+ }
27
31
  await rimraf(path.join(projectPath, '.vona'));
28
32
  }
29
33
  async _run(projectPath, modulesMeta) {
@@ -52,6 +56,19 @@ export class CliBinTest extends BeanCliBase {
52
56
  },
53
57
  });
54
58
  }
59
+ async _outputCoverageReportViewer(projectPath) {
60
+ // lcovCliFile
61
+ const lcovCliFile = getAbsolutePathOfModule('@lcov-viewer/cli/lib/index.js', '');
62
+ // run
63
+ const args = [lcovCliFile, 'lcov', '-o', './coverage/report', './coverage/lcov.info'];
64
+ await this.helper.spawnExe({
65
+ cmd: 'node',
66
+ args,
67
+ options: {
68
+ cwd: projectPath,
69
+ },
70
+ });
71
+ }
55
72
  _combineTestPatterns(projectPath, modulesMeta) {
56
73
  const patterns = [];
57
74
  for (const moduleName in modulesMeta.modules) {
@@ -2,7 +2,7 @@ import { createWriteStream } from 'node:fs';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  import { run } from 'node:test';
5
- import { lcov, tap } from 'node:test/reporters';
5
+ import { lcov, spec } from 'node:test/reporters';
6
6
  import { sleep } from '@cabloy/utils';
7
7
  import TableClass from 'cli-table3';
8
8
  import fse from 'fs-extra';
@@ -96,12 +96,12 @@ async function testRun(projectPath, coverage, patterns) {
96
96
  if (coverage) {
97
97
  const reporterDir = path.join(projectPath, 'coverage');
98
98
  fse.ensureDirSync(reporterDir);
99
- const reporter = createWriteStream(path.join(reporterDir, 'lcov.info'));
99
+ const reporterLcov = createWriteStream(path.join(reporterDir, 'lcov.info'));
100
100
  testStream.compose(lcov)
101
- .pipe(reporter);
101
+ .pipe(reporterLcov);
102
102
  }
103
103
  else {
104
- testStream.compose(tap)
104
+ testStream.compose(spec)
105
105
  .pipe(process.stdout);
106
106
  }
107
107
  });
@@ -10,6 +10,10 @@ declare const _default: {
10
10
  description: string;
11
11
  type: string;
12
12
  };
13
+ retainRuntime: {
14
+ description: string;
15
+ type: string;
16
+ };
13
17
  };
14
18
  };
15
19
  export default _default;
@@ -3,12 +3,16 @@ export default {
3
3
  info: {
4
4
  version: '5.0.0',
5
5
  title: 'Cli: Bin: Demo',
6
- usage: 'vona :bin:demo [index.ts] [--flavor=]',
6
+ usage: 'vona :bin:demo [index.ts] [--flavor=] [--retainRuntime=]',
7
7
  },
8
8
  options: {
9
9
  flavor: {
10
10
  description: 'flavor',
11
11
  type: 'string',
12
12
  },
13
+ retainRuntime: {
14
+ description: 'retainRuntime',
15
+ type: 'boolean',
16
+ },
13
17
  },
14
18
  };
@@ -82,6 +82,10 @@ export declare const commands: {
82
82
  description: string;
83
83
  type: string;
84
84
  };
85
+ retainRuntime: {
86
+ description: string;
87
+ type: string;
88
+ };
85
89
  };
86
90
  };
87
91
  dev: {
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.67",
4
+ "version": "1.0.72",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -31,12 +31,13 @@
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.29",
34
+ "@cabloy/cli": "^3.0.30",
35
35
  "@cabloy/dotenv": "^1.1.10",
36
36
  "@cabloy/extend": "^3.1.10",
37
- "@cabloy/module-glob": "^5.2.12",
38
- "@cabloy/module-info": "^1.3.19",
37
+ "@cabloy/module-glob": "^5.2.13",
38
+ "@cabloy/module-info": "^1.3.20",
39
39
  "@cabloy/word-utils": "^2.0.1",
40
+ "@lcov-viewer/cli": "^1.3.0",
40
41
  "@rollup/plugin-alias": "^5.1.1",
41
42
  "@rollup/plugin-babel": "^6.0.4",
42
43
  "@rollup/plugin-commonjs": "^28.0.2",
@@ -60,7 +61,7 @@
60
61
  "ts-node": "^10.9.2",
61
62
  "urllib": "^4.6.11",
62
63
  "uuid": "^11.1.0",
63
- "vona-core": "^5.0.21",
64
+ "vona-core": "^5.0.23",
64
65
  "why-is-node-running": "^3.2.2",
65
66
  "yargs-parser": "^21.1.1"
66
67
  },