@voidzero-dev/vite-plus-core 0.2.6 → 0.2.8

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 (74) hide show
  1. package/LICENSE +35 -0
  2. package/dist/rolldown/cli.mjs +9 -10
  3. package/dist/rolldown/config.d.mts +1 -1
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-default-runtime.mjs +116 -0
  6. package/dist/rolldown/experimental-index.d.mts +10 -4
  7. package/dist/rolldown/experimental-index.mjs +32 -16
  8. package/dist/rolldown/experimental-runtime-base.mjs +95 -0
  9. package/dist/rolldown/experimental-runtime.d.ts +177 -0
  10. package/dist/rolldown/experimental-runtime.mjs +257 -0
  11. package/dist/rolldown/filter-index.d.mts +1 -1
  12. package/dist/rolldown/filter-index.mjs +1 -3
  13. package/dist/rolldown/index.d.mts +3 -3
  14. package/dist/rolldown/index.mjs +4 -4
  15. package/dist/rolldown/parallel-plugin-worker.mjs +3 -3
  16. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  17. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  18. package/dist/rolldown/parse-ast-index.mjs +2 -2
  19. package/dist/rolldown/plugins-index.d.mts +3 -3
  20. package/dist/rolldown/plugins-index.mjs +2 -2
  21. package/dist/rolldown/shared/{binding-Dbbi0RbO.d.mts → binding-CVtkJvyl.d.mts} +11 -0
  22. package/dist/rolldown/shared/{binding-Dby9rwGk.mjs → binding-DwUQWZOo.mjs} +178 -104
  23. package/dist/rolldown/shared/{bindingify-input-options-DVQ4K-zY.mjs → bindingify-input-options-B03y7DfJ.mjs} +448 -268
  24. package/dist/rolldown/shared/{constructors-CSWbNgBZ.d.mts → constructors-ALilxAii.d.mts} +2 -2
  25. package/dist/rolldown/shared/{constructors-CuGa75s-.mjs → constructors-COwFYQna.mjs} +10 -6
  26. package/dist/rolldown/shared/{rolldown-build-BGXNOfvH.mjs → create-bundler-option-B-tSTZRt.mjs} +72 -179
  27. package/dist/rolldown/shared/{define-config-B-IDOhDz.d.mts → define-config-DSMNXceb.d.mts} +85 -22
  28. package/dist/rolldown/shared/{error-DFGNOCle.mjs → error-nLggAzpQ.mjs} +1 -1
  29. package/dist/rolldown/shared/{load-config-R0z2olkB.mjs → load-config-O4G7NVNA.mjs} +2 -2
  30. package/dist/rolldown/shared/{logs-ZGEh6uhb.mjs → logs-DmYCAKcW.mjs} +8 -1
  31. package/dist/rolldown/shared/{misc-CoQm4NHO.mjs → misc-DOSKtd97.mjs} +9 -1
  32. package/dist/rolldown/shared/{normalize-string-or-regex-SiXbePVH.mjs → normalize-string-or-regex-Cj-DgIV1.mjs} +2 -2
  33. package/dist/rolldown/shared/{parse-D5dkElpf.mjs → parse-CQfUbVuN.mjs} +2 -2
  34. package/dist/rolldown/shared/{prompt-pZFoa1TT.mjs → prompt-uaCPq0_A.mjs} +2 -6
  35. package/dist/rolldown/shared/{resolve-tsconfig-2TXRF_zr.mjs → resolve-tsconfig-CE3HNSOK.mjs} +2 -2
  36. package/dist/rolldown/shared/rolldown-qV_fUwyM.mjs +178 -0
  37. package/dist/rolldown/shared/{transform-Cs2bUDRH.d.mts → transform-WmU_cI8e.d.mts} +1 -1
  38. package/dist/rolldown/shared/{watch-DVucf-VG.mjs → watch-BNIsji74.mjs} +16 -13
  39. package/dist/rolldown/utils-index.d.mts +3 -3
  40. package/dist/rolldown/utils-index.mjs +5 -5
  41. package/dist/tsdown/{build-oq13wECG-Bymq3jT5.js → build-D_enfyvD-X5SFXZZc.js} +30 -28
  42. package/dist/tsdown/{debug-BntVTkRq-BGIoAiTa.js → debug-CKcBYQLP-avlAPNcV.js} +5 -7
  43. package/dist/tsdown/{detect-DGhJGEqb-S-tkSzpt.js → detect-DGhJGEqb-CGd2brAW.js} +1 -1
  44. package/dist/tsdown/{dist-CxIM8o7n.js → dist-BZO8q3c0.js} +48 -12
  45. package/dist/tsdown/{dist-DCMiHFrJ.js → dist-CMKwGGNp.js} +1 -3
  46. package/dist/tsdown/index-types.d.ts +21 -11
  47. package/dist/tsdown/index.js +4 -4
  48. package/dist/tsdown/internal-DyaNxVWW.js +3 -0
  49. package/dist/tsdown/{main-BdzlWPt6.js → main-Jz_9T-KA.js} +18 -10
  50. package/dist/tsdown/npm_entry_picomatch.cjs +1 -1
  51. package/dist/tsdown/npm_entry_tree-kill.cjs +11 -13
  52. package/dist/tsdown/{resolver-cwLsPb2o-oj1hqxK6.js → resolver-cwLsPb2o-BqQjnCbF.js} +3 -3
  53. package/dist/tsdown/run.js +5 -5
  54. package/dist/tsdown/{src-BV-UJr_R.js → src-D5keKqGd.js} +5 -5
  55. package/dist/tsdown/{target-CNxIDvSz-eoHNdJNs.js → target-Bab3CUeB-CERZYTwS.js} +34 -28
  56. package/dist/tsdown/{tsc-zcbB6ZVY.js → tsc-DmzrnJwy.js} +4 -5
  57. package/dist/tsdown/tsdown-css.js +13 -16
  58. package/dist/tsdown/tsdown-exe.js +4 -4
  59. package/dist/vite/client/bundledDevClient.mjs +1465 -0
  60. package/dist/vite/client/client.mjs +51 -82
  61. package/dist/vite/node/chunks/build.js +47 -43
  62. package/dist/vite/node/chunks/dist.js +26 -85
  63. package/dist/vite/node/chunks/dist2.js +5 -10
  64. package/dist/vite/node/chunks/node.js +2728 -2311
  65. package/dist/vite/node/chunks/postcss-import.js +10 -10
  66. package/dist/vite/node/index.d.ts +68 -14
  67. package/dist/vite/node/module-runner.js +21 -11
  68. package/dist/vite/types/customEvent.d.ts +3 -1
  69. package/dist/vite/types/hmrPayload.d.ts +20 -6
  70. package/package.json +32 -18
  71. package/dist/rolldown/shared/rolldown-BnV7isAX.mjs +0 -40
  72. package/dist/tsdown/internal-C7ewSPAZ.js +0 -3
  73. package/dist/tsdown/load-tsc-BKULZsrs-BFmeD6Bu.js +0 -18
  74. package/dist/tsdown/tsc-context-CA76SkkZ.js +0 -23
@@ -1,6 +1,6 @@
1
1
  import { mt as __require, pt as __commonJSMin } from "./node.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/format-import-prelude.js
4
4
  var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
5
  module.exports = function formatImportPrelude(layer, media, supports) {
6
6
  const parts = [];
@@ -15,7 +15,7 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
15
15
  };
16
16
  }));
17
17
  //#endregion
18
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/base64-encoded-import.js
19
19
  var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20
20
  const formatImportPrelude = require_format_import_prelude();
21
21
  module.exports = function base64EncodedConditionalImport(prelude, conditions) {
@@ -28,7 +28,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
28
28
  };
29
29
  }));
30
30
  //#endregion
31
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-conditions.js
32
32
  var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33
33
  const base64EncodedConditionalImport = require_base64_encoded_import();
34
34
  module.exports = function applyConditions(bundle, atRule) {
@@ -103,7 +103,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
103
103
  };
104
104
  }));
105
105
  //#endregion
106
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-raws.js
107
107
  var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
108
108
  module.exports = function applyRaws(bundle) {
109
109
  bundle.forEach((stmt, index) => {
@@ -117,7 +117,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
117
117
  };
118
118
  }));
119
119
  //#endregion
120
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/apply-styles.js
120
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-styles.js
121
121
  var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
122
  module.exports = function applyStyles(bundle, styles) {
123
123
  styles.nodes = [];
@@ -137,7 +137,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
137
137
  };
138
138
  }));
139
139
  //#endregion
140
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/data-url.js
140
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/data-url.js
141
141
  var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
142
142
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
143
143
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
@@ -156,7 +156,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
156
156
  };
157
157
  }));
158
158
  //#endregion
159
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/parse-statements.js
159
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-statements.js
160
160
  var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
161
161
  const valueParser = require_lib();
162
162
  const { stringify } = valueParser;
@@ -281,7 +281,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
281
281
  }
282
282
  }));
283
283
  //#endregion
284
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/process-content.js
284
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/process-content.js
285
285
  var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
286
286
  const path$2 = __require("path");
287
287
  let sugarss;
@@ -315,7 +315,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
315
315
  }
316
316
  }));
317
317
  //#endregion
318
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/lib/parse-styles.js
318
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-styles.js
319
319
  var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
320
320
  const path$1 = __require("path");
321
321
  const dataURL = require_data_url();
@@ -418,7 +418,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
418
418
  module.exports = parseStyles;
419
419
  }));
420
420
  //#endregion
421
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.20/node_modules/postcss-import/index.js
421
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/index.js
422
422
  var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
423
423
  const path = __require("path");
424
424
  const applyConditions = require_apply_conditions();
@@ -24,12 +24,13 @@ import { ZlibOptions } from "node:zlib";
24
24
  import { ChunkMetadata, CustomPluginOptionsVite } from "#types/metadata";
25
25
  import { Terser, TerserMinifyOptions } from "#types/internal/terserOptions";
26
26
  import * as PostCSS from "postcss";
27
+ import { ProcessOptions, Processor, Transformer } from "postcss";
27
28
  import { LightningCSSOptions, LightningCSSOptions as lightningcssOptions_LightningCSSOptions } from "#types/internal/lightningcssOptions";
28
29
  import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPreprocessorBaseOptions } from "#types/internal/cssPreprocessorOptions";
29
30
  import { withFilter } from "@voidzero-dev/vite-plus-core/rolldown/filter";
30
31
  import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
31
32
  //#endregion
32
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.3.4_crossws@0.4.10_srvx@0.11.15__typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_6dd09e987cdcfce7e76f9fde407b07b8/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
34
  //#region src/node/cli-commands.d.ts
34
35
  interface StartOptions {
35
36
  root?: string;
@@ -39,7 +40,7 @@ interface StartOptions {
39
40
  open?: boolean;
40
41
  }
41
42
  //#endregion
42
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.3.4_crossws@0.4.10_srvx@0.11.15__typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/config.d.ts
43
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_6dd09e987cdcfce7e76f9fde407b07b8/node_modules/@vitejs/devtools/dist/config.d.ts
43
44
  //#region src/node/config.d.ts
44
45
  interface DevToolsConfig extends Partial<StartOptions> {
45
46
  enabled: boolean;
@@ -64,6 +65,16 @@ interface DevToolsConfig extends Partial<StartOptions> {
64
65
  * will be auto-approved without a terminal prompt.
65
66
  */
66
67
  clientAuthTokens?: string[];
68
+ /**
69
+ * Origins allowed to open the DevTools WebSocket connection, in addition to the built-in
70
+ * loopback allowlist (`localhost`, `127.0.0.1`, etc).
71
+ *
72
+ * The loopback check is a plain string match against the `Origin` header, not a DNS/hosts-file
73
+ * resolution — a custom dev hostname that resolves to loopback via `/etc/hosts` or a local DNS
74
+ * override (e.g. `dev-my-app.example.com`) is invisible to it and gets rejected. List such
75
+ * hostnames here explicitly.
76
+ */
77
+ allowedOrigins?: string[];
67
78
  }
68
79
  interface ResolvedDevToolsConfig {
69
80
  config: Omit<DevToolsConfig, 'enabled'> & {
@@ -1628,22 +1639,31 @@ declare class BundledDev {
1628
1639
  private initialBuildCompleted;
1629
1640
  private _closed;
1630
1641
  private clients;
1631
- private invalidateCalledModules;
1632
1642
  private debouncedFullReload;
1633
1643
  private fullReloadPending;
1644
+ private reloadNeededClientIds;
1645
+ private debouncedReloadNeededFlush;
1634
1646
  private lastBuildError;
1635
1647
  memoryFiles: MemoryFiles;
1636
1648
  constructor(environment: DevEnvironment);
1637
1649
  private get devEngine();
1650
+ private pendingPayloadFilenames;
1638
1651
  listen(): Promise<void>;
1639
1652
  private waitForInitialBuildFinish;
1640
- invalidateModule(m: {
1641
- path: string;
1642
- message?: string;
1643
- firstInvalidatedBy: string;
1644
- }, client: NormalizedHotChannelClient): Promise<void>;
1653
+ private ensureOutputAndFlushReloadNeeded;
1645
1654
  triggerBundleRegenerationIfStale(): Promise<boolean>;
1646
- triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<string | undefined>;
1655
+ triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<{
1656
+ code: string;
1657
+ filename: string;
1658
+ } | undefined>;
1659
+ /**
1660
+ * Called by the serving middlewares when the response for a payload completed.
1661
+ * Only delivered payloads are recorded on the server's per-client ship map, so
1662
+ * later chunks may omit a module only if the payload carrying it was delivered.
1663
+ *
1664
+ * Note: the payload filename is unique across all clients.
1665
+ */
1666
+ markPayloadDelivered(filename: string): void;
1647
1667
  close(): Promise<void>;
1648
1668
  private storeOutputFiles;
1649
1669
  private getRolldownOptions;
@@ -2002,7 +2022,6 @@ interface ResolveOptions extends EnvironmentResolveOptions {
2002
2022
  * Enable tsconfig paths resolution
2003
2023
  *
2004
2024
  * @default false
2005
- * @experimental
2006
2025
  */
2007
2026
  tsconfigPaths?: boolean;
2008
2027
  }
@@ -2280,9 +2299,10 @@ interface BuildEnvironmentOptions {
2280
2299
  type BuildOptions = BuildEnvironmentOptions;
2281
2300
  interface LibraryOptions {
2282
2301
  /**
2283
- * Path of library entry
2302
+ * Path of library entry.
2303
+ * Defaults to the top-level `input` option when omitted.
2284
2304
  */
2285
- entry: InputOption;
2305
+ entry?: InputOption;
2286
2306
  /**
2287
2307
  * The name of the exposed global variable. Required when the `formats` option includes
2288
2308
  * `umd` or `iife`
@@ -2759,6 +2779,13 @@ interface ViteDevServer {
2759
2779
  interface ResolvedServerUrls {
2760
2780
  local: string[];
2761
2781
  network: string[];
2782
+ /**
2783
+ * Names of the network interface that each {@link ResolvedServerUrls.network}
2784
+ * URL is bound to, in the same order as `network`. An entry is `undefined`
2785
+ * when the interface name is not known, for example when an explicit `host`
2786
+ * is set.
2787
+ */
2788
+ networkInterfaceNames?: (string | undefined)[];
2762
2789
  }
2763
2790
  declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Promise<ViteDevServer>;
2764
2791
  //#endregion
@@ -3083,6 +3110,18 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
3083
3110
  */
3084
3111
  declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3085
3112
  //#endregion
3113
+ //#region ../../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3114
+ type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
3115
+ interface Config {
3116
+ parser?: string | ProcessOptions['parser'] | false;
3117
+ stringifier?: string | ProcessOptions['stringifier'] | false;
3118
+ syntax?: string | ProcessOptions['syntax'] | false;
3119
+ map?: string | false;
3120
+ from?: string;
3121
+ to?: string;
3122
+ plugins?: Array<ConfigPlugin | false> | Record<string, object | false>;
3123
+ }
3124
+ //#endregion
3086
3125
  //#region src/node/plugins/css.d.ts
3087
3126
  interface CSSOptions {
3088
3127
  /**
@@ -3376,6 +3415,12 @@ type AllResolveOptions = ResolveOptions & {
3376
3415
  alias?: AliasOptions;
3377
3416
  };
3378
3417
  interface SharedEnvironmentOptions {
3418
+ /**
3419
+ * Entry points of the application.
3420
+ *
3421
+ * Paths are resolved relative to the project root.
3422
+ */
3423
+ input?: InputOption;
3379
3424
  /**
3380
3425
  * Define global variable replacements.
3381
3426
  * Entries will be defined on `window` during dev and replaced during build.
@@ -3423,6 +3468,7 @@ interface EnvironmentOptions extends SharedEnvironmentOptions {
3423
3468
  }
3424
3469
  type ResolvedResolveOptions = Required<ResolveOptions>;
3425
3470
  type ResolvedEnvironmentOptions = {
3471
+ input?: InputOption;
3426
3472
  define?: Record<string, any>;
3427
3473
  resolve: ResolvedResolveOptions;
3428
3474
  consumer: "client" | "server";
@@ -3463,7 +3509,7 @@ interface UserConfig extends DefaultEnvironmentOptions {
3463
3509
  * the performance. You can use `--force` flag or manually delete the directory
3464
3510
  * to regenerate the cache files. The value can be either an absolute file
3465
3511
  * system path or a path relative to project root.
3466
- * Default to `.vite` when no `package.json` is detected.
3512
+ * Default to `.vite` when neither a `package.json` nor a `node_modules` directory is detected.
3467
3513
  * @default 'node_modules/.vite'
3468
3514
  */
3469
3515
  cacheDir?: string;
@@ -3680,6 +3726,14 @@ interface ExperimentalOptions {
3680
3726
  *
3681
3727
  * This is highly experimental.
3682
3728
  *
3729
+ * HMR semantics under full bundle mode differ from the middleware-based dev server
3730
+ * in two ways (boundaries are computed in the browser from runtime state, not
3731
+ * statically on the server):
3732
+ *
3733
+ * - Acceptance counts only when it executed: an `import.meta.hot.accept()` that
3734
+ * is in a dead branch does not suppress the update and falls back to a full reload.
3735
+ * - `hot.invalidate()` is handled fully client-side.
3736
+ *
3683
3737
  * @experimental
3684
3738
  * @default false
3685
3739
  */
@@ -4007,4 +4061,4 @@ declare const parseAst: typeof parseAst$1;
4007
4061
  declare const parseAstAsync: typeof parseAstAsync$1;
4008
4062
  declare const esbuildVersion = "0.25.0";
4009
4063
  //#endregion
4010
- export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlAssetSource, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type KnownQueryTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, type WsOptions, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
4064
+ export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlAssetSource, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type KnownQueryTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type Config as PostcssUserConfig, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, type WsOptions, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
@@ -71,7 +71,8 @@ function normalizeString(path, allowAboveRoot) {
71
71
  let lastSlashIndex = res.lastIndexOf("/");
72
72
  lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
73
73
  continue;
74
- } else if (res.length > 0) {
74
+ }
75
+ if (res.length > 0) {
75
76
  res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
76
77
  continue;
77
78
  }
@@ -464,13 +465,17 @@ var HMRContext = class {
464
465
  this.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();
465
466
  }
466
467
  async prunePaths(paths) {
467
- await Promise.all(paths.map((path) => {
468
- let disposer = this.disposeMap.get(path);
469
- if (disposer) return disposer(this.dataMap.get(path));
470
- })), await Promise.all(paths.map((path) => {
471
- let fn = this.pruneMap.get(path);
472
- if (fn) return fn(this.dataMap.get(path));
473
- }));
468
+ try {
469
+ await Promise.all(paths.map((path) => {
470
+ let disposer = this.disposeMap.get(path);
471
+ if (disposer) return disposer(this.dataMap.get(path));
472
+ })), await Promise.all(paths.map((path) => {
473
+ let fn = this.pruneMap.get(path);
474
+ if (fn) return fn(this.dataMap.get(path));
475
+ }));
476
+ } finally {
477
+ paths.forEach((path) => this.dataMap.delete(path));
478
+ }
474
479
  }
475
480
  warnFailedUpdate(err, path) {
476
481
  (!(err instanceof Error) || !err.message.includes("fetch")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);
@@ -787,6 +792,7 @@ function createHMRHandlerForRunner(runner) {
787
792
  break;
788
793
  }
789
794
  case "ping": break;
795
+ case "bundled-dev-update": break;
790
796
  default: return payload;
791
797
  }
792
798
  });
@@ -866,7 +872,11 @@ function retrieveSourceMap(source) {
866
872
  let sourceMappingURL = retrieveSourceMapURL(source);
867
873
  if (!sourceMappingURL) return null;
868
874
  let sourceMapData;
869
- return reSourceMap.test(sourceMappingURL) ? (sourceMapData = decodeBase64(sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1)), sourceMappingURL = source) : (sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL)), sourceMapData ? {
875
+ if (reSourceMap.test(sourceMappingURL)) {
876
+ let rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
877
+ sourceMapData = decodeBase64(rawData), sourceMappingURL = source;
878
+ } else sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL);
879
+ return sourceMapData ? {
870
880
  url: sourceMappingURL,
871
881
  map: sourceMapData
872
882
  } : null;
@@ -918,7 +928,7 @@ function CallSiteToString() {
918
928
  let fileName, fileLocation = "";
919
929
  if (this.isNative()) fileLocation = "native";
920
930
  else {
921
- fileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += ", "), fileName ? fileLocation += fileName : fileLocation += "<anonymous>";
931
+ fileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += ", "), fileLocation += fileName || "<anonymous>";
922
932
  let lineNumber = this.getLineNumber();
923
933
  if (lineNumber != null) {
924
934
  fileLocation += `:${lineNumber}`;
@@ -937,7 +947,7 @@ function CallSiteToString() {
937
947
  return addSuffix && (line += ` (${fileLocation})`), line;
938
948
  }
939
949
  function cloneCallSite(frame) {
940
- let object = {};
950
+ let object = Object.create(null);
941
951
  return Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {
942
952
  let key = name;
943
953
  object[key] = /^(?:is|get)/.test(name) ? function() {
@@ -18,7 +18,9 @@ export interface CustomEventMap {
18
18
  /** @internal */
19
19
  'vite:forward-console': ForwardConsolePayload
20
20
  /** @internal */
21
- 'vite:module-loaded': { modules: string[]; clientId: string }
21
+ 'vite:client-connected': { clientId: string }
22
+ /** @internal */
23
+ 'vite:bundled-dev:reload-needed': { reason: string }
22
24
 
23
25
  // server events
24
26
  'vite:client:connect': undefined
@@ -4,6 +4,7 @@ export type HotPayload =
4
4
  | ConnectedPayload
5
5
  | PingPayload
6
6
  | UpdatePayload
7
+ | BundledDevUpdatePayload
7
8
  | FullReloadPayload
8
9
  | CustomPayload
9
10
  | ErrorPayload
@@ -22,14 +23,21 @@ export interface UpdatePayload {
22
23
  updates: Update[]
23
24
  }
24
25
 
26
+ /**
27
+ * Full-bundle-mode update notification. The client computes the HMR boundaries
28
+ * itself from `changedIds`.
29
+ */
30
+ export interface BundledDevUpdatePayload {
31
+ type: 'bundled-dev-update'
32
+ changedIds: string[]
33
+ /** URL of the per-client HMR patch chunk */
34
+ url: string
35
+ /** Per-client sequence number */
36
+ seq: number
37
+ }
38
+
25
39
  export interface Update {
26
40
  type: 'js-update' | 'css-update'
27
- /**
28
- * URL of HMR patch chunk
29
- *
30
- * This only exists when full-bundle mode is enabled.
31
- */
32
- url?: string
33
41
  path: string
34
42
  acceptedPath: string
35
43
  timestamp: number
@@ -53,6 +61,12 @@ export interface FullReloadPayload {
53
61
  path?: string
54
62
  /** @internal */
55
63
  triggeredBy?: string
64
+ /**
65
+ * When set, only the bundling-fallback page acts on the reload;
66
+ * other pages ignore the message.
67
+ * @internal
68
+ */
69
+ ifFallback?: boolean
56
70
  }
57
71
 
58
72
  export interface CustomPayload {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vite-plus-core",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -62,6 +62,10 @@
62
62
  "default": "./dist/rolldown/experimental-index.mjs",
63
63
  "types": "./dist/rolldown/experimental-index.d.mts"
64
64
  },
65
+ "./rolldown/experimental/runtime": {
66
+ "types": "./dist/rolldown/experimental-runtime.d.ts",
67
+ "default": "./dist/rolldown/experimental-runtime.mjs"
68
+ },
65
69
  "./rolldown/experimental/runtime-types": {
66
70
  "types": "./dist/rolldown/experimental-runtime-types.d.ts"
67
71
  },
@@ -97,8 +101,8 @@
97
101
  "./types/internal/*": null
98
102
  },
99
103
  "dependencies": {
100
- "@oxc-project/runtime": "=0.141.0",
101
- "@oxc-project/types": "=0.141.0",
104
+ "@oxc-project/runtime": "=0.142.0",
105
+ "@oxc-project/types": "=0.142.0",
102
106
  "lightningcss": "^1.33.0",
103
107
  "postcss": "^8.5.6",
104
108
  "yuku-codegen": "^0.5.44",
@@ -109,33 +113,35 @@
109
113
  "@babel/generator": "^7.28.5",
110
114
  "@babel/parser": "^7.28.5",
111
115
  "@babel/types": "^7.28.5",
116
+ "@emnapi/core": "2.0.0-alpha.3",
117
+ "@emnapi/runtime": "2.0.0-alpha.3",
118
+ "@napi-rs/cli": "^3.8.2",
112
119
  "@oxc-node/cli": "^0.1.0",
113
- "@oxc-node/core": "^0.1.0",
114
- "@tsdown/css": "^0.22.13",
115
- "@tsdown/exe": "^0.22.13",
116
- "@vitejs/devtools": "^0.4.2",
120
+ "@tsdown/css": "^0.22.14",
121
+ "@tsdown/exe": "^0.22.14",
122
+ "@vitejs/devtools": "^0.4.10",
117
123
  "es-module-lexer": "^1.7.0",
118
124
  "hookable": "^6.0.1",
119
125
  "magic-string": "^0.30.21",
120
- "oxc-parser": "=0.141.0",
121
- "oxfmt": "=0.60.0",
126
+ "oxc-parser": "=0.142.0",
127
+ "oxfmt": "=0.61.0",
122
128
  "picocolors": "^1.1.1",
123
129
  "picomatch": "^4.0.3",
124
130
  "pkg-types": "^2.3.0",
125
- "rolldown-plugin-dts": "^0.27.0",
131
+ "rolldown-plugin-dts": "^0.28.0",
126
132
  "rollup": "^4.18.0",
127
133
  "rollup-plugin-license": "^3.6.0",
128
134
  "semver": "^7.7.3",
129
135
  "tinyglobby": "^0.2.15",
130
136
  "tree-kill": "^1.2.2",
131
- "tsdown": "^0.22.13",
132
- "vite": "npm:@voidzero-dev/vite-plus-core@0.2.6",
133
- "rolldown": "1.2.0"
137
+ "tsdown": "^0.22.14",
138
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.2.8",
139
+ "rolldown": "1.2.2"
134
140
  },
135
141
  "peerDependencies": {
136
142
  "@arethetypeswrong/core": "^0.18.1",
137
143
  "@types/node": "^20.19.0 || >=22.12.0",
138
- "@vitejs/devtools": "^0.3.0",
144
+ "@vitejs/devtools": "^0.4.0",
139
145
  "esbuild": "^0.27.0 || ^0.28.0",
140
146
  "jiti": ">=1.21.0",
141
147
  "less": "^4.0.0",
@@ -205,15 +211,23 @@
205
211
  }
206
212
  },
207
213
  "optionalDependencies": {
208
- "fsevents": "~2.3.3"
214
+ "fsevents": "~2.3.3",
215
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.2.8",
216
+ "@voidzero-dev/vite-plus-darwin-x64": "0.2.8",
217
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.2.8",
218
+ "@voidzero-dev/vite-plus-linux-arm64-musl": "0.2.8",
219
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.2.8",
220
+ "@voidzero-dev/vite-plus-linux-x64-musl": "0.2.8",
221
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.2.8",
222
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.2.8"
209
223
  },
210
224
  "engines": {
211
225
  "node": "^20.19.0 || ^22.18.0 || >=24.11.0"
212
226
  },
213
227
  "bundledVersions": {
214
- "vite": "8.1.5",
215
- "rolldown": "1.2.0",
216
- "tsdown": "0.22.13"
228
+ "vite": "8.2.0",
229
+ "rolldown": "1.2.2",
230
+ "tsdown": "0.22.14"
217
231
  },
218
232
  "scripts": {
219
233
  "build": "oxnode -C dev ./build.ts"
@@ -1,40 +0,0 @@
1
- import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-BGXNOfvH.mjs";
2
- //#region src/api/rolldown/index.ts
3
- /**
4
- * The API compatible with Rollup's `rollup` function.
5
- *
6
- * Unlike Rollup, the module graph is not built until the methods of the bundle object are called.
7
- *
8
- * @param input The input options object.
9
- * @returns A Promise that resolves to a bundle object.
10
- *
11
- * @example
12
- * ```js
13
- * import { rolldown } from 'rolldown';
14
- *
15
- * let bundle, failed = false;
16
- * try {
17
- * bundle = await rolldown({
18
- * input: 'src/main.js',
19
- * });
20
- * await bundle.write({
21
- * format: 'esm',
22
- * });
23
- * } catch (e) {
24
- * console.error(e);
25
- * failed = true;
26
- * }
27
- * if (bundle) {
28
- * await bundle.close();
29
- * }
30
- * process.exitCode = failed ? 1 : 0;
31
- * ```
32
- *
33
- * @category Programmatic APIs
34
- */
35
- const rolldown = async (input) => {
36
- validateOption("input", input);
37
- return new RolldownBuild(await PluginDriver.callOptionsHook(input));
38
- };
39
- //#endregion
40
- export { rolldown as t };
@@ -1,3 +0,0 @@
1
- import "./main-BdzlWPt6.js";
2
- import "./target-CNxIDvSz-eoHNdJNs.js";
3
- export {};
@@ -1,18 +0,0 @@
1
- import { r as createDebug } from "./main-BdzlWPt6.js";
2
- import { createRequire } from "node:module";
3
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.12_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_d94a4da753642eee691447f5bf042e95/node_modules/rolldown-plugin-dts/dist/load-tsc-BKULZsrs.mjs
4
- const require = createRequire(import.meta.url);
5
- const debug = createDebug("rolldown-plugin-dts:load-tsc");
6
- let _ts;
7
- function requireTS(message = "") {
8
- if (_ts) return _ts;
9
- try {
10
- _ts = require("typescript");
11
- if (debug.enabled) debug(`loaded TypeScript version ${_ts.version} from ${require.resolve("typescript")}`);
12
- return _ts;
13
- } catch (cause) {
14
- throw new Error(`TypeScript is not installed. You should install \`typescript\` package. ${message}`, { cause });
15
- }
16
- }
17
- //#endregion
18
- export { requireTS as t };
@@ -1,23 +0,0 @@
1
- import { r as createDebug } from "./main-BdzlWPt6.js";
2
- import path from "node:path";
3
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.12_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_d94a4da753642eee691447f5bf042e95/node_modules/rolldown-plugin-dts/dist/tsc-context.mjs
4
- const debug = createDebug("rolldown-plugin-dts:tsc-context");
5
- function createContext() {
6
- return {
7
- programs: [],
8
- files: /* @__PURE__ */ new Map(),
9
- projects: /* @__PURE__ */ new Map()
10
- };
11
- }
12
- function invalidateContextFile(context, file) {
13
- file = path.resolve(file).replaceAll("\\", "/");
14
- debug(`invalidating context file: ${file}`);
15
- context.files.delete(file);
16
- context.programs = context.programs.filter((program) => {
17
- return !program.getSourceFiles().some((sourceFile) => sourceFile.fileName === file);
18
- });
19
- context.projects.clear();
20
- }
21
- const globalContext = createContext();
22
- //#endregion
23
- export { globalContext as n, invalidateContextFile as r, createContext as t };