@zwa73/dev-utils 1.0.65 → 1.0.67

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.
@@ -32,10 +32,6 @@ const pathe_1 = __importDefault(require("pathe"));
32
32
  const utils_1 = require("@zwa73/utils");
33
33
  const RouteInterface_1 = require("./RouteInterface");
34
34
  const InitDataPath = pathe_1.default.join(RouteInterface_1.DATA_PATH, 'CreateElectronFrame');
35
- (async () => {
36
- const filelist = await fs.promises.readdir(InitDataPath);
37
- console.log(filelist);
38
- })();
39
35
  /**复制基础文件 */
40
36
  async function copyData() {
41
37
  const filelist = await fs.promises.readdir(InitDataPath);
@@ -70,13 +70,10 @@ var UtilDT;
70
70
  .addSourceFileAtPath(fp)
71
71
  .getDescendantsOfKind(ts_morph_1.SyntaxKind.TypeAliasDeclaration)
72
72
  .map(d => d.getName())).flat();
73
- //console.log(types)
74
73
  const list = gener.getUserSymbols()
75
74
  .filter(t => types.some(i => i === t))
76
75
  .filter(t => it.some(i => i.test(t)))
77
76
  .filter(t => !et.some(i => i.test(t)));
78
- //console.log(list)
79
- //await UtilFT.writeJSONFile('testout',list);
80
77
  const schema = gener.getSchemaForSymbols(list);
81
78
  const outDir = opt?.outDir ?? pathe_1.default.join(process.cwd(), 'schema');
82
79
  const schemasPath = pathe_1.default.join(outDir, 'schemas.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwa73/dev-utils",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "编译与调试工具",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
19
  "@deepkit/type-compiler": "^1.0.1-alpha.150",
20
- "@zwa73/utils": "^1.0.146",
20
+ "@zwa73/utils": "*",
21
21
  "commander": "^11.1.0",
22
22
  "pathe": "^1.1.2",
23
23
  "ts-morph": "^23.0.0",
@@ -28,13 +28,14 @@ function showUpgradeMessages(prevVersion, currentVersion) {
28
28
  // 如果用户的上一个版本低于这个版本,而当前版本高于或等于这个版本
29
29
  if (versionNumber > prevVersionNumber && versionNumber <= currentVersionNumber) {
30
30
  // 显示这个版本的提示信息
31
- process.stdout.write(INFO_TABLE[version]);
31
+ log(INFO_TABLE[version]);
32
32
  hasOut=true;
33
33
  }
34
34
  }
35
35
  return hasOut;
36
36
  }
37
37
 
38
+ const log = ()=>undefined;
38
39
 
39
40
  async function main(){
40
41
  const packageTable = await UtilFT.loadJSONFile(PACKAGE_PATH);
@@ -43,7 +44,7 @@ async function main(){
43
44
  const versionTable = await UtilFT.loadJSONFile(VERSION_PATH,{default:{}});
44
45
  const prevVersion = versionTable[PKG_NAME]?.version ?? "10000.0.0";
45
46
 
46
- process.stdout.write(`${currentVersion} 版本已安装`);
47
+ log(`${currentVersion} 版本已安装`);
47
48
  // 使用这个函数来显示升级信息
48
49
  const hasOut = showUpgradeMessages(prevVersion, currentVersion);
49
50
 
@@ -9,13 +9,6 @@ import { checkProject, DATA_PATH, MIRROR_SOURCE, PROJECT_PATH } from './RouteInt
9
9
 
10
10
  const InitDataPath = path.join(DATA_PATH,'CreateElectronFrame');
11
11
 
12
- (async ()=>{
13
-
14
-
15
- const filelist = await fs.promises.readdir(InitDataPath);
16
- console.log(filelist);
17
- })();
18
-
19
12
  /**复制基础文件 */
20
13
  async function copyData() {
21
14
  const filelist = await fs.promises.readdir(InitDataPath);
@@ -74,13 +74,10 @@ export async function generateSchema(dir:string,opt?:BuildSchemaOpt){
74
74
  .getDescendantsOfKind(SyntaxKind.TypeAliasDeclaration)
75
75
  .map(d=>d.getName())
76
76
  ).flat();
77
- //console.log(types)
78
77
  const list = gener.getUserSymbols()
79
78
  .filter(t=>types.some(i=>i===t))
80
79
  .filter(t=>it.some(i=>i.test(t)))
81
80
  .filter(t=>!et.some(i=>i.test(t)));
82
- //console.log(list)
83
- //await UtilFT.writeJSONFile('testout',list);
84
81
  const schema = gener.getSchemaForSymbols(list) as JObject;
85
82
  const outDir = opt?.outDir ?? path.join(process.cwd(),'schema');
86
83
  const schemasPath = path.join(outDir,'schemas.json');