weapp-ide-cli 2.0.4 → 2.0.6
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/{chunk-NRSAANGI.js → chunk-FQW4GQRU.js} +11 -18
- package/dist/cli.cjs +11 -20
- package/dist/cli.js +1 -3
- package/dist/index.cjs +11 -18
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -100,22 +100,15 @@ function compose(...funcs) {
|
|
|
100
100
|
|
|
101
101
|
// src/config.ts
|
|
102
102
|
import fs from "fs-extra";
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
107
|
+
cliPath: params.cliPath
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
encoding: "utf8",
|
|
111
|
+
spaces: 2
|
|
119
112
|
}
|
|
120
113
|
);
|
|
121
114
|
}
|
|
@@ -137,12 +130,12 @@ async function getConfig() {
|
|
|
137
130
|
}
|
|
138
131
|
|
|
139
132
|
// src/parse.ts
|
|
140
|
-
var rl = readline.createInterface({
|
|
141
|
-
input: process2.stdin,
|
|
142
|
-
output: process2.stdout
|
|
143
|
-
});
|
|
144
133
|
var isSupported = Boolean(defaultPath);
|
|
145
134
|
function rlSetConfig() {
|
|
135
|
+
const rl = readline.createInterface({
|
|
136
|
+
input: process2.stdin,
|
|
137
|
+
output: process2.stdout
|
|
138
|
+
});
|
|
146
139
|
logger_default.log("\u8BF7\u8BBE\u7F6E\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177 cli \u7684\u8DEF\u5F84");
|
|
147
140
|
logger_default.log("> \u63D0\u793A\uFF1A\u547D\u4EE4\u884C\u5DE5\u5177\u9ED8\u8BA4\u6240\u5728\u4F4D\u7F6E\uFF1A");
|
|
148
141
|
logger_default.log("- MacOS: <\u5B89\u88C5\u8DEF\u5F84>/Contents/MacOS/cli");
|
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
|
-
|
|
75
|
-
|
|
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
|
-
|
|
78
|
+
cliPath: params.cliPath
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
encoding: "utf8",
|
|
82
|
+
spaces: 2
|
|
90
83
|
}
|
|
91
84
|
);
|
|
92
85
|
}
|
|
@@ -166,12 +159,12 @@ function createPathCompat(option) {
|
|
|
166
159
|
}
|
|
167
160
|
|
|
168
161
|
// src/parse.ts
|
|
169
|
-
var rl = import_node_readline.default.createInterface({
|
|
170
|
-
input: import_node_process2.default.stdin,
|
|
171
|
-
output: import_node_process2.default.stdout
|
|
172
|
-
});
|
|
173
162
|
var isSupported = Boolean(defaultPath);
|
|
174
163
|
function rlSetConfig() {
|
|
164
|
+
const rl = import_node_readline.default.createInterface({
|
|
165
|
+
input: import_node_process2.default.stdin,
|
|
166
|
+
output: import_node_process2.default.stdout
|
|
167
|
+
});
|
|
175
168
|
logger_default.log("\u8BF7\u8BBE\u7F6E\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177 cli \u7684\u8DEF\u5F84");
|
|
176
169
|
logger_default.log("> \u63D0\u793A\uFF1A\u547D\u4EE4\u884C\u5DE5\u5177\u9ED8\u8BA4\u6240\u5728\u4F4D\u7F6E\uFF1A");
|
|
177
170
|
logger_default.log("- MacOS: <\u5B89\u88C5\u8DEF\u5F84>/Contents/MacOS/cli");
|
|
@@ -221,6 +214,4 @@ async function parse(argv2) {
|
|
|
221
214
|
var argv = import_node_process3.default.argv.slice(2);
|
|
222
215
|
parse(argv).catch((err) => {
|
|
223
216
|
logger_default.error(err);
|
|
224
|
-
}).finally(() => {
|
|
225
|
-
import_node_process3.default.exit();
|
|
226
217
|
});
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logger_default,
|
|
3
3
|
parse
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FQW4GQRU.js";
|
|
5
5
|
|
|
6
6
|
// src/cli.ts
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
var argv = process.argv.slice(2);
|
|
9
9
|
parse(argv).catch((err) => {
|
|
10
10
|
logger_default.error(err);
|
|
11
|
-
}).finally(() => {
|
|
12
|
-
process.exit();
|
|
13
11
|
});
|
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
|
-
|
|
92
|
-
|
|
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
|
-
|
|
95
|
+
cliPath: params.cliPath
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
encoding: "utf8",
|
|
99
|
+
spaces: 2
|
|
107
100
|
}
|
|
108
101
|
);
|
|
109
102
|
}
|
|
@@ -183,12 +176,12 @@ function createPathCompat(option) {
|
|
|
183
176
|
}
|
|
184
177
|
|
|
185
178
|
// src/parse.ts
|
|
186
|
-
var rl = import_node_readline.default.createInterface({
|
|
187
|
-
input: import_node_process2.default.stdin,
|
|
188
|
-
output: import_node_process2.default.stdout
|
|
189
|
-
});
|
|
190
179
|
var isSupported = Boolean(defaultPath);
|
|
191
180
|
function rlSetConfig() {
|
|
181
|
+
const rl = import_node_readline.default.createInterface({
|
|
182
|
+
input: import_node_process2.default.stdin,
|
|
183
|
+
output: import_node_process2.default.stdout
|
|
184
|
+
});
|
|
192
185
|
logger_default.log("\u8BF7\u8BBE\u7F6E\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177 cli \u7684\u8DEF\u5F84");
|
|
193
186
|
logger_default.log("> \u63D0\u793A\uFF1A\u547D\u4EE4\u884C\u5DE5\u5177\u9ED8\u8BA4\u6240\u5728\u4F4D\u7F6E\uFF1A");
|
|
194
187
|
logger_default.log("- MacOS: <\u5B89\u88C5\u8DEF\u5F84>/Contents/MacOS/cli");
|
package/dist/index.js
CHANGED