weapp-vite 6.15.15 → 6.15.16
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 +3 -3
- package/dist/{createContext-Bwdmz5ML.mjs → createContext-xOVHRF1m.mjs} +48 -9
- package/dist/file-CNC4V9ax.mjs +2 -0
- package/dist/{file-fMqSV4Z9.mjs → file-DEHK6p9s.mjs} +1 -1
- package/dist/getInstance-DP821mDU.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/file-C7J-GBEl.mjs +0 -2
- package/dist/getInstance-C_LndkCo.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-
|
|
1
|
+
import { d as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-xOVHRF1m.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 isPathInside, S as shouldPassPlatformArgToIdeOpen, _ as createCjsConfigLoadError, b as normalizeMiniPlatform, c as createSharedBuildConfig, f as resolveWeappConfigFile, g as parseCommentJson, h as loadViteConfigFile, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as getProjectConfigFileName, n as syncProjectSupportFiles, p as checkRuntime, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, u as resolveHmrProfileJsonPath, v as DEFAULT_MP_PLATFORM, x as resolveMiniPlatform, y as getDefaultIdeProjectRoot } from "./createContext-
|
|
1
|
+
import { C as isPathInside, S as shouldPassPlatformArgToIdeOpen, _ as createCjsConfigLoadError, b as normalizeMiniPlatform, c as createSharedBuildConfig, f as resolveWeappConfigFile, g as parseCommentJson, h as loadViteConfigFile, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as getProjectConfigFileName, n as syncProjectSupportFiles, p as checkRuntime, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, u as resolveHmrProfileJsonPath, v as DEFAULT_MP_PLATFORM, x as resolveMiniPlatform, y as getDefaultIdeProjectRoot } from "./createContext-xOVHRF1m.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-CgxdNjvb.mjs";
|
|
3
|
-
import { h as VERSION } from "./file-
|
|
3
|
+
import { h as VERSION } from "./file-DEHK6p9s.mjs";
|
|
4
4
|
import { a as resolveWeappMcpConfig, o as startWeappViteMcpServer } from "./mcp-DRlj32v4.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -2784,7 +2784,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
//#endregion
|
|
2786
2786
|
//#region package.json
|
|
2787
|
-
var version = "6.15.
|
|
2787
|
+
var version = "6.15.16";
|
|
2788
2788
|
//#endregion
|
|
2789
2789
|
//#region src/cli/devHotkeys/format.ts
|
|
2790
2790
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost-SJdl15d3.mjs";
|
|
2
2
|
import { n as configureLogger, r as logger_default } from "./logger-CgxdNjvb.mjs";
|
|
3
|
-
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, 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 supportedCssLangs, y as templateExtensions } from "./file-
|
|
3
|
+
import { _ as jsExtensions, a as findJsonEntry, b as vueExtensions, 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 supportedCssLangs, y as templateExtensions } from "./file-DEHK6p9s.mjs";
|
|
4
4
|
import { createRequire, isBuiltin } from "node:module";
|
|
5
5
|
import path, { posix } from "pathe";
|
|
6
6
|
import path$1, { normalize, relative, win32 } from "node:path";
|
|
@@ -10589,8 +10589,44 @@ function createBuildService(ctx) {
|
|
|
10589
10589
|
};
|
|
10590
10590
|
delete snapshotBuildOptions.build?.watch;
|
|
10591
10591
|
const snapshotWatcherRoot = `${configService.absoluteSrcRoot}::dev-snapshot`;
|
|
10592
|
-
let snapshotBuildChain = Promise.resolve();
|
|
10592
|
+
let snapshotBuildChain = Promise.resolve(void 0);
|
|
10593
10593
|
let devWatcherClosed = false;
|
|
10594
|
+
async function resolveSnapshotSidecarEntryId(reason) {
|
|
10595
|
+
if (reason?.event !== "update" || !reason.file) return;
|
|
10596
|
+
const normalizedFile = normalizeFsResolvedId(reason.file);
|
|
10597
|
+
const configSuffix = configSuffixes$1.find((suffix) => normalizedFile.endsWith(suffix));
|
|
10598
|
+
const ext = path.extname(normalizedFile);
|
|
10599
|
+
if (!configSuffix && !(ext && (watchedCssExts.has(ext) || watchedTemplateExts.has(ext)))) return;
|
|
10600
|
+
const primaryScript = await findJsEntry(configSuffix ? normalizedFile.slice(0, -configSuffix.length) : ext ? normalizedFile.slice(0, -ext.length) : normalizedFile);
|
|
10601
|
+
if (!primaryScript.path) return;
|
|
10602
|
+
const entryId = normalizeFsResolvedId(primaryScript.path);
|
|
10603
|
+
if (!ctx.runtimeState.build.hmr.resolvedEntryMap.has(entryId)) return;
|
|
10604
|
+
const relativeSrc = configService.relativeAbsoluteSrcRoot(entryId);
|
|
10605
|
+
if (relativeSrc === "layouts" || relativeSrc.startsWith("layouts/")) return;
|
|
10606
|
+
return entryId;
|
|
10607
|
+
}
|
|
10608
|
+
function markSnapshotEntriesFullDirty() {
|
|
10609
|
+
for (const entryId of ctx.runtimeState.build.hmr.resolvedEntryMap.keys()) {
|
|
10610
|
+
ctx.runtimeState.build.hmr.dirtyEntrySet.add(entryId);
|
|
10611
|
+
ctx.runtimeState.build.hmr.dirtyEntryReasons.set(entryId, "direct");
|
|
10612
|
+
ctx.runtimeState.build.hmr.loadedEntrySet.delete(entryId);
|
|
10613
|
+
}
|
|
10614
|
+
ctx.runtimeState.build.hmr.profile = {
|
|
10615
|
+
...ctx.runtimeState.build.hmr.profile,
|
|
10616
|
+
dirtyCount: ctx.runtimeState.build.hmr.dirtyEntrySet.size,
|
|
10617
|
+
dirtyReasonSummary: [`snapshot-full:${ctx.runtimeState.build.hmr.resolvedEntryMap.size}`]
|
|
10618
|
+
};
|
|
10619
|
+
}
|
|
10620
|
+
function markSnapshotEntryDirty(entryId) {
|
|
10621
|
+
ctx.runtimeState.build.hmr.dirtyEntrySet.add(entryId);
|
|
10622
|
+
ctx.runtimeState.build.hmr.dirtyEntryReasons.set(entryId, "direct");
|
|
10623
|
+
ctx.runtimeState.build.hmr.loadedEntrySet.delete(entryId);
|
|
10624
|
+
ctx.runtimeState.build.hmr.profile = {
|
|
10625
|
+
...ctx.runtimeState.build.hmr.profile,
|
|
10626
|
+
dirtyCount: ctx.runtimeState.build.hmr.dirtyEntrySet.size,
|
|
10627
|
+
dirtyReasonSummary: ["sidecar-direct:1"]
|
|
10628
|
+
};
|
|
10629
|
+
}
|
|
10594
10630
|
const runSnapshotBuild = (reason) => {
|
|
10595
10631
|
if (devWatcherClosed) return snapshotBuildChain;
|
|
10596
10632
|
const startedAt = reason ? performance.now() : 0;
|
|
@@ -10602,14 +10638,17 @@ function createBuildService(ctx) {
|
|
|
10602
10638
|
file: reason.file,
|
|
10603
10639
|
watchToDirtyMs: performance.now() - startedAt
|
|
10604
10640
|
};
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10641
|
+
const sidecarEntryId = await resolveSnapshotSidecarEntryId(reason);
|
|
10642
|
+
if (sidecarEntryId) {
|
|
10643
|
+
markSnapshotEntryDirty(sidecarEntryId);
|
|
10644
|
+
await touch(sidecarEntryId);
|
|
10645
|
+
return "forwarded";
|
|
10609
10646
|
}
|
|
10647
|
+
markSnapshotEntriesFullDirty();
|
|
10610
10648
|
process.env.WEAPP_VITE_FORCE_FULL_HMR_SHARED_CHUNKS = "1";
|
|
10611
10649
|
try {
|
|
10612
10650
|
await build(snapshotBuildOptions);
|
|
10651
|
+
return "snapshot";
|
|
10613
10652
|
} finally {
|
|
10614
10653
|
delete process.env.WEAPP_VITE_FORCE_FULL_HMR_SHARED_CHUNKS;
|
|
10615
10654
|
}
|
|
@@ -10639,7 +10678,6 @@ function createBuildService(ctx) {
|
|
|
10639
10678
|
else if (e.code === "END") {
|
|
10640
10679
|
const durationMs = performance.now() - startTime;
|
|
10641
10680
|
(async () => {
|
|
10642
|
-
await runSnapshotBuild();
|
|
10643
10681
|
if (firstBuildCompleted) {
|
|
10644
10682
|
finalizeHmrProfile(durationMs);
|
|
10645
10683
|
recordHmrProfile(durationMs);
|
|
@@ -10675,7 +10713,8 @@ function createBuildService(ctx) {
|
|
|
10675
10713
|
runSnapshotBuild({
|
|
10676
10714
|
event: event.startsWith("unlink") ? "delete" : event.startsWith("add") ? "create" : "update",
|
|
10677
10715
|
file: id
|
|
10678
|
-
}).then(() => {
|
|
10716
|
+
}).then((result) => {
|
|
10717
|
+
if (result !== "snapshot") return;
|
|
10679
10718
|
const durationMs = performance.now() - sidecarStartedAt;
|
|
10680
10719
|
finalizeHmrProfile(durationMs);
|
|
10681
10720
|
recordHmrProfile(durationMs);
|
|
@@ -22181,7 +22220,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
22181
22220
|
const vueAppPath = await findVueEntry(appBasename);
|
|
22182
22221
|
let configFromVue;
|
|
22183
22222
|
if (!appConfigFile && vueAppPath) {
|
|
22184
|
-
const { extractConfigFromVue } = await import("./file-
|
|
22223
|
+
const { extractConfigFromVue } = await import("./file-CNC4V9ax.mjs");
|
|
22185
22224
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
22186
22225
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
22187
22226
|
}
|
|
@@ -84,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
84
84
|
}
|
|
85
85
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
86
86
|
try {
|
|
87
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
87
|
+
const { getCompilerContext } = await import("./getInstance-DP821mDU.mjs");
|
|
88
88
|
const compilerContext = getCompilerContext();
|
|
89
89
|
const service = compilerContext.autoRoutesService;
|
|
90
90
|
const reference = service?.getReference?.();
|
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-D0HkutE0.mjs";
|
|
2
2
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-SJdl15d3.mjs";
|
|
3
3
|
import { t as defineConfig } from "./config-DJjSbpNX.mjs";
|
|
4
|
-
import { t as createCompilerContext } from "./createContext-
|
|
4
|
+
import { t as createCompilerContext } from "./createContext-xOVHRF1m.mjs";
|
|
5
5
|
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-DN3lxU9s.mjs";
|
|
6
6
|
export { WEAPP_VITE_HOST_NAME, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta, setPageLayout };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.15.
|
|
4
|
+
"version": "6.15.16",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@weapp-core/logger": "3.1.1",
|
|
123
123
|
"@weapp-core/schematics": "6.0.4",
|
|
124
124
|
"@weapp-core/shared": "3.0.4",
|
|
125
|
-
"@weapp-vite/ast": "6.15.
|
|
125
|
+
"@weapp-vite/ast": "6.15.16",
|
|
126
126
|
"@weapp-vite/mcp": "1.2.1",
|
|
127
127
|
"@weapp-vite/miniprogram-automator": "1.0.4",
|
|
128
128
|
"@weapp-vite/volar": "2.1.0",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"rolldown-require": "2.0.15",
|
|
133
133
|
"vite-plugin-performance": "2.0.1",
|
|
134
134
|
"weapp-ide-cli": "5.2.6",
|
|
135
|
-
"wevu": "6.15.
|
|
135
|
+
"wevu": "6.15.16"
|
|
136
136
|
},
|
|
137
137
|
"publishConfig": {
|
|
138
138
|
"access": "public",
|
package/dist/file-C7J-GBEl.mjs
DELETED