vona-cli-set-api 1.0.244 → 1.0.248
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/pnpm-workspace.yaml +21 -0
- package/dist/lib/bean/cli.bin.dbReset.js +3 -1
- package/dist/lib/bean/cli.bin.demo.js +3 -1
- package/dist/lib/bean/cli.bin.dev.js +3 -1
- package/dist/lib/bean/cli.bin.test.js +3 -2
- package/dist/lib/bean/toolsBin/generateEntryFiles.js +12 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +4 -0
- package/package.json +4 -4
- package/templates/app/register.js +4 -0
- package/cli/templates/create/project/basic/boilerplate/_.npmrc +0 -19
|
@@ -5,3 +5,24 @@ packages:
|
|
|
5
5
|
- 'src/suite/*/modules/*'
|
|
6
6
|
- 'src/suite-vendor/*'
|
|
7
7
|
- 'src/suite-vendor/*/modules/*'
|
|
8
|
+
|
|
9
|
+
hoist: true
|
|
10
|
+
hoistWorkspacePackages: true
|
|
11
|
+
linkWorkspacePackages: 'deep'
|
|
12
|
+
preferWorkspacePackages: true
|
|
13
|
+
autoInstallPeers: true
|
|
14
|
+
publicHoistPattern:
|
|
15
|
+
- '*babel*'
|
|
16
|
+
- '*@babel*'
|
|
17
|
+
- '*eslint*'
|
|
18
|
+
- '*types*'
|
|
19
|
+
- 'lerna'
|
|
20
|
+
- 'vona'
|
|
21
|
+
- '*vona*'
|
|
22
|
+
- 'cabloy'
|
|
23
|
+
- '@cabloy'
|
|
24
|
+
- '*cabloy*'
|
|
25
|
+
- '*@cabloy*'
|
|
26
|
+
- '*why-is-node-running*'
|
|
27
|
+
- '*ts-node*'
|
|
28
|
+
- 'zod'
|
|
@@ -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 { getImportEsm } from "../utils.js";
|
|
5
6
|
import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
|
|
6
7
|
export class CliBinDbReset extends BeanCliBase {
|
|
7
8
|
async execute() {
|
|
@@ -34,7 +35,8 @@ export class CliBinDbReset extends BeanCliBase {
|
|
|
34
35
|
}
|
|
35
36
|
// run
|
|
36
37
|
let args = [];
|
|
37
|
-
args = args.concat([
|
|
38
|
+
args = args.concat([getImportEsm(), testFile, projectPath]);
|
|
39
|
+
// args = args.concat(['--experimental-transform-types', getImportEsm(), testFile, projectPath]);
|
|
38
40
|
await this.helper.spawnExe({
|
|
39
41
|
cmd: 'node',
|
|
40
42
|
args,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { BeanCliBase } from '@cabloy/cli';
|
|
3
3
|
import fse from 'fs-extra';
|
|
4
|
+
import { getImportEsm } from "../utils.js";
|
|
4
5
|
import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
|
|
5
6
|
export class CliBinDemo extends BeanCliBase {
|
|
6
7
|
async execute() {
|
|
@@ -34,7 +35,8 @@ export class CliBinDemo extends BeanCliBase {
|
|
|
34
35
|
}
|
|
35
36
|
// run
|
|
36
37
|
let args = [];
|
|
37
|
-
args = args.concat([
|
|
38
|
+
args = args.concat([getImportEsm(), testFile, projectPath]);
|
|
39
|
+
// args = args.concat(['--experimental-transform-types', getImportEsm(), testFile, projectPath]);
|
|
38
40
|
const pos = process.argv.indexOf(':bin:demo');
|
|
39
41
|
if (pos > -1) {
|
|
40
42
|
args = args.concat(process.argv.slice(pos + 1));
|
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { BeanCliBase } from '@cabloy/cli';
|
|
3
3
|
import nodemon from 'nodemon';
|
|
4
4
|
import { rimraf } from 'rimraf';
|
|
5
|
+
import { getImportEsm } from "../utils.js";
|
|
5
6
|
import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
|
|
6
7
|
export class CliBinDev extends BeanCliBase {
|
|
7
8
|
async execute() {
|
|
@@ -32,7 +33,8 @@ export class CliBinDev extends BeanCliBase {
|
|
|
32
33
|
script: '.vona/bootstrap.ts',
|
|
33
34
|
cwd: projectPath,
|
|
34
35
|
exec: 'node',
|
|
35
|
-
execArgs: [
|
|
36
|
+
execArgs: [getImportEsm()],
|
|
37
|
+
// execArgs: ['--experimental-transform-types', getImportEsm(), '--trace-deprecation'],
|
|
36
38
|
// signal: 'SIGHUP',
|
|
37
39
|
});
|
|
38
40
|
nodemon.on('quit', () => {
|
|
@@ -3,7 +3,7 @@ import { BeanCliBase } from '@cabloy/cli';
|
|
|
3
3
|
import { catchError } from '@cabloy/utils';
|
|
4
4
|
import fse from 'fs-extra';
|
|
5
5
|
import { rimraf } from 'rimraf';
|
|
6
|
-
import { getAbsolutePathOfModule } from "../utils.js";
|
|
6
|
+
import { getAbsolutePathOfModule, getImportEsm } from "../utils.js";
|
|
7
7
|
import { generateVonaMeta } from "./toolsBin/generateVonaMeta.js";
|
|
8
8
|
export class CliBinTest extends BeanCliBase {
|
|
9
9
|
async execute() {
|
|
@@ -48,7 +48,8 @@ export class CliBinTest extends BeanCliBase {
|
|
|
48
48
|
if (process.env.TEST_WHYISNODERUNNING === 'true') {
|
|
49
49
|
args.push('--import=why-is-node-running/include');
|
|
50
50
|
}
|
|
51
|
-
args = args.concat([
|
|
51
|
+
args = args.concat([getImportEsm(), testFile, projectPath, (!!argv.coverage).toString(), patterns.join(',')]);
|
|
52
|
+
// args = args.concat(['--experimental-transform-types', getImportEsm(), testFile, projectPath, (!!argv.coverage).toString(), patterns.join(',')]);
|
|
52
53
|
// ignore error special in windows
|
|
53
54
|
await catchError(() => {
|
|
54
55
|
return this.helper.spawnExe({
|
|
@@ -13,6 +13,8 @@ export async function generateEntryFiles(configMeta, configOptions, modulesMeta,
|
|
|
13
13
|
await __generateEnvJson();
|
|
14
14
|
// app
|
|
15
15
|
await __generateApp();
|
|
16
|
+
// others
|
|
17
|
+
await __generateOthers();
|
|
16
18
|
// zod
|
|
17
19
|
await generateZod(configOptions);
|
|
18
20
|
//////////////////////////////
|
|
@@ -58,6 +60,16 @@ export async function generateEntryFiles(configMeta, configOptions, modulesMeta,
|
|
|
58
60
|
await copyTemplateFile(fileSrc, fileDest, vars);
|
|
59
61
|
}
|
|
60
62
|
}
|
|
63
|
+
async function __generateOthers() {
|
|
64
|
+
const templates = [['app/register.js', 'register.js']];
|
|
65
|
+
for (const [templateSrc, templateDest] of templates) {
|
|
66
|
+
const fileSrc = resolveTemplatePath(templateSrc);
|
|
67
|
+
const fileDest = path.join(configOptions.appDir, configOptions.runtimeDir, templateDest);
|
|
68
|
+
await fse.ensureDir(path.join(configOptions.appDir, configOptions.runtimeDir));
|
|
69
|
+
const vars = {};
|
|
70
|
+
await copyTemplateFile(fileSrc, fileDest, vars);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
61
73
|
async function __generateModulesMeta() {
|
|
62
74
|
// modules
|
|
63
75
|
const { modules, modulesArray } = modulesMeta;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export declare function pathToHref(fileName: string): string;
|
|
|
16
16
|
export declare function getOutDir(): string;
|
|
17
17
|
export declare function getOutReleasesDir(): string;
|
|
18
18
|
export declare function copyTemplateIfNeed(fileSrc: string, fileDest: string): void;
|
|
19
|
+
export declare function getImportEsm(): string;
|
package/dist/lib/utils.js
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.248",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
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.
|
|
34
|
+
"@cabloy/cli": "^3.0.48",
|
|
35
35
|
"@cabloy/dotenv": "^1.1.10",
|
|
36
36
|
"@cabloy/extend": "^3.1.10",
|
|
37
37
|
"@cabloy/module-glob": "^5.2.26",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"randomatic": "^3.1.1",
|
|
59
59
|
"rimraf": "^6.0.1",
|
|
60
60
|
"rollup": "^4.34.8",
|
|
61
|
-
"ts-node": "^10.9.
|
|
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.66",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
hoist = true
|
|
2
|
-
hoist-workspace-packages = true
|
|
3
|
-
public-hoist-pattern[]=*babel*
|
|
4
|
-
public-hoist-pattern[]=*@babel*
|
|
5
|
-
public-hoist-pattern[]=*eslint*
|
|
6
|
-
public-hoist-pattern[]=*types*
|
|
7
|
-
public-hoist-pattern[]=lerna
|
|
8
|
-
public-hoist-pattern[]=vona
|
|
9
|
-
public-hoist-pattern[]=*vona*
|
|
10
|
-
public-hoist-pattern[]=cabloy
|
|
11
|
-
public-hoist-pattern[]=@cabloy
|
|
12
|
-
public-hoist-pattern[]=*cabloy*
|
|
13
|
-
public-hoist-pattern[]=*@cabloy*
|
|
14
|
-
public-hoist-pattern[]=*why-is-node-running*
|
|
15
|
-
public-hoist-pattern[]=*ts-node*
|
|
16
|
-
public-hoist-pattern[]=zod
|
|
17
|
-
link-workspace-packages = 'deep'
|
|
18
|
-
prefer-workspace-packages = true
|
|
19
|
-
auto-install-peers = true
|