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