vona-cli-set-api 1.0.147 → 1.0.152

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.
@@ -131,5 +131,17 @@
131
131
  "}"
132
132
  ],
133
133
  "description": "record.instance"
134
+ },
135
+ "record.host": {
136
+ "scope": "typescript,typescriptreact",
137
+ "prefix": "recordhost",
138
+ "body": [
139
+ "declare module 'vona' {",
140
+ " export interface IHostRecord {",
141
+ " $0: never;",
142
+ " }",
143
+ "}"
144
+ ],
145
+ "description": "record.host"
134
146
  }
135
147
  }
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "vona": "^5.0.83"
48
+ "vona": "^5.0.86"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@cabloy/lint": "^5.0.16",
@@ -1,5 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import { BeanCliBase } from '@cabloy/cli';
3
+ import { catchError } from '@cabloy/utils';
3
4
  import fse from 'fs-extra';
4
5
  import { rimraf } from 'rimraf';
5
6
  import { getAbsolutePathOfModule } from "../utils.js";
@@ -48,12 +49,15 @@ export class CliBinTest extends BeanCliBase {
48
49
  args.push('--import=why-is-node-running/include');
49
50
  }
50
51
  args = args.concat(['--experimental-transform-types', '--loader=ts-node/esm', testFile, projectPath, (!!argv.coverage).toString(), patterns.join(',')]);
51
- await this.helper.spawnExe({
52
- cmd: 'node',
53
- args,
54
- options: {
55
- cwd: projectPath,
56
- },
52
+ // ignore error special in windows
53
+ await catchError(() => {
54
+ return this.helper.spawnExe({
55
+ cmd: 'node',
56
+ args,
57
+ options: {
58
+ cwd: projectPath,
59
+ },
60
+ });
57
61
  });
58
62
  }
59
63
  async _outputCoverageReportViewer(projectPath) {
@@ -61,12 +65,14 @@ export class CliBinTest extends BeanCliBase {
61
65
  const lcovCliFile = getAbsolutePathOfModule('@lcov-viewer/cli/lib/index.js', '');
62
66
  // run
63
67
  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
- },
68
+ await catchError(() => {
69
+ return this.helper.spawnExe({
70
+ cmd: 'node',
71
+ args,
72
+ options: {
73
+ cwd: projectPath,
74
+ },
75
+ });
70
76
  });
71
77
  }
72
78
  _combineTestPatterns(projectPath, modulesMeta) {
@@ -3,11 +3,11 @@ import os from 'node:os';
3
3
  import path from 'node:path';
4
4
  import { run } from 'node:test';
5
5
  import { lcov, spec } from 'node:test/reporters';
6
- import { sleep } from '@cabloy/utils';
6
+ import { catchError, sleep } from '@cabloy/utils';
7
7
  import TableClass from 'cli-table3';
8
8
  import fse from 'fs-extra';
9
9
  import { globby } from 'globby';
10
- import { closeApp, createGeneralApp } from 'vona-core';
10
+ import { createGeneralApp } from 'vona-core';
11
11
  import whyIsNodeRunning from 'why-is-node-running';
12
12
  import { resolveTemplatePath } from "../../utils.js";
13
13
  const argv = process.argv.slice(2);
@@ -61,6 +61,7 @@ async function testRun(projectPath, coverage, patterns) {
61
61
  'src/suite-vendor/*/modules/*/templates/**/*.ts',
62
62
  ];
63
63
  return new Promise(resolve => {
64
+ let app;
64
65
  const testStream = run({
65
66
  isolation: 'none',
66
67
  concurrency,
@@ -71,7 +72,7 @@ async function testRun(projectPath, coverage, patterns) {
71
72
  cwd: projectPath,
72
73
  files,
73
74
  setup: async () => {
74
- await createGeneralApp(projectPath);
75
+ app = await createGeneralApp(projectPath);
75
76
  },
76
77
  })
77
78
  .on('test:coverage', data => {
@@ -82,7 +83,12 @@ async function testRun(projectPath, coverage, patterns) {
82
83
  })
83
84
  .on('test:pass', async (t) => {
84
85
  if (t.name === '---done---') {
85
- await closeApp();
86
+ const [_, err] = await catchError(() => {
87
+ return app.close();
88
+ });
89
+ if (err) {
90
+ console.error(err);
91
+ }
86
92
  // handles
87
93
  if (process.env.TEST_WHYISNODERUNNING === 'true') {
88
94
  await sleep(2000);
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.147",
4
+ "version": "1.0.152",
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.44",
64
+ "vona-core": "^5.0.45",
65
65
  "why-is-node-running": "^3.2.2",
66
66
  "yargs-parser": "^21.1.1"
67
67
  },