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