weapp-ide-cli 6.3.0 → 6.4.0
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 +2 -0
- package/dist/automator-BqhUtMJp.js +1 -0
- package/dist/{automator-BOe32upt.js → automator-Esp3BjoT.js} +11 -18
- package/dist/{automator-session-VOB03glx.js → automator-session-Ba27VW0_.js} +4 -6
- package/dist/{automatorProject-DjYLqMj6.js → automatorProject-DPU-pEF0.js} +19 -38
- package/dist/{cli-CFlqFpIw.js → cli-Dd1RJ5PH.js} +41 -71
- package/dist/cli.js +3 -4
- package/dist/{commands-mslf7-sP.js → commands-5entj0Rh.js} +5 -7
- package/dist/commands-DR-8MVFm.js +1 -0
- package/dist/{devtoolsProjectOwnership-BMfSAg4n.js → devtoolsProjectOwnership-C4jj8msU.js} +116 -89
- package/dist/index.d.ts +0 -110
- package/dist/index.js +7 -7
- package/dist/{managed-B04Xo9U_.js → managed-hSCZXTon.js} +4 -6
- package/dist/{run-mcp-Ni139Z5C.js → run-mcp-CbmskSgr.js} +4 -7
- package/dist/run-mcp-D1w7-oPp.js +1 -0
- package/package.json +9 -9
- package/dist/automator-VSjgHujY.js +0 -1
- package/dist/commands-DmirGBy4.js +0 -1
- package/dist/run-mcp-83-VKZVA.js +0 -1
package/README.md
CHANGED
|
@@ -187,6 +187,8 @@ weapp cache --clean all
|
|
|
187
187
|
|
|
188
188
|
`weapp-ide-cli` 内置 automator 子命令:
|
|
189
189
|
|
|
190
|
+
`weapp compare` 使用 pixelmatch 8 的 OKLab/HyAB 感知色差算法,默认 `threshold` 为 `0.1`,抗锯齿像素不计入差异。新版的 `diffPixels`、`diffRatio` 可能与旧算法不同;升级时应使用同一张当前截图重新审核既有容差,保留基准图片和原有门限。
|
|
191
|
+
|
|
190
192
|
| 命令 | 说明 |
|
|
191
193
|
| -------------------------------- | ------------------------------ |
|
|
192
194
|
| `weapp screenshot` | 截图(支持 base64 / 文件输出) |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as launchAutomator } from "./automator-Esp3BjoT.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as readPersistedAutomatorSession, i as persistAutomatorSession, j as colors, m as assertWechatDevtoolsPort, p as assertWechatDevtoolsHost, r as resolveAutomatorProjectPath, u as resolveWechatDevtoolsTarget, z as readCustomConfig } from "./automatorProject-
|
|
1
|
+
import { a as readPersistedAutomatorSession, i as persistAutomatorSession, j as colors, m as assertWechatDevtoolsPort, p as assertWechatDevtoolsHost, r as resolveAutomatorProjectPath, u as resolveWechatDevtoolsTarget, z as readCustomConfig } from "./automatorProject-DPU-pEF0.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { withMachineE2ELease } from "@weapp-vite/devtools-runtime";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -6,7 +6,7 @@ import process from "node:process";
|
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { OperationLifecycle } from "@weapp-vite/miniprogram-automator/operation";
|
|
8
8
|
import { emitKeypressEvents } from "node:readline";
|
|
9
|
-
|
|
9
|
+
// src/cli/automator/port.ts
|
|
10
10
|
/** 显式端口不能被截断或作为默认值忽略,避免连接其他项目。 */
|
|
11
11
|
function assertAutomatorPort(port) {
|
|
12
12
|
if (port !== void 0 && (typeof port !== "number" || !Number.isInteger(port) || port < 1 || port > 65535)) throw Object.assign(/* @__PURE__ */ new RangeError("Automator port must be an integer between 1 and 65535."), { code: "DEVTOOLS_INVALID_PORT" });
|
|
@@ -17,8 +17,7 @@ function parseAutomatorPort(raw) {
|
|
|
17
17
|
assertAutomatorPort(port);
|
|
18
18
|
return port;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
//#region src/cli/automator/context.ts
|
|
20
|
+
// src/cli/automator/context.ts
|
|
22
21
|
/** 在连接与共享缓存入口固定安装选择;headless 不读取或修改 IDE 状态。 */
|
|
23
22
|
async function resolveAutomatorSessionOptions(options) {
|
|
24
23
|
assertAutomatorPort(options.port);
|
|
@@ -39,8 +38,7 @@ async function resolveAutomatorSessionOptions(options) {
|
|
|
39
38
|
installationId: target.installationId
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
//#region src/i18n.ts
|
|
41
|
+
// src/i18n.ts
|
|
44
42
|
let currentLocale = "zh";
|
|
45
43
|
/**
|
|
46
44
|
* @description 设置当前语言。
|
|
@@ -104,8 +102,7 @@ function readLangOption(argv) {
|
|
|
104
102
|
if (token.startsWith("--lang=")) return token.slice(7);
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
|
-
|
|
108
|
-
//#region src/cli/inputCoordinator.ts
|
|
105
|
+
// src/cli/inputCoordinator.ts
|
|
109
106
|
const sharedSessions = /* @__PURE__ */ new Set();
|
|
110
107
|
const exclusiveKeypressStack = [];
|
|
111
108
|
const EXCLUSIVE_KEYPRESS_CARRYOVER_GUARD_MS = 500;
|
|
@@ -245,6 +242,7 @@ async function waitForExclusiveKeypress(options) {
|
|
|
245
242
|
});
|
|
246
243
|
}
|
|
247
244
|
async function runWithSuspendedSharedInput(runner) {
|
|
245
|
+
if (!hasInteractiveStdin()) return runner();
|
|
248
246
|
const previousStates = /* @__PURE__ */ new Map();
|
|
249
247
|
for (const session of sharedSessions) {
|
|
250
248
|
if (session.closed) continue;
|
|
@@ -263,8 +261,7 @@ async function runWithSuspendedSharedInput(runner) {
|
|
|
263
261
|
updateTerminalState();
|
|
264
262
|
}
|
|
265
263
|
}
|
|
266
|
-
|
|
267
|
-
//#region src/cli/retry.ts
|
|
264
|
+
// src/cli/retry.ts
|
|
268
265
|
const RETRY_PROMPT_INITIAL_IGNORE_MS = 300;
|
|
269
266
|
const RETRY_CONFIRM_KEYS = ["y"];
|
|
270
267
|
const RETRY_CANCEL_KEYS = [
|
|
@@ -410,8 +407,7 @@ async function promptWechatIdeLoginRetry(options) {
|
|
|
410
407
|
}
|
|
411
408
|
return "retry";
|
|
412
409
|
}
|
|
413
|
-
|
|
414
|
-
//#region src/cli/automator/errors.ts
|
|
410
|
+
// src/cli/automator/errors.ts
|
|
415
411
|
const ERROR_STACK_PREFIX_RE = /^at /;
|
|
416
412
|
const ERROR_PREFIX_RE = /^\[error\]\s*/i;
|
|
417
413
|
const ERROR_LABEL_PREFIX_RE = /^error\s*:\s*/i;
|
|
@@ -526,8 +522,7 @@ function formatAutomatorLoginError(error) {
|
|
|
526
522
|
if (!code && !message) lines.push("- message: 需要重新登录");
|
|
527
523
|
return lines.join("\n");
|
|
528
524
|
}
|
|
529
|
-
|
|
530
|
-
//#region src/cli/wechatDevtoolsSettings.ts
|
|
525
|
+
// src/cli/wechatDevtoolsSettings.ts
|
|
531
526
|
function createStorageHash(key) {
|
|
532
527
|
return createHash("md5").update(key).digest("hex");
|
|
533
528
|
}
|
|
@@ -628,8 +623,7 @@ async function bootstrapWechatDevtoolsSettings(options = {}) {
|
|
|
628
623
|
trustedProjectCount: trusted ? 1 : 0
|
|
629
624
|
};
|
|
630
625
|
}
|
|
631
|
-
|
|
632
|
-
//#region src/cli/automator.ts
|
|
626
|
+
// src/cli/automator.ts
|
|
633
627
|
const PROJECT_AUTOMATOR_PORT_BASE = 9620;
|
|
634
628
|
const PROJECT_AUTOMATOR_PORT_RANGE = 2e3;
|
|
635
629
|
/**
|
|
@@ -666,7 +660,7 @@ async function launchSelectedAutomator(options) {
|
|
|
666
660
|
let lastError = null;
|
|
667
661
|
let bootstrapResult;
|
|
668
662
|
if (process.env["WEAPP_IDE_MANAGED_PROJECT_JOURNAL"]?.trim()) {
|
|
669
|
-
const { launchManagedAutomator } = await import("./managed-
|
|
663
|
+
const { launchManagedAutomator } = await import("./managed-hSCZXTon.js");
|
|
670
664
|
managedLaunch = launchManagedAutomator({
|
|
671
665
|
launcher,
|
|
672
666
|
scope,
|
|
@@ -818,5 +812,4 @@ async function connectOpenedAutomator(options) {
|
|
|
818
812
|
return miniProgram;
|
|
819
813
|
});
|
|
820
814
|
}
|
|
821
|
-
//#endregion
|
|
822
815
|
export { waitForExclusiveKeypress as A, isWechatIdeLoginRequiredError as C, waitForRetryKeypress as D, promptWechatIdeLoginRetry as E, parseAutomatorPort as F, i18nText as M, validateLocaleOption as N, createSharedInputSession as O, resolveAutomatorSessionOptions as P, formatWechatIdeLoginRequiredError as S, promptRetryKeypress as T, RETRY_CONFIRM_KEYS as _, bootstrapWechatDevtoolsSettings as a, extractExecutionErrorText as b, getAutomatorProtocolTimeoutMethod as c, isAutomatorProtocolTimeoutError as d, isAutomatorWsConnectError as f, RETRY_CANCEL_KEYS as g, isRetryableAutomatorLaunchError as h, resolveProjectAutomatorPort as i, configureLocaleFromArgv as j, runWithSuspendedSharedInput as k, isAutomatorLoginError as l, isDevtoolsHttpPortError as m, launchAutomator as n, detectWechatDevtoolsServicePort as o, isDevtoolsExtensionContextInvalidatedError as p, persistOpenedAutomatorSession as r, formatAutomatorLoginError as s, connectOpenedAutomator as t, isAutomatorPortInUseError as u, RETRY_PROMPT_INITIAL_IGNORE_MS as v, isWechatIdeLoginRequiredExitError as w, formatRetryHotkeyPrompt as x, createWechatIdeLoginRequiredExitError as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as logger } from "./automatorProject-
|
|
2
|
-
import { E as promptWechatIdeLoginRetry, M as i18nText, P as resolveAutomatorSessionOptions, c as getAutomatorProtocolTimeoutMethod, d as isAutomatorProtocolTimeoutError, f as isAutomatorWsConnectError, i as resolveProjectAutomatorPort, l as isAutomatorLoginError, m as isDevtoolsHttpPortError, n as launchAutomator, p as isDevtoolsExtensionContextInvalidatedError, s as formatAutomatorLoginError, t as connectOpenedAutomator, u as isAutomatorPortInUseError, y as createWechatIdeLoginRequiredExitError } from "./automator-
|
|
1
|
+
import { M as logger } from "./automatorProject-DPU-pEF0.js";
|
|
2
|
+
import { E as promptWechatIdeLoginRetry, M as i18nText, P as resolveAutomatorSessionOptions, c as getAutomatorProtocolTimeoutMethod, d as isAutomatorProtocolTimeoutError, f as isAutomatorWsConnectError, i as resolveProjectAutomatorPort, l as isAutomatorLoginError, m as isDevtoolsHttpPortError, n as launchAutomator, p as isDevtoolsExtensionContextInvalidatedError, s as formatAutomatorLoginError, t as connectOpenedAutomator, u as isAutomatorPortInUseError, y as createWechatIdeLoginRequiredExitError } from "./automator-Esp3BjoT.js";
|
|
3
3
|
import { acquireSharedMiniProgram, closeOwnedSharedMiniProgram, closeSharedMiniProgram, getSharedMiniProgramSessionCount, releaseSharedMiniProgram, withMiniProgram } from "@weapp-vite/devtools-runtime";
|
|
4
4
|
import { OperationLifecycle } from "@weapp-vite/miniprogram-automator/operation";
|
|
5
|
-
|
|
5
|
+
// src/cli/run-login-executor.ts
|
|
6
6
|
/** 命令、登录提示和有限重试共用一个 deadline,取消信号由执行边界传入 I/O。 */
|
|
7
7
|
async function runRetryableCommand(options) {
|
|
8
8
|
return await new OperationLifecycle(options.timeout ?? 3e4, "IDE command", options.signal).run(async (scope) => {
|
|
@@ -32,8 +32,7 @@ async function runRetryableCommand(options) {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
//#region src/cli/automator-session.ts
|
|
35
|
+
// src/cli/automator-session.ts
|
|
37
36
|
function unwrapAutomatorConnectionError(result) {
|
|
38
37
|
return result.kind === "retryable" ? result.error : result.value;
|
|
39
38
|
}
|
|
@@ -182,5 +181,4 @@ async function acquireSharedMiniProgram$1(options) {
|
|
|
182
181
|
async function withMiniProgram$1(options, runner) {
|
|
183
182
|
return await withMiniProgram(runtimeHooks, options, runner);
|
|
184
183
|
}
|
|
185
|
-
//#endregion
|
|
186
184
|
export { connectConsoleMiniProgram as a, releaseSharedMiniProgram as c, closeSharedMiniProgram as i, withMiniProgram$1 as l, acquireSharedMiniProgram$1 as n, connectMiniProgram as o, closeOwnedSharedMiniProgram as r, getSharedMiniProgramSessionCount as s, acquireConsoleMiniProgram as t, runRetryableCommand as u };
|
|
@@ -10,7 +10,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
10
10
|
import baseLogger, { colors } from "@weapp-core/logger";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { Buffer } from "node:buffer";
|
|
13
|
-
|
|
13
|
+
// src/utils/path.ts
|
|
14
14
|
/**
|
|
15
15
|
* @description 解析为绝对路径(基于当前工作目录)
|
|
16
16
|
*/
|
|
@@ -18,8 +18,7 @@ function resolvePath(filePath) {
|
|
|
18
18
|
if (path$1.isAbsolute(filePath)) return filePath;
|
|
19
19
|
return path$1.resolve(process.cwd(), filePath);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
//#region src/config/paths.ts
|
|
21
|
+
// src/config/paths.ts
|
|
23
22
|
const homedir = os.homedir();
|
|
24
23
|
/**
|
|
25
24
|
* @description 默认自定义配置目录
|
|
@@ -29,8 +28,7 @@ const defaultCustomConfigDirPath = path$1.join(homedir, ".weapp-ide-cli");
|
|
|
29
28
|
* @description 默认自定义配置文件路径
|
|
30
29
|
*/
|
|
31
30
|
const defaultCustomConfigFilePath = path$1.join(defaultCustomConfigDirPath, "config.json");
|
|
32
|
-
|
|
33
|
-
//#region src/config/custom.ts
|
|
31
|
+
// src/config/custom.ts
|
|
34
32
|
const JSON_OPTIONS = {
|
|
35
33
|
encoding: "utf8",
|
|
36
34
|
spaces: 2
|
|
@@ -111,17 +109,14 @@ async function overwriteCustomConfig(config) {
|
|
|
111
109
|
if (typeof config.autoTrustProject === "boolean") nextConfig.autoTrustProject = config.autoTrustProject;
|
|
112
110
|
await writeCustomConfig(nextConfig, { replace: true });
|
|
113
111
|
}
|
|
114
|
-
|
|
115
|
-
//#region src/devtoolsTarget/context.ts
|
|
112
|
+
// src/devtoolsTarget/context.ts
|
|
116
113
|
const wechatDevtoolsSelectionContext = new AsyncLocalStorage();
|
|
117
|
-
|
|
118
|
-
//#region src/logger.ts
|
|
114
|
+
// src/logger.ts
|
|
119
115
|
const logger = baseLogger.create({
|
|
120
116
|
stdout: process.stderr,
|
|
121
117
|
stderr: process.stderr
|
|
122
118
|
});
|
|
123
|
-
|
|
124
|
-
//#region src/runtime/platform.ts
|
|
119
|
+
// src/runtime/platform.ts
|
|
125
120
|
/**
|
|
126
121
|
* @description 官方微信开发者工具只支持 Windows、macOS,Linux 只有社区版。
|
|
127
122
|
* https://github.com/msojocs/wechat-web-devtools-linux
|
|
@@ -225,14 +220,12 @@ async function getDefaultCliPath(targetOs = operatingSystemName) {
|
|
|
225
220
|
const resolver = cliPathResolvers[targetOs];
|
|
226
221
|
return await resolver();
|
|
227
222
|
}
|
|
228
|
-
|
|
229
|
-
//#region src/utils/powershell.ts
|
|
223
|
+
// src/utils/powershell.ts
|
|
230
224
|
/** 固定重定向 stdout 的 UTF-8 编码,避免默认代码页损坏进程路径和安装身份。 */
|
|
231
225
|
function withPowerShellUtf8Output(script) {
|
|
232
226
|
return `[Console]::OutputEncoding=[Text.UTF8Encoding]::new($false); ${script}`;
|
|
233
227
|
}
|
|
234
|
-
|
|
235
|
-
//#region src/devtoolsTarget/metadata.ts
|
|
228
|
+
// src/devtoolsTarget/metadata.ts
|
|
236
229
|
const MAX_HEADER_BYTES = 16777216;
|
|
237
230
|
const MAX_PACKAGE_BYTES = 1048576;
|
|
238
231
|
function record(value) {
|
|
@@ -279,8 +272,7 @@ async function readWechatDevtoolsMetadata(appPath) {
|
|
|
279
272
|
channel: String(value.versionType) === "0" ? "stable" : String(value.versionType) === "1" ? "rc" : String(value.versionType) === "2" ? "nightly" : "unknown"
|
|
280
273
|
};
|
|
281
274
|
}
|
|
282
|
-
|
|
283
|
-
//#region src/devtoolsTarget/profile.ts
|
|
275
|
+
// src/devtoolsTarget/profile.ts
|
|
284
276
|
/** 按所选宿主的存储布局定位配置,不扫描其他安装的目录。 */
|
|
285
277
|
function resolveWechatDevtoolsProfileDir(appPath, options = {}) {
|
|
286
278
|
const platform = options.platform ?? process.platform;
|
|
@@ -289,8 +281,7 @@ function resolveWechatDevtoolsProfileDir(appPath, options = {}) {
|
|
|
289
281
|
if (platform === "win32" && path.basename(appPath) === "package.nw") return baseDir;
|
|
290
282
|
return path.join(baseDir, createHash("md5").update(appPath).digest("hex"));
|
|
291
283
|
}
|
|
292
|
-
|
|
293
|
-
//#region src/devtoolsTarget/installation.ts
|
|
284
|
+
// src/devtoolsTarget/installation.ts
|
|
294
285
|
async function resolveApplicationPath(cliPath, platform) {
|
|
295
286
|
const root = platform === "darwin" && path.basename(path.dirname(cliPath)) === "MacOS" ? path.join(path.dirname(path.dirname(cliPath)), "Resources") : path.dirname(cliPath);
|
|
296
287
|
const candidates = platform === "darwin" ? [
|
|
@@ -324,8 +315,7 @@ async function inspectWechatDevtoolsInstallation(selected, options = {}) {
|
|
|
324
315
|
...await readWechatDevtoolsMetadata(appPath)
|
|
325
316
|
};
|
|
326
317
|
}
|
|
327
|
-
|
|
328
|
-
//#region src/devtoolsTarget/registry.ts
|
|
318
|
+
// src/devtoolsTarget/registry.ts
|
|
329
319
|
const defaultWechatDevtoolsRegistryPath = path.join(defaultCustomConfigDirPath, "installations.json");
|
|
330
320
|
/** 登记只保存路径;安装渠道和版本每次从实际应用重新读取。 */
|
|
331
321
|
async function readWechatDevtoolsRegistry(registryPath = defaultWechatDevtoolsRegistryPath) {
|
|
@@ -362,8 +352,7 @@ async function unregisterWechatDevtoolsInstallation(cliPath, registryPath = defa
|
|
|
362
352
|
const selected = await fs.realpath(cliPath).catch(() => path.resolve(cliPath));
|
|
363
353
|
await updateRegistry(registryPath, (paths) => paths.filter((entry) => entry !== selected && entry !== path.resolve(cliPath)));
|
|
364
354
|
}
|
|
365
|
-
|
|
366
|
-
//#region src/devtoolsTarget/discovery.ts
|
|
355
|
+
// src/devtoolsTarget/discovery.ts
|
|
367
356
|
/** 产品版本按数字段比较,避免日期版本的字符串排序漂移。 */
|
|
368
357
|
function compareWechatDevtoolsVersions(a, b) {
|
|
369
358
|
const left = a.split(".").map(Number);
|
|
@@ -457,8 +446,7 @@ async function selectInstalledWechatDevtools(options = {}) {
|
|
|
457
446
|
if (matches.filter((target) => compareWechatDevtoolsVersions(target.version, matches[0].version) === 0).length !== 1) throw Object.assign(/* @__PURE__ */ new Error("Multiple DevTools installations match the selected version. Specify --cli-path."), { code: "WECHAT_DEVTOOLS_INSTALLATION_AMBIGUOUS" });
|
|
458
447
|
return matches[0];
|
|
459
448
|
}
|
|
460
|
-
|
|
461
|
-
//#region src/devtoolsTarget/official.ts
|
|
449
|
+
// src/devtoolsTarget/official.ts
|
|
462
450
|
const WECHAT_DEVTOOLS_OFFICIAL_CHANNELS_URL = "https://devtools.wxqcloud.qq.com.cn/WechatWebDev/nightly/versions/config.json";
|
|
463
451
|
/** 官方查询只提供版本证据,默认选择不依赖网络可用性。 */
|
|
464
452
|
async function readOfficialWechatDevtoolsVersion(channel = "stable") {
|
|
@@ -481,16 +469,14 @@ async function assertOfficialWechatDevtoolsVersion(target) {
|
|
|
481
469
|
if (target.version !== official.version) throw new Error(`DEVTOOLS_OFFICIAL_LATEST_REQUIRED: selected ${target.version}, official ${target.channel}@${official.version}.`);
|
|
482
470
|
return official;
|
|
483
471
|
}
|
|
484
|
-
|
|
485
|
-
//#region src/devtoolsTarget/inspection.ts
|
|
472
|
+
// src/devtoolsTarget/inspection.ts
|
|
486
473
|
/** Windows 查询预算包含 PowerShell 冷启动及内核/CIM 初始化;显式较小预算始终优先。 */
|
|
487
474
|
function resolveWechatInspectionTimeout(platform, timeout) {
|
|
488
475
|
if (timeout !== void 0 && (Number.isNaN(timeout) || timeout <= 0)) throw new RangeError("DevTools inspection timeout must be positive.");
|
|
489
476
|
const maximum = platform === "win32" ? 3e4 : 3e3;
|
|
490
477
|
return Math.min(timeout ?? maximum, maximum);
|
|
491
478
|
}
|
|
492
|
-
|
|
493
|
-
//#region src/devtoolsTarget/host.ts
|
|
479
|
+
// src/devtoolsTarget/host.ts
|
|
494
480
|
function ownershipError(message) {
|
|
495
481
|
return Object.assign(new Error(message), { code: "WECHAT_DEVTOOLS_HOST_IDENTITY_MISMATCH" });
|
|
496
482
|
}
|
|
@@ -619,8 +605,7 @@ async function assertWechatDevtoolsPort(target, port, options = {}) {
|
|
|
619
605
|
assertExecutable(target, executable, platform);
|
|
620
606
|
}
|
|
621
607
|
}
|
|
622
|
-
|
|
623
|
-
//#region src/devtoolsTarget/index.ts
|
|
608
|
+
// src/devtoolsTarget/index.ts
|
|
624
609
|
function conflict(message) {
|
|
625
610
|
throw Object.assign(new Error(message), { code: "WECHAT_DEVTOOLS_INSTALLATION_SELECTION_CONFLICT" });
|
|
626
611
|
}
|
|
@@ -681,14 +666,12 @@ async function withWechatDevtoolsSelection(options, runner) {
|
|
|
681
666
|
function getActiveWechatDevtoolsTarget() {
|
|
682
667
|
return wechatDevtoolsSelectionContext.getStore();
|
|
683
668
|
}
|
|
684
|
-
|
|
685
|
-
//#region src/devtoolsProjectOwnership/journal/constants.ts
|
|
669
|
+
// src/devtoolsProjectOwnership/journal/constants.ts
|
|
686
670
|
/** 受管项目日志的环境变量名称;基础设施预检可在构建包之前读取。 */
|
|
687
671
|
const MANAGED_PROJECT_JOURNAL_ENV = "WEAPP_IDE_MANAGED_PROJECT_JOURNAL";
|
|
688
672
|
/** 仅供显式受管任务声明双项目窗口验收;不允许无限扩大并行窗口。 */
|
|
689
673
|
const MANAGED_PROJECT_MAX_WINDOWS_ENV = "WEAPP_IDE_MANAGED_PROJECT_MAX_WINDOWS";
|
|
690
|
-
|
|
691
|
-
//#region src/cli/automator/sessionStore.ts
|
|
674
|
+
// src/cli/automator/sessionStore.ts
|
|
692
675
|
const SESSION_DIRECTORY = path.join(os.tmpdir(), "weapp-vite-automator-sessions");
|
|
693
676
|
/** 内部工具复用会话键;不从包入口公开缓存路径契约。 */
|
|
694
677
|
function resolveAutomatorSessionFilePath(options) {
|
|
@@ -752,8 +735,7 @@ async function readPersistedAutomatorSession(options) {
|
|
|
752
735
|
return null;
|
|
753
736
|
}
|
|
754
737
|
}
|
|
755
|
-
|
|
756
|
-
//#region src/cli/automatorProject.ts
|
|
738
|
+
// src/cli/automatorProject.ts
|
|
757
739
|
const WRAPPER_ROOT = path.join(os.tmpdir(), "weapp-ide-cli-automator-projects");
|
|
758
740
|
function normalizeProjectRelativeRoot(rawRoot) {
|
|
759
741
|
if (typeof rawRoot !== "string") return;
|
|
@@ -877,5 +859,4 @@ async function resolveAutomatorProjectPath(projectPath) {
|
|
|
877
859
|
sourceProjectPath
|
|
878
860
|
};
|
|
879
861
|
}
|
|
880
|
-
//#endregion
|
|
881
862
|
export { operatingSystemName as A, removeCustomConfigKey as B, registerWechatDevtoolsInstallation as C, SupportedPlatformsMap as D, withPowerShellUtf8Output as E, createAutoTrustProjectConfig as F, defaultCustomConfigFilePath as H, createCustomConfig as I, createLocaleConfig as L, logger as M, wechatDevtoolsSelectionContext as N, getDefaultCliPath as O, createAutoBootstrapDevtoolsConfig as P, overwriteCustomConfig as R, selectInstalledWechatDevtools as S, inspectWechatDevtoolsInstallation as T, resolvePath as U, defaultCustomConfigDirPath as V, WECHAT_DEVTOOLS_OFFICIAL_CHANNELS_URL as _, readPersistedAutomatorSession as a, compareWechatDevtoolsVersions as b, getActiveWechatDevtoolsTarget as c, validateWechatDevtoolsSelection as d, withWechatDevtoolsSelection as f, resolveWechatInspectionTimeout as g, resolveWechatDevtoolsInstallationRoot as h, persistAutomatorSession as i, colors as j, isOperatingSystemSupported as k, readWechatDevtoolsSelectionEnvironment as l, assertWechatDevtoolsPort as m, readAutomatorProjectPlan as n, MANAGED_PROJECT_JOURNAL_ENV as o, assertWechatDevtoolsHost as p, resolveAutomatorProjectPath as r, MANAGED_PROJECT_MAX_WINDOWS_ENV as s, populateAutomatorProjectSnapshot as t, resolveWechatDevtoolsTarget as u, assertOfficialWechatDevtoolsVersion as v, unregisterWechatDevtoolsInstallation as w, listWechatDevtoolsInstallations as x, readOfficialWechatDevtoolsVersion as y, readCustomConfig as z };
|