weapp-ide-cli 5.2.8 → 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-CYRxSZ0F.js → cli-pFop_M4C.js} +3 -3
- 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";
|
|
@@ -433,7 +433,7 @@ async function runScreenshot(argv) {
|
|
|
433
433
|
}
|
|
434
434
|
const options = parseScreenshotArgs(argv);
|
|
435
435
|
const isJsonOutput = argv.includes("--json");
|
|
436
|
-
const { takeScreenshot } = await import("./commands-
|
|
436
|
+
const { takeScreenshot } = await import("./commands-DAN1Yl85.js");
|
|
437
437
|
const result = await takeScreenshot(options);
|
|
438
438
|
if (isJsonOutput) {
|
|
439
439
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -993,7 +993,7 @@ function handleData(chunk) {
|
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
995
|
function handleKeypress(str, key) {
|
|
996
|
-
const activeExclusive = exclusiveKeypressStack.
|
|
996
|
+
const activeExclusive = exclusiveKeypressStack[exclusiveKeypressStack.length - 1];
|
|
997
997
|
if (activeExclusive) {
|
|
998
998
|
const now = Date.now();
|
|
999
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",
|