@zwa73/dev-utils 1.0.22 → 1.0.25

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.
@@ -12,6 +12,6 @@ const CmdNode = (program) => program
12
12
  let cmd = `ts-node -r tsconfig-paths/register ${arg}`;
13
13
  if (opt.project)
14
14
  cmd += `-p ${opt.project}`;
15
- await utils_1.UtilFunc.exec(cmd, 'info', 'error');
15
+ await utils_1.UtilFunc.exec(cmd, { outlvl: 'info', errlvl: 'error' });
16
16
  });
17
17
  exports.CmdNode = CmdNode;
@@ -31,7 +31,7 @@ exports.MIRROR_SOURCE = "https://registry.npmmirror.com/";
31
31
  /**npm官方源 */
32
32
  exports.OFFICIAL_SOURCE = "https://registry.npmjs.org/";
33
33
  /**data文件夹路径 */
34
- exports.DATA_PATH = path.join(__dirname, '..', 'data');
34
+ exports.DATA_PATH = path.join(__dirname, '..', '..', 'data');
35
35
  /**项目路径 */
36
36
  exports.PROJECT_PATH = process.cwd();
37
37
  /** 检测非浮点的整数类型 */
@@ -37,7 +37,7 @@ var UtilST;
37
37
  */
38
38
  async function builAllSchema(configPath, outDir, coverDefine = {}) {
39
39
  outDir = path.join(outDir, "schemas.json");
40
- await utils_1.UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`, 'info', 'error');
40
+ await utils_1.UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`, { outlvl: 'info', errlvl: 'error' });
41
41
  const schema = (await utils_1.UtilFT.loadJSONFile(outDir));
42
42
  //进行预处理并展开
43
43
  await expandSchema(outDir, schema, coverDefine);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/dev-utils",
3
- "version": "1.0.22",
3
+ "version": "1.0.25",
4
4
  "description": "编译与调试工具",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  "author": "zwa73",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@zwa73/utils": "^1.0.111",
18
+ "@zwa73/utils": "^1.0.113",
19
19
  "commander": "^11.1.0",
20
20
  "ts-node": "^10.9.2",
21
21
  "tsconfig-paths": "^4.2.0",
@@ -11,5 +11,5 @@ export const CmdNode = (program:Command)=>program
11
11
  SLogger.info(`编译并运行: ${arg}`);
12
12
  let cmd = `ts-node -r tsconfig-paths/register ${arg}`;
13
13
  if(opt.project) cmd+=`-p ${opt.project}`;
14
- await UtilFunc.exec(cmd,'info','error');
14
+ await UtilFunc.exec(cmd,{outlvl:'info',errlvl:'error'});
15
15
  });
@@ -7,7 +7,7 @@ export const MIRROR_SOURCE = "https://registry.npmmirror.com/";
7
7
  /**npm官方源 */
8
8
  export const OFFICIAL_SOURCE = "https://registry.npmjs.org/";
9
9
  /**data文件夹路径 */
10
- export const DATA_PATH = path.join(__dirname,'..','data');
10
+ export const DATA_PATH = path.join(__dirname,'..','..','data');
11
11
  /**项目路径 */
12
12
  export const PROJECT_PATH = process.cwd();
13
13
 
@@ -12,7 +12,7 @@ export namespace UtilST{
12
12
  */
13
13
  export async function builAllSchema(configPath:string,outDir:string,coverDefine:JObject={}){
14
14
  outDir = path.join(outDir,"schemas.json");
15
- await UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`,'info','error');
15
+ await UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`,{outlvl:'info',errlvl:'error'});
16
16
  const schema = (await UtilFT.loadJSONFile(outDir)) as any;
17
17
  //进行预处理并展开
18
18
  await expandSchema(outDir,schema,coverDefine);