weapp-ide-cli 5.2.7 → 5.2.9
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-IBevYdS7.js → cli-pFop_M4C.js} +152 -4
- package/dist/cli.js +2 -2
- package/dist/{commands-CcaDGUMU.js → commands-5QkUqOoO.js} +1 -1
- package/dist/commands-DAN1Yl85.js +2 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/dist/commands-BYt68gRi.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as readCustomConfig, B as getConfiguredLocale, C as configureLocaleFromArgv, G as operatingSystemName, I as bootstrapWechatDevtoolsSettings, J as createAutoBootstrapDevtoolsConfig, K as colors, L as detectWechatDevtoolsServicePort, Q as overwriteCustomConfig, R as resolveCliPath, S as withMiniProgram, T as validateLocaleOption, V as resolveDevtoolsAutomationDefaults, W as isOperatingSystemSupported, X as createCustomConfig, Y as createAutoTrustProjectConfig, Z as createLocaleConfig, a as navigateBack, c as pageStack, d as remote, et as removeCustomConfigKey, f as scrollTo, g as tap, i as input, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as defaultCustomConfigFilePath, o as navigateTo, p as switchTab, q as logger_default, r as currentPage, rt as resolvePath, s as pageData, t as audit, u as redirectTo, w as i18nText, y as connectMiniProgram } from "./commands-
|
|
1
|
+
import { $ as readCustomConfig, B as getConfiguredLocale, C as configureLocaleFromArgv, G as operatingSystemName, I as bootstrapWechatDevtoolsSettings, J as createAutoBootstrapDevtoolsConfig, K as colors, L as detectWechatDevtoolsServicePort, Q as overwriteCustomConfig, R as resolveCliPath, S as withMiniProgram, T as validateLocaleOption, V as resolveDevtoolsAutomationDefaults, W as isOperatingSystemSupported, X as createCustomConfig, Y as createAutoTrustProjectConfig, Z as createLocaleConfig, a as navigateBack, c as pageStack, d as remote, et as removeCustomConfigKey, f as scrollTo, g as tap, i as input, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as defaultCustomConfigFilePath, o as navigateTo, p as switchTab, q as logger_default, r as currentPage, rt as resolvePath, s as pageData, t as audit, u as redirectTo, w as i18nText, y as connectMiniProgram } from "./commands-5QkUqOoO.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fs as fs$1 } from "@weapp-core/shared/fs";
|
|
@@ -17,7 +17,7 @@ function parsePositiveInt(raw) {
|
|
|
17
17
|
return value;
|
|
18
18
|
}
|
|
19
19
|
function takesValue(optionName) {
|
|
20
|
-
return optionName === "-p" || optionName === "--project" || optionName === "-t" || optionName === "--timeout" || optionName === "-o" || optionName === "--output" || optionName === "--page" || optionName === "--login-retry" || optionName === "--login-retry-timeout" || optionName === "--lang" || optionName === "--platform" || optionName === "--qr-output" || optionName === "-r" || optionName === "--result-output" || optionName === "--info-output" || optionName === "-i";
|
|
20
|
+
return optionName === "-p" || optionName === "--project" || optionName === "-t" || optionName === "--timeout" || optionName === "-o" || optionName === "--output" || optionName === "--page" || optionName === "--login-retry" || optionName === "--login-retry-timeout" || optionName === "--lang" || optionName === "--platform" || optionName === "--runtime-url" || optionName === "--qr-output" || optionName === "-r" || optionName === "--result-output" || optionName === "--info-output" || optionName === "-i";
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* @description 解析 automator 命令通用参数与位置参数。
|
|
@@ -354,6 +354,8 @@ ${colors.bold("参数:")}
|
|
|
354
354
|
--page <path> 截图前先跳转页面
|
|
355
355
|
--full-page 输出整页长截图
|
|
356
356
|
-t, --timeout <ms> 连接超时时间(默认:30000)
|
|
357
|
+
--runtime-url <url> 复用本地 runtime service 地址
|
|
358
|
+
--no-runtime-service 跳过 runtime service,直接连接 DevTools
|
|
357
359
|
--json 以 JSON 格式输出
|
|
358
360
|
--lang <lang> 语言切换:zh | en(默认:zh)
|
|
359
361
|
-h, --help 显示此帮助信息
|
|
@@ -382,6 +384,8 @@ ${colors.bold("Options:")}
|
|
|
382
384
|
--page <path> Navigate to page before taking screenshot
|
|
383
385
|
--full-page Capture a stitched full-page screenshot
|
|
384
386
|
-t, --timeout <ms> Connection timeout in milliseconds (default: 30000)
|
|
387
|
+
--runtime-url <url> Runtime service URL for shared sessions
|
|
388
|
+
--no-runtime-service Skip runtime service and connect to DevTools directly
|
|
385
389
|
--json Output as JSON format
|
|
386
390
|
--lang <lang> Language: zh | en (default: zh)
|
|
387
391
|
-h, --help Show this help message
|
|
@@ -429,7 +433,7 @@ async function runScreenshot(argv) {
|
|
|
429
433
|
}
|
|
430
434
|
const options = parseScreenshotArgs(argv);
|
|
431
435
|
const isJsonOutput = argv.includes("--json");
|
|
432
|
-
const { takeScreenshot } = await import("./commands-
|
|
436
|
+
const { takeScreenshot } = await import("./commands-DAN1Yl85.js");
|
|
433
437
|
const result = await takeScreenshot(options);
|
|
434
438
|
if (isJsonOutput) {
|
|
435
439
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -438,6 +442,132 @@ async function runScreenshot(argv) {
|
|
|
438
442
|
if (result.base64) console.log(result.base64);
|
|
439
443
|
}
|
|
440
444
|
//#endregion
|
|
445
|
+
//#region src/cli/runtime-service.ts
|
|
446
|
+
const DEFAULT_RUNTIME_SERVICE_URL = "http://127.0.0.1:3088/api/weapp/devtools";
|
|
447
|
+
const SERVICE_UNAVAILABLE_CODES = new Set([
|
|
448
|
+
"ECONNREFUSED",
|
|
449
|
+
"ECONNRESET",
|
|
450
|
+
"ENOTFOUND",
|
|
451
|
+
"UND_ERR_SOCKET",
|
|
452
|
+
"UND_ERR_CONNECT_TIMEOUT"
|
|
453
|
+
]);
|
|
454
|
+
function isRuntimeServiceDisabled(argv) {
|
|
455
|
+
return argv.includes("--no-runtime-service") || process.env.WEAPP_VITE_RUNTIME_REST_URL === "false" || process.env.WEAPP_IDE_CLI_RUNTIME_REST_URL === "false";
|
|
456
|
+
}
|
|
457
|
+
function resolveRuntimeServiceUrl(argv) {
|
|
458
|
+
const explicit = readOptionValue(argv, "--runtime-url");
|
|
459
|
+
const envValue = process.env.WEAPP_VITE_RUNTIME_REST_URL || process.env.WEAPP_IDE_CLI_RUNTIME_REST_URL;
|
|
460
|
+
return (explicit || envValue || DEFAULT_RUNTIME_SERVICE_URL).replace(/\/+$/, "");
|
|
461
|
+
}
|
|
462
|
+
function resolveProjectPath(projectPath) {
|
|
463
|
+
return path.resolve(projectPath);
|
|
464
|
+
}
|
|
465
|
+
function resolveOutputPath(outputPath) {
|
|
466
|
+
return outputPath ? path.resolve(outputPath) : void 0;
|
|
467
|
+
}
|
|
468
|
+
function createConnectionPayload(args) {
|
|
469
|
+
return {
|
|
470
|
+
projectPath: resolveProjectPath(args.projectPath),
|
|
471
|
+
...args.timeout ? { timeout: args.timeout } : {}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
function isServiceUnavailable(error) {
|
|
475
|
+
const maybeError = error;
|
|
476
|
+
const code = maybeError?.code ?? maybeError?.cause?.code;
|
|
477
|
+
return typeof code === "string" && SERVICE_UNAVAILABLE_CODES.has(code);
|
|
478
|
+
}
|
|
479
|
+
async function requestRuntimeService(baseUrl, endpoint, payload, timeout = 1e3) {
|
|
480
|
+
const response = await fetch(`${baseUrl}${endpoint}`, {
|
|
481
|
+
body: payload ? JSON.stringify(payload) : void 0,
|
|
482
|
+
headers: payload ? { "content-type": "application/json" } : void 0,
|
|
483
|
+
method: payload ? "POST" : "GET",
|
|
484
|
+
signal: AbortSignal.timeout(timeout)
|
|
485
|
+
});
|
|
486
|
+
if (response.status === 404) return;
|
|
487
|
+
const data = await response.json().catch(() => void 0);
|
|
488
|
+
if (!response.ok) throw new Error(data?.error?.message || `runtime service request failed: ${response.status}`);
|
|
489
|
+
if (!data?.ok) throw new Error(data?.error?.message || "runtime service request failed");
|
|
490
|
+
return data.result;
|
|
491
|
+
}
|
|
492
|
+
async function tryRequestRuntimeService(baseUrl, endpoint, payload, timeout) {
|
|
493
|
+
try {
|
|
494
|
+
return await requestRuntimeService(baseUrl, endpoint, payload, timeout);
|
|
495
|
+
} catch (error) {
|
|
496
|
+
if (isServiceUnavailable(error) || error instanceof Error && error.name === "TimeoutError") return;
|
|
497
|
+
throw error;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
function printJsonResult(result) {
|
|
501
|
+
console.log(JSON.stringify(result, null, 2));
|
|
502
|
+
}
|
|
503
|
+
function formatRuntimeServiceUrl(baseUrl) {
|
|
504
|
+
return colors.cyan(baseUrl);
|
|
505
|
+
}
|
|
506
|
+
async function runRouteCommand(command, args, baseUrl) {
|
|
507
|
+
const transition = {
|
|
508
|
+
"back": "navigateBack",
|
|
509
|
+
"navigate": "navigateTo",
|
|
510
|
+
"redirect": "redirectTo",
|
|
511
|
+
"relaunch": "reLaunch",
|
|
512
|
+
"switch-tab": "switchTab"
|
|
513
|
+
}[command];
|
|
514
|
+
if (!transition) return false;
|
|
515
|
+
const pagePath = args.positionals[0];
|
|
516
|
+
if (transition !== "navigateBack" && !pagePath) return false;
|
|
517
|
+
const result = await tryRequestRuntimeService(baseUrl, "/route", {
|
|
518
|
+
...createConnectionPayload(args),
|
|
519
|
+
...pagePath ? { path: pagePath } : {},
|
|
520
|
+
transition
|
|
521
|
+
}, (args.timeout ?? 3e4) + 5e3);
|
|
522
|
+
if (result === void 0) return false;
|
|
523
|
+
if (args.json) printJsonResult(result);
|
|
524
|
+
else logger_default.success(`已通过 runtime service 执行 ${command}:${formatRuntimeServiceUrl(baseUrl)}`);
|
|
525
|
+
return true;
|
|
526
|
+
}
|
|
527
|
+
async function runInfoCommand(command, args, baseUrl) {
|
|
528
|
+
const endpoint = {
|
|
529
|
+
"current-page": "/active-page",
|
|
530
|
+
"page-stack": "/page-stack"
|
|
531
|
+
}[command];
|
|
532
|
+
if (!endpoint) return false;
|
|
533
|
+
const result = await tryRequestRuntimeService(baseUrl, endpoint, createConnectionPayload(args), (args.timeout ?? 3e4) + 5e3);
|
|
534
|
+
if (result === void 0) return false;
|
|
535
|
+
printJsonResult(result);
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
async function runScreenshotCommand(argv, baseUrl) {
|
|
539
|
+
const options = parseScreenshotArgs(argv);
|
|
540
|
+
if (options.fullPage) return false;
|
|
541
|
+
if (options.page) {
|
|
542
|
+
if (await tryRequestRuntimeService(baseUrl, "/route", {
|
|
543
|
+
projectPath: resolveProjectPath(options.projectPath),
|
|
544
|
+
...options.timeout ? { timeout: options.timeout } : {},
|
|
545
|
+
path: options.page,
|
|
546
|
+
transition: "reLaunch"
|
|
547
|
+
}, (options.timeout ?? 3e4) + 5e3) === void 0) return false;
|
|
548
|
+
}
|
|
549
|
+
const result = await tryRequestRuntimeService(baseUrl, "/capture", {
|
|
550
|
+
projectPath: resolveProjectPath(options.projectPath),
|
|
551
|
+
...options.timeout ? { timeout: options.timeout } : {},
|
|
552
|
+
...options.outputPath ? { outputPath: resolveOutputPath(options.outputPath) } : {}
|
|
553
|
+
}, (options.timeout ?? 3e4) + 5e3);
|
|
554
|
+
if (result === void 0) return false;
|
|
555
|
+
if (argv.includes("--json")) printJsonResult(options.outputPath ? { path: options.outputPath } : result);
|
|
556
|
+
else if (options.outputPath) logger_default.success(`截图已通过 runtime service 保存到 ${colors.cyan(options.outputPath)}`);
|
|
557
|
+
else if (result.base64) process.stdout.write(`${result.base64}\n`);
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* @description 优先复用本地 runtime service,避免 CLI 单独建立 automator 连接。
|
|
562
|
+
*/
|
|
563
|
+
async function tryRunRuntimeServiceCommand(command, argv) {
|
|
564
|
+
if (isRuntimeServiceDisabled(argv)) return false;
|
|
565
|
+
const baseUrl = resolveRuntimeServiceUrl(argv);
|
|
566
|
+
if (command === "screenshot") return await runScreenshotCommand(argv, baseUrl);
|
|
567
|
+
const args = parseAutomatorArgs(argv);
|
|
568
|
+
return await runRouteCommand(command, args, baseUrl) || await runInfoCommand(command, args, baseUrl);
|
|
569
|
+
}
|
|
570
|
+
//#endregion
|
|
441
571
|
//#region src/cli/run-automator.ts
|
|
442
572
|
const COMMON_OPTION_DEFINITIONS = [
|
|
443
573
|
{
|
|
@@ -454,6 +584,20 @@ const COMMON_OPTION_DEFINITIONS = [
|
|
|
454
584
|
en: "Connection timeout (default: 30000)"
|
|
455
585
|
}
|
|
456
586
|
},
|
|
587
|
+
{
|
|
588
|
+
flag: "--runtime-url <url>",
|
|
589
|
+
description: {
|
|
590
|
+
zh: "复用本地 runtime service 地址",
|
|
591
|
+
en: "Runtime service URL for shared sessions"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
flag: "--no-runtime-service",
|
|
596
|
+
description: {
|
|
597
|
+
zh: "跳过 runtime service,直接连接 DevTools",
|
|
598
|
+
en: "Skip runtime service and connect to DevTools directly"
|
|
599
|
+
}
|
|
600
|
+
},
|
|
457
601
|
{
|
|
458
602
|
flag: "--json",
|
|
459
603
|
description: {
|
|
@@ -481,6 +625,8 @@ const COMMON_ALLOWED_OPTIONS = new Set([
|
|
|
481
625
|
"--project",
|
|
482
626
|
"-t",
|
|
483
627
|
"--timeout",
|
|
628
|
+
"--runtime-url",
|
|
629
|
+
"--no-runtime-service",
|
|
484
630
|
"--json",
|
|
485
631
|
"--lang",
|
|
486
632
|
"-h",
|
|
@@ -748,6 +894,7 @@ function printCommandHelp(command) {
|
|
|
748
894
|
*/
|
|
749
895
|
async function runAutomatorCommand(command, argv) {
|
|
750
896
|
if (command === "screenshot") {
|
|
897
|
+
if (!argv.includes("-h") && !argv.includes("--help") && await tryRunRuntimeServiceCommand(command, argv)) return;
|
|
751
898
|
await runScreenshot(argv);
|
|
752
899
|
return;
|
|
753
900
|
}
|
|
@@ -762,6 +909,7 @@ async function runAutomatorCommand(command, argv) {
|
|
|
762
909
|
return;
|
|
763
910
|
}
|
|
764
911
|
validateUnsupportedOptions(command, argv, definition.allowedOptions);
|
|
912
|
+
if (await tryRunRuntimeServiceCommand(command, argv)) return;
|
|
765
913
|
const args = parseAutomatorArgs(argv);
|
|
766
914
|
await definition.handler({
|
|
767
915
|
argv,
|
|
@@ -845,7 +993,7 @@ function handleData(chunk) {
|
|
|
845
993
|
}
|
|
846
994
|
}
|
|
847
995
|
function handleKeypress(str, key) {
|
|
848
|
-
const activeExclusive = exclusiveKeypressStack.
|
|
996
|
+
const activeExclusive = exclusiveKeypressStack[exclusiveKeypressStack.length - 1];
|
|
849
997
|
if (activeExclusive) {
|
|
850
998
|
const now = Date.now();
|
|
851
999
|
const signature = `${key?.ctrl ? "ctrl+" : ""}${key?.name ?? str}`;
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as logger_default } from "./commands-
|
|
2
|
-
import { n as parse } from "./cli-
|
|
1
|
+
import { q as logger_default } from "./commands-5QkUqOoO.js";
|
|
2
|
+
import { n as parse } from "./cli-pFop_M4C.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
const argv = process.argv.slice(2);
|
|
@@ -834,7 +834,7 @@ function createScrollPositions(totalHeight, viewportHeight) {
|
|
|
834
834
|
const positions = [];
|
|
835
835
|
const lastStart = Math.max(totalHeight - viewportHeight, 0);
|
|
836
836
|
for (let scrollTop = 0; scrollTop < lastStart; scrollTop += viewportHeight) positions.push(scrollTop);
|
|
837
|
-
if (positions.
|
|
837
|
+
if (positions[positions.length - 1] !== lastStart) positions.push(lastStart);
|
|
838
838
|
return positions;
|
|
839
839
|
}
|
|
840
840
|
function cropPngRows(source, startRow, rowCount) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
-
import * as _$_weapp_vite_miniprogram_automator0 from "@weapp-vite/miniprogram-automator";
|
|
3
2
|
import { AutomatorElement, AutomatorMiniProgram, AutomatorPage, DevtoolsRuntimeSessionOptions, MiniProgramEventMap, closeSharedMiniProgram, getSharedMiniProgramSessionCount, releaseSharedMiniProgram } from "@weapp-vite/devtools-runtime";
|
|
4
3
|
import * as _$execa from "execa";
|
|
5
4
|
import * as _$cac from "cac";
|
|
@@ -51,7 +50,7 @@ declare function launchAutomator(options: AutomatorOptions): Promise<any>;
|
|
|
51
50
|
/**
|
|
52
51
|
* @description 连接当前项目已打开的开发者工具自动化会话,不触发新的 IDE 拉起。
|
|
53
52
|
*/
|
|
54
|
-
declare function connectOpenedAutomator(options: AutomatorOptions): Promise<
|
|
53
|
+
declare function connectOpenedAutomator(options: AutomatorOptions): Promise<unknown>;
|
|
55
54
|
//#endregion
|
|
56
55
|
//#region src/cli/automator-argv.d.ts
|
|
57
56
|
interface ParsedAutomatorArgs {
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as readCustomConfig, A as isAutomatorProtocolTimeoutError, B as getConfiguredLocale, D as formatAutomatorLoginError, E as connectOpenedAutomator, F as launchAutomator, G as operatingSystemName, H as SupportedPlatformsMap, I as bootstrapWechatDevtoolsSettings, J as createAutoBootstrapDevtoolsConfig, L as detectWechatDevtoolsServicePort, M as isDevtoolsExtensionContextInvalidatedError, N as isDevtoolsHttpPortError, O as getAutomatorProtocolTimeoutMethod, P as isRetryableAutomatorLaunchError, Q as overwriteCustomConfig, R as resolveCliPath, S as withMiniProgram, U as getDefaultCliPath, V as resolveDevtoolsAutomationDefaults, W as isOperatingSystemSupported, X as createCustomConfig, Y as createAutoTrustProjectConfig, Z as createLocaleConfig, _ as acquireSharedMiniProgram, a as navigateBack, b as getSharedMiniProgramSessionCount, c as pageStack, d as remote, et as removeCustomConfigKey, f as scrollTo, g as tap, h as takeScreenshot, i as input, j as isAutomatorWsConnectError, k as isAutomatorLoginError, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as defaultCustomConfigFilePath, o as navigateTo, p as switchTab, r as currentPage, rt as resolvePath, s as pageData, t as audit, tt as defaultCustomConfigDirPath, u as redirectTo, v as closeSharedMiniProgram, x as releaseSharedMiniProgram, y as connectMiniProgram, z as getConfig } from "./commands-
|
|
2
|
-
import { $ as resetWechatIdeFileUtilsByHttp, A as RETRY_CANCEL_KEYS, B as waitForRetryKeypress, C as refreshWechatIdeTicket, D as validateWechatCliCommandArgs, E as uploadWechatIde, F as formatRetryHotkeyPrompt, G as transformArgv, H as execute, I as formatWechatIdeLoginRequiredError, J as runWechatIdeEngineBuildByHttp, K as startForwardConsole, L as isWechatIdeLoginRequiredError, M as RETRY_PROMPT_INITIAL_IGNORE_MS, N as createWechatIdeLoginRequiredExitError, O as runWechatCliWithRetry, P as extractExecutionErrorText, Q as requestWechatDevtoolsHttp, R as promptRetryKeypress, S as quitWechatIde, St as removeOption, T as setWechatIdeTicket, U as createAlias, V as runMinidev, W as createPathCompat, X as openWechatIdeProjectByHttp, Y as WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, Z as pollWechatIdeEngineBuildResultByHttp, _ as isWechatIdeLoggedIn, _t as parseCompareArgs, a as autoReplayWechatIde, at as waitForExclusiveKeypress, b as openWechatIdeOtherProject, bt as readBooleanOption, c as buildWechatIdeIpa, ct as WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, d as clearWechatIdeCacheByAutomator, dt as AUTOMATOR_COMMAND_NAMES, et as startWechatIdeEngineBuildByHttp, f as closeWechatIdeProject, ft as getAutomatorCommandHelp, g as getWechatIdeToolInfo, gt as printScreenshotHelp, h as getWechatIdeTicket, ht as parseScreenshotArgs, i as autoPreviewWechatIde, it as runWithSuspendedSharedInput, j as RETRY_CONFIRM_KEYS, k as runRetryableCommand, l as buildWechatIdeNpm, lt as WECHAT_CLI_COMMAND_NAMES, m as getWechatIdeTestAccounts, mt as runAutomatorCommand, n as parse, nt as promptForCliPath, o as autoWechatIde, ot as CONFIG_COMMAND_NAME, p as compileWechatIdeByAutomator, pt as isAutomatorCommand, q as runWechatIdeEngineBuild, r as dispatchWechatCliCommand, rt as createSharedInputSession, s as buildWechatIdeApk, st as MINIDEV_NAMESPACE_COMMAND_NAMES, t as createCli, tt as handleConfigCommand, u as clearWechatIdeCache, ut as isWeappIdeTopLevelCommand, v as loginWechatIde, vt as printCompareHelp, w as resetWechatIdeFileUtils, x as previewWechatIde, xt as readOptionValue, y as openWechatIde, yt as parseAutomatorArgs, z as promptWechatIdeLoginRetry } from "./cli-
|
|
1
|
+
import { $ as readCustomConfig, A as isAutomatorProtocolTimeoutError, B as getConfiguredLocale, D as formatAutomatorLoginError, E as connectOpenedAutomator, F as launchAutomator, G as operatingSystemName, H as SupportedPlatformsMap, I as bootstrapWechatDevtoolsSettings, J as createAutoBootstrapDevtoolsConfig, L as detectWechatDevtoolsServicePort, M as isDevtoolsExtensionContextInvalidatedError, N as isDevtoolsHttpPortError, O as getAutomatorProtocolTimeoutMethod, P as isRetryableAutomatorLaunchError, Q as overwriteCustomConfig, R as resolveCliPath, S as withMiniProgram, U as getDefaultCliPath, V as resolveDevtoolsAutomationDefaults, W as isOperatingSystemSupported, X as createCustomConfig, Y as createAutoTrustProjectConfig, Z as createLocaleConfig, _ as acquireSharedMiniProgram, a as navigateBack, b as getSharedMiniProgramSessionCount, c as pageStack, d as remote, et as removeCustomConfigKey, f as scrollTo, g as tap, h as takeScreenshot, i as input, j as isAutomatorWsConnectError, k as isAutomatorLoginError, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as defaultCustomConfigFilePath, o as navigateTo, p as switchTab, r as currentPage, rt as resolvePath, s as pageData, t as audit, tt as defaultCustomConfigDirPath, u as redirectTo, v as closeSharedMiniProgram, x as releaseSharedMiniProgram, y as connectMiniProgram, z as getConfig } from "./commands-5QkUqOoO.js";
|
|
2
|
+
import { $ as resetWechatIdeFileUtilsByHttp, A as RETRY_CANCEL_KEYS, B as waitForRetryKeypress, C as refreshWechatIdeTicket, D as validateWechatCliCommandArgs, E as uploadWechatIde, F as formatRetryHotkeyPrompt, G as transformArgv, H as execute, I as formatWechatIdeLoginRequiredError, J as runWechatIdeEngineBuildByHttp, K as startForwardConsole, L as isWechatIdeLoginRequiredError, M as RETRY_PROMPT_INITIAL_IGNORE_MS, N as createWechatIdeLoginRequiredExitError, O as runWechatCliWithRetry, P as extractExecutionErrorText, Q as requestWechatDevtoolsHttp, R as promptRetryKeypress, S as quitWechatIde, St as removeOption, T as setWechatIdeTicket, U as createAlias, V as runMinidev, W as createPathCompat, X as openWechatIdeProjectByHttp, Y as WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, Z as pollWechatIdeEngineBuildResultByHttp, _ as isWechatIdeLoggedIn, _t as parseCompareArgs, a as autoReplayWechatIde, at as waitForExclusiveKeypress, b as openWechatIdeOtherProject, bt as readBooleanOption, c as buildWechatIdeIpa, ct as WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, d as clearWechatIdeCacheByAutomator, dt as AUTOMATOR_COMMAND_NAMES, et as startWechatIdeEngineBuildByHttp, f as closeWechatIdeProject, ft as getAutomatorCommandHelp, g as getWechatIdeToolInfo, gt as printScreenshotHelp, h as getWechatIdeTicket, ht as parseScreenshotArgs, i as autoPreviewWechatIde, it as runWithSuspendedSharedInput, j as RETRY_CONFIRM_KEYS, k as runRetryableCommand, l as buildWechatIdeNpm, lt as WECHAT_CLI_COMMAND_NAMES, m as getWechatIdeTestAccounts, mt as runAutomatorCommand, n as parse, nt as promptForCliPath, o as autoWechatIde, ot as CONFIG_COMMAND_NAME, p as compileWechatIdeByAutomator, pt as isAutomatorCommand, q as runWechatIdeEngineBuild, r as dispatchWechatCliCommand, rt as createSharedInputSession, s as buildWechatIdeApk, st as MINIDEV_NAMESPACE_COMMAND_NAMES, t as createCli, tt as handleConfigCommand, u as clearWechatIdeCache, ut as isWeappIdeTopLevelCommand, v as loginWechatIde, vt as printCompareHelp, w as resetWechatIdeFileUtils, x as previewWechatIde, xt as readOptionValue, y as openWechatIde, yt as parseAutomatorArgs, z as promptWechatIdeLoginRetry } from "./cli-pFop_M4C.js";
|
|
3
3
|
export { AUTOMATOR_COMMAND_NAMES, CONFIG_COMMAND_NAME, MINIDEV_NAMESPACE_COMMAND_NAMES, RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, RETRY_PROMPT_INITIAL_IGNORE_MS, SupportedPlatformsMap, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, acquireSharedMiniProgram, audit, autoPreviewWechatIde, autoReplayWechatIde, autoWechatIde, bootstrapWechatDevtoolsSettings, buildWechatIdeApk, buildWechatIdeIpa, buildWechatIdeNpm, captureScreenshotBuffer, clearWechatIdeCache, clearWechatIdeCacheByAutomator, closeSharedMiniProgram, closeWechatIdeProject, compileWechatIdeByAutomator, connectMiniProgram, connectOpenedAutomator, createAlias, createAutoBootstrapDevtoolsConfig, createAutoTrustProjectConfig, createCli, createCustomConfig, createLocaleConfig, createPathCompat, createSharedInputSession, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getAutomatorProtocolTimeoutMethod, getConfig, getConfiguredLocale, getDefaultCliPath, getSharedMiniProgramSessionCount, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isAutomatorProtocolTimeoutError, isAutomatorWsConnectError, isDevtoolsExtensionContextInvalidatedError, isDevtoolsHttpPortError, isOperatingSystemSupported, isRetryableAutomatorLaunchError, isWeappIdeTopLevelCommand, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, launchAutomator, loginWechatIde, navigateBack, navigateTo, openWechatIde, openWechatIdeOtherProject, openWechatIdeProjectByHttp, operatingSystemName, overwriteCustomConfig, pageData, pageStack, parse, parseAutomatorArgs, parseCompareArgs, parseScreenshotArgs, pollWechatIdeEngineBuildResultByHttp, previewWechatIde, printCompareHelp, printScreenshotHelp, promptForCliPath, promptRetryKeypress, promptWechatIdeLoginRetry, quitWechatIde, reLaunch, readBooleanOption, readCustomConfig, readOptionValue, redirectTo, refreshWechatIdeTicket, releaseSharedMiniProgram, remote, removeCustomConfigKey, removeOption, requestWechatDevtoolsHttp, resetWechatIdeFileUtils, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveDevtoolsAutomationDefaults, resolvePath, runAutomatorCommand, runMinidev, runRetryableCommand, runWechatCliWithRetry, runWechatIdeEngineBuild, runWechatIdeEngineBuildByHttp, runWithSuspendedSharedInput, scrollTo, setWechatIdeTicket, startForwardConsole, startWechatIdeEngineBuildByHttp, switchTab, systemInfo, takeScreenshot, tap, transformArgv, uploadWechatIde, validateWechatCliCommandArgs, waitForExclusiveKeypress, 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.2.
|
|
4
|
+
"version": "5.2.9",
|
|
5
5
|
"description": "让微信开发者工具,用起来更加方便!",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"pngjs": "^7.0.0",
|
|
70
70
|
"@weapp-core/logger": "^3.1.1",
|
|
71
71
|
"@weapp-core/shared": "^3.0.4",
|
|
72
|
-
"@weapp-vite/devtools-runtime": "0.2.
|
|
73
|
-
"@weapp-vite/miniprogram-automator": "1.0
|
|
72
|
+
"@weapp-vite/devtools-runtime": "0.2.2",
|
|
73
|
+
"@weapp-vite/miniprogram-automator": "1.1.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"dev": "tsdown -w --sourcemap",
|