@zwa73/dev-utils 1.0.36 → 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.36",
3
+ "version": "1.0.37",
4
4
  "description": "编译与调试工具",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -57,7 +57,7 @@ async function main(){
57
57
  input: process.stdin,
58
58
  output: process.stdout
59
59
  });
60
- setTimeout(()=>rl.close(),20000);
60
+ setTimeout(()=>rl.close(),5000);
61
61
  rl.question('按任意键继续...', () => rl.close());
62
62
  }
63
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
- }