weapp-ide-cli 5.1.0 → 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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import * as miniprogram_automator_out_MiniProgram from 'miniprogram-automator/out/MiniProgram';
2
- import { Buffer } from 'node:buffer';
3
- import * as execa from 'execa';
1
+ import { Buffer } from "node:buffer";
2
+ import * as miniprogram_automator_out_MiniProgram0 from "miniprogram-automator/out/MiniProgram";
3
+ import * as execa from "execa";
4
4
 
5
+ //#region src/cli/automator.d.ts
5
6
  interface AutomatorOptions {
6
- projectPath: string;
7
- timeout?: number;
7
+ projectPath: string;
8
+ timeout?: number;
8
9
  }
9
10
  /**
10
11
  * @description Check if error is a DevTools HTTP port error
@@ -21,13 +22,14 @@ declare function formatAutomatorLoginError(error: unknown): string;
21
22
  /**
22
23
  * @description Launch automator with default options
23
24
  */
24
- declare function launchAutomator(options: AutomatorOptions): Promise<miniprogram_automator_out_MiniProgram.default>;
25
-
25
+ declare function launchAutomator(options: AutomatorOptions): Promise<miniprogram_automator_out_MiniProgram0.default>;
26
+ //#endregion
27
+ //#region src/cli/automator-argv.d.ts
26
28
  interface ParsedAutomatorArgs {
27
- projectPath: string;
28
- timeout?: number;
29
- json: boolean;
30
- positionals: string[];
29
+ projectPath: string;
30
+ timeout?: number;
31
+ json: boolean;
32
+ positionals: string[];
31
33
  }
32
34
  /**
33
35
  * @description 解析 automator 命令通用参数与位置参数。
@@ -41,41 +43,53 @@ declare function readOptionValue(argv: readonly string[], optionName: string): s
41
43
  * @description 删除参数中的指定选项(同时支持 --opt value 与 --opt=value)。
42
44
  */
43
45
  declare function removeOption(argv: readonly string[], optionName: string): string[];
44
-
46
+ //#endregion
47
+ //#region src/cli/automator-session.d.ts
45
48
  interface AutomatorSessionOptions {
46
- projectPath: string;
47
- timeout?: number;
49
+ projectPath: string;
50
+ timeout?: number;
51
+ }
52
+ interface MiniProgramEventMap {
53
+ console: (payload: unknown) => void;
54
+ exception: (payload: unknown) => void;
48
55
  }
49
56
  interface MiniProgramElement {
50
- tap: () => Promise<void>;
51
- input?: (value: string) => Promise<void>;
57
+ tap: () => Promise<void>;
58
+ input?: (value: string) => Promise<void>;
52
59
  }
53
60
  interface MiniProgramPage {
54
- path?: string;
55
- query?: Record<string, unknown>;
56
- data: (path?: string) => Promise<unknown>;
57
- $: (selector: string) => Promise<MiniProgramElement | null>;
61
+ path?: string;
62
+ query?: Record<string, unknown>;
63
+ data: (path?: string) => Promise<unknown>;
64
+ $: (selector: string) => Promise<MiniProgramElement | null>;
58
65
  }
59
66
  interface MiniProgramLike {
60
- navigateTo: (url: string) => Promise<unknown>;
61
- redirectTo: (url: string) => Promise<unknown>;
62
- navigateBack: () => Promise<unknown>;
63
- reLaunch: (url: string) => Promise<unknown>;
64
- switchTab: (url: string) => Promise<unknown>;
65
- pageStack: () => Promise<MiniProgramPage[]>;
66
- currentPage: () => Promise<MiniProgramPage>;
67
- systemInfo: () => Promise<unknown>;
68
- pageScrollTo: (scrollTop: number) => Promise<unknown>;
69
- stopAudits: () => Promise<unknown>;
70
- screenshot: () => Promise<string | Buffer>;
71
- remote: (enable?: boolean) => Promise<unknown>;
72
- close: () => Promise<void>;
67
+ navigateTo: (url: string) => Promise<unknown>;
68
+ redirectTo: (url: string) => Promise<unknown>;
69
+ navigateBack: () => Promise<unknown>;
70
+ reLaunch: (url: string) => Promise<unknown>;
71
+ switchTab: (url: string) => Promise<unknown>;
72
+ pageStack: () => Promise<MiniProgramPage[]>;
73
+ currentPage: () => Promise<MiniProgramPage>;
74
+ systemInfo: () => Promise<unknown>;
75
+ pageScrollTo: (scrollTop: number) => Promise<unknown>;
76
+ stopAudits: () => Promise<unknown>;
77
+ screenshot: () => Promise<string | Buffer>;
78
+ remote: (enable?: boolean) => Promise<unknown>;
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;
73
82
  }
83
+ /**
84
+ * @description 建立 automator 会话,并统一处理常见连接错误提示。
85
+ */
86
+ declare function connectMiniProgram(options: AutomatorSessionOptions): Promise<MiniProgramLike>;
74
87
  /**
75
88
  * @description 统一管理 automator 会话生命周期与常见连接错误提示。
76
89
  */
77
90
  declare function withMiniProgram<T>(options: AutomatorSessionOptions, runner: (miniProgram: MiniProgramLike) => Promise<T>): Promise<T>;
78
-
91
+ //#endregion
92
+ //#region src/cli/command-catalog.d.ts
79
93
  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"];
80
94
  declare const MINIDEV_NAMESPACE_COMMAND_NAMES: readonly ["alipay", "ali", "minidev"];
81
95
  declare const CONFIG_COMMAND_NAME: "config";
@@ -84,46 +98,45 @@ declare const WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES: string[];
84
98
  * @description 判断是否为 weapp-ide-cli 支持的顶层命令。
85
99
  */
86
100
  declare function isWeappIdeTopLevelCommand(command: string | undefined): boolean;
87
-
88
- interface AutomatorCommandOptions extends AutomatorSessionOptions {
89
- }
101
+ //#endregion
102
+ //#region src/cli/commands.d.ts
103
+ interface AutomatorCommandOptions extends AutomatorSessionOptions {}
90
104
  interface NavigateOptions extends AutomatorCommandOptions {
91
- url: string;
105
+ url: string;
92
106
  }
93
107
  interface PageInfoOptions extends AutomatorCommandOptions {
94
- json?: boolean;
108
+ json?: boolean;
95
109
  }
96
110
  interface PageDataOptions extends PageInfoOptions {
97
- path?: string;
111
+ path?: string;
98
112
  }
99
113
  interface SelectorOptions extends AutomatorCommandOptions {
100
- selector: string;
101
- }
102
- interface TapOptions extends SelectorOptions {
114
+ selector: string;
103
115
  }
116
+ interface TapOptions extends SelectorOptions {}
104
117
  interface InputOptions extends SelectorOptions {
105
- value: string;
118
+ value: string;
106
119
  }
107
120
  interface ScrollOptions extends AutomatorCommandOptions {
108
- scrollTop: number;
121
+ scrollTop: number;
109
122
  }
110
123
  interface AuditOptions extends AutomatorCommandOptions {
111
- outputPath?: string;
124
+ outputPath?: string;
112
125
  }
113
126
  interface ScreenshotOptions extends AutomatorCommandOptions {
114
- outputPath?: string;
115
- page?: string;
127
+ outputPath?: string;
128
+ page?: string;
116
129
  }
117
130
  interface ScreenshotResult {
118
- base64?: string;
119
- path?: string;
131
+ base64?: string;
132
+ path?: string;
120
133
  }
121
134
  interface RemoteOptions extends AutomatorCommandOptions {
122
- enable?: boolean;
135
+ enable?: boolean;
123
136
  }
124
137
  interface PageSnapshot {
125
- path: string;
126
- query: Record<string, unknown> | undefined;
138
+ path: string;
139
+ query: Record<string, unknown> | undefined;
127
140
  }
128
141
  declare function navigateTo(options: NavigateOptions): Promise<void>;
129
142
  declare function redirectTo(options: NavigateOptions): Promise<void>;
@@ -140,32 +153,58 @@ declare function scrollTo(options: ScrollOptions): Promise<void>;
140
153
  declare function audit(options: AuditOptions): Promise<unknown>;
141
154
  declare function takeScreenshot(options: ScreenshotOptions): Promise<ScreenshotResult>;
142
155
  declare function remote(options: RemoteOptions): Promise<void>;
143
-
156
+ //#endregion
157
+ //#region src/cli/config-command.d.ts
144
158
  /**
145
159
  * @description 处理 config 子命令。
146
160
  */
147
161
  declare function handleConfigCommand(argv: string[]): Promise<void>;
148
-
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
184
+ //#region src/cli/minidev.d.ts
149
185
  /**
150
186
  * @description 运行支付宝小程序 CLI(minidev)
151
187
  */
152
188
  declare function runMinidev(argv: readonly string[]): Promise<void>;
153
-
189
+ //#endregion
190
+ //#region src/cli/prompt.d.ts
154
191
  /**
155
192
  * @description 交互式提示并保存 CLI 路径
156
193
  */
157
194
  declare function promptForCliPath(): Promise<string | null>;
158
-
195
+ //#endregion
196
+ //#region src/cli/resolver.d.ts
159
197
  /**
160
198
  * @description 解析 CLI 路径并校验可用性
161
199
  */
162
200
  declare function resolveCliPath(): Promise<{
163
- cliPath: string | null;
164
- source: ConfigSource;
201
+ cliPath: string | null;
202
+ source: ConfigSource;
165
203
  }>;
166
-
204
+ //#endregion
205
+ //#region src/cli/retry.d.ts
167
206
  interface RetryKeypressOptions {
168
- timeoutMs?: number;
207
+ timeoutMs?: number;
169
208
  }
170
209
  type RetryPromptResult = 'retry' | 'cancel' | 'timeout';
171
210
  /**
@@ -184,8 +223,8 @@ declare function formatWechatIdeLoginRequiredError(error: unknown): string;
184
223
  * @description 创建登录失效专用错误,并携带退出码语义。
185
224
  */
186
225
  declare function createWechatIdeLoginRequiredExitError(error: unknown, reason?: string): Error & {
187
- code: number;
188
- exitCode: number;
226
+ code: number;
227
+ exitCode: number;
189
228
  };
190
229
  /**
191
230
  * @description 交互等待用户按键重试,按 r 重试,按 q 或 Ctrl+C 取消。
@@ -195,12 +234,14 @@ declare function waitForRetryKeypress(options?: RetryKeypressOptions): Promise<R
195
234
  * @description 生成重试按键提示,并高亮关键热键。
196
235
  */
197
236
  declare function formatRetryHotkeyPrompt(timeoutMs?: number): string;
198
-
237
+ //#endregion
238
+ //#region src/cli/run.d.ts
199
239
  /**
200
240
  * @description CLI 入口解析与分发。
201
241
  */
202
242
  declare function parse(argv: string[]): Promise<void>;
203
-
243
+ //#endregion
244
+ //#region src/cli/run-automator.d.ts
204
245
  declare const AUTOMATOR_COMMAND_NAMES: string[];
205
246
  /**
206
247
  * @description 判断是否属于 automator 子命令。
@@ -214,13 +255,15 @@ declare function runAutomatorCommand(command: string, argv: string[]): Promise<v
214
255
  * @description 获取 automator 命令帮助文本。
215
256
  */
216
257
  declare function getAutomatorCommandHelp(command: string): string | undefined;
217
-
258
+ //#endregion
259
+ //#region src/cli/run-login.d.ts
218
260
  type LoginRetryMode = 'never' | 'once' | 'always';
219
261
  /**
220
262
  * @description 运行微信开发者工具 CLI,并在登录失效时允许按键重试。
221
263
  */
222
264
  declare function runWechatCliWithRetry(cliPath: string, argv: string[]): Promise<void>;
223
-
265
+ //#endregion
266
+ //#region src/cli/screenshot.d.ts
224
267
  /**
225
268
  * @description Print help for screenshot command
226
269
  */
@@ -229,18 +272,20 @@ declare function printScreenshotHelp(): void;
229
272
  * @description Parse command line arguments for screenshot command
230
273
  */
231
274
  declare function parseScreenshotArgs(argv: string[]): ScreenshotOptions;
232
-
275
+ //#endregion
276
+ //#region src/cli/wechat-command-schema.d.ts
233
277
  /**
234
278
  * @description 在调用官方微信 CLI 前做轻量参数校验。
235
279
  */
236
280
  declare function validateWechatCliCommandArgs(argv: readonly string[]): void;
237
-
281
+ //#endregion
282
+ //#region src/types.d.ts
238
283
  /**
239
284
  * @description 基础配置
240
285
  */
241
286
  interface BaseConfig {
242
- cliPath: string;
243
- locale?: 'zh' | 'en';
287
+ cliPath: string;
288
+ locale?: 'zh' | 'en';
244
289
  }
245
290
  /**
246
291
  * @description 配置来源
@@ -250,19 +295,20 @@ type ConfigSource = 'custom' | 'default' | 'missing';
250
295
  * @description 解析后的配置
251
296
  */
252
297
  interface ResolvedConfig extends BaseConfig {
253
- source: ConfigSource;
298
+ source: ConfigSource;
254
299
  }
255
300
  /**
256
301
  * @description CLI 参数别名配置
257
302
  */
258
303
  interface AliasEntry {
259
- find: string;
260
- replacement: string;
304
+ find: string;
305
+ replacement: string;
261
306
  }
262
-
307
+ //#endregion
308
+ //#region src/config/custom.d.ts
263
309
  interface CustomConfigFile {
264
- cliPath?: string;
265
- locale?: 'zh' | 'en';
310
+ cliPath?: string;
311
+ locale?: 'zh' | 'en';
266
312
  }
267
313
  /**
268
314
  * @description 写入自定义 CLI 路径配置
@@ -284,7 +330,8 @@ declare function overwriteCustomConfig(config: CustomConfigFile): Promise<void>;
284
330
  * @description 读取原始自定义配置。
285
331
  */
286
332
  declare function readCustomConfig(): Promise<CustomConfigFile>;
287
-
333
+ //#endregion
334
+ //#region src/config/paths.d.ts
288
335
  /**
289
336
  * @description 默认自定义配置目录
290
337
  */
@@ -293,7 +340,8 @@ declare const defaultCustomConfigDirPath: string;
293
340
  * @description 默认自定义配置文件路径
294
341
  */
295
342
  declare const defaultCustomConfigFilePath: string;
296
-
343
+ //#endregion
344
+ //#region src/config/resolver.d.ts
297
345
  /**
298
346
  * @description 读取并解析 CLI 配置(自定义优先)
299
347
  */
@@ -302,15 +350,16 @@ declare function getConfig(): Promise<ResolvedConfig>;
302
350
  * @description 获取用户配置的语言偏好。
303
351
  */
304
352
  declare function getConfiguredLocale(): Promise<"zh" | "en" | undefined>;
305
-
353
+ //#endregion
354
+ //#region src/runtime/platform.d.ts
306
355
  /**
307
356
  * @description 官方微信开发者工具只支持 Windows、macOS,Linux 只有社区版
308
357
  * https://github.com/msojocs/wechat-web-devtools-linux
309
358
  */
310
359
  declare const SupportedPlatformsMap: {
311
- readonly Windows_NT: "Windows_NT";
312
- readonly Darwin: "Darwin";
313
- readonly Linux: "Linux";
360
+ readonly Windows_NT: "Windows_NT";
361
+ readonly Darwin: "Darwin";
362
+ readonly Linux: "Linux";
314
363
  };
315
364
  /**
316
365
  * @description 支持的系统类型
@@ -328,7 +377,8 @@ declare const operatingSystemName: string;
328
377
  * @description 获取默认 CLI 路径(按系统)
329
378
  */
330
379
  declare function getDefaultCliPath(targetOs?: string): Promise<string | undefined>;
331
-
380
+ //#endregion
381
+ //#region src/utils/argv.d.ts
332
382
  /**
333
383
  * @description argv 处理函数
334
384
  */
@@ -345,19 +395,21 @@ declare function createAlias(entry: AliasEntry): ArgvTransform;
345
395
  * @description 创建路径参数兼容转换器(补全或规范化路径)
346
396
  */
347
397
  declare function createPathCompat(option: string): ArgvTransform;
348
-
398
+ //#endregion
399
+ //#region src/utils/exec.d.ts
349
400
  interface ExecuteOptions {
350
- pipeStdout?: boolean;
351
- pipeStderr?: boolean;
401
+ pipeStdout?: boolean;
402
+ pipeStderr?: boolean;
352
403
  }
353
404
  /**
354
405
  * @description 执行 CLI 命令并透传输出
355
406
  */
356
407
  declare function execute(cliPath: string, argv: string[], options?: ExecuteOptions): Promise<execa.Result<{}>>;
357
-
408
+ //#endregion
409
+ //#region src/utils/path.d.ts
358
410
  /**
359
411
  * @description 解析为绝对路径(基于当前工作目录)
360
412
  */
361
413
  declare function resolvePath(filePath: string): string;
362
-
363
- export { AUTOMATOR_COMMAND_NAMES, type ArgvTransform, type AuditOptions, type AutomatorCommandOptions, type AutomatorOptions, type AutomatorSessionOptions, type BaseConfig, CONFIG_COMMAND_NAME, type ConfigSource, type InputOptions, type LoginRetryMode, MINIDEV_NAMESPACE_COMMAND_NAMES, type MiniProgramElement, type MiniProgramLike, type MiniProgramPage, type NavigateOptions, type PageDataOptions, type PageInfoOptions, type ParsedAutomatorArgs, type RemoteOptions, type ResolvedConfig, type RetryKeypressOptions, type RetryPromptResult, type ScreenshotOptions, type ScreenshotResult, type ScrollOptions, type SelectorOptions, type SupportedPlatform, SupportedPlatformsMap, type 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 };
414
+ //#endregion
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,136 +1,3 @@
1
- import {
2
- AUTOMATOR_COMMAND_NAMES,
3
- CONFIG_COMMAND_NAME,
4
- MINIDEV_NAMESPACE_COMMAND_NAMES,
5
- SupportedPlatformsMap,
6
- WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES,
7
- WECHAT_CLI_COMMAND_NAMES,
8
- createAlias,
9
- createCustomConfig,
10
- createLocaleConfig,
11
- createPathCompat,
12
- createWechatIdeLoginRequiredExitError,
13
- defaultCustomConfigDirPath,
14
- defaultCustomConfigFilePath,
15
- execute,
16
- extractExecutionErrorText,
17
- formatRetryHotkeyPrompt,
18
- formatWechatIdeLoginRequiredError,
19
- getAutomatorCommandHelp,
20
- getConfig,
21
- getConfiguredLocale,
22
- getDefaultCliPath,
23
- handleConfigCommand,
24
- isAutomatorCommand,
25
- isOperatingSystemSupported,
26
- isWeappIdeTopLevelCommand,
27
- isWechatIdeLoginRequiredError,
28
- operatingSystemName,
29
- overwriteCustomConfig,
30
- parse,
31
- parseAutomatorArgs,
32
- parseScreenshotArgs,
33
- printScreenshotHelp,
34
- promptForCliPath,
35
- readCustomConfig,
36
- readOptionValue,
37
- removeCustomConfigKey,
38
- removeOption,
39
- resolveCliPath,
40
- resolvePath,
41
- runAutomatorCommand,
42
- runMinidev,
43
- runWechatCliWithRetry,
44
- transformArgv,
45
- validateWechatCliCommandArgs,
46
- waitForRetryKeypress
47
- } from "./chunk-C2MXNGAM.js";
48
- import {
49
- audit,
50
- currentPage,
51
- formatAutomatorLoginError,
52
- input,
53
- isAutomatorLoginError,
54
- isDevtoolsHttpPortError,
55
- launchAutomator,
56
- navigateBack,
57
- navigateTo,
58
- pageData,
59
- pageStack,
60
- reLaunch,
61
- redirectTo,
62
- remote,
63
- scrollTo,
64
- switchTab,
65
- systemInfo,
66
- takeScreenshot,
67
- tap,
68
- withMiniProgram
69
- } from "./chunk-NSYCXXXT.js";
70
- export {
71
- AUTOMATOR_COMMAND_NAMES,
72
- CONFIG_COMMAND_NAME,
73
- MINIDEV_NAMESPACE_COMMAND_NAMES,
74
- SupportedPlatformsMap,
75
- WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES,
76
- WECHAT_CLI_COMMAND_NAMES,
77
- audit,
78
- createAlias,
79
- createCustomConfig,
80
- createLocaleConfig,
81
- createPathCompat,
82
- createWechatIdeLoginRequiredExitError,
83
- currentPage,
84
- defaultCustomConfigDirPath,
85
- defaultCustomConfigFilePath,
86
- execute,
87
- extractExecutionErrorText,
88
- formatAutomatorLoginError,
89
- formatRetryHotkeyPrompt,
90
- formatWechatIdeLoginRequiredError,
91
- getAutomatorCommandHelp,
92
- getConfig,
93
- getConfiguredLocale,
94
- getDefaultCliPath,
95
- handleConfigCommand,
96
- input,
97
- isAutomatorCommand,
98
- isAutomatorLoginError,
99
- isDevtoolsHttpPortError,
100
- isOperatingSystemSupported,
101
- isWeappIdeTopLevelCommand,
102
- isWechatIdeLoginRequiredError,
103
- launchAutomator,
104
- navigateBack,
105
- navigateTo,
106
- operatingSystemName,
107
- overwriteCustomConfig,
108
- pageData,
109
- pageStack,
110
- parse,
111
- parseAutomatorArgs,
112
- parseScreenshotArgs,
113
- printScreenshotHelp,
114
- promptForCliPath,
115
- reLaunch,
116
- readCustomConfig,
117
- readOptionValue,
118
- redirectTo,
119
- remote,
120
- removeCustomConfigKey,
121
- removeOption,
122
- resolveCliPath,
123
- resolvePath,
124
- runAutomatorCommand,
125
- runMinidev,
126
- runWechatCliWithRetry,
127
- scrollTo,
128
- switchTab,
129
- systemInfo,
130
- takeScreenshot,
131
- tap,
132
- transformArgv,
133
- validateWechatCliCommandArgs,
134
- waitForRetryKeypress,
135
- withMiniProgram
136
- };
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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-ide-cli",
3
3
  "type": "module",
4
- "version": "5.1.0",
4
+ "version": "5.1.2",
5
5
  "description": "让微信开发者工具,用起来更加方便!",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -63,17 +63,18 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "execa": "9.6.1",
66
- "fs-extra": "^11.3.3",
66
+ "fs-extra": "^11.3.4",
67
67
  "miniprogram-automator": "^0.12.1",
68
68
  "pathe": "^2.0.3",
69
- "@weapp-core/logger": "^3.1.0"
69
+ "@weapp-core/logger": "^3.1.1"
70
70
  },
71
71
  "scripts": {
72
- "dev": "tsup --watch --sourcemap",
73
- "build": "tsup",
72
+ "dev": "tsdown -w --sourcemap",
73
+ "build": "tsdown",
74
74
  "release": "node scripts/release.js",
75
75
  "test:dev": "vitest",
76
76
  "test": "vitest run",
77
+ "typecheck": "tsc --noEmit",
77
78
  "weapp": "tsx src/cli.ts",
78
79
  "debug": "tsx src/cli.ts config",
79
80
  "raw": "node bin/weapp.js",