weapp-ide-cli 6.1.3 → 6.1.5

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.
@@ -1187,6 +1187,7 @@ const ENABLE_LOG_RETRY_DELAY_MS = 500;
1187
1187
  const ENABLE_LOG_RETRY_TIMES = 5;
1188
1188
  const ENABLE_LOG_TIMEOUT_MS = 3e3;
1189
1189
  const FORWARD_CONSOLE_SESSION_TIMEOUT_MS = 3e3;
1190
+ const FORWARD_CONSOLE_LAUNCH_TIMEOUT_MS = 3e4;
1190
1191
  const ENABLE_LOG_REFRESH_INTERVAL_MS = 2e3;
1191
1192
  const AUXILIARY_FORWARD_CONSOLE_DELAY_MS = 2500;
1192
1193
  const DUPLICATE_LOG_SUPPRESS_MS = 800;
@@ -1305,13 +1306,14 @@ async function acquireForwardConsoleMiniProgram(options) {
1305
1306
  await enableMiniProgramConsoleLog(options.miniProgram);
1306
1307
  return options.miniProgram;
1307
1308
  }
1309
+ const timeout = options.openedOnly === true || options.preferOpenedSession !== false && Boolean(options.port || options.sessionId) ? Math.min(options.timeout ?? FORWARD_CONSOLE_SESSION_TIMEOUT_MS, FORWARD_CONSOLE_SESSION_TIMEOUT_MS) : options.timeout ?? FORWARD_CONSOLE_LAUNCH_TIMEOUT_MS;
1308
1310
  let lastError;
1309
1311
  for (let attempt = 0; attempt <= ENABLE_LOG_RETRY_TIMES; attempt += 1) {
1310
1312
  let miniProgram;
1311
1313
  try {
1312
1314
  miniProgram = await acquireConsoleMiniProgram({
1313
1315
  ...options,
1314
- timeout: Math.min(options.timeout ?? FORWARD_CONSOLE_SESSION_TIMEOUT_MS, FORWARD_CONSOLE_SESSION_TIMEOUT_MS)
1316
+ timeout
1315
1317
  });
1316
1318
  await enableMiniProgramConsoleLog(miniProgram, 0);
1317
1319
  return miniProgram;
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Z as logger_default } from "./automator-session-B0GSCA8Z.js";
2
- import { n as parse } from "./cli-DkuHSA2C.js";
2
+ import { n as parse } from "./cli-C7iXlA4e.js";
3
3
  import process from "node:process";
4
4
  //#region src/cli.ts
5
5
  const argv = process.argv.slice(2);
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as createAutoTrustProjectConfig, A as getAutomatorProtocolTimeoutMethod, B as bootstrapWechatDevtoolsSettings, C as runWithSuspendedSharedInput, F as isDevtoolsExtensionContextInvalidatedError, G as resolveDevtoolsAutomationDefaults, H as resolveCliPath, I as isDevtoolsHttpPortError, J as isOperatingSystemSupported, K as SupportedPlatformsMap, L as isRetryableAutomatorLaunchError, M as isAutomatorPortInUseError, N as isAutomatorProtocolTimeoutError, O as connectOpenedAutomator, P as isAutomatorWsConnectError, Q as createAutoBootstrapDevtoolsConfig, R as launchAutomator, S as createSharedInputSession, U as getConfig, V as detectWechatDevtoolsServicePort, W as getConfiguredLocale, Y as operatingSystemName, _ as isWechatIdeLoginRequiredError, a as connectMiniProgram, at as defaultCustomConfigDirPath, b as promptWechatIdeLoginRetry, c as withMiniProgram, d as RETRY_CONFIRM_KEYS, et as createCustomConfig, f as RETRY_PROMPT_INITIAL_IGNORE_MS, g as formatWechatIdeLoginRequiredError, h as formatRetryHotkeyPrompt, it as removeCustomConfigKey, j as isAutomatorLoginError, k as formatAutomatorLoginError, l as runRetryableCommand, m as extractExecutionErrorText, n as acquireSharedMiniProgram, nt as overwriteCustomConfig, o as getSharedMiniProgramSessionCount, ot as defaultCustomConfigFilePath, p as createWechatIdeLoginRequiredExitError, q as getDefaultCliPath, r as closeSharedMiniProgram, rt as readCustomConfig, s as releaseSharedMiniProgram, st as resolvePath, tt as createLocaleConfig, u as RETRY_CANCEL_KEYS, v as isWechatIdeLoginRequiredExitError, w as waitForExclusiveKeypress, x as waitForRetryKeypress, y as promptRetryKeypress, z as resolveProjectAutomatorPort } from "./automator-session-B0GSCA8Z.js";
2
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-C2M-B-Nd.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-DkuHSA2C.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-C7iXlA4e.js";
4
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-i4WLaQoh.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, isAutomatorPortInUseError, 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,11 +1,11 @@
1
1
  {
2
2
  "name": "weapp-ide-cli",
3
3
  "type": "module",
4
- "version": "6.1.3",
5
- "description": "让微信开发者工具,用起来更加方便!",
4
+ "version": "6.1.5",
5
+ "description": "Command-line tools for automating WeChat DevTools and mini-program projects.",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/sonofmagic/weapp-tailwindcss",
8
+ "homepage": "https://github.com/weapp-vite/weapp-vite#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/weapp-vite/weapp-vite.git",
@@ -15,16 +15,18 @@
15
15
  "url": "https://github.com/weapp-vite/weapp-vite/issues"
16
16
  },
17
17
  "keywords": [
18
+ "weapp-vite",
18
19
  "weapp",
19
- "weapp-cli",
20
20
  "wechat",
21
+ "mini-program",
22
+ "miniprogram",
23
+ "weapp-cli",
21
24
  "cli",
22
25
  "uni-app",
23
26
  "taro",
24
27
  "ide",
25
28
  "weapp-ide",
26
- "mini",
27
- "miniprogram"
29
+ "mini"
28
30
  ],
29
31
  "exports": {
30
32
  ".": {
@@ -59,23 +61,23 @@
59
61
  },
60
62
  "publishConfig": {
61
63
  "access": "public",
62
- "registry": "https://registry.npmjs.org/"
64
+ "registry": "https://registry.npmjs.org"
63
65
  },
64
66
  "dependencies": {
65
67
  "@modelcontextprotocol/server": "^2.0.0",
66
- "@weapp-core/logger": "3.1.2",
67
- "@weapp-core/shared": "3.2.1",
68
- "@weapp-vite/devtools-runtime": "0.4.18",
69
- "@weapp-vite/miniprogram-automator": "1.2.17",
68
+ "@weapp-core/logger": "3.1.4",
69
+ "@weapp-core/shared": "3.2.3",
70
+ "@weapp-vite/devtools-runtime": "0.4.20",
71
+ "@weapp-vite/miniprogram-automator": "1.2.19",
70
72
  "cac": "^7.0.0",
71
73
  "execa": "10.0.1",
72
74
  "pathe": "^2.0.3",
73
75
  "pixelmatch": "^7.2.0",
74
76
  "pngjs": "^7.0.0",
75
- "zod": "^4.5.4"
77
+ "zod": "^4.6.5"
76
78
  },
77
79
  "devDependencies": {
78
- "@types/node": "^26.5.0"
80
+ "@types/node": "^26.6.1"
79
81
  },
80
82
  "tsd": {
81
83
  "compilerOptions": {