weapp-vite 6.15.0 → 6.15.3
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 +284 -221
- package/dist/{config-c4UHLLoh.d.mts → config-B5YFoO3u.d.mts} +33 -11
- package/dist/config.d.mts +1 -1
- package/dist/{createContext-DZzBkyLu.mjs → createContext-BuwQryVc.mjs} +4927 -4341
- package/dist/file-BVlUDAip.mjs +2 -0
- package/dist/{file-DZdM8x0_.mjs → file-x_pM3sdN.mjs} +59 -59
- package/dist/getInstance-DPy6RmDl.mjs +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/json.d.mts +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/{runtime-tVnzZwtl.mjs → runtime-Cn2Y_tqB.mjs} +2 -2
- package/dist/{runtime-58wbbRDf.d.mts → runtime-DSLk7kWi.d.mts} +1 -0
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/types.d.mts +2 -2
- package/dist/web-apis.d.mts +3 -1
- package/dist/web-apis.mjs +2 -1
- package/package.json +11 -10
- package/dist/file-BKp0PdYt.mjs +0 -2
- package/dist/getInstance-CIT2xNbn.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { fs } from "@weapp-core/shared";
|
|
3
2
|
import path from "pathe";
|
|
3
|
+
import { fs } from "@weapp-core/shared";
|
|
4
4
|
import { parse } from "vue/compiler-sfc";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { recursive } from "merge";
|
|
@@ -38,12 +38,7 @@ const supportedCssLangs = [
|
|
|
38
38
|
*/
|
|
39
39
|
const templateExtensions = ["wxml", "html"];
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region src/utils/file.ts
|
|
42
|
-
const pathExistsInFlight = /* @__PURE__ */ new Map();
|
|
43
|
-
const vueConfigCache = /* @__PURE__ */ new Map();
|
|
44
|
-
const configMtimeInFlight = /* @__PURE__ */ new Map();
|
|
45
|
-
const NODE_MODULES_RE = /[\\/]node_modules[\\/]/;
|
|
46
|
-
const JS_OR_TS_RE = /\.[jt]s$/;
|
|
41
|
+
//#region src/utils/file/autoRoutes.ts
|
|
47
42
|
const nodeRequire = createRequire(import.meta.url);
|
|
48
43
|
const AUTO_ROUTES_ID = "weapp-vite/auto-routes";
|
|
49
44
|
const AUTO_ROUTES_VIRTUAL_ID = "virtual:weapp-vite-auto-routes";
|
|
@@ -51,7 +46,6 @@ const AUTO_ROUTES_SPECIFIER_RE = /(['"])(?:weapp-vite\/auto-routes|virtual:weapp
|
|
|
51
46
|
const AUTO_ROUTES_DYNAMIC_IMPORT_RE = /import\(\s*['"](?:weapp-vite\/auto-routes|virtual:weapp-vite-auto-routes)['"]\s*\)/g;
|
|
52
47
|
const AUTO_ROUTES_NAMED_IMPORT_ALIAS_RE = /\bas\b/g;
|
|
53
48
|
const AUTO_ROUTES_DEFAULT_AND_NAMED_IMPORT_RE = /^([A-Z_$][\w$]*)\s*,\s*(\{[^}]+\})$/i;
|
|
54
|
-
const JSON_MACRO_HINT_RE = /\bdefine(?:App|Page|Component|Sitemap|Theme)Json\s*\(/;
|
|
55
49
|
function toObjectDestructureClause(namedImportClause) {
|
|
56
50
|
return namedImportClause.replace(AUTO_ROUTES_NAMED_IMPORT_ALIAS_RE, ":");
|
|
57
51
|
}
|
|
@@ -70,13 +64,17 @@ function resolveInlineAutoRoutesImport(line, inlineRoutes, replacementIndex) {
|
|
|
70
64
|
}
|
|
71
65
|
return `const ${clause} = ${inlineLiteral};`;
|
|
72
66
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
path.resolve(
|
|
76
|
-
path.resolve(
|
|
77
|
-
path.resolve(
|
|
78
|
-
path.resolve(
|
|
67
|
+
function getAutoRoutesMacroImportCandidates(baseDir = import.meta.dirname) {
|
|
68
|
+
return [
|
|
69
|
+
path.resolve(baseDir, "./auto-routes.mjs"),
|
|
70
|
+
path.resolve(baseDir, "../auto-routes.mjs"),
|
|
71
|
+
path.resolve(baseDir, "../../dist/auto-routes.mjs"),
|
|
72
|
+
path.resolve(baseDir, "../../src/auto-routes.ts"),
|
|
73
|
+
path.resolve(baseDir, "../../auto-routes.ts")
|
|
79
74
|
];
|
|
75
|
+
}
|
|
76
|
+
function resolveAutoRoutesMacroImportPath() {
|
|
77
|
+
const fallbackCandidates = getAutoRoutesMacroImportCandidates();
|
|
80
78
|
try {
|
|
81
79
|
const resolved = nodeRequire.resolve("weapp-vite/auto-routes");
|
|
82
80
|
if (fs.existsSync(resolved)) return resolved;
|
|
@@ -86,7 +84,7 @@ function resolveAutoRoutesMacroImportPath() {
|
|
|
86
84
|
}
|
|
87
85
|
async function resolveAutoRoutesInlineSnapshot() {
|
|
88
86
|
try {
|
|
89
|
-
const { getCompilerContext } = await import("./getInstance-
|
|
87
|
+
const { getCompilerContext } = await import("./getInstance-DPy6RmDl.mjs");
|
|
90
88
|
const compilerContext = getCompilerContext();
|
|
91
89
|
const service = compilerContext.autoRoutesService;
|
|
92
90
|
const reference = service?.getReference?.();
|
|
@@ -116,6 +114,10 @@ function inlineAutoRoutesImports(source, inlineRoutes) {
|
|
|
116
114
|
return line;
|
|
117
115
|
}).join("\n").replace(AUTO_ROUTES_DYNAMIC_IMPORT_RE, `Promise.resolve(${JSON.stringify(inlineRoutes)})`).replace(AUTO_ROUTES_SPECIFIER_RE, JSON.stringify(resolveAutoRoutesMacroImportPath()));
|
|
118
116
|
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/utils/file/entry.ts
|
|
119
|
+
const pathExistsInFlight = /* @__PURE__ */ new Map();
|
|
120
|
+
const JS_OR_TS_RE = /\.[jt]s$/;
|
|
119
121
|
function pathExistsCached(filePath) {
|
|
120
122
|
const pending = pathExistsInFlight.get(filePath);
|
|
121
123
|
if (pending) return pending;
|
|
@@ -125,27 +127,6 @@ function pathExistsCached(filePath) {
|
|
|
125
127
|
pathExistsInFlight.set(filePath, next);
|
|
126
128
|
return next;
|
|
127
129
|
}
|
|
128
|
-
function getMtimeCached(filePath) {
|
|
129
|
-
const pending = configMtimeInFlight.get(filePath);
|
|
130
|
-
if (pending) return pending;
|
|
131
|
-
const next = fs.stat(filePath).then((stat) => stat.mtimeMs).catch(() => void 0).finally(() => {
|
|
132
|
-
configMtimeInFlight.delete(filePath);
|
|
133
|
-
});
|
|
134
|
-
configMtimeInFlight.set(filePath, next);
|
|
135
|
-
return next;
|
|
136
|
-
}
|
|
137
|
-
async function isVueConfigCacheValid(vueFilePath, cache) {
|
|
138
|
-
const nextMtime = await getMtimeCached(vueFilePath);
|
|
139
|
-
if (nextMtime === void 0 || cache.fileMtimeMs === void 0) return false;
|
|
140
|
-
if (nextMtime !== cache.fileMtimeMs) return false;
|
|
141
|
-
if (cache.dependencies.length === 0) return true;
|
|
142
|
-
for (const dep of cache.dependencies) {
|
|
143
|
-
const nextDepMtime = await getMtimeCached(dep);
|
|
144
|
-
const cachedDepMtime = cache.dependencyMtimeMs.get(dep);
|
|
145
|
-
if (nextDepMtime === void 0 || cachedDepMtime === void 0 || nextDepMtime !== cachedDepMtime) return false;
|
|
146
|
-
}
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
130
|
function isJsOrTs(name) {
|
|
150
131
|
if (typeof name === "string") return JS_OR_TS_RE.test(name);
|
|
151
132
|
return false;
|
|
@@ -163,47 +144,39 @@ function changeFileExtension(filePath, extension) {
|
|
|
163
144
|
}
|
|
164
145
|
async function findVueEntry(filepath) {
|
|
165
146
|
for (const ext of vueExtensions) {
|
|
166
|
-
const
|
|
167
|
-
if (await pathExistsCached(
|
|
147
|
+
const targetPath = changeFileExtension(filepath, ext);
|
|
148
|
+
if (await pathExistsCached(targetPath)) return targetPath;
|
|
168
149
|
}
|
|
169
150
|
}
|
|
170
151
|
async function findJsEntry(filepath) {
|
|
171
|
-
const predictions = jsExtensions.map((ext) =>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
for (const p of predictions) if (await pathExistsCached(p)) return {
|
|
175
|
-
path: p,
|
|
152
|
+
const predictions = jsExtensions.map((ext) => changeFileExtension(filepath, ext));
|
|
153
|
+
for (const targetPath of predictions) if (await pathExistsCached(targetPath)) return {
|
|
154
|
+
path: targetPath,
|
|
176
155
|
predictions
|
|
177
156
|
};
|
|
178
157
|
return { predictions };
|
|
179
158
|
}
|
|
180
159
|
async function findJsonEntry(filepath) {
|
|
181
|
-
const predictions = configExtensions.map((ext) =>
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
for (const p of predictions) if (await pathExistsCached(p)) return {
|
|
160
|
+
const predictions = configExtensions.map((ext) => changeFileExtension(filepath, ext));
|
|
161
|
+
for (const targetPath of predictions) if (await pathExistsCached(targetPath)) return {
|
|
185
162
|
predictions,
|
|
186
|
-
path:
|
|
163
|
+
path: targetPath
|
|
187
164
|
};
|
|
188
165
|
return { predictions };
|
|
189
166
|
}
|
|
190
167
|
async function findCssEntry(filepath) {
|
|
191
|
-
const predictions = supportedCssLangs.map((ext) =>
|
|
192
|
-
|
|
193
|
-
});
|
|
194
|
-
for (const p of predictions) if (await pathExistsCached(p)) return {
|
|
168
|
+
const predictions = supportedCssLangs.map((ext) => changeFileExtension(filepath, ext));
|
|
169
|
+
for (const targetPath of predictions) if (await pathExistsCached(targetPath)) return {
|
|
195
170
|
predictions,
|
|
196
|
-
path:
|
|
171
|
+
path: targetPath
|
|
197
172
|
};
|
|
198
173
|
return { predictions };
|
|
199
174
|
}
|
|
200
175
|
async function findTemplateEntry(filepath) {
|
|
201
|
-
const predictions = templateExtensions.map((ext) =>
|
|
202
|
-
|
|
203
|
-
});
|
|
204
|
-
for (const p of predictions) if (await pathExistsCached(p)) return {
|
|
176
|
+
const predictions = templateExtensions.map((ext) => changeFileExtension(filepath, ext));
|
|
177
|
+
for (const targetPath of predictions) if (await pathExistsCached(targetPath)) return {
|
|
205
178
|
predictions,
|
|
206
|
-
path:
|
|
179
|
+
path: targetPath
|
|
207
180
|
};
|
|
208
181
|
return { predictions };
|
|
209
182
|
}
|
|
@@ -218,6 +191,33 @@ async function touch(filename) {
|
|
|
218
191
|
await fs.close(await fs.open(filename, "w"));
|
|
219
192
|
}
|
|
220
193
|
}
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region src/utils/file/vueConfig.ts
|
|
196
|
+
const vueConfigCache = /* @__PURE__ */ new Map();
|
|
197
|
+
const configMtimeInFlight = /* @__PURE__ */ new Map();
|
|
198
|
+
const NODE_MODULES_RE = /[\\/]node_modules[\\/]/;
|
|
199
|
+
const JSON_MACRO_HINT_RE = /\bdefine(?:App|Page|Component|Sitemap|Theme)Json\s*\(/;
|
|
200
|
+
function getMtimeCached(filePath) {
|
|
201
|
+
const pending = configMtimeInFlight.get(filePath);
|
|
202
|
+
if (pending) return pending;
|
|
203
|
+
const next = fs.stat(filePath).then((stat) => stat.mtimeMs).catch(() => void 0).finally(() => {
|
|
204
|
+
configMtimeInFlight.delete(filePath);
|
|
205
|
+
});
|
|
206
|
+
configMtimeInFlight.set(filePath, next);
|
|
207
|
+
return next;
|
|
208
|
+
}
|
|
209
|
+
async function isVueConfigCacheValid(vueFilePath, cache) {
|
|
210
|
+
const nextMtime = await getMtimeCached(vueFilePath);
|
|
211
|
+
if (nextMtime === void 0 || cache.fileMtimeMs === void 0) return false;
|
|
212
|
+
if (nextMtime !== cache.fileMtimeMs) return false;
|
|
213
|
+
if (cache.dependencies.length === 0) return true;
|
|
214
|
+
for (const dep of cache.dependencies) {
|
|
215
|
+
const nextDepMtime = await getMtimeCached(dep);
|
|
216
|
+
const cachedDepMtime = cache.dependencyMtimeMs.get(dep);
|
|
217
|
+
if (nextDepMtime === void 0 || cachedDepMtime === void 0 || nextDepMtime !== cachedDepMtime) return false;
|
|
218
|
+
}
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
221
|
/**
|
|
222
222
|
* 从 .vue 文件中提取 <json> 块的内容
|
|
223
223
|
* @param vueFilePath .vue 文件的路径
|
|
@@ -275,4 +275,4 @@ async function extractConfigFromVue(vueFilePath) {
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
//#endregion
|
|
278
|
-
export {
|
|
278
|
+
export { jsExtensions as _, findJsonEntry as a, vueExtensions as b, isJsOrTs as c, touch as d, getAutoRoutesMacroImportCandidates as f, configExtensions as g, VERSION as h, findJsEntry as i, isTemplate as l, resolveAutoRoutesInlineSnapshot as m, changeFileExtension as n, findTemplateEntry as o, inlineAutoRoutesImports as p, findCssEntry as r, findVueEntry as s, extractConfigFromVue as t, normalizeFileExtension as u, supportedCssLangs as v, templateExtensions as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Ref,
|
|
2
|
-
import { a as createWevuComponent, i as WevuComponentOptions, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-
|
|
1
|
+
import { A as Ref, Bn as resolveWeappViteHostMeta, C as LoadConfigOptions, D as MethodDefinitions, E as InlineConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, I as RolldownPluginOption, In as WeappViteRuntime, L as RolldownWatchOptions, Ln as applyWeappViteHostMeta, M as RolldownBuild, N as RolldownOptions, O as Plugin, P as RolldownOutput, Pn as WEAPP_VITE_HOST_NAME, R as RolldownWatcher, Rn as createWeappViteHostMeta, S as CompilerContext, T as ConfigEnv, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, j as ResolvedConfig, k as PluginOption, l as defineConfig, m as Theme, n as UserConfigExport, nt as WeappViteConfig, o as UserConfigFnObject, p as Sitemap, r as UserConfigFn, s as UserConfigFnObjectPlain, t as UserConfig, u as App, v as defineSitemapJson, w as ComputedDefinitions, y as defineThemeJson, z as ViteDevServer, zn as isWeappViteHost } from "./config-B5YFoO3u.mjs";
|
|
2
|
+
import { a as createWevuComponent, i as WevuComponentOptions, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-DSLk7kWi.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/createContext.d.ts
|
|
5
5
|
interface CreateCompilerContextOptions extends Partial<LoadConfigOptions> {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createCompilerContext } from "./createContext-
|
|
1
|
+
import { t as createCompilerContext } from "./createContext-BuwQryVc.mjs";
|
|
2
2
|
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-wnfVS9jE.mjs";
|
|
3
3
|
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-BzPJL4F-.mjs";
|
|
4
4
|
import { t as defineConfig } from "./config-B2xtjEug.mjs";
|
|
5
|
-
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-
|
|
5
|
+
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-Cn2Y_tqB.mjs";
|
|
6
6
|
export { WEAPP_VITE_HOST_NAME, applyWeappViteHostMeta, createCompilerContext, createWeappViteHostMeta, createWevuComponent, defineAppJson, defineComponentJson, defineConfig, defineEmits, definePageJson, defineProps, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta, setPageLayout };
|
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-B5YFoO3u.mjs";
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme, defineAppJson, defineComponentJson, definePageJson, defineSitemapJson, defineThemeJson };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { xt as WeappMcpConfig } from "./config-B5YFoO3u.mjs";
|
|
2
2
|
import { CreateServerOptions, DEFAULT_MCP_ENDPOINT, DEFAULT_MCP_HOST, DEFAULT_MCP_PORT, McpServerHandle, StartMcpServerOptions, createWeappViteMcpServer } from "@weapp-vite/mcp";
|
|
3
3
|
|
|
4
4
|
//#region src/mcp.d.ts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WEVU_PAGE_LAYOUT_SETTER_KEY } from "@weapp-core/constants";
|
|
1
2
|
import { defineComponent } from "wevu";
|
|
2
3
|
//#region src/plugins/vue/createWevuComponent.ts
|
|
3
4
|
/**
|
|
@@ -18,7 +19,6 @@ function createWevuComponent(options) {
|
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
20
21
|
//#region src/plugins/vue/nativePageLayout.ts
|
|
21
|
-
const PAGE_LAYOUT_SETTER_KEY = "__wevuSetPageLayout";
|
|
22
22
|
function resolveCurrentPageInstance() {
|
|
23
23
|
const getCurrentPagesFn = globalThis.getCurrentPages;
|
|
24
24
|
if (typeof getCurrentPagesFn !== "function") return;
|
|
@@ -28,7 +28,7 @@ function resolveCurrentPageInstance() {
|
|
|
28
28
|
* 为原生 Page() 页面切换 layout。
|
|
29
29
|
*/
|
|
30
30
|
function setPageLayout(layout, props) {
|
|
31
|
-
const pageSetter = resolveCurrentPageInstance()?.[
|
|
31
|
+
const pageSetter = resolveCurrentPageInstance()?.[WEVU_PAGE_LAYOUT_SETTER_KEY];
|
|
32
32
|
if (typeof pageSetter === "function") {
|
|
33
33
|
pageSetter(layout, props);
|
|
34
34
|
return;
|
|
@@ -8,6 +8,7 @@ interface WevuComponentOptions<D extends object = Record<string, any>, C extends
|
|
|
8
8
|
watch?: any;
|
|
9
9
|
setup?: (...args: any[]) => any;
|
|
10
10
|
setupLifecycle?: 'created' | 'attached';
|
|
11
|
+
allowNullPropInput?: boolean;
|
|
11
12
|
properties?: Record<string, any>;
|
|
12
13
|
[key: string]: any;
|
|
13
14
|
}
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createWevuComponent, i as WevuComponentOptions, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-
|
|
1
|
+
import { a as createWevuComponent, i as WevuComponentOptions, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-DSLk7kWi.mjs";
|
|
2
2
|
export { WevuComponentOptions, createWevuComponent, defineEmits, defineProps, setPageLayout };
|
package/dist/runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-
|
|
1
|
+
import { i as createWevuComponent, n as defineProps, r as setPageLayout, t as defineEmits } from "./runtime-Cn2Y_tqB.mjs";
|
|
2
2
|
export { createWevuComponent, defineEmits, defineProps, setPageLayout };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as Resolver } from "./index-6QUk3Zbc.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-DiEBrMtj.mjs";
|
|
3
|
-
import { $ as WeappDebugConfig, $t as
|
|
4
|
-
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, ComputedDefinitions, ConfigEnv, CopyGlobs, CopyOptions, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, Plugin, PluginOption, ProjectConfig, Ref, ResolvedAlias, ResolvedConfig, Resolver, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatchOptions, RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, ViteDevServer, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappViteConfig, WeappViteHostMeta, WeappVitePluginApi, WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
|
3
|
+
import { $ as WeappDebugConfig, $t as JsonConfig, A as Ref, An as WeappManagedServerTsconfigConfig, At as WeappWevuConfig, B as BindingErrorLike, Bt as GenerateExtensionsOptions, Cn as WeappLibDtsOptions, Ct as WeappRequestRuntimeConfig, D as MethodDefinitions, Dn as WeappLibVueTscOptions, Dt as WeappVueConfig, E as InlineConfig, En as WeappLibInternalDtsOptions, Et as WeappSubPackageConfig, F as RolldownPlugin, Fn as WeappViteHostMeta, Ft as BuildNpmPackageMeta, G as EntryJsonFragment, Gt as GenerateTemplateContext, H as BaseEntry, Ht as GenerateFilenamesOptions, I as RolldownPluginOption, In as WeappViteRuntime, It as ChunksConfig, J as ScanComponentItem, Jt as GenerateTemplateFileSource, K as PageEntry, Kt as GenerateTemplateEntry, L as RolldownWatchOptions, Lt as CopyGlobs, M as RolldownBuild, Mn as WeappManagedTypeScriptConfig, Mt as Alias, N as RolldownOptions, Nn as WeappWebConfig, Nt as AliasOptions, O as Plugin, On as WeappManagedAppTsconfigConfig, Ot as WeappVueTemplateConfig, P as RolldownOutput, Pt as AlipayNpmMode, Q as UserConfig, Qt as JsFormat, R as RolldownWatcher, Rt as CopyOptions, Sn as WeappLibConfig, St as WeappNpmConfig, T as ConfigEnv, Tn as WeappLibFileName, Tt as WeappRouteRules, U as ComponentEntry, Ut as GenerateOptions, V as AppEntry, Vt as GenerateFileType, W as Entry, Wt as GenerateTemplate, X as ProjectConfig, Xt as GenerateTemplateScope, Y as WxmlDep, Yt as GenerateTemplateInlineSource, Z as SubPackageMetaValue, Zt as GenerateTemplatesConfig, _n as SubPackageStyleConfigEntry, _t as WeappInjectRequestGlobalsTarget, an as NpmBuildOptions, at as EnhanceOptions, b as ChangeEvent, bn as SubPackageStyleScope, bt as WeappInjectWebRuntimeGlobalsTarget, cn as NpmPluginPackageConfig, ct as MultiPlatformConfig, dn as ResolvedAlias, dt as WeappAppPreludeMode, en as JsonMergeContext, et as WeappForwardConsoleConfig, fn as SharedChunkDynamicImports, ft as WeappAutoRoutesConfig, gn as SubPackage, gt as WeappInjectRequestGlobalsConfig, hn as SharedChunkStrategy, ht as WeappHmrConfig, in as MpPlatform, it as AutoImportComponentsOption, j as ResolvedConfig, jn as WeappManagedSharedTsconfigConfig, jt as WeappWorkerConfig, k as PluginOption, kn as WeappManagedNodeTsconfigConfig, kt as WeappWebRuntimeConfig, ln as NpmStrategy, lt as ScanWxmlOptions, mn as SharedChunkOverride, mt as WeappAutoRoutesIncludePattern, nn as JsonMergeStage, nt as WeappViteConfig, on as NpmDependencyPattern, ot as EnhanceWxmlOptions, pn as SharedChunkMode, pt as WeappAutoRoutesInclude, q as ComponentsMap, qt as GenerateTemplateFactory, rn as JsonMergeStrategy, rt as AutoImportComponents, sn as NpmMainPackageConfig, st as HandleWxmlOptions, tn as JsonMergeFunction, tt as WeappForwardConsoleLogLevel, un as NpmSubPackageConfig, ut as WeappAppPreludeConfig, vn as SubPackageStyleConfigObject, vt as WeappInjectWeapiConfig, w as ComputedDefinitions, wn as WeappLibEntryContext, wt as WeappRouteRule, x as WeappVitePluginApi, xn as WeappLibComponentJson, xt as WeappMcpConfig, yn as SubPackageStyleEntry, yt as WeappInjectWebRuntimeGlobalsConfig, z as ViteDevServer, zt as GenerateDirsOptions } from "./config-B5YFoO3u.mjs";
|
|
4
|
+
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, ComputedDefinitions, ConfigEnv, CopyGlobs, CopyOptions, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, MethodDefinitions, MpPlatform, MultiPlatformConfig, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, Plugin, PluginOption, ProjectConfig, Ref, ResolvedAlias, ResolvedConfig, Resolver, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatchOptions, RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, ViteDevServer, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappViteConfig, WeappViteHostMeta, WeappVitePluginApi, WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlDep };
|
package/dist/web-apis.d.mts
CHANGED
package/dist/web-apis.mjs
CHANGED
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.3",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -90,17 +90,17 @@
|
|
|
90
90
|
"node": "^20.19.0 || >=22.12.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@vercel/detect-agent": "^1.2.
|
|
93
|
+
"@vercel/detect-agent": "^1.2.2",
|
|
94
94
|
"@volar/typescript": "^2.4.28",
|
|
95
95
|
"@vue/language-core": "^3.2.6",
|
|
96
96
|
"cac": "^7.0.0",
|
|
97
97
|
"chokidar": "^5.0.0",
|
|
98
|
-
"comment-json": "^
|
|
98
|
+
"comment-json": "^5.0.0",
|
|
99
99
|
"debug": "^4.4.3",
|
|
100
100
|
"fdir": "^6.5.0",
|
|
101
101
|
"htmlparser2": "^12.0.0",
|
|
102
102
|
"local-pkg": "^1.1.2",
|
|
103
|
-
"lru-cache": "^11.3.
|
|
103
|
+
"lru-cache": "^11.3.5",
|
|
104
104
|
"magic-string": "^0.30.21",
|
|
105
105
|
"merge": "^2.1.1",
|
|
106
106
|
"p-queue": "^9.1.2",
|
|
@@ -116,31 +116,32 @@
|
|
|
116
116
|
"vite-tsconfig-paths": "^6.1.1",
|
|
117
117
|
"vue": "^3.5.32",
|
|
118
118
|
"vue-tsc": "^3.2.6",
|
|
119
|
+
"@weapp-core/constants": "0.1.0",
|
|
119
120
|
"@weapp-core/init": "6.0.6",
|
|
120
121
|
"@weapp-core/logger": "3.1.1",
|
|
121
122
|
"@weapp-core/schematics": "6.0.4",
|
|
122
123
|
"@weapp-core/shared": "3.0.3",
|
|
123
|
-
"@weapp-vite/ast": "6.15.
|
|
124
|
+
"@weapp-vite/ast": "6.15.3",
|
|
124
125
|
"@weapp-vite/mcp": "1.2.1",
|
|
125
126
|
"@weapp-vite/miniprogram-automator": "1.0.2",
|
|
126
127
|
"@weapp-vite/volar": "2.0.8",
|
|
127
|
-
"@weapp-vite/web": "1.3.
|
|
128
|
+
"@weapp-vite/web": "1.3.14",
|
|
128
129
|
"@wevu/api": "0.2.3",
|
|
129
|
-
"@wevu/web-apis": "1.2.
|
|
130
|
+
"@wevu/web-apis": "1.2.5",
|
|
130
131
|
"rolldown-require": "2.0.13",
|
|
131
132
|
"vite-plugin-performance": "2.0.1",
|
|
132
133
|
"weapp-ide-cli": "5.2.2",
|
|
133
|
-
"wevu": "6.15.
|
|
134
|
+
"wevu": "6.15.3"
|
|
134
135
|
},
|
|
135
136
|
"publishConfig": {
|
|
136
137
|
"access": "public",
|
|
137
138
|
"registry": "https://registry.npmjs.org"
|
|
138
139
|
},
|
|
139
140
|
"devDependencies": {
|
|
140
|
-
"oxc-parser": "^0.
|
|
141
|
+
"oxc-parser": "^0.125.0",
|
|
141
142
|
"oxc-walker": "^0.7.0",
|
|
142
143
|
"tailwindcss": "^4.2.2",
|
|
143
|
-
"ts-morph": "^
|
|
144
|
+
"ts-morph": "^28.0.0"
|
|
144
145
|
},
|
|
145
146
|
"scripts": {
|
|
146
147
|
"stub": "unbuild --stub",
|
package/dist/file-BKp0PdYt.mjs
DELETED