weapp-ide-cli 2.0.4 → 2.0.5

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.
@@ -100,22 +100,15 @@ function compose(...funcs) {
100
100
 
101
101
  // src/config.ts
102
102
  import fs from "fs-extra";
103
- async function createCustomConfig(params) {
104
- const isExisted = await fs.exists(defaultCustomConfigDirPath);
105
- if (!isExisted) {
106
- await fs.mkdir(defaultCustomConfigDirPath, { recursive: true });
107
- }
108
- await fs.writeFile(
103
+ function createCustomConfig(params) {
104
+ return fs.outputJSON(
109
105
  defaultCustomConfigFilePath,
110
- JSON.stringify(
111
- {
112
- cliPath: params.cliPath
113
- },
114
- null,
115
- 2
116
- ),
117
106
  {
118
- encoding: "utf8"
107
+ cliPath: params.cliPath
108
+ },
109
+ {
110
+ encoding: "utf8",
111
+ spaces: 2
119
112
  }
120
113
  );
121
114
  }
package/dist/cli.cjs CHANGED
@@ -71,22 +71,15 @@ var defaultCustomConfigFilePath = import_pathe.default.join(
71
71
  var defaultPath = defaultPathMap[operatingSystemName];
72
72
 
73
73
  // src/config.ts
74
- async function createCustomConfig(params) {
75
- const isExisted = await import_fs_extra.default.exists(defaultCustomConfigDirPath);
76
- if (!isExisted) {
77
- await import_fs_extra.default.mkdir(defaultCustomConfigDirPath, { recursive: true });
78
- }
79
- await import_fs_extra.default.writeFile(
74
+ function createCustomConfig(params) {
75
+ return import_fs_extra.default.outputJSON(
80
76
  defaultCustomConfigFilePath,
81
- JSON.stringify(
82
- {
83
- cliPath: params.cliPath
84
- },
85
- null,
86
- 2
87
- ),
88
77
  {
89
- encoding: "utf8"
78
+ cliPath: params.cliPath
79
+ },
80
+ {
81
+ encoding: "utf8",
82
+ spaces: 2
90
83
  }
91
84
  );
92
85
  }
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger_default,
3
3
  parse
4
- } from "./chunk-NRSAANGI.js";
4
+ } from "./chunk-63LTOOC2.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import process from "node:process";
package/dist/index.cjs CHANGED
@@ -88,22 +88,15 @@ var import_logger = __toESM(require("@weapp-core/logger"), 1);
88
88
  var logger_default = import_logger.default;
89
89
 
90
90
  // src/config.ts
91
- async function createCustomConfig(params) {
92
- const isExisted = await import_fs_extra.default.exists(defaultCustomConfigDirPath);
93
- if (!isExisted) {
94
- await import_fs_extra.default.mkdir(defaultCustomConfigDirPath, { recursive: true });
95
- }
96
- await import_fs_extra.default.writeFile(
91
+ function createCustomConfig(params) {
92
+ return import_fs_extra.default.outputJSON(
97
93
  defaultCustomConfigFilePath,
98
- JSON.stringify(
99
- {
100
- cliPath: params.cliPath
101
- },
102
- null,
103
- 2
104
- ),
105
94
  {
106
- encoding: "utf8"
95
+ cliPath: params.cliPath
96
+ },
97
+ {
98
+ encoding: "utf8",
99
+ spaces: 2
107
100
  }
108
101
  );
109
102
  }
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  operatingSystemName,
9
9
  parse,
10
10
  resolvePath
11
- } from "./chunk-NRSAANGI.js";
11
+ } from "./chunk-63LTOOC2.js";
12
12
  export {
13
13
  createAlias,
14
14
  createPathCompat,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-ide-cli",
3
3
  "type": "module",
4
- "version": "2.0.4",
4
+ "version": "2.0.5",
5
5
  "description": "让微信开发者工具,用起来更加方便!",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",