weapp-ide-cli 5.1.1 → 5.1.2
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as validateLocaleOption, S as i18nText, _ as connectMiniProgram, a as navigateBack, b as logger_default, c as pageStack, d as remote, f as scrollTo, g as tap, i as input, l as reLaunch, m as systemInfo, o as navigateTo, p as switchTab, r as currentPage, s as pageData, t as audit, u as redirectTo, x as configureLocaleFromArgv, y as colors } from "./commands-BwCMEmX-.js";
|
|
2
2
|
import process, { stdin, stdout } from "node:process";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import { createInterface } from "node:readline/promises";
|
|
7
|
+
import { inspect } from "node:util";
|
|
7
8
|
import { emitKeypressEvents } from "node:readline";
|
|
8
9
|
//#region src/cli/automator-argv.ts
|
|
9
10
|
/**
|
|
@@ -182,7 +183,7 @@ async function runScreenshot(argv) {
|
|
|
182
183
|
}
|
|
183
184
|
const options = parseScreenshotArgs(argv);
|
|
184
185
|
const isJsonOutput = argv.includes("--json");
|
|
185
|
-
const { takeScreenshot } = await import("./commands-
|
|
186
|
+
const { takeScreenshot } = await import("./commands-BwCMEmX-.js").then((n) => n.n);
|
|
186
187
|
const result = await takeScreenshot(options);
|
|
187
188
|
if (isJsonOutput) {
|
|
188
189
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -917,6 +918,123 @@ async function handleConfigCommand(argv) {
|
|
|
917
918
|
throw new Error(i18nText("支持的 config 子命令:lang | set-lang | show | get | set | unset | doctor | import | export", "Supported config subcommands: lang | set-lang | show | get | set | unset | doctor | import | export"));
|
|
918
919
|
}
|
|
919
920
|
//#endregion
|
|
921
|
+
//#region src/cli/forwardConsole.ts
|
|
922
|
+
const DEFAULT_FORWARD_CONSOLE_LEVELS = [
|
|
923
|
+
"log",
|
|
924
|
+
"info",
|
|
925
|
+
"warn",
|
|
926
|
+
"error"
|
|
927
|
+
];
|
|
928
|
+
/**
|
|
929
|
+
* @description 启动小程序控制台日志转发,并保持 automator 会话常驻。
|
|
930
|
+
*/
|
|
931
|
+
async function startForwardConsole(options) {
|
|
932
|
+
const miniProgram = await connectMiniProgram(options);
|
|
933
|
+
const logLevels = new Set(options.logLevels?.length ? options.logLevels : DEFAULT_FORWARD_CONSOLE_LEVELS);
|
|
934
|
+
const logHandler = options.onLog ?? printForwardConsoleEvent;
|
|
935
|
+
const onConsole = (payload) => {
|
|
936
|
+
const event = normalizeConsoleEvent(payload);
|
|
937
|
+
if (!logLevels.has(event.level)) return;
|
|
938
|
+
logHandler(event);
|
|
939
|
+
};
|
|
940
|
+
const onException = (payload) => {
|
|
941
|
+
if (options.unhandledErrors === false) return;
|
|
942
|
+
logHandler(normalizeExceptionEvent(payload));
|
|
943
|
+
};
|
|
944
|
+
miniProgram.on("console", onConsole);
|
|
945
|
+
miniProgram.on("exception", onException);
|
|
946
|
+
options.onReady?.();
|
|
947
|
+
let closed = false;
|
|
948
|
+
return { async close() {
|
|
949
|
+
if (closed) return;
|
|
950
|
+
closed = true;
|
|
951
|
+
detachMiniProgramListener(miniProgram, "console", onConsole);
|
|
952
|
+
detachMiniProgramListener(miniProgram, "exception", onException);
|
|
953
|
+
await miniProgram.close();
|
|
954
|
+
} };
|
|
955
|
+
}
|
|
956
|
+
function detachMiniProgramListener(miniProgram, event, listener) {
|
|
957
|
+
if (typeof miniProgram.off === "function") miniProgram.off(event, listener);
|
|
958
|
+
}
|
|
959
|
+
function printForwardConsoleEvent(event) {
|
|
960
|
+
const line = `${colors.dim(`[mini:${event.level}]`)} ${event.message}`;
|
|
961
|
+
switch (event.level) {
|
|
962
|
+
case "error":
|
|
963
|
+
logger_default.error(line);
|
|
964
|
+
return;
|
|
965
|
+
case "warn":
|
|
966
|
+
logger_default.warn(line);
|
|
967
|
+
return;
|
|
968
|
+
case "info":
|
|
969
|
+
logger_default.info(line);
|
|
970
|
+
return;
|
|
971
|
+
default: logger_default.log(line);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
function normalizeConsoleEvent(payload) {
|
|
975
|
+
const record = toPlainObject(payload);
|
|
976
|
+
return {
|
|
977
|
+
level: normalizeLogLevel(record.type ?? record.level ?? record.method),
|
|
978
|
+
message: resolveLogMessage(record, payload),
|
|
979
|
+
raw: payload
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
function normalizeExceptionEvent(payload) {
|
|
983
|
+
const record = toPlainObject(payload);
|
|
984
|
+
const error = toPlainObject(record.error);
|
|
985
|
+
return {
|
|
986
|
+
level: "error",
|
|
987
|
+
message: [getStringValue(error.message) ?? getStringValue(record.message), getStringValue(error.stack) ?? getStringValue(record.stack)].filter(Boolean).join("\n") || inspect(payload, {
|
|
988
|
+
depth: 4,
|
|
989
|
+
colors: false,
|
|
990
|
+
compact: true
|
|
991
|
+
}),
|
|
992
|
+
raw: payload
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
function normalizeLogLevel(value) {
|
|
996
|
+
const normalized = String(value ?? "log").toLowerCase();
|
|
997
|
+
if (normalized === "warning") return "warn";
|
|
998
|
+
if (normalized === "debug" || normalized === "info" || normalized === "warn" || normalized === "error") return normalized;
|
|
999
|
+
return "log";
|
|
1000
|
+
}
|
|
1001
|
+
function resolveLogMessage(record, payload) {
|
|
1002
|
+
const text = getStringValue(record.text) ?? getStringValue(record.message);
|
|
1003
|
+
if (text) return text;
|
|
1004
|
+
if (Array.isArray(record.args) && record.args.length > 0) return record.args.map(formatConsoleArgument).join(" ");
|
|
1005
|
+
if (typeof payload === "string") return payload;
|
|
1006
|
+
return inspect(payload, {
|
|
1007
|
+
depth: 4,
|
|
1008
|
+
colors: false,
|
|
1009
|
+
compact: true
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
function formatConsoleArgument(value) {
|
|
1013
|
+
const record = toPlainObject(value);
|
|
1014
|
+
const rawValue = record.value;
|
|
1015
|
+
const description = getStringValue(record.description);
|
|
1016
|
+
if (typeof rawValue === "string" || typeof rawValue === "number" || typeof rawValue === "boolean") return String(rawValue);
|
|
1017
|
+
if (rawValue !== void 0) return inspect(rawValue, {
|
|
1018
|
+
depth: 4,
|
|
1019
|
+
colors: false,
|
|
1020
|
+
compact: true
|
|
1021
|
+
});
|
|
1022
|
+
if (description) return description;
|
|
1023
|
+
if (typeof value === "string") return value;
|
|
1024
|
+
return inspect(value, {
|
|
1025
|
+
depth: 4,
|
|
1026
|
+
colors: false,
|
|
1027
|
+
compact: true
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
function getStringValue(value) {
|
|
1031
|
+
return typeof value === "string" && value.trim() ? value : void 0;
|
|
1032
|
+
}
|
|
1033
|
+
function toPlainObject(value) {
|
|
1034
|
+
if (!value || typeof value !== "object") return {};
|
|
1035
|
+
return value;
|
|
1036
|
+
}
|
|
1037
|
+
//#endregion
|
|
920
1038
|
//#region src/utils/argv.ts
|
|
921
1039
|
function ensurePathArgument(argv, optionIndex) {
|
|
922
1040
|
const paramIdx = optionIndex + 1;
|
|
@@ -1069,10 +1187,9 @@ async function waitForRetryKeypress(options = {}) {
|
|
|
1069
1187
|
process.stdin.resume();
|
|
1070
1188
|
return new Promise((resolve) => {
|
|
1071
1189
|
let settled = false;
|
|
1072
|
-
const normalizedTimeoutMs = Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : 3e4;
|
|
1073
1190
|
const timeout = setTimeout(() => {
|
|
1074
1191
|
done("timeout");
|
|
1075
|
-
},
|
|
1192
|
+
}, Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : 3e4);
|
|
1076
1193
|
const cleanup = () => {
|
|
1077
1194
|
clearTimeout(timeout);
|
|
1078
1195
|
process.stdin.off("keypress", onKeypress);
|
|
@@ -1347,4 +1464,4 @@ function createMinidevOpenArgv(argv) {
|
|
|
1347
1464
|
return removeOption(nextArgv, "--platform");
|
|
1348
1465
|
}
|
|
1349
1466
|
//#endregion
|
|
1350
|
-
export {
|
|
1467
|
+
export { defaultCustomConfigDirPath as A, isAutomatorCommand as B, operatingSystemName as C, overwriteCustomConfig as D, createLocaleConfig as E, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES as F, readOptionValue as G, parseScreenshotArgs as H, WECHAT_CLI_COMMAND_NAMES as I, removeOption as K, isWeappIdeTopLevelCommand as L, resolvePath as M, CONFIG_COMMAND_NAME as N, readCustomConfig as O, MINIDEV_NAMESPACE_COMMAND_NAMES as P, AUTOMATOR_COMMAND_NAMES as R, isOperatingSystemSupported as S, createCustomConfig as T, printScreenshotHelp as U, runAutomatorCommand as V, parseAutomatorArgs as W, resolveCliPath as _, extractExecutionErrorText as a, SupportedPlatformsMap as b, isWechatIdeLoginRequiredError as c, execute as d, createAlias as f, handleConfigCommand as g, startForwardConsole as h, createWechatIdeLoginRequiredExitError as i, defaultCustomConfigFilePath as j, removeCustomConfigKey as k, waitForRetryKeypress as l, transformArgv as m, validateWechatCliCommandArgs as n, formatRetryHotkeyPrompt as o, createPathCompat as p, runWechatCliWithRetry as r, formatWechatIdeLoginRequiredError as s, parse as t, runMinidev as u, getConfig as v, promptForCliPath as w, getDefaultCliPath as x, getConfiguredLocale as y, getAutomatorCommandHelp as z };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as parse } from "./cli-
|
|
1
|
+
import { b as logger_default } from "./commands-BwCMEmX-.js";
|
|
2
|
+
import { t as parse } from "./cli-g8B8r0xg.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
parse(process.argv.slice(2)).catch((err) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import net from "node:net";
|
|
1
2
|
import automator from "miniprogram-automator";
|
|
2
3
|
import process from "node:process";
|
|
3
4
|
import logger, { colors } from "@weapp-core/logger";
|
|
@@ -30,6 +31,24 @@ const DEVTOOLS_LOGIN_REQUIRED_PATTERNS = [
|
|
|
30
31
|
/need\s+re-?login/i,
|
|
31
32
|
/re-?login/i
|
|
32
33
|
];
|
|
34
|
+
let localhostListenPatched = false;
|
|
35
|
+
function patchNetListenToLoopback() {
|
|
36
|
+
if (localhostListenPatched) return;
|
|
37
|
+
localhostListenPatched = true;
|
|
38
|
+
const rawListen = net.Server.prototype.listen;
|
|
39
|
+
net.Server.prototype.listen = function patchedListen(...args) {
|
|
40
|
+
const firstArg = args[0];
|
|
41
|
+
if (firstArg && typeof firstArg === "object" && !Array.isArray(firstArg)) {
|
|
42
|
+
if (!("host" in firstArg) || !firstArg.host) args[0] = {
|
|
43
|
+
...firstArg,
|
|
44
|
+
host: "127.0.0.1"
|
|
45
|
+
};
|
|
46
|
+
return rawListen.apply(this, args);
|
|
47
|
+
}
|
|
48
|
+
if ((typeof firstArg === "number" || typeof firstArg === "string") && typeof args[1] !== "string") args.splice(1, 0, "127.0.0.1");
|
|
49
|
+
return rawListen.apply(this, args);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
33
52
|
/**
|
|
34
53
|
* @description Extract error text from various error types
|
|
35
54
|
*/
|
|
@@ -86,6 +105,7 @@ function formatAutomatorLoginError(error) {
|
|
|
86
105
|
* @description Launch automator with default options
|
|
87
106
|
*/
|
|
88
107
|
async function launchAutomator(options) {
|
|
108
|
+
patchNetListenToLoopback();
|
|
89
109
|
const { projectPath, timeout = 3e4 } = options;
|
|
90
110
|
return automator.launch({
|
|
91
111
|
projectPath,
|
|
@@ -163,29 +183,42 @@ var logger_default = logger;
|
|
|
163
183
|
//#endregion
|
|
164
184
|
//#region src/cli/automator-session.ts
|
|
165
185
|
/**
|
|
186
|
+
* @description 建立 automator 会话,并统一处理常见连接错误提示。
|
|
187
|
+
*/
|
|
188
|
+
async function connectMiniProgram(options) {
|
|
189
|
+
try {
|
|
190
|
+
return await launchAutomator(options);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
throw normalizeMiniProgramConnectionError(error);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
166
196
|
* @description 统一管理 automator 会话生命周期与常见连接错误提示。
|
|
167
197
|
*/
|
|
168
198
|
async function withMiniProgram(options, runner) {
|
|
169
199
|
let miniProgram = null;
|
|
170
200
|
try {
|
|
171
|
-
miniProgram = await
|
|
201
|
+
miniProgram = await connectMiniProgram(options);
|
|
172
202
|
return await runner(miniProgram);
|
|
173
203
|
} catch (error) {
|
|
174
|
-
|
|
175
|
-
logger_default.error(i18nText("检测到微信开发者工具登录状态失效,请先登录后重试。", "Wechat DevTools login has expired. Please login and retry."));
|
|
176
|
-
logger_default.warn(formatAutomatorLoginError(error));
|
|
177
|
-
throw new Error("DEVTOOLS_LOGIN_REQUIRED");
|
|
178
|
-
}
|
|
179
|
-
if (isDevtoolsHttpPortError(error)) {
|
|
180
|
-
logger_default.error(i18nText("无法连接到微信开发者工具,请确保已开启 HTTP 服务端口。", "Cannot connect to Wechat DevTools. Please ensure HTTP service port is enabled."));
|
|
181
|
-
logger_default.warn(i18nText("请在微信开发者工具中:设置 -> 安全设置 -> 开启服务端口", "Please enable service port in Wechat DevTools: Settings -> Security -> Service Port"));
|
|
182
|
-
throw new Error("DEVTOOLS_HTTP_PORT_ERROR");
|
|
183
|
-
}
|
|
184
|
-
throw error;
|
|
204
|
+
throw normalizeMiniProgramConnectionError(error);
|
|
185
205
|
} finally {
|
|
186
206
|
if (miniProgram) await miniProgram.close();
|
|
187
207
|
}
|
|
188
208
|
}
|
|
209
|
+
function normalizeMiniProgramConnectionError(error) {
|
|
210
|
+
if (isAutomatorLoginError(error)) {
|
|
211
|
+
logger_default.error(i18nText("检测到微信开发者工具登录状态失效,请先登录后重试。", "Wechat DevTools login has expired. Please login and retry."));
|
|
212
|
+
logger_default.warn(formatAutomatorLoginError(error));
|
|
213
|
+
return /* @__PURE__ */ new Error("DEVTOOLS_LOGIN_REQUIRED");
|
|
214
|
+
}
|
|
215
|
+
if (isDevtoolsHttpPortError(error)) {
|
|
216
|
+
logger_default.error(i18nText("无法连接到微信开发者工具,请确保已开启 HTTP 服务端口。", "Cannot connect to Wechat DevTools. Please ensure HTTP service port is enabled."));
|
|
217
|
+
logger_default.warn(i18nText("请在微信开发者工具中:设置 -> 安全设置 -> 开启服务端口", "Please enable service port in Wechat DevTools: Settings -> Security -> Service Port"));
|
|
218
|
+
return /* @__PURE__ */ new Error("DEVTOOLS_HTTP_PORT_ERROR");
|
|
219
|
+
}
|
|
220
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
221
|
+
}
|
|
189
222
|
//#endregion
|
|
190
223
|
//#region src/cli/commands.ts
|
|
191
224
|
var commands_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -339,4 +372,4 @@ async function requireElement(page, selector) {
|
|
|
339
372
|
return element;
|
|
340
373
|
}
|
|
341
374
|
//#endregion
|
|
342
|
-
export {
|
|
375
|
+
export { validateLocaleOption as C, launchAutomator as D, isDevtoolsHttpPortError as E, i18nText as S, isAutomatorLoginError as T, connectMiniProgram as _, navigateBack as a, logger_default as b, pageStack as c, remote as d, scrollTo as f, tap as g, takeScreenshot as h, input as i, reLaunch as l, systemInfo as m, commands_exports as n, navigateTo as o, switchTab as p, currentPage as r, pageData as s, audit as t, redirectTo as u, withMiniProgram as v, formatAutomatorLoginError as w, configureLocaleFromArgv as x, colors as y };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
-
import * as execa from "execa";
|
|
3
2
|
import * as miniprogram_automator_out_MiniProgram0 from "miniprogram-automator/out/MiniProgram";
|
|
3
|
+
import * as execa from "execa";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/automator.d.ts
|
|
6
6
|
interface AutomatorOptions {
|
|
@@ -49,6 +49,10 @@ interface AutomatorSessionOptions {
|
|
|
49
49
|
projectPath: string;
|
|
50
50
|
timeout?: number;
|
|
51
51
|
}
|
|
52
|
+
interface MiniProgramEventMap {
|
|
53
|
+
console: (payload: unknown) => void;
|
|
54
|
+
exception: (payload: unknown) => void;
|
|
55
|
+
}
|
|
52
56
|
interface MiniProgramElement {
|
|
53
57
|
tap: () => Promise<void>;
|
|
54
58
|
input?: (value: string) => Promise<void>;
|
|
@@ -73,7 +77,13 @@ interface MiniProgramLike {
|
|
|
73
77
|
screenshot: () => Promise<string | Buffer>;
|
|
74
78
|
remote: (enable?: boolean) => Promise<unknown>;
|
|
75
79
|
close: () => Promise<void>;
|
|
80
|
+
on: <TEvent extends keyof MiniProgramEventMap>(event: TEvent, listener: MiniProgramEventMap[TEvent]) => MiniProgramLike;
|
|
81
|
+
off?: <TEvent extends keyof MiniProgramEventMap>(event: TEvent, listener: MiniProgramEventMap[TEvent]) => MiniProgramLike;
|
|
76
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* @description 建立 automator 会话,并统一处理常见连接错误提示。
|
|
85
|
+
*/
|
|
86
|
+
declare function connectMiniProgram(options: AutomatorSessionOptions): Promise<MiniProgramLike>;
|
|
77
87
|
/**
|
|
78
88
|
* @description 统一管理 automator 会话生命周期与常见连接错误提示。
|
|
79
89
|
*/
|
|
@@ -150,6 +160,27 @@ declare function remote(options: RemoteOptions): Promise<void>;
|
|
|
150
160
|
*/
|
|
151
161
|
declare function handleConfigCommand(argv: string[]): Promise<void>;
|
|
152
162
|
//#endregion
|
|
163
|
+
//#region src/cli/forwardConsole.d.ts
|
|
164
|
+
type ForwardConsoleLogLevel = 'debug' | 'log' | 'info' | 'warn' | 'error';
|
|
165
|
+
interface ForwardConsoleEvent {
|
|
166
|
+
level: ForwardConsoleLogLevel;
|
|
167
|
+
message: string;
|
|
168
|
+
raw: unknown;
|
|
169
|
+
}
|
|
170
|
+
interface ForwardConsoleOptions extends AutomatorSessionOptions {
|
|
171
|
+
logLevels?: ForwardConsoleLogLevel[];
|
|
172
|
+
unhandledErrors?: boolean;
|
|
173
|
+
onLog?: (event: ForwardConsoleEvent) => void;
|
|
174
|
+
onReady?: () => void;
|
|
175
|
+
}
|
|
176
|
+
interface ForwardConsoleSession {
|
|
177
|
+
close: () => Promise<void>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @description 启动小程序控制台日志转发,并保持 automator 会话常驻。
|
|
181
|
+
*/
|
|
182
|
+
declare function startForwardConsole(options: ForwardConsoleOptions): Promise<ForwardConsoleSession>;
|
|
183
|
+
//#endregion
|
|
153
184
|
//#region src/cli/minidev.d.ts
|
|
154
185
|
/**
|
|
155
186
|
* @description 运行支付宝小程序 CLI(minidev)
|
|
@@ -381,4 +412,4 @@ declare function execute(cliPath: string, argv: string[], options?: ExecuteOptio
|
|
|
381
412
|
*/
|
|
382
413
|
declare function resolvePath(filePath: string): string;
|
|
383
414
|
//#endregion
|
|
384
|
-
export { AUTOMATOR_COMMAND_NAMES, ArgvTransform, AuditOptions, AutomatorCommandOptions, AutomatorOptions, AutomatorSessionOptions, type BaseConfig, CONFIG_COMMAND_NAME, type ConfigSource, InputOptions, LoginRetryMode, MINIDEV_NAMESPACE_COMMAND_NAMES, MiniProgramElement, MiniProgramLike, MiniProgramPage, NavigateOptions, PageDataOptions, PageInfoOptions, ParsedAutomatorArgs, RemoteOptions, type ResolvedConfig, RetryKeypressOptions, RetryPromptResult, type ScreenshotOptions, type ScreenshotResult, ScrollOptions, SelectorOptions, SupportedPlatform, SupportedPlatformsMap, TapOptions, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, audit, createAlias, createCustomConfig, createLocaleConfig, createPathCompat, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getConfig, getConfiguredLocale, getDefaultCliPath, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isDevtoolsHttpPortError, isOperatingSystemSupported, isWeappIdeTopLevelCommand, isWechatIdeLoginRequiredError, launchAutomator, navigateBack, navigateTo, operatingSystemName, overwriteCustomConfig, pageData, pageStack, parse, parseAutomatorArgs, parseScreenshotArgs, printScreenshotHelp, promptForCliPath, reLaunch, readCustomConfig, readOptionValue, redirectTo, remote, removeCustomConfigKey, removeOption, resolveCliPath, resolvePath, runAutomatorCommand, runMinidev, runWechatCliWithRetry, scrollTo, switchTab, systemInfo, takeScreenshot, tap, transformArgv, validateWechatCliCommandArgs, waitForRetryKeypress, withMiniProgram };
|
|
415
|
+
export { AUTOMATOR_COMMAND_NAMES, ArgvTransform, AuditOptions, AutomatorCommandOptions, AutomatorOptions, AutomatorSessionOptions, type BaseConfig, CONFIG_COMMAND_NAME, type ConfigSource, ForwardConsoleEvent, ForwardConsoleLogLevel, ForwardConsoleOptions, ForwardConsoleSession, InputOptions, LoginRetryMode, MINIDEV_NAMESPACE_COMMAND_NAMES, MiniProgramElement, MiniProgramEventMap, MiniProgramLike, MiniProgramPage, NavigateOptions, PageDataOptions, PageInfoOptions, ParsedAutomatorArgs, RemoteOptions, type ResolvedConfig, RetryKeypressOptions, RetryPromptResult, type ScreenshotOptions, type ScreenshotResult, ScrollOptions, SelectorOptions, SupportedPlatform, SupportedPlatformsMap, TapOptions, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, audit, connectMiniProgram, createAlias, createCustomConfig, createLocaleConfig, createPathCompat, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getConfig, getConfiguredLocale, getDefaultCliPath, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isDevtoolsHttpPortError, isOperatingSystemSupported, isWeappIdeTopLevelCommand, isWechatIdeLoginRequiredError, launchAutomator, navigateBack, navigateTo, operatingSystemName, overwriteCustomConfig, pageData, pageStack, parse, parseAutomatorArgs, parseScreenshotArgs, printScreenshotHelp, promptForCliPath, reLaunch, readCustomConfig, readOptionValue, redirectTo, remote, removeCustomConfigKey, removeOption, resolveCliPath, resolvePath, runAutomatorCommand, runMinidev, runWechatCliWithRetry, scrollTo, startForwardConsole, switchTab, systemInfo, takeScreenshot, tap, transformArgv, validateWechatCliCommandArgs, waitForRetryKeypress, withMiniProgram };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
export { AUTOMATOR_COMMAND_NAMES, CONFIG_COMMAND_NAME, MINIDEV_NAMESPACE_COMMAND_NAMES, SupportedPlatformsMap, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, audit, createAlias, createCustomConfig, createLocaleConfig, createPathCompat, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getConfig, getConfiguredLocale, getDefaultCliPath, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isDevtoolsHttpPortError, isOperatingSystemSupported, isWeappIdeTopLevelCommand, isWechatIdeLoginRequiredError, launchAutomator, navigateBack, navigateTo, operatingSystemName, overwriteCustomConfig, pageData, pageStack, parse, parseAutomatorArgs, parseScreenshotArgs, printScreenshotHelp, promptForCliPath, reLaunch, readCustomConfig, readOptionValue, redirectTo, remote, removeCustomConfigKey, removeOption, resolveCliPath, resolvePath, runAutomatorCommand, runMinidev, runWechatCliWithRetry, scrollTo, switchTab, systemInfo, takeScreenshot, tap, transformArgv, validateWechatCliCommandArgs, waitForRetryKeypress, withMiniProgram };
|
|
1
|
+
import { D as launchAutomator, E as isDevtoolsHttpPortError, T as isAutomatorLoginError, _ as connectMiniProgram, a as navigateBack, c as pageStack, d as remote, f as scrollTo, g as tap, h as takeScreenshot, i as input, l as reLaunch, m as systemInfo, o as navigateTo, p as switchTab, r as currentPage, s as pageData, t as audit, u as redirectTo, v as withMiniProgram, w as formatAutomatorLoginError } from "./commands-BwCMEmX-.js";
|
|
2
|
+
import { A as defaultCustomConfigDirPath, B as isAutomatorCommand, C as operatingSystemName, D as overwriteCustomConfig, E as createLocaleConfig, F as WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, G as readOptionValue, H as parseScreenshotArgs, I as WECHAT_CLI_COMMAND_NAMES, K as removeOption, L as isWeappIdeTopLevelCommand, M as resolvePath, N as CONFIG_COMMAND_NAME, O as readCustomConfig, P as MINIDEV_NAMESPACE_COMMAND_NAMES, R as AUTOMATOR_COMMAND_NAMES, S as isOperatingSystemSupported, T as createCustomConfig, U as printScreenshotHelp, V as runAutomatorCommand, W as parseAutomatorArgs, _ as resolveCliPath, a as extractExecutionErrorText, b as SupportedPlatformsMap, c as isWechatIdeLoginRequiredError, d as execute, f as createAlias, g as handleConfigCommand, h as startForwardConsole, i as createWechatIdeLoginRequiredExitError, j as defaultCustomConfigFilePath, k as removeCustomConfigKey, l as waitForRetryKeypress, m as transformArgv, n as validateWechatCliCommandArgs, o as formatRetryHotkeyPrompt, p as createPathCompat, r as runWechatCliWithRetry, s as formatWechatIdeLoginRequiredError, t as parse, u as runMinidev, v as getConfig, w as promptForCliPath, x as getDefaultCliPath, y as getConfiguredLocale, z as getAutomatorCommandHelp } from "./cli-g8B8r0xg.js";
|
|
3
|
+
export { AUTOMATOR_COMMAND_NAMES, CONFIG_COMMAND_NAME, MINIDEV_NAMESPACE_COMMAND_NAMES, SupportedPlatformsMap, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, audit, connectMiniProgram, createAlias, createCustomConfig, createLocaleConfig, createPathCompat, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getConfig, getConfiguredLocale, getDefaultCliPath, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isDevtoolsHttpPortError, isOperatingSystemSupported, isWeappIdeTopLevelCommand, isWechatIdeLoginRequiredError, launchAutomator, navigateBack, navigateTo, operatingSystemName, overwriteCustomConfig, pageData, pageStack, parse, parseAutomatorArgs, parseScreenshotArgs, printScreenshotHelp, promptForCliPath, reLaunch, readCustomConfig, readOptionValue, redirectTo, remote, removeCustomConfigKey, removeOption, resolveCliPath, resolvePath, runAutomatorCommand, runMinidev, runWechatCliWithRetry, scrollTo, startForwardConsole, switchTab, systemInfo, takeScreenshot, tap, transformArgv, validateWechatCliCommandArgs, waitForRetryKeypress, withMiniProgram };
|