@zwa73/dev-utils 1.0.13 → 1.0.14
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/Command/Node.js
CHANGED
@@ -12,10 +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
|
-
|
16
|
-
if (stderr)
|
17
|
-
utils_1.SLogger.error(stderr);
|
18
|
-
else
|
19
|
-
utils_1.SLogger.info(stdout);
|
15
|
+
await utils_1.UtilFunc.exec(cmd, 'info', 'error');
|
20
16
|
});
|
21
17
|
exports.CmdNode = CmdNode;
|
package/dist/Command/Release.js
CHANGED
@@ -59,11 +59,7 @@ const CmdRelease = (program) => program
|
|
59
59
|
utils_1.SLogger.info(`新版本号: ${newVersion}`);
|
60
60
|
utils_1.SLogger.info("正在发布...");
|
61
61
|
const cmd = `npm publish --registry ${RouteInterface_1.OFFICIAL_SOURCE} --access ${opt.access}`;
|
62
|
-
|
63
|
-
if (stderr)
|
64
|
-
utils_1.SLogger.error(stderr);
|
65
|
-
else
|
66
|
-
utils_1.SLogger.info(stdout);
|
62
|
+
await utils_1.UtilFunc.exec(cmd, undefined, 'info');
|
67
63
|
utils_1.SLogger.info("发布完成");
|
68
64
|
}
|
69
65
|
catch (error) {
|
package/dist/UtilSchemaTool.js
CHANGED
@@ -37,11 +37,7 @@ var UtilST;
|
|
37
37
|
*/
|
38
38
|
async function builAllSchema(configPath, outDir, coverDefine = {}) {
|
39
39
|
outDir = path.join(outDir, "schemas.json");
|
40
|
-
|
41
|
-
if (stderr)
|
42
|
-
utils_1.SLogger.error(stderr);
|
43
|
-
else
|
44
|
-
utils_1.SLogger.info(stdout);
|
40
|
+
await utils_1.UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`, 'info', 'error');
|
45
41
|
const schema = (await utils_1.UtilFT.loadJSONFile(outDir));
|
46
42
|
//进行预处理并展开
|
47
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.
|
3
|
+
"version": "1.0.14",
|
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.
|
18
|
+
"@zwa73/utils": "^1.0.101",
|
19
19
|
"commander": "^11.1.0",
|
20
20
|
"ts-node": "^10.9.2",
|
21
21
|
"tsconfig-paths": "^4.2.0",
|
package/src/Command/Node.ts
CHANGED
@@ -12,7 +12,5 @@ export const CmdNode = (program:Command)=>program
|
|
12
12
|
SLogger.info(`编译并运行: ${arg}`);
|
13
13
|
let cmd = `ts-node -r tsconfig-paths/register ${arg}`;
|
14
14
|
if(opt.project) cmd+=`-p ${opt.project}`;
|
15
|
-
|
16
|
-
if(stderr) SLogger.error(stderr);
|
17
|
-
else SLogger.info(stdout);
|
15
|
+
await UtilFunc.exec(cmd,'info','error');
|
18
16
|
});
|
package/src/Command/Release.ts
CHANGED
@@ -55,9 +55,7 @@ export const CmdRelease = (program: Command) =>program
|
|
55
55
|
SLogger.info(`新版本号: ${newVersion}`);
|
56
56
|
SLogger.info("正在发布...");
|
57
57
|
const cmd = `npm publish --registry ${OFFICIAL_SOURCE} --access ${opt.access}`;
|
58
|
-
|
59
|
-
if(stderr) SLogger.error(stderr);
|
60
|
-
else SLogger.info(stdout);
|
58
|
+
await UtilFunc.exec(cmd,undefined,'info');
|
61
59
|
SLogger.info("发布完成");
|
62
60
|
} catch (error) {
|
63
61
|
SLogger.error(error);
|
package/src/UtilSchemaTool.ts
CHANGED
@@ -11,9 +11,7 @@ export namespace UtilST{
|
|
11
11
|
*/
|
12
12
|
export async function builAllSchema(configPath:string,outDir:string,coverDefine:JObject={}){
|
13
13
|
outDir = path.join(outDir,"schemas.json");
|
14
|
-
|
15
|
-
if(stderr) SLogger.error(stderr);
|
16
|
-
else SLogger.info(stdout);
|
14
|
+
await UtilFunc.exec(`typescript-json-schema ${configPath} * --out ${outDir} --required --strictNullChecks --aliasRefs`,'info','error');
|
17
15
|
const schema = (await UtilFT.loadJSONFile(outDir)) as any;
|
18
16
|
//进行预处理并展开
|
19
17
|
await expandSchema(outDir,schema,coverDefine);
|