weapp-ide-cli 6.2.0 → 6.4.0
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 +61 -3
- package/dist/automator-BqhUtMJp.js +1 -0
- package/dist/{automator-CRpB6_pA.js → automator-Esp3BjoT.js} +391 -152
- package/dist/automator-session-Ba27VW0_.js +184 -0
- package/dist/{sessionStore-zdzy2UFM.js → automatorProject-DPU-pEF0.js} +497 -240
- package/dist/{cli-ChMQqi5w.js → cli-Dd1RJ5PH.js} +396 -115
- package/dist/cli.js +3 -4
- package/dist/{commands-C1PF1B4P.js → commands-5entj0Rh.js} +5 -6
- package/dist/commands-DR-8MVFm.js +1 -0
- package/dist/{devtoolsProjectOwnership-yDD6h0dO.js → devtoolsProjectOwnership-C4jj8msU.js} +478 -155
- package/dist/index.d.ts +111 -137
- package/dist/index.js +8 -8
- package/dist/{managed-Sq8y8FzP.js → managed-hSCZXTon.js} +109 -59
- package/dist/{run-mcp-Dl_1TH1x.js → run-mcp-CbmskSgr.js} +14 -7
- package/dist/run-mcp-D1w7-oPp.js +1 -0
- package/package.json +12 -12
- package/dist/automator-BkZZsGtn.js +0 -1
- package/dist/automator-session-gWEsSs_A.js +0 -558
- package/dist/commands-CZVPfkE9.js +0 -1
- package/dist/run-mcp-CPv8cesh.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,20 +3,42 @@ import { Buffer } from "node:buffer";
|
|
|
3
3
|
import { OperationLifecycle } from "@weapp-vite/miniprogram-automator/operation";
|
|
4
4
|
import { MiniProgram } from "@weapp-vite/miniprogram-automator";
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
6
|
-
//#region src/devtoolsTarget/metadata.d.ts
|
|
7
6
|
interface WechatDevtoolsMetadata {
|
|
8
7
|
version?: string;
|
|
9
8
|
channel?: 'stable' | 'rc' | 'nightly' | 'unknown';
|
|
10
9
|
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/devtoolsTarget/profile.d.ts
|
|
13
10
|
interface WechatDevtoolsProfileOptions {
|
|
14
11
|
homeDir?: string;
|
|
15
12
|
localAppDataDir?: string;
|
|
16
13
|
platform?: NodeJS.Platform;
|
|
17
14
|
}
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
type WechatDevtoolsChannel = 'stable' | 'rc' | 'nightly';
|
|
16
|
+
interface ResolvedWechatDevtoolsTarget extends WechatDevtoolsMetadata {
|
|
17
|
+
cliPath: string;
|
|
18
|
+
installationId: string;
|
|
19
|
+
appPath: string;
|
|
20
|
+
profileDir: string;
|
|
21
|
+
}
|
|
22
|
+
interface WechatDevtoolsSelectionOptions {
|
|
23
|
+
cliPath?: string;
|
|
24
|
+
target?: ResolvedWechatDevtoolsTarget;
|
|
25
|
+
devtoolsChannel?: WechatDevtoolsChannel;
|
|
26
|
+
devtoolsVersion?: string;
|
|
27
|
+
requireOfficialLatest?: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface ResolveWechatDevtoolsTargetOptions extends WechatDevtoolsProfileOptions, WechatDevtoolsSelectionOptions {
|
|
30
|
+
searchRoots?: string[];
|
|
31
|
+
registryPath?: string;
|
|
32
|
+
}
|
|
33
|
+
interface WechatDevtoolsInstallation {
|
|
34
|
+
cliPath: string;
|
|
35
|
+
target?: ResolvedWechatDevtoolsTarget;
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
/** 产品版本按数字段比较,避免日期版本的字符串排序漂移。 */
|
|
39
|
+
export declare function compareWechatDevtoolsVersions(a: string, b: string): number;
|
|
40
|
+
/** 只扫描已知安装根,不递归遍历磁盘,也不执行候选应用。 */
|
|
41
|
+
export declare function listWechatDevtoolsInstallations(options?: ResolveWechatDevtoolsTargetOptions): Promise<WechatDevtoolsInstallation[]>;
|
|
20
42
|
interface WechatDevtoolsHostInspectionOptions {
|
|
21
43
|
platform?: NodeJS.Platform;
|
|
22
44
|
signal?: AbortSignal;
|
|
@@ -26,22 +48,31 @@ interface WechatDevtoolsHostInspectionOptions {
|
|
|
26
48
|
export declare function assertWechatDevtoolsHost(target: ResolvedWechatDevtoolsTarget, options?: WechatDevtoolsHostInspectionOptions): Promise<void>;
|
|
27
49
|
/** HTTP 与 WebSocket 的显式端口均需由所选安装持有,端口号本身不是宿主身份。 */
|
|
28
50
|
export declare function assertWechatDevtoolsPort(target: ResolvedWechatDevtoolsTarget, port: number, options?: WechatDevtoolsHostInspectionOptions): Promise<void>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
export declare const WECHAT_DEVTOOLS_OFFICIAL_CHANNELS_URL = "https://devtools.wxqcloud.qq.com.cn/WechatWebDev/nightly/versions/config.json";
|
|
52
|
+
/** 官方查询只提供版本证据,默认选择不依赖网络可用性。 */
|
|
53
|
+
export declare function readOfficialWechatDevtoolsVersion(channel?: WechatDevtoolsChannel): Promise<{
|
|
54
|
+
version: string;
|
|
55
|
+
source: string;
|
|
56
|
+
queriedAt: string;
|
|
57
|
+
}>;
|
|
58
|
+
/** 仅显式严格模式要求所选安装匹配官方渠道最新版本。 */
|
|
59
|
+
export declare function assertOfficialWechatDevtoolsVersion(target: ResolvedWechatDevtoolsTarget): Promise<{
|
|
60
|
+
version: string;
|
|
61
|
+
source: string;
|
|
62
|
+
queriedAt: string;
|
|
63
|
+
}>;
|
|
64
|
+
/** 校验安装后登记真实 CLI 路径,不更改默认选择或登录数据。 */
|
|
65
|
+
export declare function registerWechatDevtoolsInstallation(cliPath: string, registryPath?: string): Promise<ResolvedWechatDevtoolsTarget>;
|
|
66
|
+
/** 允许移除已经失效的登记;不会删除应用或用户配置。 */
|
|
67
|
+
export declare function unregisterWechatDevtoolsInstallation(cliPath: string, registryPath?: string): Promise<void>;
|
|
68
|
+
export declare function validateWechatDevtoolsSelection(options: WechatDevtoolsSelectionOptions): void;
|
|
69
|
+
export declare function readWechatDevtoolsSelectionEnvironment(env?: NodeJS.ProcessEnv): WechatDevtoolsSelectionOptions;
|
|
70
|
+
/** 每次操作只解析一次安装,显式选择覆盖继承的配置但不写回全局设置。 */
|
|
42
71
|
export declare function resolveWechatDevtoolsTarget(options?: ResolveWechatDevtoolsTargetOptions): Promise<ResolvedWechatDevtoolsTarget>;
|
|
43
|
-
|
|
44
|
-
|
|
72
|
+
/** 命令的所有异步阶段复用同一安装,彼此并发的调用不会污染环境变量。 */
|
|
73
|
+
export declare function withWechatDevtoolsSelection<T>(options: ResolveWechatDevtoolsTargetOptions, runner: (target: ResolvedWechatDevtoolsTarget) => Promise<T>): Promise<T>;
|
|
74
|
+
/** 读取当前操作固定的安装;没有活动选择时不触发发现或启动。 */
|
|
75
|
+
export declare function getActiveWechatDevtoolsTarget(): ResolvedWechatDevtoolsTarget | undefined;
|
|
45
76
|
export interface StartWechatIdeAgentOptions {
|
|
46
77
|
projectPath: string;
|
|
47
78
|
port: number;
|
|
@@ -50,6 +81,8 @@ export interface StartWechatIdeAgentOptions {
|
|
|
50
81
|
trustProject?: boolean;
|
|
51
82
|
timeout?: number;
|
|
52
83
|
signal?: AbortSignal;
|
|
84
|
+
/** 预检完成后、命令派发前登记启动意图;钩子开始后取消仍按派发结果未知处理。 */
|
|
85
|
+
onBeforeDispatch?: () => void | Promise<void>;
|
|
53
86
|
/** 官方回执验证后先登记窗口所有权,再检查取消状态。 */
|
|
54
87
|
onStarted?: (result: StartWechatIdeAgentResult) => void | Promise<void>;
|
|
55
88
|
}
|
|
@@ -60,9 +93,7 @@ export interface StartWechatIdeAgentResult {
|
|
|
60
93
|
}
|
|
61
94
|
/** 使用所选安装的官方 agent start,并保留其窗口复用和端口冲突语义。 */
|
|
62
95
|
export declare function startWechatIdeAgent(options: StartWechatIdeAgentOptions): Promise<StartWechatIdeAgentResult>;
|
|
63
|
-
|
|
64
|
-
//#region src/cli/automator/context.d.ts
|
|
65
|
-
interface AutomatorInstallationOptions extends DevtoolsRuntimeSessionOptions {
|
|
96
|
+
interface AutomatorInstallationOptions extends DevtoolsRuntimeSessionOptions, WechatDevtoolsSelectionOptions {
|
|
66
97
|
target?: ResolvedWechatDevtoolsTarget;
|
|
67
98
|
signal?: AbortSignal;
|
|
68
99
|
}
|
|
@@ -70,8 +101,6 @@ interface AutomatorInstallationOptions extends DevtoolsRuntimeSessionOptions {
|
|
|
70
101
|
export declare function resolveAutomatorSessionOptions<T extends AutomatorInstallationOptions>(options: T): Promise<T & AutomatorInstallationOptions & {
|
|
71
102
|
installationId: string;
|
|
72
103
|
}>;
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/cli/automator/errors.d.ts
|
|
75
104
|
/**
|
|
76
105
|
* @description 判断错误是否属于开发者工具服务端口不可用。
|
|
77
106
|
*/
|
|
@@ -108,8 +137,6 @@ export declare function isAutomatorLoginError(error: unknown): boolean;
|
|
|
108
137
|
* @description 格式化开发者工具登录失效错误,便于终端展示。
|
|
109
138
|
*/
|
|
110
139
|
export declare function formatAutomatorLoginError(error: unknown): string;
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/cli/automator.d.ts
|
|
113
140
|
export interface AutomatorOptions extends AutomatorInstallationOptions {
|
|
114
141
|
projectPath: string;
|
|
115
142
|
timeout?: number;
|
|
@@ -140,8 +167,6 @@ export declare function persistOpenedAutomatorSession(options: AutomatorOptions
|
|
|
140
167
|
* @description 只读连接当前项目已打开的自动化会话;失败不证明缓存过期,也不删除其他操作持有的会话记录。
|
|
141
168
|
*/
|
|
142
169
|
export declare function connectOpenedAutomator(options: AutomatorOptions): Promise<MiniProgram>;
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region src/cli/automator-argv.d.ts
|
|
145
170
|
export interface ParsedAutomatorArgs {
|
|
146
171
|
cliPath?: string;
|
|
147
172
|
projectPath: string;
|
|
@@ -168,12 +193,10 @@ export declare function readBooleanOption(argv: readonly string[], ...optionName
|
|
|
168
193
|
* @description 删除参数中的指定选项(同时支持 --opt value 与 --opt=value)。
|
|
169
194
|
*/
|
|
170
195
|
export declare function removeOption(argv: readonly string[], optionName: string): string[];
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/cli/automator-session.d.ts
|
|
173
196
|
type MiniProgramLike = AutomatorMiniProgram;
|
|
174
197
|
type MiniProgramPage = AutomatorPage;
|
|
175
198
|
type MiniProgramElement = AutomatorElement;
|
|
176
|
-
interface AutomatorSessionOptions extends DevtoolsRuntimeSessionOptions {
|
|
199
|
+
interface AutomatorSessionOptions extends DevtoolsRuntimeSessionOptions, WechatDevtoolsSelectionOptions {
|
|
177
200
|
signal?: AbortSignal;
|
|
178
201
|
target?: ResolvedWechatDevtoolsTarget;
|
|
179
202
|
}
|
|
@@ -187,8 +210,6 @@ export declare function acquireSharedMiniProgram(options: AutomatorSessionOption
|
|
|
187
210
|
* @description 统一管理 automator 会话生命周期。
|
|
188
211
|
*/
|
|
189
212
|
export declare function withMiniProgram<T>(options: AutomatorSessionOptions, runner: (miniProgram: MiniProgramLike) => Promise<T>): Promise<T>;
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/cli/command-catalog.d.ts
|
|
192
213
|
export declare const WECHAT_CLI_COMMAND_NAMES: readonly ["open", "login", "islogin", "preview", "auto-preview", "upload", "build-npm", "auto", "auto-replay", "reset-fileutils", "close", "quit", "cache", "engine", "open-other", "build-ipa", "build-apk", "cloud"];
|
|
193
214
|
export declare const MINIDEV_NAMESPACE_COMMAND_NAMES: readonly ["alipay", "ali", "minidev"];
|
|
194
215
|
export declare const CONFIG_COMMAND_NAME: "config";
|
|
@@ -198,8 +219,6 @@ export declare const WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES: string[];
|
|
|
198
219
|
* @description 判断是否为 weapp-ide-cli 支持的顶层命令。
|
|
199
220
|
*/
|
|
200
221
|
export declare function isWeappIdeTopLevelCommand(command: string | undefined): boolean;
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/cli/commands.d.ts
|
|
203
222
|
export interface AutomatorCommandOptions extends AutomatorSessionOptions {}
|
|
204
223
|
export interface NavigateOptions extends AutomatorCommandOptions {
|
|
205
224
|
url: string;
|
|
@@ -304,8 +323,6 @@ export declare function takeScreenshot(options: ScreenshotOptions): Promise<Scre
|
|
|
304
323
|
* @description 开关远程调试。
|
|
305
324
|
*/
|
|
306
325
|
export declare function remote(options: RemoteOptions): Promise<void>;
|
|
307
|
-
//#endregion
|
|
308
|
-
//#region src/cli/compare.d.ts
|
|
309
326
|
interface CompareOptions extends ScreenshotOptions {
|
|
310
327
|
baselinePath: string;
|
|
311
328
|
currentOutputPath?: string;
|
|
@@ -322,15 +339,18 @@ export declare function printCompareHelp(): void;
|
|
|
322
339
|
* @description 解析 compare 命令参数。
|
|
323
340
|
*/
|
|
324
341
|
export declare function parseCompareArgs(argv: string[]): CompareOptions;
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region src/cli/config-command.d.ts
|
|
327
342
|
/**
|
|
328
343
|
* @description 处理 config 子命令。
|
|
329
344
|
*/
|
|
330
345
|
export declare function handleConfigCommand(argv: string[]): Promise<void>;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
346
|
+
/** 包装参数不会透传官方 CLI,选项值和双横线后的内容保持原样。 */
|
|
347
|
+
export declare function splitWechatDevtoolsSelectionArgs(argv: readonly string[]): {
|
|
348
|
+
args: string[];
|
|
349
|
+
selection: WechatDevtoolsSelectionOptions;
|
|
350
|
+
};
|
|
351
|
+
/** 显式选择在任何 helper 或 CLI 回退之前固定,避免入口间选版漂移。 */
|
|
352
|
+
export declare function withWechatDevtoolsSelectionArgs<T>(argv: readonly string[], runner: (args: string[]) => Promise<T>): Promise<T>;
|
|
353
|
+
export interface WechatDevtoolsHttpCommandOptions extends WechatDevtoolsSelectionOptions {
|
|
334
354
|
cliPath?: string;
|
|
335
355
|
target?: ResolvedWechatDevtoolsTarget;
|
|
336
356
|
port?: number;
|
|
@@ -374,8 +394,6 @@ export declare const WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES: {
|
|
|
374
394
|
readonly NOT_START: "NOT_START";
|
|
375
395
|
readonly OPEN_PROJECT: "OPEN_PROJECT";
|
|
376
396
|
};
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/cli/engine.d.ts
|
|
379
397
|
export interface RunWechatIdeEngineBuildByHttpOptions extends WechatDevtoolsHttpCommandOptions {
|
|
380
398
|
onProgress?: (result: PollWechatIdeEngineBuildResult) => void;
|
|
381
399
|
overallTimeoutMs?: number;
|
|
@@ -396,8 +414,6 @@ export declare function runWechatIdeEngineBuild(projectPath: string, options?: R
|
|
|
396
414
|
export declare function prepareAcceptanceProject(projectPath: string, signal: AbortSignal, options?: WechatDevtoolsHttpCommandOptions & {
|
|
397
415
|
runtimeProvider?: 'headless' | 'devtools';
|
|
398
416
|
}): Promise<void | PollWechatIdeEngineBuildResult>;
|
|
399
|
-
//#endregion
|
|
400
|
-
//#region src/cli/forwardConsole.d.ts
|
|
401
417
|
export type ForwardConsoleLogLevel = 'debug' | 'log' | 'info' | 'warn' | 'error';
|
|
402
418
|
export interface ForwardConsoleEvent {
|
|
403
419
|
level: ForwardConsoleLogLevel;
|
|
@@ -417,8 +433,6 @@ export interface ForwardConsoleSession {
|
|
|
417
433
|
* @description 启动小程序控制台日志转发,并保持 automator 会话常驻。
|
|
418
434
|
*/
|
|
419
435
|
export declare function startForwardConsole(options: ForwardConsoleOptions): Promise<ForwardConsoleSession>;
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region src/cli/inputCoordinator.d.ts
|
|
422
436
|
export interface SharedInputSessionOptions {
|
|
423
437
|
onData?: (chunk: string | Uint8Array) => void;
|
|
424
438
|
onKeypress?: (str: string, key: {
|
|
@@ -443,8 +457,6 @@ export interface ExclusiveKeypressOptions<T> {
|
|
|
443
457
|
export declare function createSharedInputSession(options: SharedInputSessionOptions): SharedInputSession | undefined;
|
|
444
458
|
export declare function waitForExclusiveKeypress<T>(options: ExclusiveKeypressOptions<T>): Promise<T | 'timeout'>;
|
|
445
459
|
export declare function runWithSuspendedSharedInput<T>(runner: () => Promise<T>): Promise<T>;
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region src/cli/loginQuery.d.ts
|
|
448
460
|
export type WechatIdeLoginQueryResult = {
|
|
449
461
|
status: 'success';
|
|
450
462
|
login: boolean;
|
|
@@ -457,20 +469,14 @@ export declare function queryWechatIdeLogin(cliPath: string, options?: {
|
|
|
457
469
|
timeout?: number;
|
|
458
470
|
signal?: AbortSignal;
|
|
459
471
|
}): Promise<WechatIdeLoginQueryResult>;
|
|
460
|
-
//#endregion
|
|
461
|
-
//#region src/cli/minidev.d.ts
|
|
462
472
|
/**
|
|
463
473
|
* @description 运行支付宝小程序 CLI(minidev)
|
|
464
474
|
*/
|
|
465
475
|
export declare function runMinidev(argv: readonly string[]): Promise<void>;
|
|
466
|
-
//#endregion
|
|
467
|
-
//#region src/cli/prompt.d.ts
|
|
468
476
|
/**
|
|
469
477
|
* @description 交互式提示并保存 CLI 路径
|
|
470
478
|
*/
|
|
471
479
|
export declare function promptForCliPath(): Promise<string | null>;
|
|
472
|
-
//#endregion
|
|
473
|
-
//#region src/cli/resolver.d.ts
|
|
474
480
|
/**
|
|
475
481
|
* @description 解析 CLI 路径并校验可用性
|
|
476
482
|
*/
|
|
@@ -478,8 +484,6 @@ export declare function resolveCliPath(): Promise<{
|
|
|
478
484
|
cliPath: string | null;
|
|
479
485
|
source: ConfigSource;
|
|
480
486
|
}>;
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/cli/retry.d.ts
|
|
483
487
|
export interface RetryKeypressOptions {
|
|
484
488
|
signal?: AbortSignal;
|
|
485
489
|
timeoutMs?: number;
|
|
@@ -546,18 +550,12 @@ export declare function promptRetryKeypress(options: RetryPromptOptions): Promis
|
|
|
546
550
|
* @description 统一处理微信开发者工具登录失效场景下的提示与重试交互。
|
|
547
551
|
*/
|
|
548
552
|
export declare function promptWechatIdeLoginRetry(options: WechatIdeLoginRetryOptions): Promise<"cancel" | "retry">;
|
|
549
|
-
//#endregion
|
|
550
|
-
//#region src/cli/run.d.ts
|
|
551
553
|
/**
|
|
552
554
|
* @description 基于 cac 注册顶层命令,用于统一识别入口。
|
|
553
555
|
*/
|
|
554
556
|
export declare function createCli(): import("cac").CAC;
|
|
555
|
-
/**
|
|
556
|
-
* @description CLI 入口解析与分发。
|
|
557
|
-
*/
|
|
557
|
+
/** 在分发前剥离公共选择参数并固定本次安装。 */
|
|
558
558
|
export declare function parse(argv: string[]): Promise<void>;
|
|
559
|
-
//#endregion
|
|
560
|
-
//#region src/cli/run-automator.d.ts
|
|
561
559
|
export declare const AUTOMATOR_COMMAND_NAMES: string[];
|
|
562
560
|
/**
|
|
563
561
|
* @description 判断是否属于 automator 子命令。
|
|
@@ -571,9 +569,7 @@ export declare function getAutomatorCommandHelp(command: string): string | undef
|
|
|
571
569
|
* @description 执行 automator 子命令。
|
|
572
570
|
*/
|
|
573
571
|
export declare function runAutomatorCommand(command: string, argv: string[]): Promise<void>;
|
|
574
|
-
|
|
575
|
-
//#region src/cli/run-login.d.ts
|
|
576
|
-
export interface RunWechatCliWithRetryOptions {
|
|
572
|
+
export interface RunWechatCliWithRetryOptions extends WechatDevtoolsSelectionOptions {
|
|
577
573
|
target?: ResolvedWechatDevtoolsTarget;
|
|
578
574
|
silent?: boolean;
|
|
579
575
|
timeout?: number;
|
|
@@ -581,8 +577,6 @@ export interface RunWechatCliWithRetryOptions {
|
|
|
581
577
|
}
|
|
582
578
|
/** 原生 CLI 可能启动或改变共享宿主,完整命令与有限重试共用机器租约。 */
|
|
583
579
|
export declare function runWechatCliWithRetry(cliPath: string, argv: string[], options?: RunWechatCliWithRetryOptions): Promise<void>;
|
|
584
|
-
//#endregion
|
|
585
|
-
//#region src/cli/run-login-executor.d.ts
|
|
586
580
|
export interface RetryableCommandExecutorOptions<TResult, TPromptResult> {
|
|
587
581
|
timeout?: number;
|
|
588
582
|
signal?: AbortSignal;
|
|
@@ -598,15 +592,11 @@ export interface RetryableCommandExecutorOptions<TResult, TPromptResult> {
|
|
|
598
592
|
}
|
|
599
593
|
/** 命令、登录提示和有限重试共用一个 deadline,取消信号由执行边界传入 I/O。 */
|
|
600
594
|
export declare function runRetryableCommand<TResult, TPromptResult>(options: RetryableCommandExecutorOptions<TResult, TPromptResult>): Promise<TResult>;
|
|
601
|
-
//#endregion
|
|
602
|
-
//#region src/cli/run-mcp.d.ts
|
|
603
595
|
export interface McpCommandOptions {
|
|
604
596
|
cliPath?: string;
|
|
605
597
|
workspaceRoot?: string;
|
|
606
598
|
}
|
|
607
599
|
export declare function runMcpCommand(argv: string[]): Promise<void>;
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/cli/screenshot.d.ts
|
|
610
600
|
/**
|
|
611
601
|
* @description Print help for screenshot command
|
|
612
602
|
*/
|
|
@@ -615,32 +605,28 @@ export declare function printScreenshotHelp(): void;
|
|
|
615
605
|
* @description Parse command line arguments for screenshot command
|
|
616
606
|
*/
|
|
617
607
|
export declare function parseScreenshotArgs(argv: string[]): ScreenshotOptions;
|
|
618
|
-
//#endregion
|
|
619
|
-
//#region src/cli/wechat-command-schema.d.ts
|
|
620
608
|
/**
|
|
621
609
|
* @description 在调用官方微信 CLI 前做轻量参数校验。
|
|
622
610
|
*/
|
|
623
611
|
export declare function validateWechatCliCommandArgs(argv: readonly string[]): void;
|
|
624
|
-
|
|
625
|
-
//#region src/cli/wechat-commands.d.ts
|
|
626
|
-
export interface LoginWechatIdeOptions {
|
|
612
|
+
export interface LoginWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
627
613
|
qrFormat?: 'base64' | 'image' | 'terminal';
|
|
628
614
|
qrOutput?: string;
|
|
629
615
|
qrSize?: string;
|
|
630
616
|
resultOutput?: string;
|
|
631
617
|
}
|
|
632
|
-
export interface OpenWechatIdeOptions {
|
|
618
|
+
export interface OpenWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
633
619
|
appid?: string;
|
|
634
620
|
extAppid?: string;
|
|
635
621
|
platform?: string;
|
|
636
622
|
projectPath?: string;
|
|
637
623
|
trustProject?: boolean;
|
|
638
624
|
}
|
|
639
|
-
export interface BuildWechatIdeNpmOptions {
|
|
625
|
+
export interface BuildWechatIdeNpmOptions extends WechatDevtoolsSelectionOptions {
|
|
640
626
|
compileType?: string;
|
|
641
627
|
projectPath?: string;
|
|
642
628
|
}
|
|
643
|
-
export interface PreviewWechatIdeOptions {
|
|
629
|
+
export interface PreviewWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
644
630
|
appid?: string;
|
|
645
631
|
compileCondition?: string;
|
|
646
632
|
extAppid?: string;
|
|
@@ -650,14 +636,14 @@ export interface PreviewWechatIdeOptions {
|
|
|
650
636
|
qrOutput?: string;
|
|
651
637
|
qrSize?: string;
|
|
652
638
|
}
|
|
653
|
-
export interface AutoPreviewWechatIdeOptions {
|
|
639
|
+
export interface AutoPreviewWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
654
640
|
appid?: string;
|
|
655
641
|
compileCondition?: string;
|
|
656
642
|
extAppid?: string;
|
|
657
643
|
infoOutput?: string;
|
|
658
644
|
projectPath?: string;
|
|
659
645
|
}
|
|
660
|
-
export interface UploadWechatIdeOptions {
|
|
646
|
+
export interface UploadWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
661
647
|
appid?: string;
|
|
662
648
|
desc: string;
|
|
663
649
|
extAppid?: string;
|
|
@@ -665,7 +651,7 @@ export interface UploadWechatIdeOptions {
|
|
|
665
651
|
projectPath?: string;
|
|
666
652
|
version: string;
|
|
667
653
|
}
|
|
668
|
-
export interface AutoWechatIdeOptions {
|
|
654
|
+
export interface AutoWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
669
655
|
account?: string;
|
|
670
656
|
appid?: string;
|
|
671
657
|
extAppid?: string;
|
|
@@ -675,7 +661,7 @@ export interface AutoWechatIdeOptions {
|
|
|
675
661
|
ticket?: string;
|
|
676
662
|
trustProject?: boolean;
|
|
677
663
|
}
|
|
678
|
-
export interface AutoReplayWechatIdeOptions {
|
|
664
|
+
export interface AutoReplayWechatIdeOptions extends WechatDevtoolsSelectionOptions {
|
|
679
665
|
account?: string;
|
|
680
666
|
appid?: string;
|
|
681
667
|
extAppid?: string;
|
|
@@ -687,21 +673,21 @@ export interface AutoReplayWechatIdeOptions {
|
|
|
687
673
|
ticket?: string;
|
|
688
674
|
trustProject?: boolean;
|
|
689
675
|
}
|
|
690
|
-
export interface OpenWechatIdeOtherProjectOptions {
|
|
676
|
+
export interface OpenWechatIdeOtherProjectOptions extends WechatDevtoolsSelectionOptions {
|
|
691
677
|
projectPath?: string;
|
|
692
678
|
}
|
|
693
|
-
export interface CloseWechatIdeProjectOptions {
|
|
679
|
+
export interface CloseWechatIdeProjectOptions extends WechatDevtoolsSelectionOptions {
|
|
694
680
|
projectPath?: string;
|
|
695
681
|
cliPath?: string;
|
|
696
682
|
target?: ResolvedWechatDevtoolsTarget;
|
|
697
683
|
}
|
|
698
|
-
export interface ClearWechatIdeCacheOptions {
|
|
684
|
+
export interface ClearWechatIdeCacheOptions extends WechatDevtoolsSelectionOptions {
|
|
699
685
|
clean: 'all' | 'auth' | 'compile' | 'file' | 'network' | 'session' | 'storage';
|
|
700
686
|
}
|
|
701
|
-
export interface ResetWechatIdeFileUtilsOptions {
|
|
687
|
+
export interface ResetWechatIdeFileUtilsOptions extends WechatDevtoolsSelectionOptions {
|
|
702
688
|
projectPath: string;
|
|
703
689
|
}
|
|
704
|
-
export interface WechatIdeAutomatorSessionOptions {
|
|
690
|
+
export interface WechatIdeAutomatorSessionOptions extends WechatDevtoolsSelectionOptions {
|
|
705
691
|
port?: number;
|
|
706
692
|
preferOpenedSession?: boolean;
|
|
707
693
|
preserveProjectRoot?: boolean;
|
|
@@ -719,7 +705,7 @@ export interface ClearWechatIdeCacheByAutomatorOptions extends WechatIdeAutomato
|
|
|
719
705
|
export interface SetWechatIdeTicketOptions extends WechatIdeAutomatorSessionOptions {
|
|
720
706
|
ticket: string;
|
|
721
707
|
}
|
|
722
|
-
export interface BuildWechatIdeApkOptions {
|
|
708
|
+
export interface BuildWechatIdeApkOptions extends WechatDevtoolsSelectionOptions {
|
|
723
709
|
desc?: string;
|
|
724
710
|
isUploadResourceBundle?: boolean;
|
|
725
711
|
keyAlias: string;
|
|
@@ -731,7 +717,7 @@ export interface BuildWechatIdeApkOptions {
|
|
|
731
717
|
storePass: string;
|
|
732
718
|
useAab?: boolean;
|
|
733
719
|
}
|
|
734
|
-
export interface BuildWechatIdeIpaOptions {
|
|
720
|
+
export interface BuildWechatIdeIpaOptions extends WechatDevtoolsSelectionOptions {
|
|
735
721
|
certificateName?: string;
|
|
736
722
|
isDistribute: boolean;
|
|
737
723
|
isRemoteBuild?: boolean;
|
|
@@ -760,7 +746,7 @@ export declare function loginWechatIde(options?: LoginWechatIdeOptions): Promise
|
|
|
760
746
|
export declare function isWechatIdeLoggedIn(options?: {
|
|
761
747
|
nonInteractive?: boolean;
|
|
762
748
|
silent?: boolean;
|
|
763
|
-
}): Promise<void>;
|
|
749
|
+
} & WechatDevtoolsSelectionOptions): Promise<void>;
|
|
764
750
|
/**
|
|
765
751
|
* @description 调用微信开发者工具 build-npm 命令。
|
|
766
752
|
*/
|
|
@@ -792,7 +778,7 @@ export declare function closeWechatIdeProject(options?: CloseWechatIdeProjectOpt
|
|
|
792
778
|
/**
|
|
793
779
|
* @description 调用微信开发者工具 quit 命令。
|
|
794
780
|
*/
|
|
795
|
-
export declare function quitWechatIde(): Promise<void>;
|
|
781
|
+
export declare function quitWechatIde(options?: WechatDevtoolsSelectionOptions): Promise<void>;
|
|
796
782
|
/**
|
|
797
783
|
* @description 调用微信开发者工具 cache 命令。
|
|
798
784
|
*/
|
|
@@ -800,7 +786,7 @@ export declare function clearWechatIdeCache(options: ClearWechatIdeCacheOptions)
|
|
|
800
786
|
/**
|
|
801
787
|
* @description 调用微信开发者工具 open-other 命令。
|
|
802
788
|
*/
|
|
803
|
-
export declare function openWechatIdeOtherProject(
|
|
789
|
+
export declare function openWechatIdeOtherProject(options?: OpenWechatIdeOtherProjectOptions): Promise<void>;
|
|
804
790
|
/**
|
|
805
791
|
* @description 通过微信开发者工具 HTTP 服务端口重置指定项目的 fileutils 状态。
|
|
806
792
|
*/
|
|
@@ -841,14 +827,10 @@ export declare function buildWechatIdeApk(options: BuildWechatIdeApkOptions): Pr
|
|
|
841
827
|
* @description 调用微信开发者工具 build-ipa 命令。
|
|
842
828
|
*/
|
|
843
829
|
export declare function buildWechatIdeIpa(options: BuildWechatIdeIpaOptions): Promise<void>;
|
|
844
|
-
//#endregion
|
|
845
|
-
//#region src/cli/wechat-dispatch.d.ts
|
|
846
830
|
/**
|
|
847
831
|
* @description 优先将高频官方命令分发到 weapp-ide-cli 的稳定 helper,实现更清晰的程序化命令层。
|
|
848
832
|
*/
|
|
849
833
|
export declare function dispatchWechatCliCommand(argv: string[]): Promise<boolean>;
|
|
850
|
-
//#endregion
|
|
851
|
-
//#region src/cli/wechatDevtoolsRuntimePort.d.ts
|
|
852
834
|
type PortTarget = Pick<ResolvedWechatDevtoolsTarget, 'installationId'>;
|
|
853
835
|
/**
|
|
854
836
|
* @description 标记所选安装检测到的服务端口;无身份的旧调用仅保留在独立兼容槽中。
|
|
@@ -858,8 +840,6 @@ export declare function setRuntimeWechatDevtoolsServicePort(port: number | undef
|
|
|
858
840
|
* @description 只读取所选安装的服务端口,不借用其他安装或无身份的旧记录。
|
|
859
841
|
*/
|
|
860
842
|
export declare function getRuntimeWechatDevtoolsServicePort(target?: PortTarget): number | undefined;
|
|
861
|
-
//#endregion
|
|
862
|
-
//#region src/cli/wechatDevtoolsSettings.d.ts
|
|
863
843
|
export interface WechatDevtoolsSecuritySettings {
|
|
864
844
|
enableServicePort: boolean;
|
|
865
845
|
port: number;
|
|
@@ -895,8 +875,6 @@ export declare function detectWechatDevtoolsServicePort(options?: DetectWechatDe
|
|
|
895
875
|
* @description 在启动微信开发者工具前,检测服务端口配置,并按需写入项目信任信息。
|
|
896
876
|
*/
|
|
897
877
|
export declare function bootstrapWechatDevtoolsSettings(options?: BootstrapWechatDevtoolsSettingsOptions): Promise<BootstrapWechatDevtoolsSettingsResult>;
|
|
898
|
-
//#endregion
|
|
899
|
-
//#region src/types.d.ts
|
|
900
878
|
/**
|
|
901
879
|
* @description 基础配置
|
|
902
880
|
*/
|
|
@@ -923,8 +901,6 @@ interface AliasEntry {
|
|
|
923
901
|
find: string;
|
|
924
902
|
replacement: string;
|
|
925
903
|
}
|
|
926
|
-
//#endregion
|
|
927
|
-
//#region src/config/custom.d.ts
|
|
928
904
|
interface CustomConfigFile {
|
|
929
905
|
cliPath?: string;
|
|
930
906
|
locale?: 'zh' | 'en';
|
|
@@ -956,8 +932,6 @@ export declare function removeCustomConfigKey(key: keyof CustomConfigFile): Prom
|
|
|
956
932
|
* @description 覆盖写入配置内容(会替换原内容)。
|
|
957
933
|
*/
|
|
958
934
|
export declare function overwriteCustomConfig(config: CustomConfigFile): Promise<void>;
|
|
959
|
-
//#endregion
|
|
960
|
-
//#region src/config/paths.d.ts
|
|
961
935
|
/**
|
|
962
936
|
* @description 默认自定义配置目录
|
|
963
937
|
*/
|
|
@@ -966,8 +940,6 @@ export declare const defaultCustomConfigDirPath: string;
|
|
|
966
940
|
* @description 默认自定义配置文件路径
|
|
967
941
|
*/
|
|
968
942
|
export declare const defaultCustomConfigFilePath: string;
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/config/resolver.d.ts
|
|
971
943
|
/**
|
|
972
944
|
* @description 解析开发者工具自动预热相关配置的最终生效值。
|
|
973
945
|
*/
|
|
@@ -986,8 +958,6 @@ export declare function getConfig(): Promise<ResolvedConfig>;
|
|
|
986
958
|
* @description 获取用户配置的语言偏好。
|
|
987
959
|
*/
|
|
988
960
|
export declare function getConfiguredLocale(): Promise<"zh" | "en" | undefined>;
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region src/devtoolsProjectOwnership/types.d.ts
|
|
991
961
|
interface ManagedWechatHostIdentity {
|
|
992
962
|
pid: number;
|
|
993
963
|
executable: string;
|
|
@@ -1003,7 +973,7 @@ interface ManagedWechatInstallationExitEvidence {
|
|
|
1003
973
|
installationId: string;
|
|
1004
974
|
profileDir: string;
|
|
1005
975
|
previous: {
|
|
1006
|
-
state: 'starting' | 'unconfirmed' | 'failed';
|
|
976
|
+
state: 'starting' | 'unconfirmed' | 'failed' | 'borrowed';
|
|
1007
977
|
error?: string;
|
|
1008
978
|
updatedAt: string;
|
|
1009
979
|
recordSha256: string;
|
|
@@ -1060,6 +1030,20 @@ interface ManagedWechatWindowCloseEvidence {
|
|
|
1060
1030
|
cursors: ManagedWechatWindowLogCursor[];
|
|
1061
1031
|
};
|
|
1062
1032
|
}
|
|
1033
|
+
interface ManagedWechatProjectSnapshot {
|
|
1034
|
+
protocol: 'wechat-devtools-project-snapshot-v1';
|
|
1035
|
+
sourceProjectPath: string;
|
|
1036
|
+
token: string;
|
|
1037
|
+
state: 'reserved' | 'ready' | 'removed';
|
|
1038
|
+
directoryIdentity?: {
|
|
1039
|
+
dev: string;
|
|
1040
|
+
ino: string;
|
|
1041
|
+
};
|
|
1042
|
+
dispatchedAt?: string;
|
|
1043
|
+
cleanupStartedAt?: string;
|
|
1044
|
+
removedAt?: string;
|
|
1045
|
+
cleanupError?: string;
|
|
1046
|
+
}
|
|
1063
1047
|
interface ManagedWechatProjectRecord {
|
|
1064
1048
|
schemaVersion: 1;
|
|
1065
1049
|
id: string;
|
|
@@ -1079,10 +1063,11 @@ interface ManagedWechatProjectRecord {
|
|
|
1079
1063
|
closeAcknowledgedAt?: string;
|
|
1080
1064
|
/** 端口退出不是窗口退出;保存所选 profile 的增量销毁证据供父任务恢复。 */
|
|
1081
1065
|
windowClose?: ManagedWechatWindowCloseEvidence;
|
|
1082
|
-
releasedReason?: 'borrowed' | 'project-closed' | 'installation-exited';
|
|
1066
|
+
releasedReason?: 'borrowed' | 'project-closed' | 'installation-exited' | 'not-started';
|
|
1083
1067
|
/** 显式恢复只终结已退出安装的活资源;原启动失败与归属缺口仍保留。 */
|
|
1084
1068
|
installationExitRecovery?: ManagedWechatInstallationExitEvidence;
|
|
1085
1069
|
error?: string;
|
|
1070
|
+
snapshot?: ManagedWechatProjectSnapshot;
|
|
1086
1071
|
}
|
|
1087
1072
|
interface BeginManagedWechatProjectOptions {
|
|
1088
1073
|
target: ResolvedWechatDevtoolsTarget;
|
|
@@ -1092,10 +1077,15 @@ interface BeginManagedWechatProjectOptions {
|
|
|
1092
1077
|
journalPath?: string;
|
|
1093
1078
|
/** 当前任务根作用域最多持有一个窗口;双项目验收须显式指定两个。 */
|
|
1094
1079
|
maxOwnedWindows?: 1 | 2;
|
|
1080
|
+
/** 将输入项目的布局快照持久绑定当前任务 owner。 */
|
|
1081
|
+
snapshotProject?: boolean;
|
|
1095
1082
|
}
|
|
1096
1083
|
interface ManagedWechatProjectIntent {
|
|
1097
1084
|
id: string;
|
|
1098
1085
|
journalPath: string;
|
|
1086
|
+
projectPath: string;
|
|
1087
|
+
prepareSnapshot: (populate: (projectPath: string) => Promise<void>) => Promise<void>;
|
|
1088
|
+
markLaunchDispatched: () => Promise<void>;
|
|
1099
1089
|
confirm: (result: {
|
|
1100
1090
|
openedProjectWindow: boolean;
|
|
1101
1091
|
port: number;
|
|
@@ -1107,8 +1097,6 @@ interface CleanupManagedWechatProjectsOptions {
|
|
|
1107
1097
|
journalPath?: string;
|
|
1108
1098
|
scope?: 'process' | 'journal';
|
|
1109
1099
|
}
|
|
1110
|
-
//#endregion
|
|
1111
|
-
//#region src/devtoolsProjectOwnership/installationExit/index.d.ts
|
|
1112
1100
|
export interface RecoverManagedWechatProjectsAfterInstallationExitOptions {
|
|
1113
1101
|
target: ResolvedWechatDevtoolsTarget;
|
|
1114
1102
|
recoveryScope: MachineE2ELeaseRecoveryScope;
|
|
@@ -1118,18 +1106,17 @@ export interface ManagedWechatInstallationExitRecoveryResult {
|
|
|
1118
1106
|
}
|
|
1119
1107
|
/** 在精确恢复租约中终结已退出安装的未知启动或失败关窗;保留原证据,不补造销毁事件。 */
|
|
1120
1108
|
export declare function recoverManagedWechatProjectsAfterInstallationExit(options: RecoverManagedWechatProjectsAfterInstallationExitOptions): Promise<ManagedWechatInstallationExitRecoveryResult>;
|
|
1121
|
-
//#endregion
|
|
1122
|
-
//#region src/devtoolsProjectOwnership/journal/constants.d.ts
|
|
1123
1109
|
/** 受管项目日志的环境变量名称;基础设施预检可在构建包之前读取。 */
|
|
1124
1110
|
export declare const MANAGED_PROJECT_JOURNAL_ENV = "WEAPP_IDE_MANAGED_PROJECT_JOURNAL";
|
|
1125
1111
|
/** 仅供显式受管任务声明双项目窗口验收;不允许无限扩大并行窗口。 */
|
|
1126
1112
|
export declare const MANAGED_PROJECT_MAX_WINDOWS_ENV = "WEAPP_IDE_MANAGED_PROJECT_MAX_WINDOWS";
|
|
1127
|
-
//#endregion
|
|
1128
|
-
//#region src/devtoolsProjectOwnership/journal.d.ts
|
|
1129
1113
|
/** 仅递归当前任务明确传递的 children;不扫描用户缓存,不跟随符号链接。 */
|
|
1130
1114
|
export declare function readManagedWechatProjectRecords(journalPath?: string): Promise<ManagedWechatProjectRecord[]>;
|
|
1131
|
-
|
|
1132
|
-
|
|
1115
|
+
/** 窗口已经释放不代表本任务快照也已回收。 */
|
|
1116
|
+
export declare function isManagedWechatProjectFullyReleased(record: {
|
|
1117
|
+
state: ManagedWechatProjectRecord['state'];
|
|
1118
|
+
snapshot?: Pick<NonNullable<ManagedWechatProjectRecord['snapshot']>, 'state'>;
|
|
1119
|
+
}): boolean;
|
|
1133
1120
|
/** 窗口销毁与连接断开分别验证;失败保留登记供后续继续观察。 */
|
|
1134
1121
|
export declare function closeManagedWechatProject(options: {
|
|
1135
1122
|
journalPath?: string;
|
|
@@ -1139,8 +1126,6 @@ export declare function closeManagedWechatProject(options: {
|
|
|
1139
1126
|
export declare function beginManagedWechatProject(options: BeginManagedWechatProjectOptions): Promise<ManagedWechatProjectIntent | undefined>;
|
|
1140
1127
|
/** 父进程可回收已退出工作进程的确认所有权;未知启动结果严格阻止后续任务。 */
|
|
1141
1128
|
export declare function cleanupManagedWechatProjects(options?: CleanupManagedWechatProjectsOptions): Promise<void>;
|
|
1142
|
-
//#endregion
|
|
1143
|
-
//#region src/mcp/runtime.d.ts
|
|
1144
1129
|
export interface StartWeappIdeMcpServerOptions {
|
|
1145
1130
|
cliPath?: string;
|
|
1146
1131
|
workspaceRoot?: string;
|
|
@@ -1148,8 +1133,6 @@ export interface StartWeappIdeMcpServerOptions {
|
|
|
1148
1133
|
export declare function startWeappIdeMcpServer(options?: StartWeappIdeMcpServerOptions): Promise<{
|
|
1149
1134
|
close: () => Promise<void>;
|
|
1150
1135
|
}>;
|
|
1151
|
-
//#endregion
|
|
1152
|
-
//#region src/mcp/server.d.ts
|
|
1153
1136
|
interface ToolRegistrar {
|
|
1154
1137
|
registerTool: McpServer['registerTool'];
|
|
1155
1138
|
}
|
|
@@ -1168,8 +1151,6 @@ export declare function createWeappIdeMcpServer(options: WeappIdeMcpServerOption
|
|
|
1168
1151
|
close: () => Promise<undefined>;
|
|
1169
1152
|
server: McpServer;
|
|
1170
1153
|
}>;
|
|
1171
|
-
//#endregion
|
|
1172
|
-
//#region src/runtime/platform.d.ts
|
|
1173
1154
|
/**
|
|
1174
1155
|
* @description 官方微信开发者工具只支持 Windows、macOS,Linux 只有社区版。
|
|
1175
1156
|
* https://github.com/msojocs/wechat-web-devtools-linux
|
|
@@ -1195,8 +1176,6 @@ export declare const operatingSystemName: string;
|
|
|
1195
1176
|
* @description 获取默认 CLI 路径(按系统)。
|
|
1196
1177
|
*/
|
|
1197
1178
|
export declare function getDefaultCliPath(targetOs?: string): Promise<string | undefined>;
|
|
1198
|
-
//#endregion
|
|
1199
|
-
//#region src/utils/argv.d.ts
|
|
1200
1179
|
/**
|
|
1201
1180
|
* @description argv 处理函数
|
|
1202
1181
|
*/
|
|
@@ -1213,8 +1192,6 @@ export declare function createAlias(entry: AliasEntry): ArgvTransform;
|
|
|
1213
1192
|
* @description 创建路径参数兼容转换器(补全或规范化路径)
|
|
1214
1193
|
*/
|
|
1215
1194
|
export declare function createPathCompat(option: string): ArgvTransform;
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region src/utils/exec.d.ts
|
|
1218
1195
|
interface ExecuteOptions {
|
|
1219
1196
|
pipeStdout?: boolean;
|
|
1220
1197
|
pipeStderr?: boolean;
|
|
@@ -1229,11 +1206,8 @@ export declare function execute(cliPath: string, argv: string[], options?: Execu
|
|
|
1229
1206
|
cancelSignal: AbortSignal | undefined;
|
|
1230
1207
|
forceKillAfterDelay: number;
|
|
1231
1208
|
}>>;
|
|
1232
|
-
//#endregion
|
|
1233
|
-
//#region src/utils/path.d.ts
|
|
1234
1209
|
/**
|
|
1235
1210
|
* @description 解析为绝对路径(基于当前工作目录)
|
|
1236
1211
|
*/
|
|
1237
1212
|
export declare function resolvePath(filePath: string): string;
|
|
1238
|
-
|
|
1239
|
-
export { type AutomatorSessionOptions, type BaseConfig, type BeginManagedWechatProjectOptions, type CleanupManagedWechatProjectsOptions, type ConfigSource, type DevtoolsConnectionInput, type DevtoolsContext, type DevtoolsElementSnapshot, type DevtoolsPageSnapshot, type DevtoolsToolResult, type ManagedWechatHostIdentity, type ManagedWechatInstallationExitEvidence, type ManagedWechatProjectIntent, type ManagedWechatProjectRecord, type ManagedWechatProjectState, type ManagedWechatWindowCloseCall, type ManagedWechatWindowCloseEvidence, type ManagedWechatWindowLogCursor, type MiniProgramElement, type MiniProgramEventMap, type MiniProgramLike, type MiniProgramPage, type ResolvedConfig, type WechatDevtoolsHostInspectionOptions, closeSharedMiniProgram, getSharedMiniProgramSessionCount, readElementSnapshot, releaseSharedMiniProgram, resolveProjectPath, toSerializableValue };
|
|
1213
|
+
export { type AutomatorSessionOptions, type BaseConfig, type BeginManagedWechatProjectOptions, type CleanupManagedWechatProjectsOptions, type ConfigSource, type DevtoolsConnectionInput, type DevtoolsContext, type DevtoolsElementSnapshot, type DevtoolsPageSnapshot, type DevtoolsToolResult, type ManagedWechatHostIdentity, type ManagedWechatInstallationExitEvidence, type ManagedWechatProjectIntent, type ManagedWechatProjectRecord, type ManagedWechatProjectSnapshot, type ManagedWechatProjectState, type ManagedWechatWindowCloseCall, type ManagedWechatWindowCloseEvidence, type ManagedWechatWindowLogCursor, type MiniProgramElement, type MiniProgramEventMap, type MiniProgramLike, type MiniProgramPage, type ResolveWechatDevtoolsTargetOptions, type ResolvedConfig, type ResolvedWechatDevtoolsTarget, type WechatDevtoolsChannel, type WechatDevtoolsHostInspectionOptions, type WechatDevtoolsInstallation, type WechatDevtoolsSelectionOptions, closeSharedMiniProgram, getSharedMiniProgramSessionCount, readElementSnapshot, releaseSharedMiniProgram, resolveProjectPath, toSerializableValue };
|