weapp-vite 7.5.0 → 7.6.0

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.
Files changed (93) hide show
  1. package/README.md +8 -2
  2. package/THIRD_PARTY_NOTICES.md +60 -0
  3. package/dist/action-B3YZMA-h.mjs +255 -0
  4. package/dist/action-BELcDNNv.mjs +139 -0
  5. package/dist/action-BOk3vGI7.mjs +1110 -0
  6. package/dist/action-DlC6JYpt.mjs +95 -0
  7. package/dist/action-zEDY7oh_.mjs +247 -0
  8. package/dist/{analyze-ZJUvEdaY.mjs → analyze-DN79YOAH.mjs} +1 -65
  9. package/dist/artifacts-BOyC9Fy-.mjs +106 -0
  10. package/dist/assets-C5_YYXNk.mjs +637 -0
  11. package/dist/auto-routes.mjs +2 -2
  12. package/dist/{budget-BD7VqLCl.d.mts → budget-CTLOHwgI.d.mts} +1 -2
  13. package/dist/budget-EOeEycc_.mjs +65 -0
  14. package/dist/builtProject-C29udgXY.mjs +541 -0
  15. package/dist/{chunkStrategy-DRA5WpB-.mjs → chunkStrategy-DY_LZIIe.mjs} +15 -3
  16. package/dist/{package-7swhyLmf.mjs → classifier-DBJY__kg.mjs} +4 -7
  17. package/dist/cli-acceptance.mjs +1 -1
  18. package/dist/cli.mjs +110 -4506
  19. package/dist/{config-V0L-IAJf.d.mts → config-Bf6DWhyb.d.mts} +136 -49
  20. package/dist/config.d.mts +2 -2
  21. package/dist/{createCompilerContextInstance-DJH_P_nZ.mjs → createCompilerContextInstance-aYwi8wQt.mjs} +15235 -9523
  22. package/dist/{createContext-BqYzHhY9.mjs → createContext-tApLtII-.mjs} +6 -3
  23. package/dist/dashboard/analyze.d.mts +1 -1
  24. package/dist/dashboard/analyze.mjs +3 -1
  25. package/dist/dashboard/vite.d.mts +1 -1
  26. package/dist/dashboard.d.mts +2 -2
  27. package/dist/dashboard.mjs +1749 -1
  28. package/dist/dashboardTransport-C_Y6jMp-.mjs +16 -0
  29. package/dist/{dashboardViteBridge-Dy3nAD4m.mjs → dashboardViteBridge-DCGR43aM.mjs} +8 -5
  30. package/dist/{dev-fR5GiJRO.mjs → dev-C2fgr_Xd.mjs} +5 -1
  31. package/dist/devProvider-D-hTfsEO.mjs +3027 -0
  32. package/dist/docs/README.md +8 -2
  33. package/dist/docs/mcp.md +10 -0
  34. package/dist/docs/troubleshooting.md +8 -0
  35. package/dist/docs/vue-sfc.md +25 -2
  36. package/dist/doctor-worker.mjs +3 -2
  37. package/dist/doctor.d.mts +2 -2
  38. package/dist/doctor.mjs +15 -13
  39. package/dist/engine-C66J0HLz.mjs +54 -0
  40. package/dist/{file-sC3jD7Fh.mjs → file-CcIOmqhC.mjs} +47 -19
  41. package/dist/file-DtcteQ4G.mjs +1 -0
  42. package/dist/forwardConsole-B0Reo8Lf.mjs +511 -0
  43. package/dist/getInstance-BAIaU2y9.mjs +1 -0
  44. package/dist/{getInstance-DiGSzBNI.mjs → getInstance-Dt9IQDKr.mjs} +1 -1
  45. package/dist/history-BIiRCzbq.mjs +784 -0
  46. package/dist/i18n.d.mts +1 -1
  47. package/dist/{index-C9HjUX5c.d.mts → index-D5rgBzYZ.d.mts} +1 -2
  48. package/dist/index.d.mts +3 -3
  49. package/dist/index.mjs +2 -2
  50. package/dist/json.d.mts +1 -1
  51. package/dist/lib-DjccSI1B.mjs +143 -0
  52. package/dist/{lifecycle-BROTlwSL.mjs → lifecycle-C36WSbQS.mjs} +120 -27
  53. package/dist/{loadConfig-C3BQhz7F.mjs → loadConfig-BWIsDXR4.mjs} +1 -1
  54. package/dist/loadConfig-D-BpBgsk.mjs +1 -0
  55. package/dist/logBuildAppFinish-ChjwATMv.mjs +57 -0
  56. package/dist/mcp-CYgX9HpO.mjs +86 -0
  57. package/dist/mcp.d.mts +1 -1
  58. package/dist/mcpClient-DVLvFLZv.mjs +287 -0
  59. package/dist/{processCleanup-B6KA30Zc.mjs → metadata-hwF7QRcS.mjs} +1 -19
  60. package/dist/nodeEnv-BmH8UZPR.mjs +7 -0
  61. package/dist/openIde-CroqOgk5.mjs +648 -0
  62. package/dist/options-jqFwfD1G.mjs +34 -0
  63. package/dist/package-Cmakyy3J.mjs +4 -0
  64. package/dist/path-CYYIQGS7.mjs +44 -0
  65. package/dist/processCleanup-BQn2kTcK.mjs +19 -0
  66. package/dist/{protocol-vg8HGJ4n.mjs → protocol-Cg6Jdlvb.mjs} +42 -39
  67. package/dist/reader-sh_POQ9-.mjs +93 -0
  68. package/dist/realpathScope-Tf9mz-fh.mjs +23 -0
  69. package/dist/report-hyonPGbZ.mjs +107 -0
  70. package/dist/{path-doV773b7.mjs → resolvedId-CiDl7SC1.mjs} +3 -46
  71. package/dist/runtime-CLUhQsdA.mjs +43 -0
  72. package/dist/{runtime-Ee2HY6gR.d.mts → runtime-DpVf714f.d.mts} +1 -1
  73. package/dist/runtime.d.mts +1 -1
  74. package/dist/schematics-kO26eQRT.mjs +91 -0
  75. package/dist/{session-PskhD-nZ.mjs → session-D3zsdzIy.mjs} +71 -9
  76. package/dist/test.mjs +10 -8
  77. package/dist/{types-CgZn5X6j.d.mts → types-D-kfuyVa.d.mts} +1 -2
  78. package/dist/types-D0FFexRF.d.mts +39 -0
  79. package/dist/types.d.mts +2 -2
  80. package/dist/{upload-D4msblBf.mjs → upload-DozK8UdN.mjs} +109 -5
  81. package/dist/upload-worker.mjs +1 -1
  82. package/dist/{utils-CJSCgEj6.mjs → utils-Dy51PYAC.mjs} +56 -116
  83. package/dist/vite.d.mts +1 -1
  84. package/dist/vite.mjs +51 -12
  85. package/dist/wxs-BT8btflA.mjs +112 -0
  86. package/dist/wxs-Z4VQDeJ_.mjs +1 -0
  87. package/package.json +52 -46
  88. package/dist/dashboard-DvqF3Key.mjs +0 -1842
  89. package/dist/devProvider-BGBkw28J.mjs +0 -1050
  90. package/dist/file-DRb4eWqw.mjs +0 -1
  91. package/dist/getInstance-SiE6WZRh.mjs +0 -1
  92. package/dist/loadConfig-VGtBF4qm.mjs +0 -1
  93. package/dist/mcp-D3Yh24Cj.mjs +0 -529
@@ -1,6 +1,7 @@
1
1
  import { d as ResolvedValue, f as Resolver } from "./index-CaXAtb9e.mjs";
2
2
  import { t as AutoRoutes } from "./routes-C7fCmf92.mjs";
3
- import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
3
+ import { t as WeappI18nConfig } from "./types-D-kfuyVa.mjs";
4
+ import { r as GlassEaselTemplateFinding, t as GlassEaselAnalysisFact } from "./types-D0FFexRF.mjs";
4
5
  import { MpPlatform, OutputExtensions } from "@weapp-core/shared";
5
6
  import { WeappAstConfig } from "@weapp-vite/ast";
6
7
  import "@weapp-vite/ast/operations/onPageScroll";
@@ -10,20 +11,21 @@ import { ComponentStyleOptions, JsonConfig, JsonMergeContext, JsonMergeFunction,
10
11
  import { ConfigEnv, ConfigEnv as ConfigEnv$1, InlineConfig, InlineConfig as InlineConfig$1, Plugin, Plugin as Plugin$2, PluginOption, ResolvedConfig, ResolvedConfig as ResolvedConfig$1, UserConfig, ViteDevServer, ViteDevServer as ViteDevServer$1, build } from "vite";
11
12
  import { LRUCache } from "lru-cache";
12
13
  import { fdir } from "fdir";
14
+ import { Buffer } from "node:buffer";
13
15
  import { HmrCompilerAsset as WeappCompilerHmrAsset, HmrCompilerPreparation, HmrCompilerPreparation as WeappCompilerHmrPreparation, HmrCompilerRequest, HmrCompilerRequest as WeappCompilerHmrRequest } from "@weapp-vite/hmr";
14
16
  import PQueue from "p-queue";
15
- import { Buffer } from "node:buffer";
17
+ import "get-tsconfig";
16
18
  import { WrapPluginOptions } from "vite-plugin-performance";
17
19
  import { Options } from "rolldown-plugin-dts";
18
- import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, PageLayoutMeta, Ref, WevuDefaults } from "wevu";
19
- import { MiniProgramNetworkDefaults } from "@wevu/web-apis";
20
20
  import { App, App as App$1, Component, Component as Component$1, GenerateType, Page, Page as Page$1, Plugin as Plugin$1, Sitemap, Sitemap as Sitemap$1, Theme, Theme as Theme$1 } from "@weapp-core/schematics";
21
21
  import { InputOption, OutputBundle, OutputChunk, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownOutput as RolldownOutput$1, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcher as RolldownWatcher$1, WatchOptions as RolldownWatchOptions } from "rolldown";
22
+ import { MiniProgramNetworkDefaults } from "@wevu/web-apis/network-defaults";
23
+ import { PageLayoutMeta, WevuConfigDefaults } from "wevu/config";
22
24
  import { WeappWebPluginOptions } from "@weapp-vite/web/plugin";
23
25
  import { CompilerOptions } from "typescript";
24
26
  import { CreateCompilerOptions } from "weapp-tailwindcss/core";
25
27
  import { UserDefinedOptions } from "weapp-tailwindcss/types";
26
- import { PluginOptions } from "vite-tsconfig-paths";
28
+ import { ComputedDefinitions as ComputedDefinitions$1, MethodDefinitions as MethodDefinitions$1, Ref } from "wevu/types";
27
29
  import { DetectResult } from "package-manager-detector";
28
30
  //#region src/runtimeTarget.d.ts
29
31
  type WebPlatform = 'web';
@@ -872,6 +874,8 @@ interface WeappVueTemplateConfig {
872
874
  htmlTagToWxmlTagClass?: boolean;
873
875
  scopedSlotsCompiler?: 'auto' | 'augmented' | 'off';
874
876
  scopedSlotsRequireProps?: boolean;
877
+ /** 是否启用微信原生插槽的 provide/inject 上下文协议,默认关闭;需同时开启 scopedSlotsRequireProps。 */
878
+ nativeSlotContext?: boolean;
875
879
  slotSingleRootNoWrapper?: boolean;
876
880
  slotFallbackWrapperStrategy?: 'view' | 'virtual-host';
877
881
  slotFallbackWrapper?: string | {
@@ -907,7 +911,7 @@ interface WeappVueConfig {
907
911
  */
908
912
  interface WeappWevuConfig {
909
913
  preset?: 'performance';
910
- defaults?: WevuDefaults;
914
+ defaults?: WevuConfigDefaults;
911
915
  autoSetDataPick?: boolean;
912
916
  /**
913
917
  * @description 是否压缩 wevu 相关脚本输出。
@@ -942,6 +946,97 @@ interface WeappRouteRule {
942
946
  }
943
947
  type WeappRouteRules = Record<string, WeappRouteRule>;
944
948
  //#endregion
949
+ //#region ../../node_modules/.pnpm/vite-tsconfig-paths@7.0.0-alpha.3_supports-color@10.2.2_vite@8.3.4/node_modules/vite-tsconfig-paths/dist/types.d.ts
950
+ interface PluginOptions {
951
+ /**
952
+ * The directory to crawl for `tsconfig.json` files.
953
+ *
954
+ * When the `projects` option is set, crawling is skipped, so this is
955
+ * used to resolve `projects` paths into absolute paths instead.
956
+ *
957
+ * @default
958
+ * // The config root is used for resolving project paths, and the
959
+ * // workspace root is used for crawling.
960
+ * options.projects ? viteConfig.root : vite.searchForWorkspaceRoot(viteConfig.root)
961
+ */
962
+ root?: string;
963
+ /**
964
+ * An array of `.json` files and/or directories that contain a
965
+ * `tsconfig.json` file. These JSON files must adhere to the
966
+ * {@link https://www.typescriptlang.org/tsconfig TypeScript config interface}.
967
+ * The `extends` property is supported.
968
+ *
969
+ * This disables crawling for `tsconfig.json` files when defined.
970
+ *
971
+ * **Note:** When using `projectDiscovery: "lazy"`, this option is perfect
972
+ * for ensuring your
973
+ * {@link https://www.typescriptlang.org/docs/handbook/project-references.html project references}
974
+ * are discovered.
975
+ */
976
+ projects?: string[];
977
+ /**
978
+ * Disable strictness that limits path resolution to TypeScript and
979
+ * JavaScript modules.
980
+ *
981
+ * Useful if you want asset URLs in Vue templates to be resolved, or when
982
+ * `"allowJs": true` in your tsconfig isn't good enough.
983
+ */
984
+ loose?: boolean;
985
+ /**
986
+ * Fine-grained control over which files should have their imports
987
+ * resolved by this plugin. This has no effect when `loose` is true.
988
+ */
989
+ importerFilter?: (importer: string) => boolean;
990
+ /**
991
+ * Silence the warning about malformed `tsconfig.json` files.
992
+ */
993
+ ignoreConfigErrors?: boolean;
994
+ /**
995
+ * An array of `tsconfig.json` file names to search for.
996
+ *
997
+ * @default ["tsconfig.json", "jsconfig.json"]
998
+ */
999
+ configNames?: string[];
1000
+ /**
1001
+ * A function that determines which directories to skip when searching
1002
+ * for tsconfig.json files. While `.git` and `node_modules` directories
1003
+ * are always skipped, this option allows you to skip additional
1004
+ * directories, which is useful in large monorepos to improve
1005
+ * performance.
1006
+ *
1007
+ * **Note:** This is not used when the `projects` option is set, unless
1008
+ * `projectDiscovery` is set to `lazy`.
1009
+ */
1010
+ skip?: (dir: string) => boolean;
1011
+ /**
1012
+ * With the "lazy" strategy, the `tsconfig.json` files are parsed when an
1013
+ * import is encountered in a module with a supported file extension that
1014
+ * exists in the same directory as the `tsconfig.json` file (or one of
1015
+ * its subdirectories).
1016
+ *
1017
+ * **Note 1:** If your `tsconfig.json` files have `../*` paths in their
1018
+ * `include` or `files` array, the "lazy" strategy is not recommended,
1019
+ * since the tsconfig file won't be discovered for those cases.
1020
+ *
1021
+ * **Note 2:** You can combine the `projects` option with "lazy" to
1022
+ * ensure your project references are discovered. Alternatively, the
1023
+ * `configNames` option allows for custom-named tsconfig files to be
1024
+ * discovered.
1025
+ *
1026
+ * With the "eager" strategy, all `tsconfig.json` files are loaded and
1027
+ * parsed when the plugin is initialized. This means they won't be
1028
+ * reloaded if their file is edited. This was the only parsing strategy
1029
+ * prior to v5.2.0 and may be deprecated in a future version.
1030
+ *
1031
+ * @default "eager"
1032
+ */
1033
+ projectDiscovery?: "eager" | "lazy";
1034
+ /**
1035
+ * A file to write detailed logs of the resolver process.
1036
+ */
1037
+ logFile?: string | boolean;
1038
+ }
1039
+ //#endregion
945
1040
  //#region src/types/config/tsconfigPaths.d.ts
946
1041
  /** 高级路径适配选项,保留旧配置的类型兼容。 */
947
1042
  interface TsconfigPathsOptions extends PluginOptions {
@@ -1423,7 +1518,8 @@ interface ModuleGraphService {
1423
1518
  bindPluginContext: (scope: object, context: BuildGraphContext) => void;
1424
1519
  /** 仅用于整个会话关闭或替换,不用于普通增量构建或临时 snapshot。 */
1425
1520
  resetSession: () => void;
1426
- collectAffectedEntries: (file: string) => Set<string>;
1521
+ /** 指定 kind 时仅查询该类声明依赖,不展开构建引擎的模块图。 */
1522
+ collectAffectedEntries: (file: string, kind?: SidecarModuleKind) => Set<string>;
1427
1523
  getPendingChanges: () => Array<{
1428
1524
  event: string;
1429
1525
  file: string;
@@ -1436,7 +1532,7 @@ interface ModuleGraphService {
1436
1532
  id: string;
1437
1533
  resolveDependencies?: boolean;
1438
1534
  }) => Promise<BuildModuleInfo>;
1439
- replaceEntryDependencies: (ownerId: string, kind: SidecarModuleKind, sourceIds: Iterable<string>) => void;
1535
+ replaceEntryDependencies: (ownerId: string, kind: SidecarModuleKind, sourceIds: Iterable<string>, resolveSourceId?: (id: string) => string) => void;
1440
1536
  /** 释放 owner 自己的依赖声明;实际 import graph 的更新仍由构建引擎负责。 */
1441
1537
  removeEntryDependencies: (ownerId: string) => void;
1442
1538
  recordChangedFile: (file: string, event: string) => void;
@@ -1450,7 +1546,9 @@ interface ModuleGraphService {
1450
1546
  syncDevGraph: (context: BuildGraphContext) => Promise<void>;
1451
1547
  getTransformDependencies: (sourceId: string) => readonly string[];
1452
1548
  replaceTransformDependencies: (sourceId: string, dependencies: Iterable<string>) => void;
1453
- getEntryDependencies: (ownerId: string) => Array<{
1549
+ getEntryDependencies: (ownerId: string, options?: {
1550
+ preserveAliases: boolean;
1551
+ }) => Array<{
1454
1552
  kind: SidecarModuleKind;
1455
1553
  sourceId: string;
1456
1554
  }>;
@@ -1999,44 +2097,6 @@ interface NpmService {
1999
2097
  build: (options?: NpmBuildOptions) => Promise<void>;
2000
2098
  }
2001
2099
  //#endregion
2002
- //#region src/analyze/glassEasel/types.d.ts
2003
- type GlassEaselDiagnosticCode = 'GE001' | 'GE002' | 'GE003' | 'GE004' | 'GE005' | 'GE006';
2004
- type GlassEaselDiagnosticSeverity = 'error' | 'warning';
2005
- interface GlassEaselDiagnostic {
2006
- code: GlassEaselDiagnosticCode;
2007
- severity: GlassEaselDiagnosticSeverity;
2008
- message: string;
2009
- file: string;
2010
- line?: number;
2011
- column?: number;
2012
- normalized?: boolean;
2013
- }
2014
- /** 每个 source/output owner 的最近分析事实;日志去重状态不属于当前事实。 */
2015
- interface GlassEaselAnalysisFact {
2016
- kind: 'output' | 'source';
2017
- scope?: string;
2018
- detected: boolean;
2019
- diagnostics: Map<string, GlassEaselDiagnostic>;
2020
- sourceIds: Set<string>;
2021
- }
2022
- interface GlassEaselAnalyzeResult {
2023
- detected: boolean;
2024
- minimumBaseLibrary: '3.8.12';
2025
- migrationGuide: string;
2026
- diagnostics: GlassEaselDiagnostic[];
2027
- summary: {
2028
- errors: number;
2029
- warnings: number;
2030
- };
2031
- }
2032
- interface GlassEaselTemplateFinding {
2033
- code: Extract<GlassEaselDiagnosticCode, 'GE002' | 'GE003' | 'GE004'>;
2034
- severity: GlassEaselDiagnosticSeverity;
2035
- message: string;
2036
- start: number;
2037
- normalized?: boolean;
2038
- }
2039
- //#endregion
2040
2100
  //#region src/utils/hmrProfile/provenance.d.ts
2041
2101
  interface HmrProfileSourceEvent {
2042
2102
  eventId: string;
@@ -2221,6 +2281,8 @@ interface RuntimeState {
2221
2281
  entriesMap: Map<string, Entry | undefined>;
2222
2282
  vueEntryHasTemplate: Map<string, boolean>;
2223
2283
  vueEntrySfcSignatures: Map<string, VueSfcBlockSignatures>;
2284
+ /** 当前编译 generation 的模板注册签名,只随成功快照交付为基线。 */
2285
+ templateRegistrationSignatures?: Map<string, string | undefined>;
2224
2286
  vueEntryStyleBindings: Map<string, VueEntryStyleBindings>;
2225
2287
  /** 编译 provider 内容签名;key 为入口,value 的 key 为 provider 名称。 */
2226
2288
  vueEntryContentSignatures?: Map<string, Readonly<Record<string, string>>>;
@@ -2235,6 +2297,8 @@ interface RuntimeState {
2235
2297
  isRebuild: boolean;
2236
2298
  /** 当前快照从根入口重建可达图;完整发布后才撤销旧产物。 */
2237
2299
  fullEntryScan?: boolean;
2300
+ /** 当前快照已清空输出缓存并重发全部资源,不要求重新扫描入口拓扑。 */
2301
+ fullSnapshotOutput: boolean;
2238
2302
  didEmitAllEntries: boolean;
2239
2303
  lastHmrEntryIds: Set<string>;
2240
2304
  lastEmittedEntryIds: Set<string>;
@@ -2291,6 +2355,16 @@ interface RuntimeState {
2291
2355
  snapshotResolveMs?: number;
2292
2356
  snapshotBuildMs?: number;
2293
2357
  writeMs?: number;
2358
+ /** Tailwind 六个连续输出阶段均包含在 writeMs 中,不能与 writeMs 再次相加。 */
2359
+ tailwindPrepareMs?: number;
2360
+ tailwindGenerateMs?: number;
2361
+ tailwindCssMs?: number;
2362
+ tailwindTemplateMs?: number;
2363
+ tailwindJavaScriptMs?: number;
2364
+ tailwindFinalizeMs?: number;
2365
+ /** 来源解析与磁盘生成是 tailwindGenerateMs 的累计子项,多 root 可重叠,不能当作连续阶段相加。 */
2366
+ tailwindSourceResolveMs?: number;
2367
+ tailwindDiskGenerateMs?: number;
2294
2368
  finalizePrepareMs?: number;
2295
2369
  finalizeTemplateMs?: number;
2296
2370
  finalizePublishMs?: number;
@@ -2355,6 +2429,16 @@ interface RuntimeState {
2355
2429
  snapshotResolveMs?: number;
2356
2430
  snapshotBuildMs?: number;
2357
2431
  writeMs?: number;
2432
+ /** Tailwind 六个连续输出阶段均包含在 writeMs 中,不能与 writeMs 再次相加。 */
2433
+ tailwindPrepareMs?: number;
2434
+ tailwindGenerateMs?: number;
2435
+ tailwindCssMs?: number;
2436
+ tailwindTemplateMs?: number;
2437
+ tailwindJavaScriptMs?: number;
2438
+ tailwindFinalizeMs?: number;
2439
+ /** 来源解析与磁盘生成是 tailwindGenerateMs 的累计子项,多 root 可重叠,不能当作连续阶段相加。 */
2440
+ tailwindSourceResolveMs?: number;
2441
+ tailwindDiskGenerateMs?: number;
2358
2442
  finalizePrepareMs?: number;
2359
2443
  finalizeTemplateMs?: number;
2360
2444
  finalizePublishMs?: number;
@@ -2393,6 +2477,7 @@ interface RuntimeState {
2393
2477
  }>;
2394
2478
  emittedSource: Map<string, string>;
2395
2479
  sidecarImports: Set<string>;
2480
+ sidecarImportsByOwner: Map<string, Set<string>>;
2396
2481
  };
2397
2482
  watcher: {
2398
2483
  rollupWatcherMap: Map<string, WatcherInstance>;
@@ -2550,6 +2635,8 @@ interface AutoRoutesService {
2550
2635
  getSnapshot: () => AutoRoutes;
2551
2636
  getReference: () => AutoRoutes;
2552
2637
  getSignature: () => string;
2638
+ /** 返回最近完整扫描中的源码指纹;未知源码不能作为已发布的去重凭据。 */
2639
+ getSourceFingerprint: (filePath: string) => string | undefined;
2553
2640
  getModuleCode: () => string;
2554
2641
  getNamedModuleCode: () => string;
2555
2642
  getWatchFiles: () => Iterable<string>;
@@ -2583,7 +2670,7 @@ interface CompilerContext {
2583
2670
  buildService: BuildService;
2584
2671
  scanService: ScanService;
2585
2672
  currentBuildTarget?: BuildTarget;
2586
- onStatefulHmrSourceChange?: (file: string, dirtyReasonSummary: string[]) => void;
2673
+ onStatefulHmrSourceChange?: (file: string, dirtyReasonSummary: string[], sourceEvent?: HmrProfileSourceEvent) => void;
2587
2674
  }
2588
2675
  //#endregion
2589
2676
  //#region src/types/plugin.d.ts
@@ -2644,4 +2731,4 @@ declare module 'vite' {
2644
2731
  */
2645
2732
  declare function defineConfig<T extends UserConfigExport>(config: T): T;
2646
2733
  //#endregion
2647
- export { WeappCompilerHmrRequest as $, NpmMainPackageConfig as $n, WeappSubPackageConfig as $t, PluginOption as A, DeprecatedInlineDynamicImports as An, WeappWebConfig as Ar, ScanWxmlOptions as At, ViteDevServer$1 as B, GenerateTemplateFileSource as Bn, WeappVitePlatform as Br, WeappInjectRequestGlobalsTarget as Bt, GlassEaselAnalyzeResult as C, Alias as Cn, WeappLibInternalDtsOptions as Cr, WeappViteConfig as Ct, InlineConfig$1 as D, ChunksConfig as Dn, WeappManagedServerTsconfigConfig as Dr, EnhanceWxmlOptions as Dt, ConfigEnv$1 as E, BuildNpmPackageMeta as En, WeappManagedNodeTsconfigConfig as Er, EnhanceOptions as Et, RolldownOutput$1 as F, GenerateOptions as Fn, isWeappViteHost as Fr, WeappAutoRoutesIncludePattern as Ft, Entry as G, JsonConfig as Gn, WebPlatform as Gr, WeappNpmConfig as Gt, AppEntry as H, GenerateTemplateScope as Hn, WeappViteTargetDescriptor as Hr, WeappInjectWebRuntimeGlobalsConfig as Ht, RolldownPlugin as I, GenerateTemplate as In, resolveWeappViteHostMeta as Ir, WeappBuildScopeConfig as It, ComponentsMap as J, JsonMergeStage as Jn, isWebPlatform as Jr, WeappReactCompilerConfig as Jt, EntryJsonFragment as K, JsonMergeContext as Kn, getSupportedWeappVitePlatforms as Kr, WeappPreloadNetwork as Kt, RolldownPluginOption as L, GenerateTemplateContext as Ln, ResolveWeappViteTargetOptions as Lr, WeappBuildScopeObjectConfig as Lt, ResolvedConfig$1 as M, GenerateExtensionsOptions as Mn, WeappViteHostMeta as Mr, WeappAppPreludeMode as Mt, RolldownBuild as N, GenerateFileType as Nn, applyWeappViteHostMeta as Nr, WeappAutoRoutesConfig as Nt, MethodDefinitions$1 as O, CopyGlobs as On, WeappManagedSharedTsconfigConfig as Or, HandleWxmlOptions as Ot, RolldownOptions as P, GenerateFilenamesOptions as Pn, createWeappViteHostMeta as Pr, WeappAutoRoutesInclude as Pt, WeappCompilerHmrPreparation as Q, NpmDependencyPattern as Qn, WeappRouteRules as Qt, RolldownWatchOptions as R, GenerateTemplateEntry as Rn, ResolvedWeappViteTarget as Rr, WeappHmrConfig as Rt, CompilerContext as S, MultiPlatformProjectConfigs as Sn, WeappLibFileName as Sr, WeappUploadConfig as St, ComputedDefinitions$1 as T, AlipayNpmMode as Tn, WeappManagedAppTsconfigConfig as Tr, AutoImportComponentsOption as Tt, BaseEntry as U, GenerateTemplatesConfig as Un, WeappViteTargetInput as Ur, WeappInjectWebRuntimeGlobalsTarget as Ut, BindingErrorLike as V, GenerateTemplateInlineSource as Vn, WeappViteRuntime as Vr, WeappInjectWeapiConfig as Vt, ComponentEntry as W, JsFormat as Wn, WeappViteTargetKind as Wr, WeappMcpConfig as Wt, WxmlDep as X, MpPlatform$1 as Xn, WeappRequestRuntimeConfig as Xt, ScanComponentItem as Y, JsonMergeStrategy as Yn, resolveWeappViteTarget as Yr, WeappReactConfig as Yt, WeappCompilerHmrAsset as Z, NpmBuildOptions as Zn, WeappRouteRule as Zt, definePageJson as _, WxmlTransformContext as _n, SubPackageStyleScope as _r, WeappAnalyzeHistoryConfig as _t, UserConfigFnNoEnvPlain as a, WeappWorkerConfig as an, SharedChunkDynamicImports as ar, WeappCompilerPluginFactory as at, ChangeEvent as b, WxmlTransformVisitor as bn, WeappLibDtsOptions as br, WeappForwardConsoleLogLevel as bt, UserConfigFnPromise as c, WxmlValidate as cn, SharedChunkStrategy as cr, WeappCompilerResourceKind as ct, Component$1 as d, WxmlValidationVisitor as dn, StyleEntry as dr, WeappCompilerTransformResult as dt, WeappUniAppConfig as en, NpmPackageFilesConfig as er, WeappCompilerOutputRequest as et, Page$1 as f, WxmlAttribute as fn, StyleScope as fr, ProjectConfig as ft, defineComponentJson as g, WxmlTransform as gn, SubPackageStyleEntry as gr, WeappAnalyzeConfig as gt, defineAppJson as h, WxmlSourceLocation as hn, SubPackageStyleConfigObject as hr, WeappAnalyzeBudgetConfig as ht, UserConfigFnNoEnv as i, WeappWevuConfig as in, ResolvedAlias as ir, WeappCompilerPluginController as it, Ref as j, GenerateDirsOptions as jn, WEAPP_VITE_HOST_NAME as jr, WeappAppPreludeConfig as jt, Plugin$2 as k, CopyOptions as kn, WeappManagedTypeScriptConfig as kr, MultiPlatformConfig as kt, defineConfig as l, WxmlValidationContext as ln, StyleConfigEntry as lr, WeappCompilerSourceClaim as lt, Theme$1 as m, WxmlElementInfo as mn, SubPackageStyleConfigEntry as mr, UserConfig$2 as mt, UserConfigExport as n, WeappVueTemplateConfig as nn, NpmStrategy as nr, WeappCompilerPluginCapabilities as nt, UserConfigFnObject as o, WxmlRemoveAttrRule as on, SharedChunkMode as or, WeappCompilerPluginOption as ot, Sitemap$1 as p, WxmlAttributeValue as pn, SubPackage as pr, SubPackageMetaValue as pt, PageEntry as q, JsonMergeFunction as qn, getSupportedWeappViteTargetDescriptors as qr, WeappPreloadRule as qt, UserConfigFn as r, WeappWebRuntimeConfig as rn, NpmSubPackageConfig as rr, WeappCompilerPluginContext as rt, UserConfigFnObjectPlain as s, WxmlRemoveOptions as sn, SharedChunkOverride as sr, WeappCompilerPluginPhase as st, UserConfig$1 as t, WeappVueConfig as tn, NpmPluginPackageConfig as tr, WeappCompilerPlugin as tt, App$1 as u, WxmlValidationDiagnostic as un, StyleConfigObject as ur, WeappCompilerSourceRequest as ut, defineSitemapJson as v, WxmlTransformNode as vn, WeappLibComponentJson as vr, WeappDebugConfig as vt, LoadConfigOptions as w, AliasOptions as wn, WeappLibVueTscOptions as wr, AutoImportComponents as wt, WeappVitePluginApi as x, MultiPlatformProjectConfig as xn, WeappLibEntryContext as xr, WeappTailwindcssOptions as xt, defineThemeJson as y, WxmlTransformResult as yn, WeappLibConfig as yr, WeappForwardConsoleConfig as yt, RolldownWatcher$1 as z, GenerateTemplateFactory as zn, WEB_PLATFORM_ALIASES as zr, WeappInjectRequestGlobalsConfig as zt };
2734
+ export { WeappCompilerOutputRequest as $, NpmPackageFilesConfig as $n, WeappUniAppConfig as $t, Ref as A, GenerateDirsOptions as An, WEAPP_VITE_HOST_NAME as Ar, WeappAppPreludeConfig as At, BindingErrorLike as B, GenerateTemplateInlineSource as Bn, WeappViteRuntime as Br, WeappInjectWeapiConfig as Bt, LoadConfigOptions as C, AliasOptions as Cn, WeappLibVueTscOptions as Cr, AutoImportComponents as Ct, MethodDefinitions$1 as D, CopyGlobs as Dn, WeappManagedSharedTsconfigConfig as Dr, HandleWxmlOptions as Dt, InlineConfig$1 as E, ChunksConfig as En, WeappManagedServerTsconfigConfig as Er, EnhanceWxmlOptions as Et, RolldownPlugin as F, GenerateTemplate as Fn, resolveWeappViteHostMeta as Fr, WeappBuildScopeConfig as Ft, EntryJsonFragment as G, JsonMergeContext as Gn, getSupportedWeappVitePlatforms as Gr, WeappPreloadNetwork as Gt, BaseEntry as H, GenerateTemplatesConfig as Hn, WeappViteTargetInput as Hr, WeappInjectWebRuntimeGlobalsTarget as Ht, RolldownPluginOption as I, GenerateTemplateContext as In, ResolveWeappViteTargetOptions as Ir, WeappBuildScopeObjectConfig as It, ScanComponentItem as J, JsonMergeStrategy as Jn, resolveWeappViteTarget as Jr, WeappReactConfig as Jt, PageEntry as K, JsonMergeFunction as Kn, getSupportedWeappViteTargetDescriptors as Kr, WeappPreloadRule as Kt, RolldownWatchOptions as L, GenerateTemplateEntry as Ln, ResolvedWeappViteTarget as Lr, WeappHmrConfig as Lt, RolldownBuild as M, GenerateFileType as Mn, applyWeappViteHostMeta as Mr, WeappAutoRoutesConfig as Mt, RolldownOptions as N, GenerateFilenamesOptions as Nn, createWeappViteHostMeta as Nr, WeappAutoRoutesInclude as Nt, Plugin$2 as O, CopyOptions as On, WeappManagedTypeScriptConfig as Or, MultiPlatformConfig as Ot, RolldownOutput$1 as P, GenerateOptions as Pn, isWeappViteHost as Pr, WeappAutoRoutesIncludePattern as Pt, WeappCompilerHmrRequest as Q, NpmMainPackageConfig as Qn, WeappSubPackageConfig as Qt, RolldownWatcher$1 as R, GenerateTemplateFactory as Rn, WEB_PLATFORM_ALIASES as Rr, WeappInjectRequestGlobalsConfig as Rt, CompilerContext as S, Alias as Sn, WeappLibInternalDtsOptions as Sr, WeappViteConfig as St, ConfigEnv$1 as T, BuildNpmPackageMeta as Tn, WeappManagedNodeTsconfigConfig as Tr, EnhanceOptions as Tt, ComponentEntry as U, JsFormat as Un, WeappViteTargetKind as Ur, WeappMcpConfig as Ut, AppEntry as V, GenerateTemplateScope as Vn, WeappViteTargetDescriptor as Vr, WeappInjectWebRuntimeGlobalsConfig as Vt, Entry as W, JsonConfig as Wn, WebPlatform as Wr, WeappNpmConfig as Wt, WeappCompilerHmrAsset as X, NpmBuildOptions as Xn, WeappRouteRule as Xt, WxmlDep as Y, MpPlatform$1 as Yn, WeappRequestRuntimeConfig as Yt, WeappCompilerHmrPreparation as Z, NpmDependencyPattern as Zn, WeappRouteRules as Zt, definePageJson as _, WxmlTransformNode as _n, WeappLibComponentJson as _r, WeappDebugConfig as _t, UserConfigFnNoEnvPlain as a, WxmlRemoveAttrRule as an, SharedChunkMode as ar, WeappCompilerPluginOption as at, ChangeEvent as b, MultiPlatformProjectConfig as bn, WeappLibEntryContext as br, WeappTailwindcssOptions as bt, UserConfigFnPromise as c, WxmlValidationContext as cn, StyleConfigEntry as cr, WeappCompilerSourceClaim as ct, Component$1 as d, WxmlAttribute as dn, StyleScope as dr, ProjectConfig as dt, WeappVueConfig as en, NpmPluginPackageConfig as er, WeappCompilerPlugin as et, Page$1 as f, WxmlAttributeValue as fn, SubPackage as fr, SubPackageMetaValue as ft, defineComponentJson as g, WxmlTransformContext as gn, SubPackageStyleScope as gr, WeappAnalyzeHistoryConfig as gt, defineAppJson as h, WxmlTransform as hn, SubPackageStyleEntry as hr, WeappAnalyzeConfig as ht, UserConfigFnNoEnv as i, WeappWorkerConfig as in, SharedChunkDynamicImports as ir, WeappCompilerPluginFactory as it, ResolvedConfig$1 as j, GenerateExtensionsOptions as jn, WeappViteHostMeta as jr, WeappAppPreludeMode as jt, PluginOption as k, DeprecatedInlineDynamicImports as kn, WeappWebConfig as kr, ScanWxmlOptions as kt, defineConfig as l, WxmlValidationDiagnostic as ln, StyleConfigObject as lr, WeappCompilerSourceRequest as lt, Theme$1 as m, WxmlSourceLocation as mn, SubPackageStyleConfigObject as mr, WeappAnalyzeBudgetConfig as mt, UserConfigExport as n, WeappWebRuntimeConfig as nn, NpmSubPackageConfig as nr, WeappCompilerPluginContext as nt, UserConfigFnObject as o, WxmlRemoveOptions as on, SharedChunkOverride as or, WeappCompilerPluginPhase as ot, Sitemap$1 as p, WxmlElementInfo as pn, SubPackageStyleConfigEntry as pr, UserConfig$2 as pt, ComponentsMap as q, JsonMergeStage as qn, isWebPlatform as qr, WeappReactCompilerConfig as qt, UserConfigFn as r, WeappWevuConfig as rn, ResolvedAlias as rr, WeappCompilerPluginController as rt, UserConfigFnObjectPlain as s, WxmlValidate as sn, SharedChunkStrategy as sr, WeappCompilerResourceKind as st, UserConfig$1 as t, WeappVueTemplateConfig as tn, NpmStrategy as tr, WeappCompilerPluginCapabilities as tt, App$1 as u, WxmlValidationVisitor as un, StyleEntry as ur, WeappCompilerTransformResult as ut, defineSitemapJson as v, WxmlTransformResult as vn, WeappLibConfig as vr, WeappForwardConsoleConfig as vt, ComputedDefinitions$1 as w, AlipayNpmMode as wn, WeappManagedAppTsconfigConfig as wr, AutoImportComponentsOption as wt, WeappVitePluginApi as x, MultiPlatformProjectConfigs as xn, WeappLibFileName as xr, WeappUploadConfig as xt, defineThemeJson as y, WxmlTransformVisitor as yn, WeappLibDtsOptions as yr, WeappForwardConsoleLogLevel as yt, ViteDevServer$1 as z, GenerateTemplateFileSource as zn, WeappVitePlatform as zr, WeappInjectRequestGlobalsTarget as zt };
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as WeappCompilerHmrRequest, Ct as WeappViteConfig, Fr as isWeappViteHost, Gn as JsonConfig, Ir as resolveWeappViteHostMeta, Jn as JsonMergeStage, Kn as JsonMergeContext, Mr as WeappViteHostMeta, Nr as applyWeappViteHostMeta, Pr as createWeappViteHostMeta, Q as WeappCompilerHmrPreparation, Sn as MultiPlatformProjectConfigs, Vr as WeappViteRuntime, Yn as JsonMergeStrategy, Z as WeappCompilerHmrAsset, _ as definePageJson, _n as WxmlTransformContext, a as UserConfigFnNoEnvPlain, bn as WxmlTransformVisitor, c as UserConfigFnPromise, cn as WxmlValidate, d as Component, dn as WxmlValidationVisitor, f as Page, fn as WxmlAttribute, g as defineComponentJson, gn as WxmlTransform, h as defineAppJson, hn as WxmlSourceLocation, i as UserConfigFnNoEnv, it as WeappCompilerPluginController, jr as WEAPP_VITE_HOST_NAME, l as defineConfig, ln as WxmlValidationContext, m as Theme, mn as WxmlElementInfo, n as UserConfigExport, nt as WeappCompilerPluginCapabilities, o as UserConfigFnObject, on as WxmlRemoveAttrRule, ot as WeappCompilerPluginOption, p as Sitemap, pn as WxmlAttributeValue, qn as JsonMergeFunction, r as UserConfigFn, rt as WeappCompilerPluginContext, s as UserConfigFnObjectPlain, sn as WxmlRemoveOptions, t as UserConfig, tt as WeappCompilerPlugin, u as App, un as WxmlValidationDiagnostic, v as defineSitemapJson, vn as WxmlTransformNode, xn as MultiPlatformProjectConfig, y as defineThemeJson, yn as WxmlTransformResult } from "./config-V0L-IAJf.mjs";
2
- import { t as WeappI18nConfig } from "./types-CgZn5X6j.mjs";
1
+ import { Ar as WEAPP_VITE_HOST_NAME, Br as WeappViteRuntime, Fr as resolveWeappViteHostMeta, Gn as JsonMergeContext, Jn as JsonMergeStrategy, Kn as JsonMergeFunction, Mr as applyWeappViteHostMeta, Nr as createWeappViteHostMeta, Pr as isWeappViteHost, Q as WeappCompilerHmrRequest, St as WeappViteConfig, Wn as JsonConfig, X as WeappCompilerHmrAsset, Z as WeappCompilerHmrPreparation, _ as definePageJson, _n as WxmlTransformNode, a as UserConfigFnNoEnvPlain, an as WxmlRemoveAttrRule, at as WeappCompilerPluginOption, bn as MultiPlatformProjectConfig, c as UserConfigFnPromise, cn as WxmlValidationContext, d as Component, dn as WxmlAttribute, et as WeappCompilerPlugin, f as Page, fn as WxmlAttributeValue, g as defineComponentJson, gn as WxmlTransformContext, h as defineAppJson, hn as WxmlTransform, i as UserConfigFnNoEnv, jr as WeappViteHostMeta, l as defineConfig, ln as WxmlValidationDiagnostic, m as Theme, mn as WxmlSourceLocation, n as UserConfigExport, nt as WeappCompilerPluginContext, o as UserConfigFnObject, on as WxmlRemoveOptions, p as Sitemap, pn as WxmlElementInfo, qn as JsonMergeStage, r as UserConfigFn, rt as WeappCompilerPluginController, s as UserConfigFnObjectPlain, sn as WxmlValidate, t as UserConfig, tt as WeappCompilerPluginCapabilities, u as App, un as WxmlValidationVisitor, v as defineSitemapJson, vn as WxmlTransformResult, xn as MultiPlatformProjectConfigs, y as defineThemeJson, yn as WxmlTransformVisitor } from "./config-Bf6DWhyb.mjs";
2
+ import { t as WeappI18nConfig } from "./types-D-kfuyVa.mjs";
3
3
  export { type App, type Component, type JsonConfig, type JsonMergeContext, type JsonMergeFunction, type JsonMergeStage, type JsonMergeStrategy, type MultiPlatformProjectConfig, type MultiPlatformProjectConfigs, type Page, type Sitemap, type Theme, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnNoEnv, UserConfigFnNoEnvPlain, UserConfigFnObject, UserConfigFnObjectPlain, UserConfigFnPromise, WEAPP_VITE_HOST_NAME, type WeappCompilerHmrAsset, type WeappCompilerHmrPreparation, type WeappCompilerHmrRequest, type WeappCompilerPlugin, type WeappCompilerPluginCapabilities, type WeappCompilerPluginContext, type WeappCompilerPluginController, type WeappCompilerPluginOption, type WeappI18nConfig, type WeappViteConfig, WeappViteHostMeta, type WeappViteRuntime, type WxmlAttribute, type WxmlAttributeValue, type WxmlElementInfo, type WxmlRemoveAttrRule, type WxmlRemoveOptions, type WxmlSourceLocation, type WxmlTransform, type WxmlTransformContext, type WxmlTransformNode, type WxmlTransformResult, type WxmlTransformVisitor, type WxmlValidate, type WxmlValidationContext, type WxmlValidationDiagnostic, type WxmlValidationVisitor, applyWeappViteHostMeta, createWeappViteHostMeta, defineAppJson, defineComponentJson, defineConfig, definePageJson, defineSitemapJson, defineThemeJson, isWeappViteHost, resolveWeappViteHostMeta };