weapp-vite 6.22.0 → 6.23.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/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +195 -62
- package/dist/{config-6l-p3o-C.d.mts → config-qh0O73A5.d.mts} +36 -1
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-PBWMhrli.mjs → createContext-RnHhe84f.mjs} +313 -75
- package/dist/docs/glass-easel.md +23 -0
- package/dist/docs/index.md +8 -6
- package/dist/{file-D0n-Q1ra.mjs → file-Cr034LIZ.mjs} +1 -1
- package/dist/file-DWR7zIBT.mjs +2 -0
- package/dist/getInstance-BjUP-8qc.mjs +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/json.d.mts +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/test.mjs +1 -1
- package/dist/types.d.mts +2 -2
- package/package.json +17 -17
- package/dist/file-DPQbjCzZ.mjs +0 -2
- package/dist/getInstance-DxCSOpxw.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getCompilerContext,
|
|
1
|
+
import { n as getCompilerContext, y as getRouteRuntimeGlobalKeys } from "./createContext-RnHhe84f.mjs";
|
|
2
2
|
//#region src/auto-routes.ts
|
|
3
3
|
const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
|
|
4
4
|
function createGetter(resolver) {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as getDefaultIdeProjectRoot, C as collectPreloadPages, D as loadViteConfigFile, E as suggestPreloadRules, M as isPathInside, O as parseCommentJson, S as getProjectConfigFileName, T as resolvePreloadPackageIdentifier, _ as SHARED_CHUNK_VIRTUAL_PREFIX, a as createGlassEaselAnalyzeResult, b as resolveWeappConfigFile, f as getBackendForCapability, g as createSharedBuildConfig, h as syncManagedTsconfigBootstrapFiles, j as shouldPassPlatformArgToIdeOpen, k as createCjsConfigLoadError, m as syncProjectSupportFiles, o as formatBytes, p as resolveBackendExecution, t as createCompilerContext, v as resolveHmrProfileJsonPath, w as findPreloadRuleKey, x as checkRuntime } from "./createContext-RnHhe84f.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { h as VERSION, i as findJsEntry, o as findTemplateEntry, s as findVueEntry } from "./file-
|
|
3
|
+
import { h as VERSION, i as findJsEntry, o as findTemplateEntry, s as findVueEntry } from "./file-Cr034LIZ.mjs";
|
|
4
4
|
import { c as startWeappViteMcpServer, l as detectAiDevelopmentEnvironment, s as resolveWeappMcpConfig } from "./mcp-BG6TliEg.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -16,7 +16,7 @@ import os from "node:os";
|
|
|
16
16
|
import { execFile, spawn } from "node:child_process";
|
|
17
17
|
import { Buffer } from "node:buffer";
|
|
18
18
|
import { cac } from "cac";
|
|
19
|
-
import { RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, bootstrapWechatDevtoolsSettings, buildWechatIdeNpm, clearWechatIdeCache, clearWechatIdeCacheByAutomator, closeSharedMiniProgram, closeWechatIdeProject, compileWechatIdeByAutomator, connectOpenedAutomator, createSharedInputSession, createWechatIdeLoginRequiredExitError, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, formatAutomatorLoginError, getConfig, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, isAutomatorLoginError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, launchAutomator, parse as parse$1, promptRetryKeypress, promptWechatIdeLoginRetry, quitWechatIde, refreshWechatIdeTicket, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveProjectAutomatorPort, runRetryableCommand, runWechatIdeEngineBuild, runWithSuspendedSharedInput, setWechatIdeTicket, startForwardConsole, takeScreenshot } from "weapp-ide-cli";
|
|
19
|
+
import { RETRY_CANCEL_KEYS, RETRY_CONFIRM_KEYS, bootstrapWechatDevtoolsSettings, buildWechatIdeNpm, clearWechatIdeCache, clearWechatIdeCacheByAutomator, closeSharedMiniProgram, closeWechatIdeProject, compileWechatIdeByAutomator, connectOpenedAutomator, createSharedInputSession, createWechatIdeLoginRequiredExitError, defaultCustomConfigFilePath, detectWechatDevtoolsServicePort, dispatchWechatCliCommand, formatAutomatorLoginError, getConfig, getWechatIdeTestAccounts, getWechatIdeTicket, getWechatIdeToolInfo, isAutomatorLoginError, isRetryableAutomatorLaunchError, isWeappIdeTopLevelCommand, isWechatIdeEngineBuildEndpointMissingError, isWechatIdeLoggedIn, isWechatIdeLoginRequiredError, isWechatIdeLoginRequiredExitError, launchAutomator, parse as parse$1, promptRetryKeypress, promptWechatIdeLoginRetry, quitWechatIde, refreshWechatIdeTicket, resetWechatIdeFileUtilsByHttp, resolveCliPath, resolveProjectAutomatorPort, runRetryableCommand, runWechatIdeEngineBuild, runWithSuspendedSharedInput, setWechatIdeTicket, startForwardConsole, takeScreenshot } from "weapp-ide-cli";
|
|
20
20
|
import { promisify } from "node:util";
|
|
21
21
|
import { brotliCompressSync, gzipSync } from "node:zlib";
|
|
22
22
|
import { resolveCommand } from "package-manager-detector/commands";
|
|
@@ -387,11 +387,12 @@ async function tryReuseOpenedWechatIde(projectPath, closeIde, options = {}) {
|
|
|
387
387
|
*/
|
|
388
388
|
async function reopenOpenedWechatIde(projectPath, closeIde, options = {}) {
|
|
389
389
|
const connection = await connectOpenedProject(projectPath);
|
|
390
|
-
if (connection.status
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
logger_default.info("
|
|
394
|
-
|
|
390
|
+
if (connection.status === "connected") {
|
|
391
|
+
disconnectMiniProgram(connection.miniProgram);
|
|
392
|
+
logger_default.info("目标项目已在微信开发者工具中打开,当前命令将主动重开以刷新最新构建产物。");
|
|
393
|
+
} else if (connection.status === "unhealthy") logger_default.info("目标项目的 automator 会话未通过健康检查,当前命令将关闭窗口并重新拉起。");
|
|
394
|
+
else logger_default.info("未检测到可复用的 automator 会话,当前命令将关闭现有窗口并重新拉起目标项目。");
|
|
395
|
+
if (!await (connection.status === "connected" ? closeIde : options.restartIde ?? closeIde)()) logger_default.warn("关闭当前微信开发者工具失败,仍继续尝试重新打开目标项目。");
|
|
395
396
|
await openWechatIdeByAutomator(projectPath, options);
|
|
396
397
|
return true;
|
|
397
398
|
}
|
|
@@ -402,7 +403,11 @@ function shouldLogAutomatorFallbackError() {
|
|
|
402
403
|
return flag === "1" || flag === "true";
|
|
403
404
|
}
|
|
404
405
|
const PREPARE_AUTOMATOR_SESSION_TIMEOUT = 8e3;
|
|
406
|
+
const AUTOMATOR_RECOVERY_QUIT_SETTLE_MS = 5e3;
|
|
405
407
|
const RESET_FILEUTILS_ENV = "WEAPP_VITE_RESET_IDE_FILEUTILS";
|
|
408
|
+
function sleep$1(ms) {
|
|
409
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
410
|
+
}
|
|
406
411
|
function readProjectConfigObject(projectPath) {
|
|
407
412
|
try {
|
|
408
413
|
const raw = fs.readFileSync(path.join(projectPath, "project.config.json"), "utf8");
|
|
@@ -456,11 +461,21 @@ function resolveIdeProjectRoot(mpDistRoot, cwd) {
|
|
|
456
461
|
async function closeIde() {
|
|
457
462
|
return await closeIde$1();
|
|
458
463
|
}
|
|
464
|
+
async function restartWechatIdeForAutomatorRecovery() {
|
|
465
|
+
try {
|
|
466
|
+
await quitWechatIde();
|
|
467
|
+
await sleep$1(AUTOMATOR_RECOVERY_QUIT_SETTLE_MS);
|
|
468
|
+
return true;
|
|
469
|
+
} catch {
|
|
470
|
+
return await closeIde();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
459
473
|
async function tryOpenWechatIdeByAutomator(projectPath, options) {
|
|
460
474
|
const preserveProjectRoot = !shouldUseAutomatorProjectWrapper(projectPath);
|
|
461
475
|
if (options.reuseOpenedProject === false) {
|
|
462
476
|
if (await reopenOpenedWechatIde(projectPath, closeIde, {
|
|
463
477
|
preserveProjectRoot,
|
|
478
|
+
restartIde: restartWechatIdeForAutomatorRecovery,
|
|
464
479
|
trustProject: options.trustProject
|
|
465
480
|
})) return "reopened";
|
|
466
481
|
}
|
|
@@ -1293,6 +1308,10 @@ function readUsingComponents(config) {
|
|
|
1293
1308
|
if (!isRecord(config) || !isRecord(config.usingComponents)) return [];
|
|
1294
1309
|
return Object.entries(config.usingComponents).filter((entry) => typeof entry[1] === "string" && entry[1].trim() !== "");
|
|
1295
1310
|
}
|
|
1311
|
+
function readComponentGenericDefaults(config) {
|
|
1312
|
+
if (!isRecord(config) || !isRecord(config.componentGenerics)) return [];
|
|
1313
|
+
return Object.entries(config.componentGenerics).map(([name, value]) => isRecord(value) && typeof value.default === "string" && value.default.trim() !== "" ? [name, value.default] : void 0).filter((entry) => Boolean(entry));
|
|
1314
|
+
}
|
|
1296
1315
|
function readComponentPlaceholder(config) {
|
|
1297
1316
|
if (!isRecord(config) || !isRecord(config.componentPlaceholder)) return /* @__PURE__ */ new Set();
|
|
1298
1317
|
return new Set(Object.keys(config.componentPlaceholder));
|
|
@@ -1367,14 +1386,14 @@ function analyzeComponentUsage(options) {
|
|
|
1367
1386
|
for (const route of configs.keys()) packageMap.set(route, resolvePackageId(route, options.subPackages));
|
|
1368
1387
|
for (const [owner, config] of configs) {
|
|
1369
1388
|
const placeholders = readComponentPlaceholder(config);
|
|
1370
|
-
const edges = readUsingComponents(config).map(([name, request]) => {
|
|
1389
|
+
const edges = [...readUsingComponents(config), ...readComponentGenericDefaults(config)].map(([name, request]) => {
|
|
1371
1390
|
const component = resolveComponentRoute(owner, request);
|
|
1372
1391
|
return component && configs.has(component) ? {
|
|
1373
1392
|
owner,
|
|
1374
1393
|
component,
|
|
1375
1394
|
placeholderCovered: placeholders.has(name)
|
|
1376
1395
|
} : void 0;
|
|
1377
|
-
}).filter((edge) => Boolean(edge));
|
|
1396
|
+
}).filter((edge) => Boolean(edge)).filter((edge, index, all) => all.findIndex((item) => item.component === edge.component) === index);
|
|
1378
1397
|
if (edges.length > 0) graph.set(owner, edges);
|
|
1379
1398
|
}
|
|
1380
1399
|
const usageMap = /* @__PURE__ */ new Map();
|
|
@@ -1784,7 +1803,8 @@ async function analyzeSubpackages(ctx) {
|
|
|
1784
1803
|
components: analyzeComponentUsage({
|
|
1785
1804
|
jsonConfigs: componentJsonConfigs,
|
|
1786
1805
|
subPackages
|
|
1787
|
-
})
|
|
1806
|
+
}),
|
|
1807
|
+
glassEasel: createGlassEaselAnalyzeResult(ctx)
|
|
1788
1808
|
};
|
|
1789
1809
|
}
|
|
1790
1810
|
//#endregion
|
|
@@ -2759,6 +2779,25 @@ function printBudgetCheckSummary(result) {
|
|
|
2759
2779
|
for (const item of exceededItems) logger_default.error(`- ${item.label}:${formatAnalyzeBytes(item.currentBytes)} / ${formatAnalyzeBytes(item.limitBytes)} (${(item.ratio * 100).toFixed(1)}%)`);
|
|
2760
2780
|
return true;
|
|
2761
2781
|
}
|
|
2782
|
+
function printGlassEaselCheckSummary(result) {
|
|
2783
|
+
const { glassEasel } = result;
|
|
2784
|
+
if (!glassEasel.detected) {
|
|
2785
|
+
logger_default.info("未检测到 glass-easel 配置。");
|
|
2786
|
+
return false;
|
|
2787
|
+
}
|
|
2788
|
+
if (glassEasel.diagnostics.length === 0) {
|
|
2789
|
+
logger_default.success("glass-easel 迁移检查通过");
|
|
2790
|
+
return false;
|
|
2791
|
+
}
|
|
2792
|
+
logger_default.info(`glass-easel 迁移检查:${glassEasel.summary.errors} 个错误,${glassEasel.summary.warnings} 个警告`);
|
|
2793
|
+
for (const diagnostic of glassEasel.diagnostics) {
|
|
2794
|
+
const location = diagnostic.line ? `:${diagnostic.line}:${diagnostic.column}` : "";
|
|
2795
|
+
const message = `[${diagnostic.code}] ${diagnostic.file}${location} ${diagnostic.message}`;
|
|
2796
|
+
if (diagnostic.severity === "error") logger_default.error(message);
|
|
2797
|
+
else logger_default.warn(message);
|
|
2798
|
+
}
|
|
2799
|
+
return glassEasel.summary.errors > 0;
|
|
2800
|
+
}
|
|
2762
2801
|
function printWebAnalysisSummary(result) {
|
|
2763
2802
|
logger_default.success("Web 静态分析完成");
|
|
2764
2803
|
logger_default.info(`- 配置状态:${result.web.enabled ? "已启用 weapp.web" : "未启用 weapp.web"}`);
|
|
@@ -2913,7 +2952,7 @@ function printHmrProfileAnalysisSummary(result, configService) {
|
|
|
2913
2952
|
}
|
|
2914
2953
|
}
|
|
2915
2954
|
function registerAnalyzeCommand(cli) {
|
|
2916
|
-
cli.command("analyze [root]", "analyze 两端包体与源码映射").option("--hmr-profile [file]", `[string | boolean] 分析 HMR JSONL profile,省略值时优先读取配置,否则回退到默认路径`).option("--json", `[boolean] 输出 JSON 结果`).option("--markdown", `[boolean] 输出 Markdown 报告`).option("--report <type>", `[string] 输出指定报告类型(pr)`).option("--budget-check", `[boolean] 检查 analyze 预算,超过预算时返回非 0 退出码`).option("--preload", `[boolean] 分析静态页面跳转、实际分包体积和 preloadRule 额度`).option("--output <file>", `[string] 将分析结果写入指定文件(JSON 或 Markdown)`).option("-p, --platform <platform>", `[string] target platform (weapp | web)`).option("--project-config <path>", `[string] project config path (miniprogram only)`).action(async (root, options) => {
|
|
2955
|
+
cli.command("analyze [root]", "analyze 两端包体与源码映射").option("--hmr-profile [file]", `[string | boolean] 分析 HMR JSONL profile,省略值时优先读取配置,否则回退到默认路径`).option("--json", `[boolean] 输出 JSON 结果`).option("--markdown", `[boolean] 输出 Markdown 报告`).option("--report <type>", `[string] 输出指定报告类型(pr)`).option("--budget-check", `[boolean] 检查 analyze 预算,超过预算时返回非 0 退出码`).option("--glass-easel-check", `[boolean] 检查 glass-easel 配置、模板和 SelectorQuery 迁移兼容性`).option("--preload", `[boolean] 分析静态页面跳转、实际分包体积和 preloadRule 额度`).option("--output <file>", `[string] 将分析结果写入指定文件(JSON 或 Markdown)`).option("-p, --platform <platform>", `[string] target platform (weapp | web)`).option("--project-config <path>", `[string] project config path (miniprogram only)`).action(async (root, options) => {
|
|
2917
2956
|
filterDuplicateOptions(options);
|
|
2918
2957
|
const configFile = resolveConfigFile(options);
|
|
2919
2958
|
const outputJson = coerceBooleanOption(options.json);
|
|
@@ -2922,6 +2961,7 @@ function registerAnalyzeCommand(cli) {
|
|
|
2922
2961
|
const outputPrReport = reportType === "pr";
|
|
2923
2962
|
if (reportType && !outputPrReport) throw new Error(`不支持的 analyze report 类型:${reportType}`);
|
|
2924
2963
|
const budgetCheck = coerceBooleanOption(options.budgetCheck);
|
|
2964
|
+
const glassEaselCheck = coerceBooleanOption(options.glassEaselCheck);
|
|
2925
2965
|
const targets = resolveRuntimeTargets(options);
|
|
2926
2966
|
const inlineConfig = createInlineConfig(targets);
|
|
2927
2967
|
let ctx;
|
|
@@ -2976,6 +3016,7 @@ function registerAnalyzeCommand(cli) {
|
|
|
2976
3016
|
return;
|
|
2977
3017
|
}
|
|
2978
3018
|
const previousResult = await readLatestAnalyzeHistorySnapshot(ctx.configService);
|
|
3019
|
+
ctx.runtimeState.glassEasel.silent = Boolean(outputJson || outputMarkdown || outputPrReport || glassEaselCheck);
|
|
2979
3020
|
const result = await analyzeSubpackages(ctx);
|
|
2980
3021
|
await writeAnalyzeHistorySnapshot(result, ctx.configService);
|
|
2981
3022
|
const writtenPath = await writeAnalyzeResult(result, outputOption, ctx.configService, outputPrReport ? "pr" : outputMarkdown ? "markdown" : "json", previousResult);
|
|
@@ -2986,8 +3027,10 @@ function registerAnalyzeCommand(cli) {
|
|
|
2986
3027
|
} else if (outputJson) {
|
|
2987
3028
|
if (!writtenPath) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
2988
3029
|
}
|
|
2989
|
-
|
|
2990
|
-
|
|
3030
|
+
const budgetFailed = budgetCheck ? printBudgetCheckSummary(result) : false;
|
|
3031
|
+
const glassEaselFailed = glassEaselCheck && !outputJson ? printGlassEaselCheckSummary(result) : glassEaselCheck && result.glassEasel.summary.errors > 0;
|
|
3032
|
+
if (budgetFailed || glassEaselFailed) process.exitCode = 1;
|
|
3033
|
+
if (budgetCheck || glassEaselCheck) return;
|
|
2991
3034
|
if (!outputPrReport && !outputMarkdown && !outputJson) {
|
|
2992
3035
|
printAnalysisSummary(result);
|
|
2993
3036
|
await startAnalyzeDashboard(result, {
|
|
@@ -3448,8 +3491,12 @@ const DEFAULT_FORWARD_CONSOLE_LEVELS = [
|
|
|
3448
3491
|
];
|
|
3449
3492
|
let activeForwardConsoleSession;
|
|
3450
3493
|
let activeForwardConsoleBridgeOptions;
|
|
3494
|
+
let activeForwardConsoleStart;
|
|
3495
|
+
let forwardConsoleLifecycle = 0;
|
|
3451
3496
|
const FORWARD_CONSOLE_RETRY_DELAY_MS = 1e3;
|
|
3452
3497
|
const FORWARD_CONSOLE_RETRY_TIMES = 5;
|
|
3498
|
+
const FORWARD_CONSOLE_RETRY_WINDOW_MS = 1e4;
|
|
3499
|
+
const FORWARD_CONSOLE_RECOVERABLE_START_TIMEOUT_MS = 6e4;
|
|
3453
3500
|
const FORWARD_CONSOLE_START_TIMEOUT_MS = 12e4;
|
|
3454
3501
|
async function detectAgent() {
|
|
3455
3502
|
try {
|
|
@@ -3487,16 +3534,23 @@ function writeForwardConsoleLine(line) {
|
|
|
3487
3534
|
function isDevtoolsPortNotReadyError(error) {
|
|
3488
3535
|
return error instanceof Error && (error.message === "DEVTOOLS_HTTP_PORT_ERROR" || error.message === "DEVTOOLS_WS_CONNECT_ERROR" || error.message === "DEVTOOLS_EXTENSION_CONTEXT_INVALIDATED");
|
|
3489
3536
|
}
|
|
3537
|
+
function isDevtoolsProtocolTimeoutError(error) {
|
|
3538
|
+
return error instanceof Error && (error.message === "DEVTOOLS_PROTOCOL_TIMEOUT" || /DevTools did not respond to protocol method \S+ within \d+ms/i.test(error.message));
|
|
3539
|
+
}
|
|
3540
|
+
function isRecoverableAutomatorStartError(error) {
|
|
3541
|
+
return isDevtoolsPortNotReadyError(error) || isDevtoolsProtocolTimeoutError(error) || isRetryableAutomatorLaunchError(error);
|
|
3542
|
+
}
|
|
3490
3543
|
function sleep(ms) {
|
|
3491
3544
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3492
3545
|
}
|
|
3493
3546
|
async function withForwardConsoleRetry(runner) {
|
|
3494
3547
|
let lastError;
|
|
3548
|
+
const startedAt = Date.now();
|
|
3495
3549
|
for (let attempt = 0; attempt <= FORWARD_CONSOLE_RETRY_TIMES; attempt++) try {
|
|
3496
3550
|
return await runner();
|
|
3497
3551
|
} catch (error) {
|
|
3498
3552
|
lastError = error;
|
|
3499
|
-
if (!isDevtoolsPortNotReadyError(error) || attempt === FORWARD_CONSOLE_RETRY_TIMES) break;
|
|
3553
|
+
if (!isDevtoolsPortNotReadyError(error) || attempt === FORWARD_CONSOLE_RETRY_TIMES || Date.now() - startedAt >= FORWARD_CONSOLE_RETRY_WINDOW_MS) break;
|
|
3500
3554
|
await sleep(FORWARD_CONSOLE_RETRY_DELAY_MS);
|
|
3501
3555
|
}
|
|
3502
3556
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
@@ -3550,6 +3604,8 @@ async function startForwardConsoleBridge(options) {
|
|
|
3550
3604
|
projectPath: options.projectPath,
|
|
3551
3605
|
logLevels: options.logLevels,
|
|
3552
3606
|
openedOnly: options.openedOnly,
|
|
3607
|
+
preferOpenedSession: options.preferOpenedSession,
|
|
3608
|
+
preserveProjectRoot: options.preserveProjectRoot,
|
|
3553
3609
|
port: options.port,
|
|
3554
3610
|
timeout: options.timeout,
|
|
3555
3611
|
unhandledErrors: options.unhandledErrors,
|
|
@@ -3589,57 +3645,100 @@ async function pauseActiveForwardConsole() {
|
|
|
3589
3645
|
};
|
|
3590
3646
|
}
|
|
3591
3647
|
/**
|
|
3648
|
+
* @description 关闭当前 DevTools 日志桥并释放共享 automator 会话。
|
|
3649
|
+
*/
|
|
3650
|
+
async function closeActiveForwardConsole() {
|
|
3651
|
+
forwardConsoleLifecycle += 1;
|
|
3652
|
+
const session = activeForwardConsoleSession;
|
|
3653
|
+
const pendingStart = activeForwardConsoleStart;
|
|
3654
|
+
activeForwardConsoleSession = void 0;
|
|
3655
|
+
activeForwardConsoleBridgeOptions = void 0;
|
|
3656
|
+
await session?.close();
|
|
3657
|
+
await pendingStart?.catch(() => {});
|
|
3658
|
+
}
|
|
3659
|
+
/**
|
|
3592
3660
|
* @description 在 weapp 开发态按需启动控制台转发。
|
|
3593
3661
|
*/
|
|
3594
3662
|
async function maybeStartForwardConsole(options) {
|
|
3595
3663
|
if (options.platform !== "weapp") return false;
|
|
3596
3664
|
const projectPath = resolveIdeProjectPath(options.mpDistRoot) ?? options.cwd;
|
|
3597
3665
|
if (!projectPath) return false;
|
|
3598
|
-
const resolved = await resolveForwardConsoleOptions(options.weappViteConfig);
|
|
3599
|
-
if (!resolved.enabled) return false;
|
|
3600
3666
|
if (activeForwardConsoleSession) return true;
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3667
|
+
if (activeForwardConsoleStart) return await activeForwardConsoleStart;
|
|
3668
|
+
const lifecycle = forwardConsoleLifecycle;
|
|
3669
|
+
const startTask = (async () => {
|
|
3670
|
+
const resolved = await resolveForwardConsoleOptions(options.weappViteConfig);
|
|
3671
|
+
if (!resolved.enabled || lifecycle !== forwardConsoleLifecycle) return false;
|
|
3672
|
+
const bridgeOptions = {
|
|
3673
|
+
agentName: resolved.agentName,
|
|
3674
|
+
color: !resolved.agentName,
|
|
3675
|
+
projectPath,
|
|
3676
|
+
port: resolveProjectAutomatorPort(projectPath),
|
|
3677
|
+
timeout: options.recoverAutomatorSession ? FORWARD_CONSOLE_RECOVERABLE_START_TIMEOUT_MS : FORWARD_CONSOLE_START_TIMEOUT_MS,
|
|
3678
|
+
logLevels: resolved.logLevels,
|
|
3679
|
+
openedOnly: options.openedOnly,
|
|
3680
|
+
preferOpenedSession: options.preferOpenedSession,
|
|
3681
|
+
preserveProjectRoot: options.preserveProjectRoot ?? !shouldUseAutomatorProjectWrapper(projectPath),
|
|
3682
|
+
unhandledErrors: resolved.unhandledErrors,
|
|
3683
|
+
onReadyMessage: "[forwardConsole] 已连接微信开发者工具日志"
|
|
3684
|
+
};
|
|
3685
|
+
const activateSession = async (session, activeOptions) => {
|
|
3686
|
+
if (lifecycle !== forwardConsoleLifecycle) {
|
|
3687
|
+
await session.close();
|
|
3688
|
+
return false;
|
|
3689
|
+
}
|
|
3690
|
+
activeForwardConsoleSession = session;
|
|
3691
|
+
activeForwardConsoleBridgeOptions = activeOptions;
|
|
3692
|
+
return true;
|
|
3693
|
+
};
|
|
3694
|
+
const recoverAutomatorSession = async () => {
|
|
3695
|
+
try {
|
|
3696
|
+
await options.recoverAutomatorSession?.();
|
|
3697
|
+
if (lifecycle !== forwardConsoleLifecycle) return false;
|
|
3698
|
+
const recoveredOptions = {
|
|
3699
|
+
...bridgeOptions,
|
|
3700
|
+
openedOnly: true,
|
|
3701
|
+
preferOpenedSession: true
|
|
3702
|
+
};
|
|
3703
|
+
return await activateSession(await startForwardConsoleBridge(recoveredOptions), recoveredOptions);
|
|
3704
|
+
} catch (recoveryError) {
|
|
3705
|
+
if (lifecycle !== forwardConsoleLifecycle) return false;
|
|
3706
|
+
const message = recoveryError instanceof Error ? recoveryError.message : String(recoveryError);
|
|
3707
|
+
logger_default.warn(`[forwardConsole] automator 会话恢复失败,回退到普通 IDE 打开流程:${message}`);
|
|
3708
|
+
return false;
|
|
3709
|
+
}
|
|
3710
|
+
};
|
|
3624
3711
|
try {
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3712
|
+
return await activateSession(await startForwardConsoleBridge(bridgeOptions), bridgeOptions);
|
|
3713
|
+
} catch (error) {
|
|
3714
|
+
if (lifecycle !== forwardConsoleLifecycle) return false;
|
|
3715
|
+
if (options.recoverAutomatorSession && isRecoverableAutomatorStartError(error)) return await recoverAutomatorSession();
|
|
3716
|
+
if (!isDevtoolsPortNotReadyError(error)) {
|
|
3717
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
3718
|
+
logger_default.warn(`[forwardConsole] 启动失败,回退到普通 IDE 打开流程:${message}`);
|
|
3719
|
+
return false;
|
|
3720
|
+
}
|
|
3721
|
+
const fallbackOptions = {
|
|
3631
3722
|
...bridgeOptions,
|
|
3632
3723
|
openedOnly: true,
|
|
3633
|
-
port: void 0
|
|
3724
|
+
port: void 0,
|
|
3725
|
+
preferOpenedSession: true
|
|
3634
3726
|
};
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3727
|
+
try {
|
|
3728
|
+
return await activateSession(await startForwardConsoleBridge(fallbackOptions), fallbackOptions);
|
|
3729
|
+
} catch (fallbackError) {
|
|
3730
|
+
if (lifecycle !== forwardConsoleLifecycle) return false;
|
|
3731
|
+
const message = fallbackError instanceof Error ? fallbackError.message : String(fallbackError);
|
|
3732
|
+
logger_default.warn(`[forwardConsole] 启动失败,回退到普通 IDE 打开流程:${message}`);
|
|
3733
|
+
return false;
|
|
3734
|
+
}
|
|
3642
3735
|
}
|
|
3736
|
+
})();
|
|
3737
|
+
activeForwardConsoleStart = startTask;
|
|
3738
|
+
try {
|
|
3739
|
+
return await startTask;
|
|
3740
|
+
} finally {
|
|
3741
|
+
if (activeForwardConsoleStart === startTask) activeForwardConsoleStart = void 0;
|
|
3643
3742
|
}
|
|
3644
3743
|
}
|
|
3645
3744
|
//#endregion
|
|
@@ -4945,7 +5044,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4945
5044
|
}
|
|
4946
5045
|
//#endregion
|
|
4947
5046
|
//#region package.json
|
|
4948
|
-
var version = "6.
|
|
5047
|
+
var version = "6.23.0";
|
|
4949
5048
|
//#endregion
|
|
4950
5049
|
//#region src/cli/devHotkeys/format.ts
|
|
4951
5050
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -5408,7 +5507,8 @@ async function analyzeUiFallback(ctx) {
|
|
|
5408
5507
|
root: meta.subPackage.root ?? "",
|
|
5409
5508
|
independent: Boolean(meta.subPackage.independent),
|
|
5410
5509
|
name: meta.subPackage.name
|
|
5411
|
-
})).filter((item) => item.root).sort((a, b) => a.root.localeCompare(b.root))
|
|
5510
|
+
})).filter((item) => item.root).sort((a, b) => a.root.localeCompare(b.root)),
|
|
5511
|
+
glassEasel: createGlassEaselAnalyzeResult(ctx)
|
|
5412
5512
|
};
|
|
5413
5513
|
}
|
|
5414
5514
|
function createAnalyzeController(options) {
|
|
@@ -5567,11 +5667,17 @@ function createAnalyzeController(options) {
|
|
|
5567
5667
|
}
|
|
5568
5668
|
//#endregion
|
|
5569
5669
|
//#region src/cli/commands/serve/shared.ts
|
|
5570
|
-
function
|
|
5571
|
-
if (!
|
|
5670
|
+
function startBackgroundForwardConsole(startForwardConsole) {
|
|
5671
|
+
if (!startForwardConsole) return;
|
|
5572
5672
|
try {
|
|
5573
|
-
|
|
5574
|
-
|
|
5673
|
+
startForwardConsole().catch((error) => {
|
|
5674
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
5675
|
+
logger_default.warn(`[forwardConsole] 后台启动失败:${message}`);
|
|
5676
|
+
});
|
|
5677
|
+
} catch (error) {
|
|
5678
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
5679
|
+
logger_default.warn(`[forwardConsole] 后台启动失败:${message}`);
|
|
5680
|
+
}
|
|
5575
5681
|
}
|
|
5576
5682
|
function resolveWebHost(host) {
|
|
5577
5683
|
if (host === void 0) return;
|
|
@@ -5589,7 +5695,7 @@ function createServeMiniProgramDevActions(options) {
|
|
|
5589
5695
|
openIde: async (openOptions = {}) => {
|
|
5590
5696
|
if (!openOptions.forceOpen && await options.tryReuseForwardConsole?.()) return "已通过控制台转发复用当前开发者工具会话";
|
|
5591
5697
|
await options.openIde(projectPath, openOptions);
|
|
5592
|
-
|
|
5698
|
+
startBackgroundForwardConsole(options.startForwardConsole);
|
|
5593
5699
|
return openOptions.forceReopen ? "已重新打开微信开发者工具项目" : "已打开或复用微信开发者工具项目";
|
|
5594
5700
|
},
|
|
5595
5701
|
rebuild: async () => {
|
|
@@ -5658,7 +5764,7 @@ function registerServeCommand(cli) {
|
|
|
5658
5764
|
loginRetryTimeout: options.loginRetryTimeout,
|
|
5659
5765
|
nonInteractive: options.nonInteractive,
|
|
5660
5766
|
openRecovery: false,
|
|
5661
|
-
prepareAutomatorSession: useAutomatorOpen
|
|
5767
|
+
prepareAutomatorSession: useAutomatorOpen,
|
|
5662
5768
|
reuseOpenedProject: !forceReopen,
|
|
5663
5769
|
skipAutomatorCompile: !forceReopen,
|
|
5664
5770
|
skipPostOpenHealthCheck: true,
|
|
@@ -5669,8 +5775,34 @@ function registerServeCommand(cli) {
|
|
|
5669
5775
|
writePostOpenSeparator();
|
|
5670
5776
|
},
|
|
5671
5777
|
projectPath: resolveIdeProjectRoot(configService.mpDistRoot, configService.cwd),
|
|
5778
|
+
startForwardConsole: async () => {
|
|
5779
|
+
return await maybeStartForwardConsole({
|
|
5780
|
+
platform: configService.platform,
|
|
5781
|
+
mpDistRoot: configService.mpDistRoot,
|
|
5782
|
+
cwd: configService.cwd,
|
|
5783
|
+
preferOpenedSession: false,
|
|
5784
|
+
recoverAutomatorSession: async () => {
|
|
5785
|
+
const projectPath = resolveIdeProjectRoot(configService.mpDistRoot, configService.cwd);
|
|
5786
|
+
await openIde(configService.platform, projectPath, {
|
|
5787
|
+
loginRetry: options.loginRetry,
|
|
5788
|
+
loginRetryTimeout: options.loginRetryTimeout,
|
|
5789
|
+
nonInteractive: options.nonInteractive,
|
|
5790
|
+
openRecovery: false,
|
|
5791
|
+
openStrategy: "automator",
|
|
5792
|
+
prepareAutomatorSession: true,
|
|
5793
|
+
reuseOpenedProject: false,
|
|
5794
|
+
skipAutomatorCompile: false,
|
|
5795
|
+
skipPostOpenHealthCheck: true,
|
|
5796
|
+
trustProject: options.trustProject,
|
|
5797
|
+
useAutomatorOpen: true
|
|
5798
|
+
});
|
|
5799
|
+
},
|
|
5800
|
+
weappViteConfig: configService.weappViteConfig
|
|
5801
|
+
});
|
|
5802
|
+
},
|
|
5672
5803
|
tryReuseForwardConsole: async () => {
|
|
5673
5804
|
return await maybeStartForwardConsole({
|
|
5805
|
+
openedOnly: true,
|
|
5674
5806
|
platform: configService.platform,
|
|
5675
5807
|
mpDistRoot: configService.mpDistRoot,
|
|
5676
5808
|
cwd: configService.cwd,
|
|
@@ -5786,6 +5918,7 @@ function registerServeCommand(cli) {
|
|
|
5786
5918
|
else if (targets.has("dev")) await waitForServeShutdownSignal();
|
|
5787
5919
|
} finally {
|
|
5788
5920
|
devHotkeysSession?.close();
|
|
5921
|
+
await closeActiveForwardConsole();
|
|
5789
5922
|
for (const backend of [...targets.select("dev")].reverse()) await backend.driver.close(ctx);
|
|
5790
5923
|
}
|
|
5791
5924
|
});
|
|
@@ -317,6 +317,12 @@ interface NpmMainPackageConfig {
|
|
|
317
317
|
interface NpmPluginPackageConfig {
|
|
318
318
|
dependencies?: false | NpmDependencyPattern[];
|
|
319
319
|
}
|
|
320
|
+
interface NpmPackageFilesConfig {
|
|
321
|
+
/** 包内需要复制的文件 glob,默认包含全部文件 */
|
|
322
|
+
include?: string[];
|
|
323
|
+
/** 包内需要排除的文件 glob */
|
|
324
|
+
exclude?: string[];
|
|
325
|
+
}
|
|
320
326
|
type JsFormat = 'cjs' | 'esm';
|
|
321
327
|
type SharedChunkStrategy = 'hoist' | 'duplicate';
|
|
322
328
|
type SharedChunkMode = 'common' | 'path' | 'inline';
|
|
@@ -563,6 +569,8 @@ interface WeappNpmConfig {
|
|
|
563
569
|
mainPackage?: NpmMainPackageConfig;
|
|
564
570
|
pluginPackage?: NpmPluginPackageConfig;
|
|
565
571
|
subPackages?: Record<string, NpmSubPackageConfig>;
|
|
572
|
+
/** 按包名限制原生小程序 npm 包复制到产物中的文件 */
|
|
573
|
+
packageFiles?: Record<string, NpmPackageFilesConfig>;
|
|
566
574
|
buildOptions?: (options: NpmBuildOptions, pkgMeta: BuildNpmPackageMeta) => NpmBuildOptions | undefined;
|
|
567
575
|
alipayNpmMode?: AlipayNpmMode;
|
|
568
576
|
}
|
|
@@ -1562,6 +1570,26 @@ interface NpmService {
|
|
|
1562
1570
|
build: (options?: NpmBuildOptions) => Promise<void>;
|
|
1563
1571
|
}
|
|
1564
1572
|
//#endregion
|
|
1573
|
+
//#region src/analyze/glassEasel/types.d.ts
|
|
1574
|
+
type GlassEaselDiagnosticCode = 'GE001' | 'GE002' | 'GE003' | 'GE004' | 'GE005' | 'GE006';
|
|
1575
|
+
type GlassEaselDiagnosticSeverity = 'error' | 'warning';
|
|
1576
|
+
interface GlassEaselDiagnostic {
|
|
1577
|
+
code: GlassEaselDiagnosticCode;
|
|
1578
|
+
severity: GlassEaselDiagnosticSeverity;
|
|
1579
|
+
message: string;
|
|
1580
|
+
file: string;
|
|
1581
|
+
line?: number;
|
|
1582
|
+
column?: number;
|
|
1583
|
+
normalized?: boolean;
|
|
1584
|
+
}
|
|
1585
|
+
interface GlassEaselTemplateFinding {
|
|
1586
|
+
code: Extract<GlassEaselDiagnosticCode, 'GE002' | 'GE003' | 'GE004'>;
|
|
1587
|
+
severity: GlassEaselDiagnosticSeverity;
|
|
1588
|
+
message: string;
|
|
1589
|
+
start: number;
|
|
1590
|
+
normalized?: boolean;
|
|
1591
|
+
}
|
|
1592
|
+
//#endregion
|
|
1565
1593
|
//#region src/wxml/shared.d.ts
|
|
1566
1594
|
interface Token {
|
|
1567
1595
|
start: number;
|
|
@@ -1603,6 +1631,7 @@ interface WxmlToken {
|
|
|
1603
1631
|
eventTokens: Token[];
|
|
1604
1632
|
directiveTokens?: Token[];
|
|
1605
1633
|
tagNameTokens?: Token[];
|
|
1634
|
+
glassEaselFindings?: GlassEaselTemplateFinding[];
|
|
1606
1635
|
code: string;
|
|
1607
1636
|
}
|
|
1608
1637
|
//#endregion
|
|
@@ -1640,6 +1669,12 @@ interface LibEntryState {
|
|
|
1640
1669
|
relativeBase: string;
|
|
1641
1670
|
}
|
|
1642
1671
|
interface RuntimeState {
|
|
1672
|
+
glassEasel: {
|
|
1673
|
+
detected: boolean;
|
|
1674
|
+
diagnostics: Map<string, GlassEaselDiagnostic>;
|
|
1675
|
+
warnedDiagnostics: Set<string>;
|
|
1676
|
+
silent: boolean;
|
|
1677
|
+
};
|
|
1643
1678
|
autoRoutes: {
|
|
1644
1679
|
routes: AutoRoutes;
|
|
1645
1680
|
serialized: string;
|
|
@@ -2070,4 +2105,4 @@ declare module 'vite' {
|
|
|
2070
2105
|
*/
|
|
2071
2106
|
declare function defineConfig<T extends UserConfigExport>(config: T): T;
|
|
2072
2107
|
//#endregion
|
|
2073
|
-
export { WeappAnalyzeBudgetConfig as $,
|
|
2108
|
+
export { WeappAnalyzeBudgetConfig as $, createWeappViteHostMeta as $n, GenerateFilenamesOptions as $t, Ref as A, StyleEntry as An, WeappReactCompilerConfig as At, BindingErrorLike as B, WeappLibEntryContext as Bn, WeappWevuConfig as Bt, LoadConfigOptions as C, ResolvedAlias as Cn, WeappInjectWeapiConfig as Ct, MethodDefinitions$1 as D, SharedChunkStrategy as Dn, WeappNpmConfig as Dt, InlineConfig$1 as E, SharedChunkOverride as En, WeappMcpConfig as Et, RolldownPlugin as F, SubPackageStyleEntry as Fn, WeappSubPackageConfig as Ft, EntryJsonFragment as G, WeappManagedNodeTsconfigConfig as Gn, BuildNpmPackageMeta as Gt, BaseEntry as H, WeappLibInternalDtsOptions as Hn, Alias as Ht, RolldownPluginOption as I, SubPackageStyleScope as In, WeappUniAppConfig as It, ScanComponentItem as J, WeappManagedTypeScriptConfig as Jn, CopyOptions as Jt, PageEntry as K, WeappManagedServerTsconfigConfig as Kn, ChunksConfig as Kt, RolldownWatchOptions as L, WeappLibComponentJson as Ln, WeappVueConfig as Lt, RolldownBuild as M, SubPackage as Mn, WeappRequestRuntimeConfig as Mt, RolldownOptions as N, SubPackageStyleConfigEntry as Nn, WeappRouteRule as Nt, Plugin$1 as O, StyleConfigEntry as On, WeappPreloadNetwork as Ot, RolldownOutput$1 as P, SubPackageStyleConfigObject as Pn, WeappRouteRules as Pt, UserConfig$2 as Q, applyWeappViteHostMeta as Qn, GenerateFileType as Qt, RolldownWatcher$1 as R, WeappLibConfig as Rn, WeappVueTemplateConfig as Rt, CompilerContext as S, NpmSubPackageConfig as Sn, WeappInjectRequestGlobalsTarget as St, ConfigEnv$1 as T, SharedChunkMode as Tn, WeappInjectWebRuntimeGlobalsTarget as Tt, ComponentEntry as U, WeappLibVueTscOptions as Un, AliasOptions as Ut, AppEntry as V, WeappLibFileName as Vn, WeappWorkerConfig as Vt, Entry as W, WeappManagedAppTsconfigConfig as Wn, AlipayNpmMode as Wt, ProjectConfig as X, WEAPP_VITE_HOST_NAME as Xn, GenerateDirsOptions as Xt, WxmlDep as Y, WeappWebConfig as Yn, DeprecatedInlineDynamicImports as Yt, SubPackageMetaValue as Z, WeappViteHostMeta as Zn, GenerateExtensionsOptions as Zt, definePageJson as _, NpmDependencyPattern as _n, WeappAutoRoutesIncludePattern as _t, UserConfigFnNoEnvPlain as a, GenerateTemplateFileSource as an, WeappVitePlatform as ar, WeappViteConfig as at, ChangeEvent as b, NpmPluginPackageConfig as bn, WeappHmrConfig as bt, UserConfigFnPromise as c, GenerateTemplatesConfig as cn, WeappViteTargetInput as cr, EnhanceOptions as ct, Component$1 as d, JsonMergeContext as dn, getSupportedWeappVitePlatforms as dr, MultiPlatformConfig as dt, GenerateOptions as en, isWeappViteHost as er, WeappAnalyzeConfig as et, Page$1 as f, JsonMergeFunction as fn, getSupportedWeappViteTargetDescriptors as fr, ScanWxmlOptions as ft, defineComponentJson as g, NpmBuildOptions as gn, WeappAutoRoutesInclude as gt, defineAppJson as h, MpPlatform$1 as hn, WeappAutoRoutesConfig as ht, UserConfigFnNoEnv as i, GenerateTemplateFactory as in, WEB_PLATFORM_ALIASES as ir, WeappForwardConsoleLogLevel as it, ResolvedConfig as j, StyleScope as jn, WeappReactConfig as jt, PluginOption as k, StyleConfigObject as kn, WeappPreloadRule as kt, defineConfig as l, JsFormat as ln, WeappViteTargetKind as lr, EnhanceWxmlOptions as lt, Theme$1 as m, JsonMergeStrategy as mn, resolveWeappViteTarget as mr, WeappAppPreludeMode as mt, UserConfigExport as n, GenerateTemplateContext as nn, ResolveWeappViteTargetOptions as nr, WeappDebugConfig as nt, UserConfigFnObject as o, GenerateTemplateInlineSource as on, WeappViteRuntime as or, AutoImportComponents as ot, Sitemap$1 as p, JsonMergeStage as pn, isWebPlatform as pr, WeappAppPreludeConfig as pt, ComponentsMap as q, WeappManagedSharedTsconfigConfig as qn, CopyGlobs as qt, UserConfigFn as r, GenerateTemplateEntry as rn, ResolvedWeappViteTarget as rr, WeappForwardConsoleConfig as rt, UserConfigFnObjectPlain as s, GenerateTemplateScope as sn, WeappViteTargetDescriptor as sr, AutoImportComponentsOption as st, UserConfig$1 as t, GenerateTemplate as tn, resolveWeappViteHostMeta as tr, WeappAnalyzeHistoryConfig as tt, App$1 as u, JsonConfig as un, WebPlatform as ur, HandleWxmlOptions as ut, defineSitemapJson as v, NpmMainPackageConfig as vn, WeappBuildScopeConfig as vt, ComputedDefinitions$1 as w, SharedChunkDynamicImports as wn, WeappInjectWebRuntimeGlobalsConfig as wt, WeappVitePluginApi as x, NpmStrategy as xn, WeappInjectRequestGlobalsConfig as xt, defineThemeJson as y, NpmPackageFilesConfig as yn, WeappBuildScopeObjectConfig as yt, ViteDevServer$1 as z, WeappLibDtsOptions as zn, WeappWebRuntimeConfig as zt };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as createWeappViteHostMeta, Qn as applyWeappViteHostMeta, Xn as WEAPP_VITE_HOST_NAME, Zn as WeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as isWeappViteHost, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, o as UserConfigFnObject, or as WeappViteRuntime, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, tr as resolveWeappViteHostMeta, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-qh0O73A5.mjs";
|
|
2
2
|
import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
|
|
3
3
|
export { type App, type Component, type Page, type Sitemap, type Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, type WeappI18nConfig, type WeappViteConfig, WeappViteHostMeta, type WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|