weapp-vite 6.16.13 → 6.16.14
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-CH-fflWu.mjs → createContext-CzGWJpCw.mjs} +19 -4
- package/dist/file-35pjSeN9.mjs +2 -0
- package/dist/{file-BJggrdd-.mjs → file-HUd9lLNU.mjs} +1 -1
- package/dist/getInstance-DD6NsV2F.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
- package/dist/file-Cnv4FhFK.mjs +0 -2
- package/dist/getInstance-CAxuHsMM.mjs +0 -2
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-
|
|
1
|
+
import { g as getRouteRuntimeGlobalKeys, i as getCompilerContext } from "./createContext-CzGWJpCw.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 getDefaultIdeProjectRoot, S as createCjsConfigLoadError, T as isPathInside, _ as resolveWeappConfigFile, b as loadViteConfigFile, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as checkRuntime, w as shouldPassPlatformArgToIdeOpen, x as parseCommentJson, y as getProjectConfigFileName } from "./createContext-
|
|
1
|
+
import { C as getDefaultIdeProjectRoot, S as createCjsConfigLoadError, T as isPathInside, _ as resolveWeappConfigFile, b as loadViteConfigFile, f as resolveWeappViteTarget, h as resolveHmrProfileJsonPath, m as SHARED_CHUNK_VIRTUAL_PREFIX, n as syncProjectSupportFiles, p as createSharedBuildConfig, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as checkRuntime, w as shouldPassPlatformArgToIdeOpen, x as parseCommentJson, y as getProjectConfigFileName } from "./createContext-CzGWJpCw.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-HUd9lLNU.mjs";
|
|
4
4
|
import { o as resolveWeappMcpConfig, s as startWeappViteMcpServer } from "./mcp-DV3K2AVD.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import path, { posix } from "pathe";
|
|
@@ -3704,7 +3704,7 @@ function resolveRunnableHotkeyDefinition(input) {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
//#endregion
|
|
3706
3706
|
//#region package.json
|
|
3707
|
-
var version = "6.16.
|
|
3707
|
+
var version = "6.16.14";
|
|
3708
3708
|
//#endregion
|
|
3709
3709
|
//#region src/cli/devHotkeys/format.ts
|
|
3710
3710
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as applyWeappViteHostMeta } from "./pluginHost-BEnGeaSo.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-HUd9lLNU.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";
|
|
@@ -9788,6 +9788,7 @@ const REG_NODE_MODULES_DIR = /[\\/]node_modules[\\/]/gi;
|
|
|
9788
9788
|
const REG_COMMONJS_HELPERS = /commonjsHelpers\.js$/;
|
|
9789
9789
|
const REG_REQUEST_GLOBAL_RUNTIME_VENDOR_ID = /(?:^|[/\\])(?:@wevu[/\\]web-apis|web-apis[/\\]dist[/\\]index\.(?:m?js|cjs)|weapp-vite[/\\](?:dist[/\\]web-apis\.mjs|src[/\\](?:webApis\.ts|runtime[/\\]webApis[/\\]index\.ts)))(?:$|[?#])/;
|
|
9790
9790
|
const REG_HASHED_DIST_CHUNK_ID = /(?:^|[/\\])dist[/\\]([^/\\]+)-(\w{6,})\.(?:m?js|cjs)(?:$|[?#])/;
|
|
9791
|
+
const STABLE_HASHED_DIST_CHUNK_PRIORITY = ["src"];
|
|
9791
9792
|
function resolveSharedPathRoot(configService, sharedPathRoot) {
|
|
9792
9793
|
const absoluteSrcRoot = configService.absoluteSrcRoot;
|
|
9793
9794
|
const configuredRoot = sharedPathRoot ? path.resolve(configService.cwd, sharedPathRoot) : absoluteSrcRoot;
|
|
@@ -9898,6 +9899,7 @@ function isRequestGlobalsRuntimeModuleId(id) {
|
|
|
9898
9899
|
}
|
|
9899
9900
|
function resolveStableHashedDistChunkFileName(chunk) {
|
|
9900
9901
|
const candidateIds = [chunk.facadeModuleId, ...chunk.moduleIds ?? []].filter((id) => typeof id === "string");
|
|
9902
|
+
const matchedChunks = [];
|
|
9901
9903
|
for (const id of candidateIds) {
|
|
9902
9904
|
const cleanedAbsoluteId = normalizeSharedPathCandidate(id);
|
|
9903
9905
|
if (!path.isAbsolute(cleanedAbsoluteId)) continue;
|
|
@@ -9908,8 +9910,16 @@ function resolveStableHashedDistChunkFileName(chunk) {
|
|
|
9908
9910
|
if (!baseName || !packageToken) continue;
|
|
9909
9911
|
REG_REQUEST_GLOBAL_RUNTIME_VENDOR_ID.lastIndex = 0;
|
|
9910
9912
|
if (REG_REQUEST_GLOBAL_RUNTIME_VENDOR_ID.test(cleanedAbsoluteId) || packageToken.endsWith("web-apis")) return `weapp-vendors/request-globals-${packageToken}-${baseName}.js`;
|
|
9911
|
-
|
|
9913
|
+
matchedChunks.push({
|
|
9914
|
+
baseName,
|
|
9915
|
+
fileName: `weapp-vendors/${packageToken}-${baseName}.js`
|
|
9916
|
+
});
|
|
9917
|
+
}
|
|
9918
|
+
for (const priorityBaseName of STABLE_HASHED_DIST_CHUNK_PRIORITY) {
|
|
9919
|
+
const matched = matchedChunks.find((chunk) => chunk.baseName === priorityBaseName);
|
|
9920
|
+
if (matched) return matched.fileName;
|
|
9912
9921
|
}
|
|
9922
|
+
if (matchedChunks[0]) return matchedChunks[0].fileName;
|
|
9913
9923
|
}
|
|
9914
9924
|
function resolveStableHashedDistChunkName(chunk) {
|
|
9915
9925
|
return resolveStableHashedDistChunkFileName(chunk)?.replace(/\.js$/, "");
|
|
@@ -23400,7 +23410,7 @@ async function loadAppEntry(ctx, scanState) {
|
|
|
23400
23410
|
const vueAppPath = await findVueEntry(appBasename);
|
|
23401
23411
|
let configFromVue;
|
|
23402
23412
|
if (!appConfigFile && vueAppPath) {
|
|
23403
|
-
const { extractConfigFromVue } = await import("./file-
|
|
23413
|
+
const { extractConfigFromVue } = await import("./file-35pjSeN9.mjs");
|
|
23404
23414
|
configFromVue = await extractConfigFromVue(vueAppPath);
|
|
23405
23415
|
if (configFromVue) appConfigFile = vueAppPath;
|
|
23406
23416
|
}
|
|
@@ -24568,9 +24578,14 @@ async function hasManagedTsconfigChanges$1(ctx) {
|
|
|
24568
24578
|
for (const file of files) if (await fs.readFile(file.path, "utf8").catch(() => void 0) !== file.content) return true;
|
|
24569
24579
|
return false;
|
|
24570
24580
|
}
|
|
24581
|
+
async function outputFileIfChanged(file) {
|
|
24582
|
+
if (await fs.readFile(file.path, "utf8").catch(() => void 0) === file.content) return false;
|
|
24583
|
+
await fs.outputFile(file.path, file.content, "utf8");
|
|
24584
|
+
return true;
|
|
24585
|
+
}
|
|
24571
24586
|
async function syncManagedTsconfigFiles(ctx) {
|
|
24572
24587
|
const changed = await hasManagedTsconfigChanges$1(ctx);
|
|
24573
|
-
for (const file of await createManagedTsconfigFiles(ctx)) await
|
|
24588
|
+
for (const file of await createManagedTsconfigFiles(ctx)) await outputFileIfChanged(file);
|
|
24574
24589
|
return changed;
|
|
24575
24590
|
}
|
|
24576
24591
|
async function syncManagedTsconfigBootstrapFiles(cwd) {
|
|
@@ -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-DD6NsV2F.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-BEnGeaSo.mjs";
|
|
3
3
|
import { t as defineConfig } from "./config-DJjSbpNX.mjs";
|
|
4
|
-
import { c as WEB_PLATFORM_ALIASES, d as isWebPlatform, f as resolveWeappViteTarget, l as getSupportedWeappVitePlatforms, t as createCompilerContext, u as getSupportedWeappViteTargetDescriptors } from "./createContext-
|
|
4
|
+
import { c as WEB_PLATFORM_ALIASES, d as isWebPlatform, f as resolveWeappViteTarget, l as getSupportedWeappVitePlatforms, t as createCompilerContext, u as getSupportedWeappViteTargetDescriptors } from "./createContext-CzGWJpCw.mjs";
|
|
5
5
|
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-spnjzaP2.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, resolveWeappViteHostMeta, resolveWeappViteTarget, setPageLayout };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.16.
|
|
4
|
+
"version": "6.16.14",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -117,22 +117,22 @@
|
|
|
117
117
|
"vite-tsconfig-paths": "^6.1.1",
|
|
118
118
|
"vue": "^3.5.34",
|
|
119
119
|
"vue-tsc": "^3.2.8",
|
|
120
|
-
"@weapp-core/init": "6.0.8",
|
|
121
120
|
"@weapp-core/constants": "^0.1.7",
|
|
122
|
-
"@weapp-core/
|
|
123
|
-
"@weapp-core/schematics": "6.0.4",
|
|
121
|
+
"@weapp-core/init": "6.0.8",
|
|
124
122
|
"@weapp-core/logger": "3.1.1",
|
|
125
|
-
"@weapp-
|
|
123
|
+
"@weapp-core/schematics": "6.0.4",
|
|
124
|
+
"@weapp-core/shared": "3.0.4",
|
|
125
|
+
"@weapp-vite/ast": "6.16.14",
|
|
126
|
+
"@weapp-vite/mcp": "1.3.3",
|
|
126
127
|
"@weapp-vite/miniprogram-automator": "1.1.1",
|
|
127
|
-
"@weapp-vite/web": "1.3.20",
|
|
128
128
|
"@weapp-vite/volar": "2.1.0",
|
|
129
|
-
"
|
|
130
|
-
"@wevu/web-apis": "1.2.12",
|
|
129
|
+
"@weapp-vite/web": "1.3.20",
|
|
131
130
|
"@wevu/api": "0.2.8",
|
|
131
|
+
"@wevu/web-apis": "1.2.12",
|
|
132
|
+
"rolldown-require": "2.0.15",
|
|
132
133
|
"vite-plugin-performance": "2.0.1",
|
|
133
134
|
"weapp-ide-cli": "5.2.10",
|
|
134
|
-
"wevu": "6.16.
|
|
135
|
-
"@weapp-vite/mcp": "1.3.3"
|
|
135
|
+
"wevu": "6.16.14"
|
|
136
136
|
},
|
|
137
137
|
"publishConfig": {
|
|
138
138
|
"access": "public",
|
package/dist/file-Cnv4FhFK.mjs
DELETED