weapp-vite 6.20.0 → 6.20.1
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 +30 -12
- package/dist/{config-ClSNHsDH.d.mts → config-Dd_PqIy2.d.mts} +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-CtCNbqdC.mjs → createContext-DutRdQ_I.mjs} +59 -10
- package/dist/file-BG-q88IF.mjs +2 -0
- package/dist/{file-NyBgGJm2.mjs → file-Bwxu2veP.mjs} +1 -1
- package/dist/getInstance-D8SEyLSD.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 +1 -1
- package/package.json +5 -5
- package/dist/file-CQTcjEWz.mjs +0 -2
- package/dist/getInstance-DkRC6-mO.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getCompilerContext, v as getRouteRuntimeGlobalKeys } from "./createContext-
|
|
1
|
+
import { n as getCompilerContext, v as getRouteRuntimeGlobalKeys } from "./createContext-DutRdQ_I.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 { C as parseCommentJson, D as isPathInside, E as shouldPassPlatformArgToIdeOpen, S as loadViteConfigFile, T as getDefaultIdeProjectRoot, _ as resolveHmrProfileJsonPath, a as formatBytes, b as checkRuntime, d as getBackendForCapability, f as resolveBackendExecution, g as SHARED_CHUNK_VIRTUAL_PREFIX, h as createSharedBuildConfig, m as syncManagedTsconfigBootstrapFiles, p as syncProjectSupportFiles, t as createCompilerContext, w as createCjsConfigLoadError, x as getProjectConfigFileName, y as resolveWeappConfigFile } from "./createContext-
|
|
1
|
+
import { C as parseCommentJson, D as isPathInside, E as shouldPassPlatformArgToIdeOpen, S as loadViteConfigFile, T as getDefaultIdeProjectRoot, _ as resolveHmrProfileJsonPath, a as formatBytes, b as checkRuntime, d as getBackendForCapability, f as resolveBackendExecution, g as SHARED_CHUNK_VIRTUAL_PREFIX, h as createSharedBuildConfig, m as syncManagedTsconfigBootstrapFiles, p as syncProjectSupportFiles, t as createCompilerContext, w as createCjsConfigLoadError, x as getProjectConfigFileName, y as resolveWeappConfigFile } from "./createContext-DutRdQ_I.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { h as VERSION } from "./file-
|
|
3
|
+
import { h as VERSION } from "./file-Bwxu2veP.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";
|
|
@@ -313,26 +313,39 @@ async function openWechatIdeByAutomator(projectPath) {
|
|
|
313
313
|
}));
|
|
314
314
|
}
|
|
315
315
|
async function connectOpenedProject(projectPath) {
|
|
316
|
-
let miniProgram
|
|
316
|
+
let miniProgram;
|
|
317
317
|
try {
|
|
318
318
|
miniProgram = await connectOpenedAutomator({
|
|
319
319
|
projectPath,
|
|
320
320
|
port: resolveProjectAutomatorPort(projectPath),
|
|
321
321
|
timeout: 3e3
|
|
322
322
|
});
|
|
323
|
+
} catch {
|
|
324
|
+
return { status: "not-connected" };
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
323
327
|
await verifyOpenedProjectHealth(miniProgram);
|
|
324
|
-
return
|
|
328
|
+
return {
|
|
329
|
+
status: "connected",
|
|
330
|
+
miniProgram
|
|
331
|
+
};
|
|
325
332
|
} catch {
|
|
326
|
-
|
|
327
|
-
return
|
|
333
|
+
disconnectMiniProgram(miniProgram);
|
|
334
|
+
return { status: "unhealthy" };
|
|
328
335
|
}
|
|
329
336
|
}
|
|
330
337
|
/**
|
|
331
338
|
* @description 若当前项目已在微信开发者工具中打开且自动化可连通,则直接复用现有会话,避免重复拉起 IDE。
|
|
332
339
|
*/
|
|
333
340
|
async function tryReuseOpenedWechatIde(projectPath, closeIde, options = {}) {
|
|
334
|
-
const
|
|
335
|
-
if (
|
|
341
|
+
const connection = await connectOpenedProject(projectPath);
|
|
342
|
+
if (connection.status === "unhealthy") return {
|
|
343
|
+
reopened: false,
|
|
344
|
+
reused: false,
|
|
345
|
+
unhealthy: true
|
|
346
|
+
};
|
|
347
|
+
if (connection.status === "not-connected") return null;
|
|
348
|
+
const { miniProgram } = connection;
|
|
336
349
|
disconnectMiniProgram(miniProgram);
|
|
337
350
|
if (options.promptReopen === false) {
|
|
338
351
|
logger_default.info("目标项目已在微信开发者工具中打开,已跳过重复打开。");
|
|
@@ -358,8 +371,9 @@ async function tryReuseOpenedWechatIde(projectPath, closeIde, options = {}) {
|
|
|
358
371
|
* @description 对已打开的目标项目执行强制重开,以刷新最新构建产物。
|
|
359
372
|
*/
|
|
360
373
|
async function reopenOpenedWechatIde(projectPath, closeIde) {
|
|
361
|
-
const
|
|
362
|
-
if (
|
|
374
|
+
const connection = await connectOpenedProject(projectPath);
|
|
375
|
+
if (connection.status !== "connected") return false;
|
|
376
|
+
const { miniProgram } = connection;
|
|
363
377
|
disconnectMiniProgram(miniProgram);
|
|
364
378
|
logger_default.info("目标项目已在微信开发者工具中打开,当前命令将主动重开以刷新最新构建产物。");
|
|
365
379
|
if (!await closeIde()) logger_default.warn("关闭当前微信开发者工具失败,仍继续尝试重新打开目标项目。");
|
|
@@ -421,6 +435,7 @@ async function tryOpenWechatIdeByAutomator(projectPath, options) {
|
|
|
421
435
|
const reuseResult = await tryReuseOpenedWechatIde(projectPath, closeIde, { promptReopen: options.reuseOpenedProject !== true });
|
|
422
436
|
if (reuseResult?.reused) return "reused";
|
|
423
437
|
if (reuseResult?.reopened) return "reopened";
|
|
438
|
+
if (reuseResult?.unhealthy) return "unhealthy";
|
|
424
439
|
await openWechatIdeByAutomator(projectPath);
|
|
425
440
|
return "opened";
|
|
426
441
|
}
|
|
@@ -606,7 +621,10 @@ async function openIde(platform, projectPath, options = {}) {
|
|
|
606
621
|
if (platform === "weapp" && projectPath && normalizedOptions.trustProject !== false && bootstrapResult?.servicePortEnabled !== false && useAutomatorOpen) try {
|
|
607
622
|
const openResult = await tryOpenWechatIdeByAutomator(projectPath, normalizedOptions);
|
|
608
623
|
if (openResult === "reused") return;
|
|
609
|
-
if (openResult) {
|
|
624
|
+
if (openResult === "unhealthy") {
|
|
625
|
+
logger_default.warn("已连接到目标微信开发者工具项目,但协议健康检查暂未就绪;已保留当前窗口并跳过重复启动。");
|
|
626
|
+
return;
|
|
627
|
+
} else if (openResult) {
|
|
610
628
|
if (!normalizedOptions.skipPostOpenHealthCheck) await verifyAndRecoverOpenedWechatIdeProject(platform, projectPath, bootstrapResult?.servicePortEnabled, normalizedOptions);
|
|
611
629
|
return;
|
|
612
630
|
}
|
|
@@ -4546,7 +4564,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
4546
4564
|
}
|
|
4547
4565
|
//#endregion
|
|
4548
4566
|
//#region package.json
|
|
4549
|
-
var version = "6.20.
|
|
4567
|
+
var version = "6.20.1";
|
|
4550
4568
|
//#endregion
|
|
4551
4569
|
//#region src/cli/devHotkeys/format.ts
|
|
4552
4570
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1921,6 +1921,7 @@ interface AutoImportService {
|
|
|
1921
1921
|
reset: () => void;
|
|
1922
1922
|
getVersion: () => number;
|
|
1923
1923
|
runInBatch: <T>(task: () => T | Promise<T>) => Promise<T>;
|
|
1924
|
+
runWithoutOutputWrites: <T>(task: () => T | Promise<T>) => Promise<T>;
|
|
1924
1925
|
registerPotentialComponent: (filePath: string) => Promise<void>;
|
|
1925
1926
|
removePotentialComponent: (filePath: string) => void;
|
|
1926
1927
|
resolve: (componentName: string, importerBaseName?: string) => AutoImportMatch | undefined;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as WeappViteRuntime, Gn as applyWeappViteHostMeta, Jn as resolveWeappViteHostMeta, Kn as createWeappViteHostMeta, Un as WEAPP_VITE_HOST_NAME, Wn as WeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, o as UserConfigFnObject, p as Sitemap, qn as isWeappViteHost, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-
|
|
1
|
+
import { $n as WeappViteRuntime, Gn as applyWeappViteHostMeta, Jn as resolveWeappViteHostMeta, Kn as createWeappViteHostMeta, Un as WEAPP_VITE_HOST_NAME, Wn as WeappViteHostMeta, _ as definePageJson, a as UserConfigFnNoEnvPlain, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, l as defineConfig, m as Theme, n as UserConfigExport, o as UserConfigFnObject, p as Sitemap, qn as isWeappViteHost, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-Dd_PqIy2.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, type WeappViteConfig, WeappViteHostMeta, type WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost--CaeyWpA.mjs";
|
|
2
2
|
import { n as configureLogger, r as logger_default } from "./logger-mt4mSTqV.mjs";
|
|
3
|
-
import { _ as jsExtensions, a as findJsonEntry, b as templateExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as scriptExtensions, x as vueExtensions, y as supportedCssLangs } from "./file-
|
|
3
|
+
import { _ as jsExtensions, a as findJsonEntry, b as templateExtensions, c as isJsOrTs, d as touch, g as configExtensions, i as findJsEntry, l as isTemplate, n as changeFileExtension, o as findTemplateEntry, p as inlineAutoRoutesImports, r as findCssEntry, s as findVueEntry, t as extractConfigFromVue, v as scriptExtensions, x as vueExtensions, y as supportedCssLangs } from "./file-Bwxu2veP.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import { createDebug } from "obug";
|
|
6
6
|
import fs, { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
@@ -5989,6 +5989,7 @@ function createAutoImportScheduling(options) {
|
|
|
5989
5989
|
html: void 0,
|
|
5990
5990
|
vue: void 0
|
|
5991
5991
|
};
|
|
5992
|
+
let outputWritesSuppressed = 0;
|
|
5992
5993
|
let outputSettingsSnapshot;
|
|
5993
5994
|
function getOutputSettingsSnapshot() {
|
|
5994
5995
|
if (!outputSettingsSnapshot) outputSettingsSnapshot = {
|
|
@@ -5999,6 +6000,7 @@ function createAutoImportScheduling(options) {
|
|
|
5999
6000
|
return outputSettingsSnapshot;
|
|
6000
6001
|
}
|
|
6001
6002
|
function deferOrSchedule(kind, shouldWrite) {
|
|
6003
|
+
if (outputWritesSuppressed > 0) return;
|
|
6002
6004
|
if (batchedWrites.depth > 0) {
|
|
6003
6005
|
const previous = batchedWrites[kind];
|
|
6004
6006
|
batchedWrites[kind] = previous === void 0 ? shouldWrite : previous || shouldWrite;
|
|
@@ -6041,10 +6043,19 @@ function createAutoImportScheduling(options) {
|
|
|
6041
6043
|
if (batchedWrites.depth === 0) flushBatchedWrites();
|
|
6042
6044
|
}
|
|
6043
6045
|
}
|
|
6046
|
+
async function runWithoutOutputWrites(task) {
|
|
6047
|
+
outputWritesSuppressed += 1;
|
|
6048
|
+
try {
|
|
6049
|
+
return await task();
|
|
6050
|
+
} finally {
|
|
6051
|
+
outputWritesSuppressed -= 1;
|
|
6052
|
+
}
|
|
6053
|
+
}
|
|
6044
6054
|
return {
|
|
6045
6055
|
getOutputSettingsSnapshot,
|
|
6046
6056
|
deferOrSchedule,
|
|
6047
|
-
runInBatch
|
|
6057
|
+
runInBatch,
|
|
6058
|
+
runWithoutOutputWrites
|
|
6048
6059
|
};
|
|
6049
6060
|
}
|
|
6050
6061
|
//#endregion
|
|
@@ -6165,6 +6176,9 @@ function createAutoImportService(ctx) {
|
|
|
6165
6176
|
},
|
|
6166
6177
|
async runInBatch(task) {
|
|
6167
6178
|
return await scheduling.runInBatch(task);
|
|
6179
|
+
},
|
|
6180
|
+
async runWithoutOutputWrites(task) {
|
|
6181
|
+
return await scheduling.runWithoutOutputWrites(task);
|
|
6168
6182
|
}
|
|
6169
6183
|
};
|
|
6170
6184
|
}
|
|
@@ -12311,7 +12325,11 @@ async function runStatefulHmrDev(ctx, buildOptions, restart, snapshots) {
|
|
|
12311
12325
|
server: {
|
|
12312
12326
|
...buildOptions.server ?? {},
|
|
12313
12327
|
host: "127.0.0.1",
|
|
12314
|
-
port: 0
|
|
12328
|
+
port: 0,
|
|
12329
|
+
watch: {
|
|
12330
|
+
...buildOptions.server?.watch ?? {},
|
|
12331
|
+
ignored: createStatefulHmrWatchIgnored(buildOptions.root ?? configService.cwd, configService.outDir, buildOptions.server?.watch?.ignored)
|
|
12332
|
+
}
|
|
12315
12333
|
},
|
|
12316
12334
|
build: {
|
|
12317
12335
|
...buildOptions.build ?? {},
|
|
@@ -12330,6 +12348,14 @@ async function runStatefulHmrDev(ctx, buildOptions, restart, snapshots) {
|
|
|
12330
12348
|
throw error;
|
|
12331
12349
|
}
|
|
12332
12350
|
}
|
|
12351
|
+
function createStatefulHmrWatchIgnored(root, outDir, ignored) {
|
|
12352
|
+
const normalizedRoot = normalizeFsResolvedId(root);
|
|
12353
|
+
const normalizedOutDir = normalizeFsResolvedId(path.isAbsolute(outDir) ? outDir : path.resolve(root, outDir));
|
|
12354
|
+
return [...ignored === void 0 ? [] : Array.isArray(ignored) ? ignored : [ignored], (id) => {
|
|
12355
|
+
const normalizedId = normalizeFsResolvedId(path.isAbsolute(id) ? id : path.resolve(normalizedRoot, id));
|
|
12356
|
+
return isPathInside(normalizedOutDir, normalizedId);
|
|
12357
|
+
}];
|
|
12358
|
+
}
|
|
12333
12359
|
var StatefulHmrSession = class {
|
|
12334
12360
|
ctx;
|
|
12335
12361
|
server;
|
|
@@ -14694,14 +14720,38 @@ function createIndependentBuilder(configService, buildState) {
|
|
|
14694
14720
|
const task = (async () => {
|
|
14695
14721
|
try {
|
|
14696
14722
|
const chunkRoot = meta.subPackage.root ?? root;
|
|
14697
|
-
const
|
|
14723
|
+
const isolatedCtx = createCompilerContextInstance();
|
|
14724
|
+
await isolatedCtx.configService.load({
|
|
14725
|
+
cwd: configService.cwd,
|
|
14726
|
+
isDev: configService.isDev,
|
|
14727
|
+
mode: configService.mode,
|
|
14728
|
+
configFile: configService.configFilePath,
|
|
14729
|
+
cliPlatform: configService.platform,
|
|
14730
|
+
projectConfigPath: configService.projectConfigPath
|
|
14731
|
+
});
|
|
14732
|
+
const isolatedConfigService = isolatedCtx.configService;
|
|
14733
|
+
isolatedConfigService.options = {
|
|
14734
|
+
...isolatedConfigService.options,
|
|
14735
|
+
currentSubPackageRoot: chunkRoot
|
|
14736
|
+
};
|
|
14737
|
+
const inlineConfig = isolatedConfigService.merge(meta, meta.subPackage.inlineConfig, { build: {
|
|
14698
14738
|
write: false,
|
|
14699
14739
|
watch: null,
|
|
14700
14740
|
rolldownOptions: { output: { chunkFileNames() {
|
|
14701
14741
|
return `${chunkRoot}/[name].js`;
|
|
14702
14742
|
} } }
|
|
14703
14743
|
} });
|
|
14704
|
-
const
|
|
14744
|
+
const autoImportGlobs = getAutoImportConfig(isolatedConfigService)?.globs;
|
|
14745
|
+
if (autoImportGlobs?.length) {
|
|
14746
|
+
const candidates = await findAutoImportCandidates({
|
|
14747
|
+
ctx: isolatedCtx,
|
|
14748
|
+
resolvedConfig: { build: { outDir: isolatedConfigService.outDir } }
|
|
14749
|
+
}, autoImportGlobs);
|
|
14750
|
+
await isolatedCtx.autoImportService.runWithoutOutputWrites(async () => {
|
|
14751
|
+
await Promise.all(candidates.map((candidate) => isolatedCtx.autoImportService.registerPotentialComponent(candidate)));
|
|
14752
|
+
});
|
|
14753
|
+
}
|
|
14754
|
+
const restoreDefineEnv = syncImportMetaEnvDefineOverride(isolatedConfigService, inlineConfig.define);
|
|
14705
14755
|
let result;
|
|
14706
14756
|
try {
|
|
14707
14757
|
result = await build(inlineConfig);
|
|
@@ -27855,8 +27905,7 @@ function createOptionsHook(state) {
|
|
|
27855
27905
|
scanService.loadSubPackages();
|
|
27856
27906
|
const dirtyIndependentRoots = scanService.drainIndependentDirtyRoots();
|
|
27857
27907
|
const pendingIndependentBuilds = [];
|
|
27858
|
-
const
|
|
27859
|
-
const previousSubPackageRoot = shouldSerializeIndependentBuilds ? configService.currentSubPackageRoot : void 0;
|
|
27908
|
+
const previousSubPackageRoot = configService.currentSubPackageRoot;
|
|
27860
27909
|
for (const root of dirtyIndependentRoots) {
|
|
27861
27910
|
const meta = scanService.independentSubPackageMap.get(root);
|
|
27862
27911
|
if (!meta) continue;
|
|
@@ -27868,11 +27917,11 @@ function createOptionsHook(state) {
|
|
|
27868
27917
|
});
|
|
27869
27918
|
buildTask.catch(() => {});
|
|
27870
27919
|
pendingIndependentBuilds.push(buildTask);
|
|
27871
|
-
|
|
27920
|
+
try {
|
|
27872
27921
|
await buildTask;
|
|
27873
27922
|
} catch {}
|
|
27874
27923
|
}
|
|
27875
|
-
if (
|
|
27924
|
+
if (configService.currentSubPackageRoot !== previousSubPackageRoot) configService.options = {
|
|
27876
27925
|
...configService.options,
|
|
27877
27926
|
currentSubPackageRoot: previousSubPackageRoot
|
|
27878
27927
|
};
|
|
@@ -33177,7 +33226,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
33177
33226
|
const { path: appEntryPath } = appEntry;
|
|
33178
33227
|
let configFromVue;
|
|
33179
33228
|
if (!appConfigFile && vueAppPath) {
|
|
33180
|
-
const { extractConfigFromVue } = await import("./file-
|
|
33229
|
+
const { extractConfigFromVue } = await import("./file-BG-q88IF.mjs");
|
|
33181
33230
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
33182
33231
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
33183
33232
|
}
|
|
@@ -90,7 +90,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
90
90
|
}
|
|
91
91
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
92
92
|
try {
|
|
93
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
93
|
+
const { getCompilerContext } = await import("./getInstance-D8SEyLSD.mjs");
|
|
94
94
|
const compilerContext = getCompilerContext();
|
|
95
95
|
const service = compilerContext.autoRoutesService;
|
|
96
96
|
const reference = service?.getReference?.();
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as WeappViteRuntime, A as Ref, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as applyWeappViteHostMeta, I as RolldownPluginOption, Jn as resolveWeappViteHostMeta, Kn as createWeappViteHostMeta, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappVitePlatform, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as WEAPP_VITE_HOST_NAME, Wn as WeappViteHostMeta, Xn as ResolvedWeappViteTarget, Yn as ResolveWeappViteTargetOptions, Zn as WEB_PLATFORM_ALIASES, _ as definePageJson, a as UserConfigFnNoEnvPlain, ar as getSupportedWeappViteTargetDescriptors, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as WeappViteTargetDescriptor, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, ir as getSupportedWeappVitePlatforms, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nr as WeappViteTargetKind, o as UserConfigFnObject, or as isWebPlatform, p as Sitemap, qn as isWeappViteHost, r as UserConfigFn, rr as WebPlatform, s as UserConfigFnObjectPlain, sr as resolveWeappViteTarget, t as UserConfig, tr as WeappViteTargetInput, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer } from "./config-
|
|
1
|
+
import { $n as WeappViteRuntime, A as Ref, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Gn as applyWeappViteHostMeta, I as RolldownPluginOption, Jn as resolveWeappViteHostMeta, Kn as createWeappViteHostMeta, L as RolldownWatchOptions, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Qn as WeappVitePlatform, R as RolldownWatcher, S as CompilerContext, T as ConfigEnv, Un as WEAPP_VITE_HOST_NAME, Wn as WeappViteHostMeta, Xn as ResolvedWeappViteTarget, Yn as ResolveWeappViteTargetOptions, Zn as WEB_PLATFORM_ALIASES, _ as definePageJson, a as UserConfigFnNoEnvPlain, ar as getSupportedWeappViteTargetDescriptors, at as WeappViteConfig, c as UserConfigFnPromise, d as Component, er as WeappViteTargetDescriptor, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, ir as getSupportedWeappVitePlatforms, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nr as WeappViteTargetKind, o as UserConfigFnObject, or as isWebPlatform, p as Sitemap, qn as isWeappViteHost, r as UserConfigFn, rr as WebPlatform, s as UserConfigFnObjectPlain, sr as resolveWeappViteTarget, t as UserConfig, tr as WeappViteTargetInput, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer } from "./config-Dd_PqIy2.mjs";
|
|
2
2
|
import { a as LayoutHostContext, c as LayoutHostResolver, d as unregisterLayoutHosts, f as waitForLayoutHost, i as LayoutHostBridge, l as registerLayoutHosts, m as createWevuComponent, n as defineProps, o as LayoutHostEntry, p as WevuComponentOptions, r as setPageLayout, s as LayoutHostResolveOptions, t as defineEmits, u as resolveLayoutHost } from "./runtime-Ee2HY6gR.mjs";
|
|
3
3
|
//#region src/createContext.d.ts
|
|
4
4
|
interface CreateCompilerContextOptions extends Partial<LoadConfigOptions> {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-BL8Dhhk6.mjs";
|
|
2
2
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost--CaeyWpA.mjs";
|
|
3
3
|
import { t as defineConfig } from "./config-DRGcCi3h.mjs";
|
|
4
|
-
import { c as getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-
|
|
4
|
+
import { c as getSupportedWeappViteTargetDescriptors, l as isWebPlatform, o as WEB_PLATFORM_ALIASES, s as getSupportedWeappVitePlatforms, t as createCompilerContext, u as resolveWeappViteTarget } from "./createContext-DutRdQ_I.mjs";
|
|
5
5
|
import { a as resolveLayoutHost, c as createWevuComponent, i as registerLayoutHosts, n as defineProps, o as unregisterLayoutHosts, r as setPageLayout, s as waitForLayoutHost, t as defineEmits } from "./runtime-D6VCNhNY.mjs";
|
|
6
6
|
export { WEAPP_VITE_HOST_NAME, WEB_PLATFORM_ALIASES, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, getSupportedWeappVitePlatforms, getSupportedWeappViteTargetDescriptors, isWeappViteHost, isWebPlatform, registerLayoutHosts, resolveLayoutHost, resolveWeappViteHostMeta, resolveWeappViteTarget, setPageLayout, unregisterLayoutHosts, waitForLayoutHost };
|
package/dist/json.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-
|
|
1
|
+
import { _ as definePageJson, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, m as Theme, p as Sitemap, u as App, v as defineSitemapJson, y as defineThemeJson } from "./config-Dd_PqIy2.mjs";
|
|
2
2
|
export { type App, type Component, type Page, type Sitemap, type Theme, defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as WeappMcpConfig } from "./config-
|
|
1
|
+
import { Et as WeappMcpConfig } from "./config-Dd_PqIy2.mjs";
|
|
2
2
|
import { CreateServerOptions, DEFAULT_MCP_ENDPOINT, DEFAULT_MCP_HOST, DEFAULT_MCP_PORT, DEFAULT_RUNTIME_REST_ENDPOINT, McpServerHandle, StartMcpServerOptions, createWeappViteMcpServer } from "@weapp-vite/mcp";
|
|
3
3
|
//#region src/mcp.d.ts
|
|
4
4
|
interface ResolvedWeappMcpConfig {
|
package/dist/test.mjs
CHANGED
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { f as Resolver } from "./index-CaXAtb9e.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-C7fCmf92.mjs";
|
|
3
|
-
import { $ as WeappAnalyzeBudgetConfig, $n as WeappViteRuntime, $t as GenerateTemplate, A as Ref, An as WeappLibComponentJson, At as WeappRequestRuntimeConfig, B as BindingErrorLike, Bn as WeappManagedSharedTsconfigConfig, Bt as Alias, Cn as SharedChunkOverride, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as SubPackageStyleConfigObject, Dt as WeappNpmConfig, E as InlineConfig, En as SubPackageStyleConfigEntry, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappLibInternalDtsOptions, Ft as WeappVueConfig, G as EntryJsonFragment, Gt as CopyGlobs, H as BaseEntry, Hn as WeappWebConfig, Ht as AlipayNpmMode, I as RolldownPluginOption, In as WeappLibVueTscOptions, It as WeappVueTemplateConfig, J as ScanComponentItem, Jt as GenerateDirsOptions, K as PageEntry, Kt as CopyOptions, L as RolldownWatchOptions, Ln as WeappManagedAppTsconfigConfig, Lt as WeappWebRuntimeConfig, M as RolldownBuild, Mn as WeappLibDtsOptions, Mt as WeappRouteRules, N as RolldownOptions, Nn as WeappLibEntryContext, Nt as WeappSubPackageConfig, O as Plugin, On as SubPackageStyleEntry, Ot as WeappReactCompilerConfig, P as RolldownOutput, Pn as WeappLibFileName, Pt as WeappUniAppConfig, Q as UserConfig, Qt as GenerateOptions, R as RolldownWatcher, Rn as WeappManagedNodeTsconfigConfig, Rt as WeappWevuConfig, Sn as SharedChunkMode, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackage, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as BuildNpmPackageMeta, V as AppEntry, Vn as WeappManagedTypeScriptConfig, Vt as AliasOptions, W as Entry, Wn as WeappViteHostMeta, Wt as ChunksConfig, X as ProjectConfig, Xt as GenerateFileType, Y as WxmlDep, Yt as GenerateExtensionsOptions, Z as SubPackageMetaValue, Zt as GenerateFilenamesOptions, _n as NpmPluginPackageConfig, _t as WeappAutoRoutesIncludePattern, an as GenerateTemplateScope, at as WeappViteConfig, b as ChangeEvent, bn as ResolvedAlias, bt as WeappHmrConfig, cn as JsonConfig, ct as EnhanceOptions, dn as JsonMergeStage, dt as MultiPlatformConfig, en as GenerateTemplateContext, et as WeappAnalyzeConfig, fn as JsonMergeStrategy, ft as ScanWxmlOptions, gn as NpmMainPackageConfig, gt as WeappAutoRoutesInclude, hn as NpmDependencyPattern, ht as WeappAutoRoutesConfig, in as GenerateTemplateInlineSource, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibConfig, jt as WeappRouteRule, k as PluginOption, kn as SubPackageStyleScope, kt as WeappReactConfig, ln as JsonMergeContext, lt as EnhanceWxmlOptions, mn as NpmBuildOptions, mt as WeappAppPreludeMode, nn as GenerateTemplateFactory, nt as WeappDebugConfig, on as GenerateTemplatesConfig, ot as AutoImportComponents, pn as MpPlatform, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as DeprecatedInlineDynamicImports, rn as GenerateTemplateFileSource, rt as WeappForwardConsoleConfig, sn as JsFormat, st as AutoImportComponentsOption, tn as GenerateTemplateEntry, tt as WeappAnalyzeHistoryConfig, un as JsonMergeFunction, ut as HandleWxmlOptions, vn as NpmStrategy, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SharedChunkStrategy, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SharedChunkDynamicImports, xt as WeappInjectRequestGlobalsConfig, yn as NpmSubPackageConfig, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zn as WeappManagedServerTsconfigConfig, zt as WeappWorkerConfig } from "./config-
|
|
3
|
+
import { $ as WeappAnalyzeBudgetConfig, $n as WeappViteRuntime, $t as GenerateTemplate, A as Ref, An as WeappLibComponentJson, At as WeappRequestRuntimeConfig, B as BindingErrorLike, Bn as WeappManagedSharedTsconfigConfig, Bt as Alias, Cn as SharedChunkOverride, Ct as WeappInjectWeapiConfig, D as MethodDefinitions, Dn as SubPackageStyleConfigObject, Dt as WeappNpmConfig, E as InlineConfig, En as SubPackageStyleConfigEntry, Et as WeappMcpConfig, F as RolldownPlugin, Fn as WeappLibInternalDtsOptions, Ft as WeappVueConfig, G as EntryJsonFragment, Gt as CopyGlobs, H as BaseEntry, Hn as WeappWebConfig, Ht as AlipayNpmMode, I as RolldownPluginOption, In as WeappLibVueTscOptions, It as WeappVueTemplateConfig, J as ScanComponentItem, Jt as GenerateDirsOptions, K as PageEntry, Kt as CopyOptions, L as RolldownWatchOptions, Ln as WeappManagedAppTsconfigConfig, Lt as WeappWebRuntimeConfig, M as RolldownBuild, Mn as WeappLibDtsOptions, Mt as WeappRouteRules, N as RolldownOptions, Nn as WeappLibEntryContext, Nt as WeappSubPackageConfig, O as Plugin, On as SubPackageStyleEntry, Ot as WeappReactCompilerConfig, P as RolldownOutput, Pn as WeappLibFileName, Pt as WeappUniAppConfig, Q as UserConfig, Qt as GenerateOptions, R as RolldownWatcher, Rn as WeappManagedNodeTsconfigConfig, Rt as WeappWevuConfig, Sn as SharedChunkMode, St as WeappInjectRequestGlobalsTarget, T as ConfigEnv, Tn as SubPackage, Tt as WeappInjectWebRuntimeGlobalsTarget, U as ComponentEntry, Ut as BuildNpmPackageMeta, V as AppEntry, Vn as WeappManagedTypeScriptConfig, Vt as AliasOptions, W as Entry, Wn as WeappViteHostMeta, Wt as ChunksConfig, X as ProjectConfig, Xt as GenerateFileType, Y as WxmlDep, Yt as GenerateExtensionsOptions, Z as SubPackageMetaValue, Zt as GenerateFilenamesOptions, _n as NpmPluginPackageConfig, _t as WeappAutoRoutesIncludePattern, an as GenerateTemplateScope, at as WeappViteConfig, b as ChangeEvent, bn as ResolvedAlias, bt as WeappHmrConfig, cn as JsonConfig, ct as EnhanceOptions, dn as JsonMergeStage, dt as MultiPlatformConfig, en as GenerateTemplateContext, et as WeappAnalyzeConfig, fn as JsonMergeStrategy, ft as ScanWxmlOptions, gn as NpmMainPackageConfig, gt as WeappAutoRoutesInclude, hn as NpmDependencyPattern, ht as WeappAutoRoutesConfig, in as GenerateTemplateInlineSource, it as WeappForwardConsoleLogLevel, j as ResolvedConfig, jn as WeappLibConfig, jt as WeappRouteRule, k as PluginOption, kn as SubPackageStyleScope, kt as WeappReactConfig, ln as JsonMergeContext, lt as EnhanceWxmlOptions, mn as NpmBuildOptions, mt as WeappAppPreludeMode, nn as GenerateTemplateFactory, nt as WeappDebugConfig, on as GenerateTemplatesConfig, ot as AutoImportComponents, pn as MpPlatform, pt as WeappAppPreludeConfig, q as ComponentsMap, qt as DeprecatedInlineDynamicImports, rn as GenerateTemplateFileSource, rt as WeappForwardConsoleConfig, sn as JsFormat, st as AutoImportComponentsOption, tn as GenerateTemplateEntry, tt as WeappAnalyzeHistoryConfig, un as JsonMergeFunction, ut as HandleWxmlOptions, vn as NpmStrategy, vt as WeappBuildScopeConfig, w as ComputedDefinitions, wn as SharedChunkStrategy, wt as WeappInjectWebRuntimeGlobalsConfig, x as WeappVitePluginApi, xn as SharedChunkDynamicImports, xt as WeappInjectRequestGlobalsConfig, yn as NpmSubPackageConfig, yt as WeappBuildScopeObjectConfig, z as ViteDevServer, zn as WeappManagedServerTsconfigConfig, zt as WeappWorkerConfig } from "./config-Dd_PqIy2.mjs";
|
|
4
4
|
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, DeprecatedInlineDynamicImports, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, type InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, type MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, type Plugin, type PluginOption, ProjectConfig, type Ref, ResolvedAlias, type ResolvedConfig, type Resolver, type RolldownBuild, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatchOptions, type RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappReactCompilerConfig, WeappReactConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappUniAppConfig, WeappViteConfig, type WeappViteHostMeta, WeappVitePluginApi, type WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.20.
|
|
4
|
+
"version": "6.20.1",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,21 +128,21 @@
|
|
|
128
128
|
"vue": "^3.5.41",
|
|
129
129
|
"vue-tsc": "^3.3.9",
|
|
130
130
|
"@weapp-core/constants": "0.1.17",
|
|
131
|
-
"@weapp-core/shared": "3.1.0",
|
|
132
131
|
"@weapp-core/init": "6.0.13",
|
|
133
132
|
"@weapp-core/logger": "3.1.1",
|
|
134
133
|
"@weapp-core/schematics": "6.1.0",
|
|
134
|
+
"@weapp-core/shared": "3.1.0",
|
|
135
|
+
"@weapp-vite/ast": "6.20.1",
|
|
135
136
|
"@weapp-vite/mcp": "1.4.13",
|
|
136
137
|
"@weapp-vite/miniprogram-automator": "1.2.12",
|
|
137
138
|
"@weapp-vite/volar": "2.1.3",
|
|
139
|
+
"@weapp-vite/web": "1.4.6",
|
|
138
140
|
"@wevu/api": "0.2.15",
|
|
139
|
-
"@weapp-vite/web": "1.4.5",
|
|
140
141
|
"@wevu/web-apis": "1.2.33",
|
|
141
142
|
"rolldown-require": "2.0.24",
|
|
142
|
-
"@weapp-vite/ast": "6.20.0",
|
|
143
143
|
"vite-plugin-performance": "2.0.1",
|
|
144
144
|
"weapp-ide-cli": "6.0.5",
|
|
145
|
-
"wevu": "6.20.
|
|
145
|
+
"wevu": "6.20.1"
|
|
146
146
|
},
|
|
147
147
|
"publishConfig": {
|
|
148
148
|
"access": "public",
|
package/dist/file-CQTcjEWz.mjs
DELETED