@zwa73/dev-utils 1.0.35 → 1.0.37

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,7 +12,7 @@ const CmdGenSchema = (program) => program
12
12
  .option("-p, --project <path>", "tsconfig路径 默认tsconfig.json", "tsconfig.json")
13
13
  .option("-o, --outDir <dir>", "schema输出路径目录 默认 ./schema/")
14
14
  .action(async (opt) => {
15
- await UtilDevTool_1.UtilDT.buildSchema(process.cwd(), {
15
+ await UtilDevTool_1.UtilDT.generateSchema(process.cwd(), {
16
16
  include: opt.include,
17
17
  exclude: opt.ignore,
18
18
  project: opt.project,
@@ -29,7 +29,7 @@ export declare namespace UtilDT {
29
29
  * @param opt.project - tsconfig路径
30
30
  * @param opt.outDir - schema输出路径目录 默认 ./schema/
31
31
  */
32
- export function buildSchema(dir: string, opt?: BuildSchemaOpt): Promise<void>;
32
+ export function generateSchema(dir: string, opt?: BuildSchemaOpt): Promise<void>;
33
33
  /**运行所有匹配的的js/ts文件
34
34
  * @async
35
35
  * @param dir - 基础目录
@@ -40,7 +40,7 @@ var UtilDT;
40
40
  * @param opt.project - tsconfig路径
41
41
  * @param opt.outDir - schema输出路径目录 默认 ./schema/
42
42
  */
43
- async function buildSchema(dir, opt) {
43
+ async function generateSchema(dir, opt) {
44
44
  //生成
45
45
  const settings = {
46
46
  required: true,
@@ -60,7 +60,7 @@ var UtilDT;
60
60
  //进行预处理并展开
61
61
  await expandSchema(schemasPath, schema, opt?.coverDefine ?? {});
62
62
  }
63
- UtilDT.buildSchema = buildSchema;
63
+ UtilDT.generateSchema = generateSchema;
64
64
  /**展开schema以供使用 */
65
65
  async function expandSchema(schemasPath, schema, coverDefine) {
66
66
  //覆盖
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/dev-utils",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "编译与调试工具",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,7 +6,8 @@ const PACKAGE_PATH = path.join(__dirname,'..','package.json');
6
6
  const VERSION_PATH = path.join(__dirname,"..","..","version.json");
7
7
  //提示表
8
8
  const INFO_TABLE = {
9
- "1.0.33":"zcli Build-Macro Build-Schema 更名为 Expand-Macro Gen-Schema"
9
+ "1.0.33":"zcli Build-Macro Build-Schema 更名为 Expand-Macro Gen-Schema",
10
+ "1.0.36":"$macro 更名为 regionMacro"
10
11
  }
11
12
 
12
13
  // 将版本号转换为可以比较的数字
@@ -56,7 +57,7 @@ async function main(){
56
57
  input: process.stdin,
57
58
  output: process.stdout
58
59
  });
59
- setTimeout(()=>rl.close(),20000);
60
+ setTimeout(()=>rl.close(),5000);
60
61
  rl.question('按任意键继续...', () => rl.close());
61
62
  }
62
63
  main()
@@ -11,7 +11,7 @@ export const CmdGenSchema = (program:Command) => program
11
11
  .option("-p, --project <path>", "tsconfig路径 默认tsconfig.json","tsconfig.json")
12
12
  .option("-o, --outDir <dir>", "schema输出路径目录 默认 ./schema/")
13
13
  .action(async (opt) => {
14
- await UtilDT.buildSchema(process.cwd(), {
14
+ await UtilDT.generateSchema(process.cwd(), {
15
15
  include: opt.include,
16
16
  exclude: opt.ignore,
17
17
  project: opt.project,
@@ -39,7 +39,7 @@ type BuildSchemaOpt = Partial<{
39
39
  * @param opt.project - tsconfig路径
40
40
  * @param opt.outDir - schema输出路径目录 默认 ./schema/
41
41
  */
42
- export async function buildSchema(dir:string,opt?:BuildSchemaOpt){
42
+ export async function generateSchema(dir:string,opt?:BuildSchemaOpt){
43
43
  //生成
44
44
  const settings: TJS.PartialArgs = {
45
45
  required: true,
@@ -1,4 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "definitions": {}
4
- }