weapp-vite 6.14.1 → 6.14.2
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-import-components/resolvers.d.mts +1 -1
- package/dist/auto-import-components/resolvers.mjs +3 -0
- package/dist/auto-routes.mjs +1 -1
- package/dist/cli.mjs +5 -4
- package/dist/{config-GqcM7sq1.d.mts → config-BHVrIbhx.d.mts} +25 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +3 -3
- package/dist/{createContext-DT4tLA1C.mjs → createContext-utz68GiW.mjs} +14743 -272
- package/dist/{file-BkvmW6_2.mjs → file-PUFdKeUd.mjs} +1 -1
- package/dist/file-nOZc956t.mjs +2 -0
- package/dist/getInstance-eoGdnbzn.mjs +2 -0
- package/dist/{index-hN5mdpQ_.d.mts → index-6QUk3Zbc.d.mts} +6 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/json.d.mts +1 -1
- package/dist/json.mjs +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/types.d.mts +2 -2
- package/package.json +6 -6
- package/dist/file-3AtJoiKx.mjs +0 -2
- package/dist/getInstance-ChnpuIME.mjs +0 -2
- /package/dist/{config-DJjSbpNX.mjs → config-B2xtjEug.mjs} +0 -0
- /package/dist/{json-D0HkutE0.mjs → json-wnfVS9jE.mjs} +0 -0
- /package/dist/{pluginHost-SJdl15d3.mjs → pluginHost-BzPJL4F-.mjs} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, f as ResolverSupportFilesStrategy, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-
|
|
1
|
+
import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, f as ResolverSupportFilesStrategy, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-6QUk3Zbc.mjs";
|
|
2
2
|
export { CreateResolver, ExternalMetadataFileCandidates, Options, ResolvedValue, Resolver, ResolverFn, ResolverMeta, ResolverObject, ResolverSupportFilesStrategy, TDesignResolver, VantResolver, WeuiResolver };
|
|
@@ -109,6 +109,7 @@ const TDesignResolver = (opts) => {
|
|
|
109
109
|
}, {});
|
|
110
110
|
return {
|
|
111
111
|
components: Object.freeze({ ...map }),
|
|
112
|
+
componentLookupStrategy: "static",
|
|
112
113
|
supportFilesStrategy,
|
|
113
114
|
resolve(componentName) {
|
|
114
115
|
const from = map[componentName];
|
|
@@ -241,6 +242,7 @@ const VantResolver = (opts) => {
|
|
|
241
242
|
}, {});
|
|
242
243
|
return {
|
|
243
244
|
components: Object.freeze({ ...map }),
|
|
245
|
+
componentLookupStrategy: "static",
|
|
244
246
|
supportFilesStrategy,
|
|
245
247
|
resolve(componentName) {
|
|
246
248
|
const from = map[componentName];
|
|
@@ -311,6 +313,7 @@ const WeuiResolver = (opts) => {
|
|
|
311
313
|
}, {});
|
|
312
314
|
return {
|
|
313
315
|
components: Object.freeze({ ...map }),
|
|
316
|
+
componentLookupStrategy: "static",
|
|
314
317
|
supportFilesStrategy,
|
|
315
318
|
resolve(componentName) {
|
|
316
319
|
const from = map[componentName];
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getCompilerContext, u as getRouteRuntimeGlobalKeys } from "./createContext-
|
|
1
|
+
import { i as getCompilerContext, u as getRouteRuntimeGlobalKeys } from "./createContext-utz68GiW.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 { S as isPathInside, _ as DEFAULT_MP_PLATFORM, b as resolveMiniPlatform, c as createSharedBuildConfig, d as resolveWeappConfigFile, f as checkRuntime, g as createCjsConfigLoadError, h as parseCommentJson, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as loadViteConfigFile, n as syncProjectSupportFiles, p as getProjectConfigFileName, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as getDefaultIdeProjectRoot, x as shouldPassPlatformArgToIdeOpen, y as normalizeMiniPlatform } from "./createContext-
|
|
1
|
+
import { S as isPathInside, _ as DEFAULT_MP_PLATFORM, b as resolveMiniPlatform, c as createSharedBuildConfig, d as resolveWeappConfigFile, f as checkRuntime, g as createCjsConfigLoadError, h as parseCommentJson, l as SHARED_CHUNK_VIRTUAL_PREFIX, m as loadViteConfigFile, n as syncProjectSupportFiles, p as getProjectConfigFileName, r as syncManagedTsconfigBootstrapFiles, s as formatBytes, t as createCompilerContext, v as getDefaultIdeProjectRoot, x as shouldPassPlatformArgToIdeOpen, y as normalizeMiniPlatform } from "./createContext-utz68GiW.mjs";
|
|
2
2
|
import { r as logger_default, t as colors } from "./logger-CgxdNjvb.mjs";
|
|
3
|
-
import { m as VERSION } from "./file-
|
|
3
|
+
import { m as VERSION } from "./file-PUFdKeUd.mjs";
|
|
4
4
|
import { a as resolveWeappMcpConfig, o as startWeappViteMcpServer } from "./mcp-DRlj32v4.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { defu, fs } from "@weapp-core/shared";
|
|
@@ -1137,6 +1137,7 @@ function registerBuildCommand(cli) {
|
|
|
1137
1137
|
inlineConfig,
|
|
1138
1138
|
cliPlatform: targets.rawPlatform,
|
|
1139
1139
|
projectConfigPath: options.projectConfig,
|
|
1140
|
+
emitDefaultAutoImportOutputs: false,
|
|
1140
1141
|
syncSupportFiles: false,
|
|
1141
1142
|
preloadAppEntry: false
|
|
1142
1143
|
});
|
|
@@ -2051,10 +2052,10 @@ function registerPrepareCommand(cli) {
|
|
|
2051
2052
|
}
|
|
2052
2053
|
//#endregion
|
|
2053
2054
|
//#region package.json
|
|
2054
|
-
var version = "6.14.
|
|
2055
|
+
var version = "6.14.2";
|
|
2055
2056
|
//#endregion
|
|
2056
2057
|
//#region src/cli/devHotkeys.ts
|
|
2057
|
-
const DEV_SCREENSHOT_DIR = ".
|
|
2058
|
+
const DEV_SCREENSHOT_DIR = ".weapp-vite/dev-screenshots";
|
|
2058
2059
|
const DEFAULT_SCREENSHOT_TIMEOUT = 3e4;
|
|
2059
2060
|
const REG_PENDING_PREFIX = /^正在/;
|
|
2060
2061
|
const FULLWIDTH_ASCII_START = 65281;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Resolver, s as ResolvedValue } from "./index-
|
|
1
|
+
import { c as Resolver, s as ResolvedValue } from "./index-6QUk3Zbc.mjs";
|
|
2
2
|
import { t as AutoRoutes } from "./routes-DiEBrMtj.mjs";
|
|
3
3
|
import { LRUCache } from "lru-cache";
|
|
4
4
|
import { LoggerConfig } from "@weapp-core/logger";
|
|
@@ -351,6 +351,7 @@ interface ScanWxmlOptions {
|
|
|
351
351
|
* @description WXML 处理阶段配置
|
|
352
352
|
*/
|
|
353
353
|
interface HandleWxmlOptions {
|
|
354
|
+
defineImportMetaEnv?: Record<string, any>;
|
|
354
355
|
removeComment?: boolean;
|
|
355
356
|
transformEvent?: boolean;
|
|
356
357
|
scriptModuleExtension?: string;
|
|
@@ -1022,6 +1023,7 @@ interface LoadConfigOptions {
|
|
|
1022
1023
|
cwd: string;
|
|
1023
1024
|
isDev: boolean;
|
|
1024
1025
|
mode: string;
|
|
1026
|
+
emitDefaultAutoImportOutputs?: boolean;
|
|
1025
1027
|
pluginOnly?: boolean;
|
|
1026
1028
|
inlineConfig?: InlineConfig;
|
|
1027
1029
|
configFile?: string;
|
|
@@ -1037,6 +1039,7 @@ interface LoadConfigResult {
|
|
|
1037
1039
|
cwd: string;
|
|
1038
1040
|
isDev: boolean;
|
|
1039
1041
|
mode: string;
|
|
1042
|
+
emitDefaultAutoImportOutputs: boolean;
|
|
1040
1043
|
chunksConfigured?: boolean;
|
|
1041
1044
|
projectConfig: Record<string, any>;
|
|
1042
1045
|
projectConfigPath?: string;
|
|
@@ -1085,6 +1088,7 @@ interface ConfigService {
|
|
|
1085
1088
|
readonly defineImportMetaEnv: Record<string, any>;
|
|
1086
1089
|
readonly cwd: string;
|
|
1087
1090
|
readonly isDev: boolean;
|
|
1091
|
+
readonly emitDefaultAutoImportOutputs: boolean;
|
|
1088
1092
|
readonly mpDistRoot: string;
|
|
1089
1093
|
readonly outDir: string;
|
|
1090
1094
|
readonly inlineConfig: InlineConfig;
|
|
@@ -1202,7 +1206,18 @@ interface RemovalRange {
|
|
|
1202
1206
|
end: number;
|
|
1203
1207
|
}
|
|
1204
1208
|
interface WxmlToken {
|
|
1209
|
+
/**
|
|
1210
|
+
* @description 参与常规组件分析的标签集合。
|
|
1211
|
+
* 会应用 `excludeComponent` 过滤,通常会排除宿主内置组件,
|
|
1212
|
+
* 供原有的 `usingComponents` 推断与模板依赖聚合使用。
|
|
1213
|
+
*/
|
|
1205
1214
|
components: ComponentsMap;
|
|
1215
|
+
/**
|
|
1216
|
+
* @description 供自动导入使用的完整标签集合。
|
|
1217
|
+
* 不会因为“这是宿主内置组件名”而被提前过滤,
|
|
1218
|
+
* 用来支持“本地组件与内置组件重名时仍优先命中用户组件”的场景。
|
|
1219
|
+
*/
|
|
1220
|
+
autoImportComponents?: ComponentsMap;
|
|
1206
1221
|
deps: WxmlDep[];
|
|
1207
1222
|
removalRanges: RemovalRange[];
|
|
1208
1223
|
commentTokens: Token[];
|
|
@@ -1367,7 +1382,15 @@ interface WxmlService {
|
|
|
1367
1382
|
depsMap: Map<string, Set<string>>;
|
|
1368
1383
|
importerMap: Map<string, Set<string>>;
|
|
1369
1384
|
tokenMap: Map<string, ScanWxmlResult>;
|
|
1385
|
+
/**
|
|
1386
|
+
* @description 常规组件索引缓存。
|
|
1387
|
+
* 这里沿用历史行为,只保留“应参与 usingComponents 推断”的组件标签。
|
|
1388
|
+
*/
|
|
1370
1389
|
wxmlComponentsMap: Map<string, ComponentsMap>;
|
|
1390
|
+
/**
|
|
1391
|
+
* @description 常规组件聚合缓存。
|
|
1392
|
+
* 会递归合并 import/include 进来的模板组件,但仍遵循内置组件过滤规则。
|
|
1393
|
+
*/
|
|
1371
1394
|
aggregatedComponentsMap: Map<string, ComponentsMap>;
|
|
1372
1395
|
addDeps: (filepath: string, deps?: string[]) => Promise<void>;
|
|
1373
1396
|
setDeps: (filepath: string, deps?: string[]) => Promise<void>;
|
|
@@ -1375,6 +1398,7 @@ interface WxmlService {
|
|
|
1375
1398
|
getImporters: (filepath: string) => Set<string>;
|
|
1376
1399
|
getAllDeps: () => Set<string>;
|
|
1377
1400
|
getAggregatedComponents: (filepathOrBaseName: string) => ComponentsMap | undefined;
|
|
1401
|
+
getAggregatedAutoImportComponents: (filepathOrBaseName: string) => ComponentsMap | undefined;
|
|
1378
1402
|
clearAll: () => void;
|
|
1379
1403
|
analyze: (wxml: string) => ScanWxmlResult;
|
|
1380
1404
|
scan: (filepath: string) => Promise<ScanWxmlResult | undefined>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { An as createWeappViteHostMeta, Dn as WeappViteHostMeta, En as WEAPP_VITE_HOST_NAME, Mn as resolveWeappViteHostMeta, On as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, jn as isWeappViteHost, kn as applyWeappViteHostMeta, 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, y as defineThemeJson } from "./config-
|
|
1
|
+
import { An as createWeappViteHostMeta, Dn as WeappViteHostMeta, En as WEAPP_VITE_HOST_NAME, Mn as resolveWeappViteHostMeta, On as WeappViteRuntime, _ as definePageJson, a as UserConfigFnNoEnvPlain, c as UserConfigFnPromise, d as Component, f as Page, g as defineComponentJson, h as defineAppJson, i as UserConfigFnNoEnv, jn as isWeappViteHost, kn as applyWeappViteHostMeta, 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, y as defineThemeJson } from "./config-BHVrIbhx.mjs";
|
|
2
2
|
export { App, Component, Page, Sitemap, Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, WeappViteConfig, WeappViteHostMeta, WeappViteRuntime, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-
|
|
2
|
-
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-
|
|
3
|
-
import { t as defineConfig } from "./config-
|
|
1
|
+
import { a as defineThemeJson, i as defineSitemapJson, n as defineComponentJson, r as definePageJson, t as defineAppJson } from "./json-wnfVS9jE.mjs";
|
|
2
|
+
import { a as resolveWeappViteHostMeta, i as isWeappViteHost, n as applyWeappViteHostMeta, r as createWeappViteHostMeta, t as WEAPP_VITE_HOST_NAME } from "./pluginHost-BzPJL4F-.mjs";
|
|
3
|
+
import { t as defineConfig } from "./config-B2xtjEug.mjs";
|
|
4
4
|
export { WEAPP_VITE_HOST_NAME, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };
|