weapp-ide-cli 6.0.5 → 6.0.6
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/{automator-session-ec0i76Cx.js → automator-session-CkojbnCg.js} +17 -4
- package/dist/{cli-B8HQUwg3.js → cli-DSrMNDWQ.js} +5 -5
- package/dist/cli.js +2 -2
- package/dist/{commands-DuTTBEs8.js → commands-Ijtoy2_F.js} +11 -8
- package/dist/commands-qLfRse7L.js +2 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.js +4 -4
- package/dist/{run-mcp-DPz-bwrD.js → run-mcp-CUUdfBm7.js} +1 -1
- package/dist/run-mcp-D1G1d_Le.js +2 -0
- package/package.json +4 -4
- package/dist/commands-BXY57tfS.js +0 -2
- package/dist/run-mcp-BFYPend3.js +0 -2
|
@@ -151,13 +151,25 @@ async function copyProjectRoot(sourceProjectPath, wrapperProjectPath, relativeRo
|
|
|
151
151
|
recursive: true
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
+
function createWrapperProjectConfig(source, patch) {
|
|
155
|
+
const { miniprogramRoot: _miniprogramRoot, qcloudRoot: _qcloudRoot, srcMiniprogramRoot: _srcMiniprogramRoot, ...rest } = source;
|
|
156
|
+
const sourceSetting = source.setting && typeof source.setting === "object" ? source.setting : {};
|
|
157
|
+
const patchSetting = patch.setting && typeof patch.setting === "object" ? patch.setting : {};
|
|
158
|
+
return {
|
|
159
|
+
...rest,
|
|
160
|
+
...patch,
|
|
161
|
+
setting: {
|
|
162
|
+
...sourceSetting,
|
|
163
|
+
...patchSetting,
|
|
164
|
+
packNpmManually: false,
|
|
165
|
+
packNpmRelationList: []
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
154
169
|
async function copyJsonConfigAsWrapper(sourcePath, targetPath, patch) {
|
|
155
170
|
const source = await readJsonObject$1(sourcePath);
|
|
156
171
|
if (!source) return;
|
|
157
|
-
await writeJsonObject$1(targetPath,
|
|
158
|
-
...source,
|
|
159
|
-
...patch
|
|
160
|
-
});
|
|
172
|
+
await writeJsonObject$1(targetPath, createWrapperProjectConfig(source, patch));
|
|
161
173
|
}
|
|
162
174
|
async function ensureWrapperAppConfig(wrapperProjectPath) {
|
|
163
175
|
const appConfigPath = path.join(wrapperProjectPath, "app.json");
|
|
@@ -199,6 +211,7 @@ async function resolveAutomatorProjectPath(projectPath) {
|
|
|
199
211
|
const pluginRoot = normalizeProjectRelativeRoot(projectConfig?.pluginRoot);
|
|
200
212
|
if (pluginRoot) await copyProjectRoot(sourceProjectPath, wrapperProjectPath, pluginRoot);
|
|
201
213
|
const rootPatch = {
|
|
214
|
+
compileType: projectConfig?.compileType === "plugin" ? "plugin" : "miniprogram",
|
|
202
215
|
miniprogramRoot: "./",
|
|
203
216
|
srcMiniprogramRoot: "./"
|
|
204
217
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as overwriteCustomConfig, C as configureLocaleFromArgv, H as resolveDevtoolsAutomationDefaults, J as logger_default, Q as createLocaleConfig, T as validateLocaleOption, V as getConfiguredLocale, X as createAutoTrustProjectConfig, Y as createAutoBootstrapDevtoolsConfig, Z as createCustomConfig, a as releaseSharedMiniProgram, et as readCustomConfig, q as colors, r as connectMiniProgram, rt as defaultCustomConfigFilePath, t as acquireSharedMiniProgram, tt as removeCustomConfigKey, w as i18nText, z as resolveCliPath } from "./automator-session-
|
|
2
|
-
import { A as isWechatIdeLoggedIn, B as runWechatCliCommand, C as clearWechatIdeCache, F as quitWechatIde, G as transformArgv, H as execute, K as promptForCliPath, L as resetWechatIdeFileUtils, M as openWechatIde, N as openWechatIdeOtherProject, P as previewWechatIde, Q as startWechatIdeEngineBuildByHttp, S as buildWechatIdeNpm, T as closeWechatIdeProject, U as createAlias, W as createPathCompat, Y as pollWechatIdeEngineBuildResultByHttp, _ as autoPreviewWechatIde, a as navigateBack, b as buildWechatIdeApk, c as pageStack, d as remote, f as scrollTo, g as tap, i as input, it as removeOption, j as loginWechatIde, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as readBooleanOption, o as navigateTo, p as switchTab, r as currentPage, rt as readOptionValue, s as pageData, t as audit, tt as parseAutomatorArgs, u as redirectTo, v as autoReplayWechatIde, x as buildWechatIdeIpa, y as autoWechatIde, z as uploadWechatIde } from "./commands-
|
|
3
|
-
import "./run-mcp-
|
|
1
|
+
import { $ as overwriteCustomConfig, C as configureLocaleFromArgv, H as resolveDevtoolsAutomationDefaults, J as logger_default, Q as createLocaleConfig, T as validateLocaleOption, V as getConfiguredLocale, X as createAutoTrustProjectConfig, Y as createAutoBootstrapDevtoolsConfig, Z as createCustomConfig, a as releaseSharedMiniProgram, et as readCustomConfig, q as colors, r as connectMiniProgram, rt as defaultCustomConfigFilePath, t as acquireSharedMiniProgram, tt as removeCustomConfigKey, w as i18nText, z as resolveCliPath } from "./automator-session-CkojbnCg.js";
|
|
2
|
+
import { A as isWechatIdeLoggedIn, B as runWechatCliCommand, C as clearWechatIdeCache, F as quitWechatIde, G as transformArgv, H as execute, K as promptForCliPath, L as resetWechatIdeFileUtils, M as openWechatIde, N as openWechatIdeOtherProject, P as previewWechatIde, Q as startWechatIdeEngineBuildByHttp, S as buildWechatIdeNpm, T as closeWechatIdeProject, U as createAlias, W as createPathCompat, Y as pollWechatIdeEngineBuildResultByHttp, _ as autoPreviewWechatIde, a as navigateBack, b as buildWechatIdeApk, c as pageStack, d as remote, f as scrollTo, g as tap, i as input, it as removeOption, j as loginWechatIde, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as readBooleanOption, o as navigateTo, p as switchTab, r as currentPage, rt as readOptionValue, s as pageData, t as audit, tt as parseAutomatorArgs, u as redirectTo, v as autoReplayWechatIde, x as buildWechatIdeIpa, y as autoWechatIde, z as uploadWechatIde } from "./commands-Ijtoy2_F.js";
|
|
3
|
+
import "./run-mcp-CUUdfBm7.js";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fs as fs$1 } from "@weapp-core/shared/fs";
|
|
@@ -313,7 +313,7 @@ async function runScreenshot(argv) {
|
|
|
313
313
|
}
|
|
314
314
|
const options = parseScreenshotArgs(argv);
|
|
315
315
|
const isJsonOutput = argv.includes("--json");
|
|
316
|
-
const { takeScreenshot } = await import("./commands-
|
|
316
|
+
const { takeScreenshot } = await import("./commands-qLfRse7L.js");
|
|
317
317
|
const result = await takeScreenshot(options);
|
|
318
318
|
if (isJsonOutput) {
|
|
319
319
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -1734,7 +1734,7 @@ async function parse(argv) {
|
|
|
1734
1734
|
return;
|
|
1735
1735
|
}
|
|
1736
1736
|
if (matchedCommand === "mcp") {
|
|
1737
|
-
const { runMcpCommand } = await import("./run-mcp-
|
|
1737
|
+
const { runMcpCommand } = await import("./run-mcp-D1G1d_Le.js");
|
|
1738
1738
|
await runMcpCommand(argv.slice(1));
|
|
1739
1739
|
return;
|
|
1740
1740
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as logger_default } from "./automator-session-
|
|
2
|
-
import { n as parse } from "./cli-
|
|
1
|
+
import { J as logger_default } from "./automator-session-CkojbnCg.js";
|
|
2
|
+
import { n as parse } from "./cli-DSrMNDWQ.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
const argv = process.argv.slice(2);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as isOperatingSystemSupported, J as logger_default, K as operatingSystemName, L as bootstrapWechatDevtoolsSettings, R as detectWechatDevtoolsServicePort, Z as createCustomConfig, d as createWechatIdeLoginRequiredExitError, et as readCustomConfig, h as isWechatIdeLoginRequiredError, it as resolvePath, n as closeSharedMiniProgram, o as withMiniProgram, q as colors, rt as defaultCustomConfigFilePath, s as runRetryableCommand, v as promptWechatIdeLoginRetry, w as i18nText, x as runWithSuspendedSharedInput, z as resolveCliPath } from "./automator-session-
|
|
1
|
+
import { G as isOperatingSystemSupported, J as logger_default, K as operatingSystemName, L as bootstrapWechatDevtoolsSettings, R as detectWechatDevtoolsServicePort, Z as createCustomConfig, d as createWechatIdeLoginRequiredExitError, et as readCustomConfig, h as isWechatIdeLoginRequiredError, it as resolvePath, n as closeSharedMiniProgram, o as withMiniProgram, q as colors, rt as defaultCustomConfigFilePath, s as runRetryableCommand, v as promptWechatIdeLoginRetry, w as i18nText, x as runWithSuspendedSharedInput, z as resolveCliPath } from "./automator-session-CkojbnCg.js";
|
|
2
2
|
import { Buffer } from "node:buffer";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
@@ -670,7 +670,7 @@ function captureWechatDevtoolsServicePort(result) {
|
|
|
670
670
|
/**
|
|
671
671
|
* @description 运行微信开发者工具 CLI,并在登录失效时允许按键重试。
|
|
672
672
|
*/
|
|
673
|
-
async function runWechatCliWithRetry(cliPath, argv) {
|
|
673
|
+
async function runWechatCliWithRetry(cliPath, argv, options = {}) {
|
|
674
674
|
const loginRetryOptions = resolveLoginRetryConfig(argv);
|
|
675
675
|
const result = await runWithSuspendedSharedInput(async () => {
|
|
676
676
|
return await runRetryableCommand({
|
|
@@ -705,7 +705,7 @@ async function runWechatCliWithRetry(cliPath, argv) {
|
|
|
705
705
|
if (result.kind === "retryable") throw createWechatIdeLoginRequiredExitError(result.error);
|
|
706
706
|
if (isWechatIdeLoginRequiredError(result.value)) throw createWechatIdeLoginRequiredExitError(result.value);
|
|
707
707
|
captureWechatDevtoolsServicePort(result.value);
|
|
708
|
-
flushExecutionOutput(result.value);
|
|
708
|
+
if (!options.silent) flushExecutionOutput(result.value);
|
|
709
709
|
}
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region src/cli/run-wechat-cli.ts
|
|
@@ -759,7 +759,7 @@ async function maybeBootstrapWechatDevtoolsSettings(argv) {
|
|
|
759
759
|
/**
|
|
760
760
|
* @description 执行微信开发者工具 CLI 阶段,包括环境检查、路径解析、bootstrap 与登录重试。
|
|
761
761
|
*/
|
|
762
|
-
async function runWechatCliCommand(argv) {
|
|
762
|
+
async function runWechatCliCommand(argv, options = {}) {
|
|
763
763
|
if (!isOperatingSystemSupported(operatingSystemName)) {
|
|
764
764
|
logger_default.warn(i18nText(`微信web开发者工具不支持当前平台:${operatingSystemName} !`, `Wechat Web DevTools CLI is not supported on current platform: ${operatingSystemName}!`));
|
|
765
765
|
return;
|
|
@@ -770,8 +770,8 @@ async function runWechatCliCommand(argv) {
|
|
|
770
770
|
return;
|
|
771
771
|
}
|
|
772
772
|
const wakeArgv = createAutoPreviewWakeArgv(argv, (await maybeBootstrapWechatDevtoolsSettings(argv))?.trustProject);
|
|
773
|
-
if (wakeArgv) await runWechatCliWithRetry(cliPath, wakeArgv);
|
|
774
|
-
await runWechatCliWithRetry(cliPath, argv);
|
|
773
|
+
if (wakeArgv) await runWechatCliWithRetry(cliPath, wakeArgv, options);
|
|
774
|
+
await runWechatCliWithRetry(cliPath, argv, options);
|
|
775
775
|
}
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region src/cli/wechat-commands.ts
|
|
@@ -804,8 +804,11 @@ async function loginWechatIde(options = {}) {
|
|
|
804
804
|
/**
|
|
805
805
|
* @description 调用微信开发者工具 islogin 命令。
|
|
806
806
|
*/
|
|
807
|
-
async function isWechatIdeLoggedIn() {
|
|
808
|
-
|
|
807
|
+
async function isWechatIdeLoggedIn(options = {}) {
|
|
808
|
+
const argv = ["islogin"];
|
|
809
|
+
if (options.nonInteractive) argv.push("--non-interactive");
|
|
810
|
+
if (options.silent) await runWechatCliCommand(argv, { silent: true });
|
|
811
|
+
else await runWechatCliCommand(argv);
|
|
809
812
|
}
|
|
810
813
|
/**
|
|
811
814
|
* @description 调用微信开发者工具 build-npm 命令。
|
package/dist/index.d.ts
CHANGED
|
@@ -465,10 +465,13 @@ declare function getAutomatorCommandHelp(command: string): string | undefined;
|
|
|
465
465
|
declare function runAutomatorCommand(command: string, argv: string[]): Promise<void>;
|
|
466
466
|
//#endregion
|
|
467
467
|
//#region src/cli/run-login.d.ts
|
|
468
|
+
interface RunWechatCliWithRetryOptions {
|
|
469
|
+
silent?: boolean;
|
|
470
|
+
}
|
|
468
471
|
/**
|
|
469
472
|
* @description 运行微信开发者工具 CLI,并在登录失效时允许按键重试。
|
|
470
473
|
*/
|
|
471
|
-
declare function runWechatCliWithRetry(cliPath: string, argv: string[]): Promise<void>;
|
|
474
|
+
declare function runWechatCliWithRetry(cliPath: string, argv: string[], options?: RunWechatCliWithRetryOptions): Promise<void>;
|
|
472
475
|
//#endregion
|
|
473
476
|
//#region src/cli/run-login-executor.d.ts
|
|
474
477
|
interface RetryableCommandExecutorOptions<TResult, TPromptResult> {
|
|
@@ -639,7 +642,10 @@ declare function loginWechatIde(options?: LoginWechatIdeOptions): Promise<void>;
|
|
|
639
642
|
/**
|
|
640
643
|
* @description 调用微信开发者工具 islogin 命令。
|
|
641
644
|
*/
|
|
642
|
-
declare function isWechatIdeLoggedIn(
|
|
645
|
+
declare function isWechatIdeLoggedIn(options?: {
|
|
646
|
+
nonInteractive?: boolean;
|
|
647
|
+
silent?: boolean;
|
|
648
|
+
}): Promise<void>;
|
|
643
649
|
/**
|
|
644
650
|
* @description 调用微信开发者工具 build-npm 命令。
|
|
645
651
|
*/
|
|
@@ -963,4 +969,4 @@ declare function execute(cliPath: string, argv: string[], options?: ExecuteOptio
|
|
|
963
969
|
*/
|
|
964
970
|
declare function resolvePath(filePath: string): string;
|
|
965
971
|
//#endregion
|
|
966
|
-
export { AUTOMATOR_COMMAND_NAMES, ArgvTransform, AuditOptions, AutoPreviewWechatIdeOptions, AutoReplayWechatIdeOptions, AutoWechatIdeOptions, AutomatorCommandOptions, AutomatorOptions, AutomatorSessionOptions, type BaseConfig, BootstrapWechatDevtoolsSettingsOptions, BootstrapWechatDevtoolsSettingsResult, BuildWechatIdeApkOptions, BuildWechatIdeIpaOptions, BuildWechatIdeNpmOptions, CONFIG_COMMAND_NAME, ClearWechatIdeCacheByAutomatorOptions, ClearWechatIdeCacheOptions, CompileWechatIdeByAutomatorOptions, type ConfigSource, DetectWechatDevtoolsServicePortOptions, DetectWechatDevtoolsServicePortResult, DetectedWechatDevtoolsServicePortSettings, type DevtoolsConnectionInput, type DevtoolsContext, type DevtoolsElementSnapshot, type DevtoolsPageSnapshot, type DevtoolsToolResult, ExclusiveKeypressOptions, ForwardConsoleEvent, ForwardConsoleLogLevel, ForwardConsoleOptions, ForwardConsoleSession, InputOptions, LoginWechatIdeOptions, MCP_COMMAND_NAME, MINIDEV_NAMESPACE_COMMAND_NAMES, McpCommandOptions, MiniProgramElement, type MiniProgramEventMap, MiniProgramLike, MiniProgramPage, NavigateOptions, OpenWechatIdeOptions, OpenWechatIdeOtherProjectOptions, PageDataOptions, PageInfoOptions, ParsedAutomatorArgs, PollWechatIdeEngineBuildResult, PreviewWechatIdeOptions, RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, RETRY_PROMPT_INITIAL_IGNORE_MS, RemoteOptions, ResetWechatIdeFileUtilsOptions, type ResolvedConfig, RetryKeypressOptions, RetryLogger, RetryPromptOptions, RetryPromptResult, RetryableCommandExecutorOptions, RunWechatIdeEngineBuildByHttpOptions, RunWechatIdeEngineBuildOptions, ScreenshotOptions, ScreenshotResult, ScrollOptions, SelectorOptions, SetWechatIdeTicketOptions, SharedInputSession, SharedInputSessionOptions, StartWeappIdeMcpServerOptions, StartWechatIdeEngineBuildResult, SupportedPlatform, SupportedPlatformsMap, TapOptions, UploadWechatIdeOptions, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, WeappIdeMcpRuntimeHooks, WeappIdeMcpServerHandle, WeappIdeMcpServerOptions, WechatDevtoolsEngineBuildResult, WechatDevtoolsHttpCommandOptions, WechatDevtoolsSecuritySettings, WechatIdeAutomatorSessionOptions, WechatIdeLoginRetryOptions, 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, createWeappIdeMcpServer, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getAutomatorProtocolTimeoutMethod, getConfig, getConfiguredLocale, getDefaultCliPath, getRuntimeWechatDevtoolsServicePort, getSharedMiniProgramSessionCount, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isAutomatorProtocolTimeoutError, isAutomatorWsConnectError, isDevtoolsExtensionContextInvalidatedError, isDevtoolsHttpPortError, isOperatingSystemSupported, isRetryableAutomatorLaunchError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, 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, readElementSnapshot, readOptionValue, redirectTo, refreshWechatIdeTicket, registerWeappIdeMcpTools, releaseSharedMiniProgram, remote, removeCustomConfigKey, removeOption, requestWechatDevtoolsHttp, resetWechatIdeFileUtils, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveDevtoolsAutomationDefaults, resolvePath, resolveProjectAutomatorPort, resolveProjectPath, runAutomatorCommand, runMcpCommand, runMinidev, runRetryableCommand, runWechatCliWithRetry, runWechatIdeEngineBuild, runWechatIdeEngineBuildByHttp, runWithSuspendedSharedInput, scrollTo, setRuntimeWechatDevtoolsServicePort, setWechatIdeTicket, startForwardConsole, startWeappIdeMcpServer, startWechatIdeEngineBuildByHttp, switchTab, systemInfo, takeScreenshot, tap, toSerializableValue, transformArgv, uploadWechatIde, validateWechatCliCommandArgs, waitForExclusiveKeypress, waitForRetryKeypress, withMiniProgram };
|
|
972
|
+
export { AUTOMATOR_COMMAND_NAMES, ArgvTransform, AuditOptions, AutoPreviewWechatIdeOptions, AutoReplayWechatIdeOptions, AutoWechatIdeOptions, AutomatorCommandOptions, AutomatorOptions, AutomatorSessionOptions, type BaseConfig, BootstrapWechatDevtoolsSettingsOptions, BootstrapWechatDevtoolsSettingsResult, BuildWechatIdeApkOptions, BuildWechatIdeIpaOptions, BuildWechatIdeNpmOptions, CONFIG_COMMAND_NAME, ClearWechatIdeCacheByAutomatorOptions, ClearWechatIdeCacheOptions, CompileWechatIdeByAutomatorOptions, type ConfigSource, DetectWechatDevtoolsServicePortOptions, DetectWechatDevtoolsServicePortResult, DetectedWechatDevtoolsServicePortSettings, type DevtoolsConnectionInput, type DevtoolsContext, type DevtoolsElementSnapshot, type DevtoolsPageSnapshot, type DevtoolsToolResult, ExclusiveKeypressOptions, ForwardConsoleEvent, ForwardConsoleLogLevel, ForwardConsoleOptions, ForwardConsoleSession, InputOptions, LoginWechatIdeOptions, MCP_COMMAND_NAME, MINIDEV_NAMESPACE_COMMAND_NAMES, McpCommandOptions, MiniProgramElement, type MiniProgramEventMap, MiniProgramLike, MiniProgramPage, NavigateOptions, OpenWechatIdeOptions, OpenWechatIdeOtherProjectOptions, PageDataOptions, PageInfoOptions, ParsedAutomatorArgs, PollWechatIdeEngineBuildResult, PreviewWechatIdeOptions, RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, RETRY_PROMPT_INITIAL_IGNORE_MS, RemoteOptions, ResetWechatIdeFileUtilsOptions, type ResolvedConfig, RetryKeypressOptions, RetryLogger, RetryPromptOptions, RetryPromptResult, RetryableCommandExecutorOptions, RunWechatCliWithRetryOptions, RunWechatIdeEngineBuildByHttpOptions, RunWechatIdeEngineBuildOptions, ScreenshotOptions, ScreenshotResult, ScrollOptions, SelectorOptions, SetWechatIdeTicketOptions, SharedInputSession, SharedInputSessionOptions, StartWeappIdeMcpServerOptions, StartWechatIdeEngineBuildResult, SupportedPlatform, SupportedPlatformsMap, TapOptions, UploadWechatIdeOptions, WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, WECHAT_CLI_COMMAND_NAMES, WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, WeappIdeMcpRuntimeHooks, WeappIdeMcpServerHandle, WeappIdeMcpServerOptions, WechatDevtoolsEngineBuildResult, WechatDevtoolsHttpCommandOptions, WechatDevtoolsSecuritySettings, WechatIdeAutomatorSessionOptions, WechatIdeLoginRetryOptions, 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, createWeappIdeMcpServer, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getAutomatorProtocolTimeoutMethod, getConfig, getConfiguredLocale, getDefaultCliPath, getRuntimeWechatDevtoolsServicePort, getSharedMiniProgramSessionCount, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isAutomatorProtocolTimeoutError, isAutomatorWsConnectError, isDevtoolsExtensionContextInvalidatedError, isDevtoolsHttpPortError, isOperatingSystemSupported, isRetryableAutomatorLaunchError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, 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, readElementSnapshot, readOptionValue, redirectTo, refreshWechatIdeTicket, registerWeappIdeMcpTools, releaseSharedMiniProgram, remote, removeCustomConfigKey, removeOption, requestWechatDevtoolsHttp, resetWechatIdeFileUtils, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveDevtoolsAutomationDefaults, resolvePath, resolveProjectAutomatorPort, resolveProjectPath, runAutomatorCommand, runMcpCommand, runMinidev, runRetryableCommand, runWechatCliWithRetry, runWechatIdeEngineBuild, runWechatIdeEngineBuildByHttp, runWithSuspendedSharedInput, scrollTo, setRuntimeWechatDevtoolsServicePort, setWechatIdeTicket, startForwardConsole, startWeappIdeMcpServer, startWechatIdeEngineBuildByHttp, switchTab, systemInfo, takeScreenshot, tap, toSerializableValue, transformArgv, uploadWechatIde, validateWechatCliCommandArgs, waitForExclusiveKeypress, waitForRetryKeypress, withMiniProgram };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as overwriteCustomConfig, A as isAutomatorProtocolTimeoutError, B as getConfig, D as formatAutomatorLoginError, E as connectOpenedAutomator, F as launchAutomator, G as isOperatingSystemSupported, H as resolveDevtoolsAutomationDefaults, I as resolveProjectAutomatorPort, K as operatingSystemName, L as bootstrapWechatDevtoolsSettings, M as isDevtoolsExtensionContextInvalidatedError, N as isDevtoolsHttpPortError, O as getAutomatorProtocolTimeoutMethod, P as isRetryableAutomatorLaunchError, Q as createLocaleConfig, R as detectWechatDevtoolsServicePort, S as waitForExclusiveKeypress, U as SupportedPlatformsMap, V as getConfiguredLocale, W as getDefaultCliPath, X as createAutoTrustProjectConfig, Y as createAutoBootstrapDevtoolsConfig, Z as createCustomConfig, _ as promptRetryKeypress, a as releaseSharedMiniProgram, b as createSharedInputSession, c as RETRY_CANCEL_KEYS, d as createWechatIdeLoginRequiredExitError, et as readCustomConfig, f as extractExecutionErrorText, g as isWechatIdeLoginRequiredExitError, h as isWechatIdeLoginRequiredError, i as getSharedMiniProgramSessionCount, it as resolvePath, j as isAutomatorWsConnectError, k as isAutomatorLoginError, l as RETRY_CONFIRM_KEYS, m as formatWechatIdeLoginRequiredError, n as closeSharedMiniProgram, nt as defaultCustomConfigDirPath, o as withMiniProgram, p as formatRetryHotkeyPrompt, r as connectMiniProgram, rt as defaultCustomConfigFilePath, s as runRetryableCommand, t as acquireSharedMiniProgram, tt as removeCustomConfigKey, u as RETRY_PROMPT_INITIAL_IGNORE_MS, v as promptWechatIdeLoginRetry, x as runWithSuspendedSharedInput, y as waitForRetryKeypress, z as resolveCliPath } from "./automator-session-
|
|
2
|
-
import { $ as getRuntimeWechatDevtoolsServicePort, A as isWechatIdeLoggedIn, C as clearWechatIdeCache, D as getWechatIdeTestAccounts, E as compileWechatIdeByAutomator, F as quitWechatIde, G as transformArgv, H as execute, I as refreshWechatIdeTicket, J as openWechatIdeProjectByHttp, K as promptForCliPath, L as resetWechatIdeFileUtils, M as openWechatIde, N as openWechatIdeOtherProject, O as getWechatIdeTicket, P as previewWechatIde, Q as startWechatIdeEngineBuildByHttp, R as setWechatIdeTicket, S as buildWechatIdeNpm, T as closeWechatIdeProject, U as createAlias, V as runWechatCliWithRetry, W as createPathCompat, X as requestWechatDevtoolsHttp, Y as pollWechatIdeEngineBuildResultByHttp, Z as resetWechatIdeFileUtilsByHttp, _ as autoPreviewWechatIde, a as navigateBack, b as buildWechatIdeApk, c as pageStack, d as remote, et as setRuntimeWechatDevtoolsServicePort, f as scrollTo, g as tap, h as takeScreenshot, i as input, it as removeOption, j as loginWechatIde, k as getWechatIdeToolInfo, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as readBooleanOption, o as navigateTo, p as switchTab, q as WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, r as currentPage, rt as readOptionValue, s as pageData, t as audit, tt as parseAutomatorArgs, u as redirectTo, v as autoReplayWechatIde, w as clearWechatIdeCacheByAutomator, x as buildWechatIdeIpa, y as autoWechatIde, z as uploadWechatIde } from "./commands-
|
|
3
|
-
import { C as parseCompareArgs, S as printScreenshotHelp, _ as AUTOMATOR_COMMAND_NAMES, a as runMinidev, b as runAutomatorCommand, c as runWechatIdeEngineBuild, d as CONFIG_COMMAND_NAME, f as MCP_COMMAND_NAME, g as isWeappIdeTopLevelCommand, h as WECHAT_CLI_COMMAND_NAMES, i as validateWechatCliCommandArgs, l as runWechatIdeEngineBuildByHttp, m as WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, n as parse, o as startForwardConsole, p as MINIDEV_NAMESPACE_COMMAND_NAMES, r as dispatchWechatCliCommand, s as isWechatIdeEngineBuildEndpointMissingError, t as createCli, u as handleConfigCommand, v as getAutomatorCommandHelp, w as printCompareHelp, x as parseScreenshotArgs, y as isAutomatorCommand } from "./cli-
|
|
4
|
-
import { a as readElementSnapshot, i as registerWeappIdeMcpTools, n as startWeappIdeMcpServer, o as resolveProjectPath, r as createWeappIdeMcpServer, s as toSerializableValue, t as runMcpCommand } from "./run-mcp-
|
|
1
|
+
import { $ as overwriteCustomConfig, A as isAutomatorProtocolTimeoutError, B as getConfig, D as formatAutomatorLoginError, E as connectOpenedAutomator, F as launchAutomator, G as isOperatingSystemSupported, H as resolveDevtoolsAutomationDefaults, I as resolveProjectAutomatorPort, K as operatingSystemName, L as bootstrapWechatDevtoolsSettings, M as isDevtoolsExtensionContextInvalidatedError, N as isDevtoolsHttpPortError, O as getAutomatorProtocolTimeoutMethod, P as isRetryableAutomatorLaunchError, Q as createLocaleConfig, R as detectWechatDevtoolsServicePort, S as waitForExclusiveKeypress, U as SupportedPlatformsMap, V as getConfiguredLocale, W as getDefaultCliPath, X as createAutoTrustProjectConfig, Y as createAutoBootstrapDevtoolsConfig, Z as createCustomConfig, _ as promptRetryKeypress, a as releaseSharedMiniProgram, b as createSharedInputSession, c as RETRY_CANCEL_KEYS, d as createWechatIdeLoginRequiredExitError, et as readCustomConfig, f as extractExecutionErrorText, g as isWechatIdeLoginRequiredExitError, h as isWechatIdeLoginRequiredError, i as getSharedMiniProgramSessionCount, it as resolvePath, j as isAutomatorWsConnectError, k as isAutomatorLoginError, l as RETRY_CONFIRM_KEYS, m as formatWechatIdeLoginRequiredError, n as closeSharedMiniProgram, nt as defaultCustomConfigDirPath, o as withMiniProgram, p as formatRetryHotkeyPrompt, r as connectMiniProgram, rt as defaultCustomConfigFilePath, s as runRetryableCommand, t as acquireSharedMiniProgram, tt as removeCustomConfigKey, u as RETRY_PROMPT_INITIAL_IGNORE_MS, v as promptWechatIdeLoginRetry, x as runWithSuspendedSharedInput, y as waitForRetryKeypress, z as resolveCliPath } from "./automator-session-CkojbnCg.js";
|
|
2
|
+
import { $ as getRuntimeWechatDevtoolsServicePort, A as isWechatIdeLoggedIn, C as clearWechatIdeCache, D as getWechatIdeTestAccounts, E as compileWechatIdeByAutomator, F as quitWechatIde, G as transformArgv, H as execute, I as refreshWechatIdeTicket, J as openWechatIdeProjectByHttp, K as promptForCliPath, L as resetWechatIdeFileUtils, M as openWechatIde, N as openWechatIdeOtherProject, O as getWechatIdeTicket, P as previewWechatIde, Q as startWechatIdeEngineBuildByHttp, R as setWechatIdeTicket, S as buildWechatIdeNpm, T as closeWechatIdeProject, U as createAlias, V as runWechatCliWithRetry, W as createPathCompat, X as requestWechatDevtoolsHttp, Y as pollWechatIdeEngineBuildResultByHttp, Z as resetWechatIdeFileUtilsByHttp, _ as autoPreviewWechatIde, a as navigateBack, b as buildWechatIdeApk, c as pageStack, d as remote, et as setRuntimeWechatDevtoolsServicePort, f as scrollTo, g as tap, h as takeScreenshot, i as input, it as removeOption, j as loginWechatIde, k as getWechatIdeToolInfo, l as reLaunch, m as systemInfo, n as captureScreenshotBuffer, nt as readBooleanOption, o as navigateTo, p as switchTab, q as WECHAT_DEVTOOLS_ENGINE_BUILD_STATUSES, r as currentPage, rt as readOptionValue, s as pageData, t as audit, tt as parseAutomatorArgs, u as redirectTo, v as autoReplayWechatIde, w as clearWechatIdeCacheByAutomator, x as buildWechatIdeIpa, y as autoWechatIde, z as uploadWechatIde } from "./commands-Ijtoy2_F.js";
|
|
3
|
+
import { C as parseCompareArgs, S as printScreenshotHelp, _ as AUTOMATOR_COMMAND_NAMES, a as runMinidev, b as runAutomatorCommand, c as runWechatIdeEngineBuild, d as CONFIG_COMMAND_NAME, f as MCP_COMMAND_NAME, g as isWeappIdeTopLevelCommand, h as WECHAT_CLI_COMMAND_NAMES, i as validateWechatCliCommandArgs, l as runWechatIdeEngineBuildByHttp, m as WEAPP_IDE_TOP_LEVEL_COMMAND_NAMES, n as parse, o as startForwardConsole, p as MINIDEV_NAMESPACE_COMMAND_NAMES, r as dispatchWechatCliCommand, s as isWechatIdeEngineBuildEndpointMissingError, t as createCli, u as handleConfigCommand, v as getAutomatorCommandHelp, w as printCompareHelp, x as parseScreenshotArgs, y as isAutomatorCommand } from "./cli-DSrMNDWQ.js";
|
|
4
|
+
import { a as readElementSnapshot, i as registerWeappIdeMcpTools, n as startWeappIdeMcpServer, o as resolveProjectPath, r as createWeappIdeMcpServer, s as toSerializableValue, t as runMcpCommand } from "./run-mcp-CUUdfBm7.js";
|
|
5
5
|
export { AUTOMATOR_COMMAND_NAMES, CONFIG_COMMAND_NAME, MCP_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, createWeappIdeMcpServer, createWechatIdeLoginRequiredExitError, currentPage, defaultCustomConfigDirPath, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, execute, extractExecutionErrorText, formatAutomatorLoginError, formatRetryHotkeyPrompt, formatWechatIdeLoginRequiredError, getAutomatorCommandHelp, getAutomatorProtocolTimeoutMethod, getConfig, getConfiguredLocale, getDefaultCliPath, getRuntimeWechatDevtoolsServicePort, getSharedMiniProgramSessionCount, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, handleConfigCommand, input, isAutomatorCommand, isAutomatorLoginError, isAutomatorProtocolTimeoutError, isAutomatorWsConnectError, isDevtoolsExtensionContextInvalidatedError, isDevtoolsHttpPortError, isOperatingSystemSupported, isRetryableAutomatorLaunchError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, 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, readElementSnapshot, readOptionValue, redirectTo, refreshWechatIdeTicket, registerWeappIdeMcpTools, releaseSharedMiniProgram, remote, removeCustomConfigKey, removeOption, requestWechatDevtoolsHttp, resetWechatIdeFileUtils, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveDevtoolsAutomationDefaults, resolvePath, resolveProjectAutomatorPort, resolveProjectPath, runAutomatorCommand, runMcpCommand, runMinidev, runRetryableCommand, runWechatCliWithRetry, runWechatIdeEngineBuild, runWechatIdeEngineBuildByHttp, runWithSuspendedSharedInput, scrollTo, setRuntimeWechatDevtoolsServicePort, setWechatIdeTicket, startForwardConsole, startWeappIdeMcpServer, startWechatIdeEngineBuildByHttp, switchTab, systemInfo, takeScreenshot, tap, toSerializableValue, 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": "6.0.
|
|
4
|
+
"version": "6.0.6",
|
|
5
5
|
"description": "让微信开发者工具,用起来更加方便!",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"pngjs": "^7.0.0",
|
|
71
71
|
"zod": "^4.4.3",
|
|
72
72
|
"@weapp-core/logger": "3.1.1",
|
|
73
|
-
"@weapp-core/shared": "3.1.
|
|
74
|
-
"@weapp-vite/devtools-runtime": "0.4.
|
|
75
|
-
"@weapp-vite/miniprogram-automator": "1.2.
|
|
73
|
+
"@weapp-core/shared": "3.1.1",
|
|
74
|
+
"@weapp-vite/devtools-runtime": "0.4.14",
|
|
75
|
+
"@weapp-vite/miniprogram-automator": "1.2.13"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"dev": "tsdown -w --sourcemap",
|
package/dist/run-mcp-BFYPend3.js
DELETED