vona-cli-set-api 1.0.405 → 1.0.406
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/dist/index.js +13 -12
- package/dist/lib/utils.d.ts +0 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +2 -2
- /package/dist/lib/bean/{toolsBin → toolsIsolate}/dbReset.d.ts +0 -0
- /package/dist/lib/bean/{toolsBin → toolsIsolate}/play.d.ts +0 -0
- /package/dist/lib/bean/{toolsBin → toolsIsolate}/test.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { globby } from 'globby';
|
|
|
12
12
|
import { rimraf } from 'rimraf';
|
|
13
13
|
import { rollup } from 'rollup';
|
|
14
14
|
import { createRequire } from 'node:module';
|
|
15
|
-
import {
|
|
15
|
+
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
16
16
|
import compileTemplate from 'lodash/template.js';
|
|
17
17
|
import os from 'node:os';
|
|
18
18
|
import * as dotenv from '@cabloy/dotenv';
|
|
@@ -40,10 +40,6 @@ function getEnvMeta(configMeta) {
|
|
|
40
40
|
function getNodeEnv(mode) {
|
|
41
41
|
return mode === 'test' ? 'test' : mode === 'dev' ? 'development' : 'production';
|
|
42
42
|
}
|
|
43
|
-
function resolveTemplatePath(file) {
|
|
44
|
-
const url = new URL(path.join('../../templates', file), import.meta.url);
|
|
45
|
-
return fileURLToPath(url);
|
|
46
|
-
}
|
|
47
43
|
function generateConfigDefine(env, translates) {
|
|
48
44
|
const acc = {};
|
|
49
45
|
for (const key in env) {
|
|
@@ -161,6 +157,11 @@ function createConfigUtils(configMeta, configOptions) {
|
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
159
|
|
|
160
|
+
function resolveTemplatePath(file) {
|
|
161
|
+
const url = new URL(path.join('../templates', file), import.meta.url);
|
|
162
|
+
return fileURLToPath(url);
|
|
163
|
+
}
|
|
164
|
+
|
|
164
165
|
const __ImportZodCore = 'zod/v4/core';
|
|
165
166
|
async function generateZod(configOptions) {
|
|
166
167
|
await __generateZodCoreUtil(configOptions);
|
|
@@ -689,9 +690,9 @@ class CliBinDbReset extends BeanCliBase {
|
|
|
689
690
|
}
|
|
690
691
|
async _run(projectPath, _modulesMeta) {
|
|
691
692
|
// testFile
|
|
692
|
-
let testFile = path.join(import.meta.dirname, './
|
|
693
|
+
let testFile = path.join(import.meta.dirname, './toolsIsolate/dbReset.ts');
|
|
693
694
|
if (!fse.existsSync(testFile)) {
|
|
694
|
-
testFile = path.join(import.meta.dirname, './
|
|
695
|
+
testFile = path.join(import.meta.dirname, './toolsIsolate/dbReset.js');
|
|
695
696
|
}
|
|
696
697
|
// run
|
|
697
698
|
let args = [];
|
|
@@ -847,9 +848,9 @@ class CliBinPlay extends BeanCliBase {
|
|
|
847
848
|
}
|
|
848
849
|
async _runIsolate(projectPath) {
|
|
849
850
|
// testFile
|
|
850
|
-
let testFile = path.join(import.meta.dirname, './
|
|
851
|
+
let testFile = path.join(import.meta.dirname, './toolsIsolate/play.ts');
|
|
851
852
|
if (!fse.existsSync(testFile)) {
|
|
852
|
-
testFile = path.join(import.meta.dirname, './
|
|
853
|
+
testFile = path.join(import.meta.dirname, './toolsIsolate/play.js');
|
|
853
854
|
}
|
|
854
855
|
// run
|
|
855
856
|
let args = [];
|
|
@@ -911,9 +912,9 @@ class CliBinTest extends BeanCliBase {
|
|
|
911
912
|
// globs
|
|
912
913
|
const patterns = this._combineTestPatterns(projectPath, modulesMeta);
|
|
913
914
|
// testFile
|
|
914
|
-
let testFile = path.join(import.meta.dirname, './
|
|
915
|
+
let testFile = path.join(import.meta.dirname, './toolsIsolate/test.ts');
|
|
915
916
|
if (!fse.existsSync(testFile)) {
|
|
916
|
-
testFile = path.join(import.meta.dirname, './
|
|
917
|
+
testFile = path.join(import.meta.dirname, './toolsIsolate/test.js');
|
|
917
918
|
}
|
|
918
919
|
// run
|
|
919
920
|
let args = [];
|
|
@@ -3310,4 +3311,4 @@ const commands = {
|
|
|
3310
3311
|
}
|
|
3311
3312
|
};
|
|
3312
3313
|
|
|
3313
|
-
export { beans, commands, copyTemplateFile, copyTemplateIfNeed, generateConfigDefine, getAbsolutePathOfModule, getEnvMeta, getImportEsm, getNodeEnv, getOutDir, getOutReleasesDir, loadJSONFile, pathToHref, requireModule,
|
|
3314
|
+
export { beans, commands, copyTemplateFile, copyTemplateIfNeed, generateConfigDefine, getAbsolutePathOfModule, getEnvMeta, getImportEsm, getNodeEnv, getOutDir, getOutReleasesDir, loadJSONFile, pathToHref, requireModule, saveJSONFile };
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare function getEnvMeta(configMeta: VonaConfigMeta): {
|
|
|
5
5
|
mine: string;
|
|
6
6
|
};
|
|
7
7
|
export declare function getNodeEnv(mode: VonaMetaMode): "test" | "development" | "production";
|
|
8
|
-
export declare function resolveTemplatePath(file: string): string;
|
|
9
8
|
export declare function generateConfigDefine(env: any, translates?: string[]): {};
|
|
10
9
|
export declare function getAbsolutePathOfModule(id: string, postfix?: string): string;
|
|
11
10
|
export declare function requireModule(id: string): any;
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveTemplatePath(file: string): string;
|
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.406",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
"gitHead": "0eab9dc4a5622caffe89e7b1b3f02c08ccbc4c4b",
|
|
70
70
|
"scripts": {
|
|
71
71
|
"clean": "rimraf dist tsconfig.tsbuildinfo",
|
|
72
|
-
"tsc:publish": "npm run clean && vona :bin:buildGeneral && tsc"
|
|
72
|
+
"tsc:publish": "npm run clean && vona :bin:buildGeneral && tsc && tsc -p tsconfig.isolate.json"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|