weapp-ide-cli 5.0.2 → 5.0.3
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/README.md +1 -0
- package/dist/{chunk-DNENPZKW.js → chunk-A26E3I4U.js} +196 -21
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +29 -2
- package/dist/index.js +13 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -113,6 +113,7 @@ weapp config
|
|
|
113
113
|
## 常见问题
|
|
114
114
|
|
|
115
115
|
- **命令执行后无反应**:请确认微信开发者工具已开启服务端口,并尝试重新登录或升级工具版本。
|
|
116
|
+
- **提示 `需要重新登录` 或 `code: 10`**:表示微信开发者工具登录态失效。请先在工具内完成登录,再回到终端按 `r` 重试;按 `q`、`Esc` 或 `Ctrl+C` 可取消本次命令。
|
|
116
117
|
- **提示未找到 CLI**:检查配置文件中的路径是否真实存在,可使用绝对路径避免解析误差。
|
|
117
118
|
- **Linux 环境报错**:需安装社区版工具并将 `wechat-devtools-cli` 加入 `PATH`,否则只能手动指定路径。
|
|
118
119
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/logger.ts
|
|
2
|
-
import logger from "@weapp-core/logger";
|
|
2
|
+
import logger, { colors } from "@weapp-core/logger";
|
|
3
3
|
var logger_default = logger;
|
|
4
4
|
|
|
5
5
|
// src/utils/path.ts
|
|
@@ -57,12 +57,20 @@ function createPathCompat(option) {
|
|
|
57
57
|
|
|
58
58
|
// src/utils/exec.ts
|
|
59
59
|
import process3 from "process";
|
|
60
|
-
async function execute(cliPath, argv) {
|
|
60
|
+
async function execute(cliPath, argv, options = {}) {
|
|
61
|
+
const {
|
|
62
|
+
pipeStdout = true,
|
|
63
|
+
pipeStderr = true
|
|
64
|
+
} = options;
|
|
61
65
|
const { execa } = await import("execa");
|
|
62
66
|
const task = execa(cliPath, argv);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
if (pipeStdout) {
|
|
68
|
+
task?.stdout?.pipe(process3.stdout);
|
|
69
|
+
}
|
|
70
|
+
if (pipeStderr) {
|
|
71
|
+
task?.stderr?.pipe(process3.stderr);
|
|
72
|
+
}
|
|
73
|
+
return await task;
|
|
66
74
|
}
|
|
67
75
|
|
|
68
76
|
// src/cli/minidev.ts
|
|
@@ -78,10 +86,10 @@ async function runMinidev(argv) {
|
|
|
78
86
|
} catch (error) {
|
|
79
87
|
if (isCommandNotFound(error)) {
|
|
80
88
|
logger_default.error("\u672A\u68C0\u6D4B\u5230\u652F\u4ED8\u5B9D\u5C0F\u7A0B\u5E8F CLI\uFF1Aminidev");
|
|
81
|
-
logger_default.
|
|
82
|
-
logger_default.
|
|
83
|
-
logger_default.
|
|
84
|
-
logger_default.
|
|
89
|
+
logger_default.warn("\u8BF7\u5148\u5B89\u88C5 minidev\uFF0C\u53EF\u4F7F\u7528\u4EE5\u4E0B\u4EFB\u4E00\u547D\u4EE4\uFF1A");
|
|
90
|
+
logger_default.info(`- ${colors.green("pnpm add -g minidev")}`);
|
|
91
|
+
logger_default.info(`- ${colors.green("npm install -g minidev")}`);
|
|
92
|
+
logger_default.info(`- ${colors.green("yarn global add minidev")}`);
|
|
85
93
|
return;
|
|
86
94
|
}
|
|
87
95
|
throw error;
|
|
@@ -128,11 +136,11 @@ import fs2 from "fs-extra";
|
|
|
128
136
|
async function promptForCliPath() {
|
|
129
137
|
const rl = createInterface({ input, output });
|
|
130
138
|
try {
|
|
131
|
-
logger_default.
|
|
132
|
-
logger_default.
|
|
133
|
-
logger_default.
|
|
134
|
-
logger_default.
|
|
135
|
-
logger_default.
|
|
139
|
+
logger_default.info(`\u8BF7\u8BBE\u7F6E ${colors.bold("\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177 CLI")} \u7684\u8DEF\u5F84`);
|
|
140
|
+
logger_default.info("\u63D0\u793A\uFF1A\u547D\u4EE4\u884C\u5DE5\u5177\u9ED8\u8BA4\u6240\u5728\u4F4D\u7F6E\uFF1A");
|
|
141
|
+
logger_default.info(`- MacOS: ${colors.green("<\u5B89\u88C5\u8DEF\u5F84>/Contents/MacOS/cli")}`);
|
|
142
|
+
logger_default.info(`- Windows: ${colors.green("<\u5B89\u88C5\u8DEF\u5F84>/cli.bat")}`);
|
|
143
|
+
logger_default.info(`- Linux: ${colors.green("<\u5B89\u88C5\u8DEF\u5F84>/files/bin/bin/wechat-devtools-cli")}`);
|
|
136
144
|
const cliPath = (await rl.question("\u8BF7\u8F93\u5165\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177 CLI \u8DEF\u5F84\uFF1A")).trim();
|
|
137
145
|
if (!cliPath) {
|
|
138
146
|
logger_default.error("\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u5DF2\u53D6\u6D88\u672C\u6B21\u914D\u7F6E\u3002");
|
|
@@ -140,7 +148,7 @@ async function promptForCliPath() {
|
|
|
140
148
|
}
|
|
141
149
|
try {
|
|
142
150
|
const normalizedPath = await createCustomConfig({ cliPath });
|
|
143
|
-
logger_default.
|
|
151
|
+
logger_default.info(`\u5168\u5C40\u914D\u7F6E\u5B58\u50A8\u4F4D\u7F6E\uFF1A${colors.green(defaultCustomConfigFilePath)}`);
|
|
144
152
|
if (!await fs2.pathExists(normalizedPath)) {
|
|
145
153
|
logger_default.warn("\u5728\u5F53\u524D\u8DEF\u5F84\u672A\u627E\u5230\u5FAE\u4FE1web\u5F00\u53D1\u8005\u547D\u4EE4\u884C\u5DE5\u5177\uFF0C\u8BF7\u786E\u8BA4\u8DEF\u5F84\u662F\u5426\u6B63\u786E\u3002");
|
|
146
154
|
}
|
|
@@ -235,8 +243,8 @@ async function getConfig() {
|
|
|
235
243
|
const config = await fs4.readJSON(defaultCustomConfigFilePath);
|
|
236
244
|
const cliPath = typeof config.cliPath === "string" ? config.cliPath.trim() : "";
|
|
237
245
|
if (cliPath) {
|
|
238
|
-
logger_default.
|
|
239
|
-
logger_default.
|
|
246
|
+
logger_default.info(`\u5168\u5C40\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84\uFF1A${colors.green(defaultCustomConfigFilePath)}`);
|
|
247
|
+
logger_default.info(`\u81EA\u5B9A\u4E49 CLI \u8DEF\u5F84\uFF1A${colors.green(cliPath)}`);
|
|
240
248
|
return {
|
|
241
249
|
cliPath,
|
|
242
250
|
source: "custom"
|
|
@@ -275,7 +283,119 @@ async function resolveCliPath() {
|
|
|
275
283
|
};
|
|
276
284
|
}
|
|
277
285
|
|
|
286
|
+
// src/cli/retry.ts
|
|
287
|
+
import process5 from "process";
|
|
288
|
+
import { emitKeypressEvents } from "readline";
|
|
289
|
+
var LOGIN_REQUIRED_PATTERNS = [
|
|
290
|
+
/code\s*[:=]\s*10/i,
|
|
291
|
+
/需要重新登录/,
|
|
292
|
+
/need\s+re-?login/i,
|
|
293
|
+
/re-?login/i
|
|
294
|
+
];
|
|
295
|
+
function isWechatIdeLoginRequiredError(error) {
|
|
296
|
+
const text = extractExecutionErrorText(error);
|
|
297
|
+
if (!text) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
return LOGIN_REQUIRED_PATTERNS.some((pattern) => pattern.test(text));
|
|
301
|
+
}
|
|
302
|
+
function extractExecutionErrorText(error) {
|
|
303
|
+
if (!error || typeof error !== "object") {
|
|
304
|
+
return "";
|
|
305
|
+
}
|
|
306
|
+
const parts = [];
|
|
307
|
+
const candidate = error;
|
|
308
|
+
for (const field of [candidate.message, candidate.shortMessage, candidate.stderr, candidate.stdout]) {
|
|
309
|
+
if (typeof field === "string" && field.trim()) {
|
|
310
|
+
parts.push(field);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return parts.join("\n");
|
|
314
|
+
}
|
|
315
|
+
function formatWechatIdeLoginRequiredError(error) {
|
|
316
|
+
const text = extractExecutionErrorText(error);
|
|
317
|
+
const code = text.match(/code\s*[:=]\s*(\d+)/i)?.[1];
|
|
318
|
+
const message = extractLoginRequiredMessage(text);
|
|
319
|
+
const lines = ["\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\u8FD4\u56DE\u767B\u5F55\u9519\u8BEF\uFF1A"];
|
|
320
|
+
if (code) {
|
|
321
|
+
lines.push(`- code: ${code}`);
|
|
322
|
+
}
|
|
323
|
+
if (message) {
|
|
324
|
+
lines.push(`- message: ${message}`);
|
|
325
|
+
}
|
|
326
|
+
if (!code && !message) {
|
|
327
|
+
lines.push("- message: \u9700\u8981\u91CD\u65B0\u767B\u5F55");
|
|
328
|
+
}
|
|
329
|
+
return lines.join("\n");
|
|
330
|
+
}
|
|
331
|
+
function extractLoginRequiredMessage(text) {
|
|
332
|
+
if (!text) {
|
|
333
|
+
return "";
|
|
334
|
+
}
|
|
335
|
+
if (/需要重新登录/.test(text)) {
|
|
336
|
+
return "\u9700\u8981\u91CD\u65B0\u767B\u5F55";
|
|
337
|
+
}
|
|
338
|
+
const englishMatch = text.match(/need\s+re-?login|re-?login/i);
|
|
339
|
+
if (englishMatch?.[0]) {
|
|
340
|
+
return englishMatch[0].toLowerCase();
|
|
341
|
+
}
|
|
342
|
+
const firstLine = text.split(/\r?\n/).map((line) => line.trim()).find((line) => Boolean(line) && !line.startsWith("at "));
|
|
343
|
+
if (!firstLine) {
|
|
344
|
+
return "";
|
|
345
|
+
}
|
|
346
|
+
return firstLine.replace(/^\[error\]\s*/i, "").replace(/^error\s*:\s*/i, "").slice(0, 120);
|
|
347
|
+
}
|
|
348
|
+
async function waitForRetryKeypress() {
|
|
349
|
+
if (!process5.stdin.isTTY) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
emitKeypressEvents(process5.stdin);
|
|
353
|
+
const hasSetRawMode = typeof process5.stdin.setRawMode === "function";
|
|
354
|
+
if (hasSetRawMode) {
|
|
355
|
+
process5.stdin.setRawMode(true);
|
|
356
|
+
}
|
|
357
|
+
process5.stdin.resume();
|
|
358
|
+
return new Promise((resolve) => {
|
|
359
|
+
const cleanup = () => {
|
|
360
|
+
process5.stdin.off("keypress", onKeypress);
|
|
361
|
+
if (hasSetRawMode) {
|
|
362
|
+
process5.stdin.setRawMode(false);
|
|
363
|
+
}
|
|
364
|
+
process5.stdin.pause();
|
|
365
|
+
};
|
|
366
|
+
const done = (value) => {
|
|
367
|
+
cleanup();
|
|
368
|
+
resolve(value);
|
|
369
|
+
};
|
|
370
|
+
const onKeypress = (_str, key) => {
|
|
371
|
+
if (!key) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (key.ctrl && key.name === "c") {
|
|
375
|
+
done(false);
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (key.name === "r") {
|
|
379
|
+
done(true);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
if (key.name === "q" || key.name === "escape") {
|
|
383
|
+
done(false);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
process5.stdin.on("keypress", onKeypress);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function formatRetryHotkeyPrompt() {
|
|
390
|
+
const highlight = (key) => highlightHotkey(key);
|
|
391
|
+
return `\u6309 ${highlight("r")} \u91CD\u8BD5\uFF0C\u6309 ${highlight("q")} / ${highlight("Esc")} / ${highlight("Ctrl+C")} \u9000\u51FA\u3002`;
|
|
392
|
+
}
|
|
393
|
+
function highlightHotkey(key) {
|
|
394
|
+
return colors.bold(colors.green(key));
|
|
395
|
+
}
|
|
396
|
+
|
|
278
397
|
// src/cli/run.ts
|
|
398
|
+
import process6 from "process";
|
|
279
399
|
var MINIDEV_NAMESPACE = /* @__PURE__ */ new Set(["alipay", "ali", "minidev"]);
|
|
280
400
|
var ALIPAY_PLATFORM_ALIASES = /* @__PURE__ */ new Set(["alipay", "ali", "minidev"]);
|
|
281
401
|
var ARG_TRANSFORMS = [
|
|
@@ -299,7 +419,7 @@ async function parse(argv) {
|
|
|
299
419
|
return;
|
|
300
420
|
}
|
|
301
421
|
if (!isOperatingSystemSupported(operatingSystemName)) {
|
|
302
|
-
logger_default.
|
|
422
|
+
logger_default.warn(`\u5FAE\u4FE1web\u5F00\u53D1\u8005\u5DE5\u5177\u4E0D\u652F\u6301\u5F53\u524D\u5E73\u53F0\uFF1A${operatingSystemName} !`);
|
|
303
423
|
return;
|
|
304
424
|
}
|
|
305
425
|
if (head === "config") {
|
|
@@ -308,12 +428,50 @@ async function parse(argv) {
|
|
|
308
428
|
}
|
|
309
429
|
const { cliPath, source } = await resolveCliPath();
|
|
310
430
|
if (!cliPath) {
|
|
311
|
-
const message = source === "custom" ? "\u5728\u5F53\u524D\u81EA\u5B9A\u4E49\u8DEF\u5F84\u4E2D\u672A\u627E\u5230\u5FAE\u4FE1web\u5F00\u53D1\u8005\u547D\u4EE4\u884C\u5DE5\u5177\uFF0C\u8BF7\u91CD\u65B0\u6307\u5B9A\u8DEF\u5F84\u3002" :
|
|
312
|
-
logger_default.
|
|
431
|
+
const message = source === "custom" ? "\u5728\u5F53\u524D\u81EA\u5B9A\u4E49\u8DEF\u5F84\u4E2D\u672A\u627E\u5230\u5FAE\u4FE1web\u5F00\u53D1\u8005\u547D\u4EE4\u884C\u5DE5\u5177\uFF0C\u8BF7\u91CD\u65B0\u6307\u5B9A\u8DEF\u5F84\u3002" : `\u672A\u68C0\u6D4B\u5230\u5FAE\u4FE1web\u5F00\u53D1\u8005\u547D\u4EE4\u884C\u5DE5\u5177\uFF0C\u8BF7\u6267\u884C ${colors.bold(colors.green("weapp-ide-cli config"))} \u6307\u5B9A\u8DEF\u5F84\u3002`;
|
|
432
|
+
logger_default.warn(message);
|
|
313
433
|
await promptForCliPath();
|
|
314
434
|
return;
|
|
315
435
|
}
|
|
316
|
-
await
|
|
436
|
+
await runWechatCliWithRetry(cliPath, formattedArgv);
|
|
437
|
+
}
|
|
438
|
+
async function runWechatCliWithRetry(cliPath, argv) {
|
|
439
|
+
let retrying = true;
|
|
440
|
+
while (retrying) {
|
|
441
|
+
try {
|
|
442
|
+
const result = await execute(cliPath, argv, {
|
|
443
|
+
pipeStdout: false,
|
|
444
|
+
pipeStderr: false
|
|
445
|
+
});
|
|
446
|
+
if (!isWechatIdeLoginRequiredError(result)) {
|
|
447
|
+
flushExecutionOutput(result);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
retrying = await promptLoginRetry(result);
|
|
451
|
+
if (retrying) {
|
|
452
|
+
logger_default.info("\u6B63\u5728\u91CD\u8BD5\u8FDE\u63A5\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177...");
|
|
453
|
+
}
|
|
454
|
+
} catch (error) {
|
|
455
|
+
if (!isWechatIdeLoginRequiredError(error)) {
|
|
456
|
+
throw error;
|
|
457
|
+
}
|
|
458
|
+
retrying = await promptLoginRetry(error);
|
|
459
|
+
if (retrying) {
|
|
460
|
+
logger_default.info("\u6B63\u5728\u91CD\u8BD5\u8FDE\u63A5\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177...");
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
async function promptLoginRetry(errorLike) {
|
|
466
|
+
logger_default.error("\u68C0\u6D4B\u5230\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\u767B\u5F55\u72B6\u6001\u5931\u6548\uFF0C\u8BF7\u5148\u767B\u5F55\u540E\u91CD\u8BD5\u3002");
|
|
467
|
+
logger_default.warn("\u8BF7\u5148\u6253\u5F00\u5FAE\u4FE1\u5F00\u53D1\u8005\u5DE5\u5177\u5B8C\u6210\u767B\u5F55\u3002");
|
|
468
|
+
logger_default.warn(formatWechatIdeLoginRequiredError(errorLike));
|
|
469
|
+
logger_default.info(formatRetryHotkeyPrompt());
|
|
470
|
+
const shouldRetry = await waitForRetryKeypress();
|
|
471
|
+
if (!shouldRetry) {
|
|
472
|
+
logger_default.info("\u5DF2\u53D6\u6D88\u91CD\u8BD5\u3002\u5B8C\u6210\u767B\u5F55\u540E\u8BF7\u91CD\u65B0\u6267\u884C\u5F53\u524D\u547D\u4EE4\u3002");
|
|
473
|
+
}
|
|
474
|
+
return shouldRetry;
|
|
317
475
|
}
|
|
318
476
|
function shouldDelegateOpenToMinidev(argv) {
|
|
319
477
|
if (argv[0] !== "open") {
|
|
@@ -370,6 +528,18 @@ function removeOption(argv, optionName) {
|
|
|
370
528
|
}
|
|
371
529
|
return nextArgv;
|
|
372
530
|
}
|
|
531
|
+
function flushExecutionOutput(result) {
|
|
532
|
+
if (!result || typeof result !== "object") {
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
const candidate = result;
|
|
536
|
+
if (typeof candidate.stdout === "string" && candidate.stdout) {
|
|
537
|
+
process6.stdout.write(candidate.stdout);
|
|
538
|
+
}
|
|
539
|
+
if (typeof candidate.stderr === "string" && candidate.stderr) {
|
|
540
|
+
process6.stderr.write(candidate.stderr);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
373
543
|
|
|
374
544
|
export {
|
|
375
545
|
logger_default,
|
|
@@ -389,5 +559,10 @@ export {
|
|
|
389
559
|
getDefaultCliPath,
|
|
390
560
|
getConfig,
|
|
391
561
|
resolveCliPath,
|
|
562
|
+
isWechatIdeLoginRequiredError,
|
|
563
|
+
extractExecutionErrorText,
|
|
564
|
+
formatWechatIdeLoginRequiredError,
|
|
565
|
+
waitForRetryKeypress,
|
|
566
|
+
formatRetryHotkeyPrompt,
|
|
392
567
|
parse
|
|
393
568
|
};
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as execa from 'execa';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @description 运行支付宝小程序 CLI(minidev)
|
|
3
5
|
*/
|
|
@@ -16,6 +18,27 @@ declare function resolveCliPath(): Promise<{
|
|
|
16
18
|
source: ConfigSource;
|
|
17
19
|
}>;
|
|
18
20
|
|
|
21
|
+
/**
|
|
22
|
+
* @description 判断是否为微信开发者工具登录失效错误。
|
|
23
|
+
*/
|
|
24
|
+
declare function isWechatIdeLoginRequiredError(error: unknown): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description 提取执行错误文本,便于统一匹配与提示。
|
|
27
|
+
*/
|
|
28
|
+
declare function extractExecutionErrorText(error: unknown): string;
|
|
29
|
+
/**
|
|
30
|
+
* @description 将登录失效错误格式化为更易读的摘要。
|
|
31
|
+
*/
|
|
32
|
+
declare function formatWechatIdeLoginRequiredError(error: unknown): string;
|
|
33
|
+
/**
|
|
34
|
+
* @description 交互等待用户按键重试,按 r 重试,按 q 或 Ctrl+C 取消。
|
|
35
|
+
*/
|
|
36
|
+
declare function waitForRetryKeypress(): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* @description 生成重试按键提示,并高亮关键热键。
|
|
39
|
+
*/
|
|
40
|
+
declare function formatRetryHotkeyPrompt(): string;
|
|
41
|
+
|
|
19
42
|
/**
|
|
20
43
|
* @description CLI 入口解析与分发
|
|
21
44
|
*/
|
|
@@ -107,14 +130,18 @@ declare function createAlias(entry: AliasEntry): ArgvTransform;
|
|
|
107
130
|
*/
|
|
108
131
|
declare function createPathCompat(option: string): ArgvTransform;
|
|
109
132
|
|
|
133
|
+
interface ExecuteOptions {
|
|
134
|
+
pipeStdout?: boolean;
|
|
135
|
+
pipeStderr?: boolean;
|
|
136
|
+
}
|
|
110
137
|
/**
|
|
111
138
|
* @description 执行 CLI 命令并透传输出
|
|
112
139
|
*/
|
|
113
|
-
declare function execute(cliPath: string, argv: string[]): Promise<
|
|
140
|
+
declare function execute(cliPath: string, argv: string[], options?: ExecuteOptions): Promise<execa.Result<{}>>;
|
|
114
141
|
|
|
115
142
|
/**
|
|
116
143
|
* @description 解析为绝对路径(基于当前工作目录)
|
|
117
144
|
*/
|
|
118
145
|
declare function resolvePath(filePath: string): string;
|
|
119
146
|
|
|
120
|
-
export { type ArgvTransform, type BaseConfig, type ConfigSource, type ResolvedConfig, type SupportedPlatform, SupportedPlatformsMap, createAlias, createCustomConfig, createPathCompat, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, getConfig, getDefaultCliPath, isOperatingSystemSupported, operatingSystemName, parse, promptForCliPath, resolveCliPath, resolvePath, runMinidev, transformArgv };
|
|
147
|
+
export { type ArgvTransform, type BaseConfig, type ConfigSource, type ResolvedConfig, type SupportedPlatform, SupportedPlatformsMap, createAlias, createCustomConfig, createPathCompat, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, extractExecutionErrorText, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getConfig, getDefaultCliPath, isOperatingSystemSupported, isWechatIdeLoginRequiredError, operatingSystemName, parse, promptForCliPath, resolveCliPath, resolvePath, runMinidev, transformArgv, waitForRetryKeypress };
|
package/dist/index.js
CHANGED
|
@@ -6,17 +6,22 @@ import {
|
|
|
6
6
|
defaultCustomConfigDirPath,
|
|
7
7
|
defaultCustomConfigFilePath,
|
|
8
8
|
execute,
|
|
9
|
+
extractExecutionErrorText,
|
|
10
|
+
formatRetryHotkeyPrompt,
|
|
11
|
+
formatWechatIdeLoginRequiredError,
|
|
9
12
|
getConfig,
|
|
10
13
|
getDefaultCliPath,
|
|
11
14
|
isOperatingSystemSupported,
|
|
15
|
+
isWechatIdeLoginRequiredError,
|
|
12
16
|
operatingSystemName,
|
|
13
17
|
parse,
|
|
14
18
|
promptForCliPath,
|
|
15
19
|
resolveCliPath,
|
|
16
20
|
resolvePath,
|
|
17
21
|
runMinidev,
|
|
18
|
-
transformArgv
|
|
19
|
-
|
|
22
|
+
transformArgv,
|
|
23
|
+
waitForRetryKeypress
|
|
24
|
+
} from "./chunk-A26E3I4U.js";
|
|
20
25
|
export {
|
|
21
26
|
SupportedPlatformsMap,
|
|
22
27
|
createAlias,
|
|
@@ -25,14 +30,19 @@ export {
|
|
|
25
30
|
defaultCustomConfigDirPath,
|
|
26
31
|
defaultCustomConfigFilePath,
|
|
27
32
|
execute,
|
|
33
|
+
extractExecutionErrorText,
|
|
34
|
+
formatRetryHotkeyPrompt,
|
|
35
|
+
formatWechatIdeLoginRequiredError,
|
|
28
36
|
getConfig,
|
|
29
37
|
getDefaultCliPath,
|
|
30
38
|
isOperatingSystemSupported,
|
|
39
|
+
isWechatIdeLoginRequiredError,
|
|
31
40
|
operatingSystemName,
|
|
32
41
|
parse,
|
|
33
42
|
promptForCliPath,
|
|
34
43
|
resolveCliPath,
|
|
35
44
|
resolvePath,
|
|
36
45
|
runMinidev,
|
|
37
|
-
transformArgv
|
|
46
|
+
transformArgv,
|
|
47
|
+
waitForRetryKeypress
|
|
38
48
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-ide-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "让微信开发者工具,用起来更加方便!",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"execa": "9.6.1",
|
|
66
66
|
"fs-extra": "^11.3.3",
|
|
67
67
|
"pathe": "^2.0.3",
|
|
68
|
-
"@weapp-core/logger": "^3.0
|
|
68
|
+
"@weapp-core/logger": "^3.1.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"dev": "tsup --watch --sourcemap",
|