@voidzero-dev/vite-plus-core 0.2.9 → 0.3.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 (57) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +5 -5
  5. package/dist/rolldown/experimental-index.mjs +11 -9
  6. package/dist/rolldown/filter-index.d.mts +1 -1
  7. package/dist/rolldown/index.d.mts +2 -2
  8. package/dist/rolldown/index.mjs +4 -4
  9. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  10. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  11. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +3 -3
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-Bvw14S3g.d.mts} +70 -1
  16. package/dist/rolldown/shared/{binding-CKyeQZen.mjs → binding-C__LJDBG.mjs} +29 -27
  17. package/dist/rolldown/shared/{bindingify-input-options-44iPAymO.mjs → bindingify-input-options-V9YvAjrr.mjs} +5 -5
  18. package/dist/rolldown/shared/{constructors-XaIbWpwJ.d.mts → constructors-CRumnw21.d.mts} +2 -2
  19. package/dist/rolldown/shared/{constructors-6Zc-JFd7.mjs → constructors-DklcHr18.mjs} +1 -1
  20. package/dist/rolldown/shared/{create-bundler-option-e1FU0w0P.mjs → create-bundler-option-DbV2ud0B.mjs} +5 -4
  21. package/dist/rolldown/shared/{define-config-DVsXPNaU.d.mts → define-config-DwTNhgWB.d.mts} +12 -6
  22. package/dist/rolldown/shared/{error-BzLGqhSQ.mjs → error-NcRuXAVN.mjs} +1 -1
  23. package/dist/rolldown/shared/{load-config-C6QXSnoS.mjs → load-config-Dd7jKGUy.mjs} +1 -1
  24. package/dist/rolldown/shared/{normalize-string-or-regex-DYjJ67tj.mjs → normalize-string-or-regex-CFtim40S.mjs} +1 -1
  25. package/dist/rolldown/shared/{parse-uDDyc1el.mjs → parse-rvxTD36n.mjs} +2 -2
  26. package/dist/rolldown/shared/{resolve-tsconfig-Bcd82vVT.mjs → resolve-tsconfig-D2vSIIkR.mjs} +2 -2
  27. package/dist/rolldown/shared/{rolldown-CCbQNGZt.mjs → rolldown-Bblizyw1.mjs} +4 -4
  28. package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform--WSMLt1x.d.mts} +1 -1
  29. package/dist/rolldown/shared/{watch-vuOCmvFs.mjs → watch-DPvOlccK.mjs} +4 -4
  30. package/dist/rolldown/utils-index.d.mts +3 -3
  31. package/dist/rolldown/utils-index.mjs +5 -5
  32. package/dist/tsdown/{build-D_enfyvD-Dg1eKRD4.js → build-D_enfyvD-tOzhITac.js} +1065 -13
  33. package/dist/tsdown/{debug-CKcBYQLP-C3NhYhrk.js → debug-CKcBYQLP-By_AQqN8.js} +3 -3
  34. package/dist/tsdown/{detect-DGhJGEqb-6CTf16BW.js → detect-DGhJGEqb-LL52mV6u.js} +1 -1
  35. package/dist/tsdown/{dist-DyXLnzyh.js → dist-BsS7BOcb.js} +5 -5
  36. package/dist/tsdown/index-types.d.ts +4 -4
  37. package/dist/tsdown/index.js +4 -4
  38. package/dist/tsdown/internal-DSmmwu4u.js +3 -0
  39. package/dist/tsdown/{main-DiierkER.js → main-Bcv7jU2b.js} +1 -1
  40. package/dist/tsdown/{resolver-cwLsPb2o-Dk4xdAGE.js → resolver-cwLsPb2o-Bb9SDBm6.js} +2 -2
  41. package/dist/tsdown/run.js +4 -4
  42. package/dist/tsdown/{src-drVPfX63.js → src-JVSpR8xt.js} +5 -5
  43. package/dist/tsdown/{target-Bab3CUeB-DQ0pKhCv.js → target-Bab3CUeB-8PBzMh3p.js} +3 -3
  44. package/dist/tsdown/{tsc-JnMl2z7d.js → tsc-B8FD48Oc.js} +3 -3
  45. package/dist/tsdown/tsdown-css.js +5 -5
  46. package/dist/tsdown/tsdown-exe.js +3 -3
  47. package/dist/vite/client/bundledDevClient.mjs +67 -17
  48. package/dist/vite/client/client.mjs +4 -4
  49. package/dist/vite/node/chunks/build.js +19 -19
  50. package/dist/vite/node/chunks/node.js +117 -83
  51. package/dist/vite/node/chunks/postcss-import.js +13 -16
  52. package/dist/vite/node/index.d.ts +58 -55
  53. package/dist/vite/node/module-runner.d.ts +13 -13
  54. package/dist/vite/node/module-runner.js +1 -2
  55. package/package.json +24 -24
  56. package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
  57. package/dist/tsdown/internal-DKworeK4.js +0 -3
@@ -3224,7 +3224,7 @@ const importMetaResolveWithCustomHookString = `
3224
3224
  `;
3225
3225
  //#endregion
3226
3226
  //#region ../../vite/packages/vite/package.json
3227
- var version = "8.2.1";
3227
+ var version = "8.2.2";
3228
3228
  //#endregion
3229
3229
  //#region ../../vite/packages/vite/src/node/constants.ts
3230
3230
  const ROLLUP_HOOKS = [
@@ -6894,7 +6894,7 @@ function warnDeprecatedShouldBeConvertedToPluginOptions(logger, name) {
6894
6894
  logger.warn(import_picocolors.default.yellow(`\`esbuild.${name}\` option was specified. But this option is deprecated and will be removed in future versions. This option can be achieved by using a plugin with transform hook, please use that instead.`));
6895
6895
  }
6896
6896
  //#endregion
6897
- //#region ../../node_modules/.pnpm/magic-string@1.1.0/node_modules/magic-string/dist/index.mjs
6897
+ //#region ../../node_modules/.pnpm/magic-string@1.2.1/node_modules/magic-string/dist/index.mjs
6898
6898
  var BitSet = class BitSet {
6899
6899
  constructor(arg) {
6900
6900
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -7032,12 +7032,24 @@ var Chunk = class Chunk {
7032
7032
  }
7033
7033
  }
7034
7034
  };
7035
+ /**
7036
+ * The single error type thrown by MagicString.
7037
+ *
7038
+ * Every message is prefixed with `[MagicString]` so its source is obvious at a
7039
+ * glance, and is kept short and consistent in tone.
7040
+ */
7041
+ var MagicStringError = class extends Error {
7042
+ name = "MagicStringError";
7043
+ constructor(message, options) {
7044
+ super(`[MagicString] ${message}`, options);
7045
+ }
7046
+ };
7035
7047
  function getBtoa() {
7036
7048
  if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
7037
7049
  const buffer = globalThis["Buffer"];
7038
7050
  if (buffer) return (str) => buffer.from(str, "utf-8").toString("base64");
7039
7051
  return () => {
7040
- throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
7052
+ throw new MagicStringError("unsupported environment: `btoa` or `Buffer` is required");
7041
7053
  };
7042
7054
  }
7043
7055
  const btoa$1 = /* #__PURE__ */ getBtoa();
@@ -7254,11 +7266,11 @@ var MagicString = class MagicString {
7254
7266
  },
7255
7267
  byStart: {
7256
7268
  writable: true,
7257
- value: {}
7269
+ value: /* @__PURE__ */ new Map([[0, chunk]])
7258
7270
  },
7259
7271
  byEnd: {
7260
7272
  writable: true,
7261
- value: {}
7273
+ value: /* @__PURE__ */ new Map([[string.length, chunk]])
7262
7274
  },
7263
7275
  filename: {
7264
7276
  writable: true,
@@ -7287,10 +7299,12 @@ var MagicString = class MagicString {
7287
7299
  offset: {
7288
7300
  writable: true,
7289
7301
  value: options.offset || 0
7302
+ },
7303
+ hasMovedChunks: {
7304
+ writable: true,
7305
+ value: false
7290
7306
  }
7291
7307
  });
7292
- this.byStart = /* @__PURE__ */ new Map([[0, chunk]]);
7293
- this.byEnd = /* @__PURE__ */ new Map([[string.length, chunk]]);
7294
7308
  }
7295
7309
  /**
7296
7310
  * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
@@ -7302,7 +7316,7 @@ var MagicString = class MagicString {
7302
7316
  * Appends the specified content to the end of the string.
7303
7317
  */
7304
7318
  append(content) {
7305
- if (typeof content !== "string") throw new TypeError("outro content must be a string");
7319
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7306
7320
  this.outro += content;
7307
7321
  return this;
7308
7322
  }
@@ -7313,7 +7327,7 @@ var MagicString = class MagicString {
7313
7327
  */
7314
7328
  appendLeft(index, content) {
7315
7329
  index = index + this.offset;
7316
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7330
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7317
7331
  this._split(index);
7318
7332
  const chunk = this.byEnd.get(index);
7319
7333
  if (chunk) chunk.appendLeft(content);
@@ -7327,7 +7341,7 @@ var MagicString = class MagicString {
7327
7341
  */
7328
7342
  appendRight(index, content) {
7329
7343
  index = index + this.offset;
7330
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7344
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7331
7345
  this._split(index);
7332
7346
  const chunk = this.byStart.get(index);
7333
7347
  if (chunk) chunk.appendRight(content);
@@ -7361,6 +7375,7 @@ var MagicString = class MagicString {
7361
7375
  cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
7362
7376
  cloned.intro = this.intro;
7363
7377
  cloned.outro = this.outro;
7378
+ cloned.hasMovedChunks = this.hasMovedChunks;
7364
7379
  return cloned;
7365
7380
  }
7366
7381
  /**
@@ -7489,7 +7504,7 @@ var MagicString = class MagicString {
7489
7504
  }
7490
7505
  /** @internal */
7491
7506
  insert() {
7492
- throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)");
7507
+ throw new MagicStringError("insert() is deprecated, use appendLeft() or prependRight()");
7493
7508
  }
7494
7509
  /** @internal */
7495
7510
  insertLeft(index, content) {
@@ -7515,12 +7530,19 @@ var MagicString = class MagicString {
7515
7530
  end = end + this.offset;
7516
7531
  index = index + this.offset;
7517
7532
  if (start === end) return this;
7518
- if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself");
7533
+ if (index >= start && index <= end) throw new MagicStringError("cannot move a selection inside itself");
7519
7534
  this._split(start);
7520
7535
  this._split(end);
7521
7536
  this._split(index);
7522
7537
  const first = this.byStart.get(start);
7523
7538
  const last = this.byEnd.get(end);
7539
+ if (this.hasMovedChunks) {
7540
+ let cursor = first;
7541
+ while (cursor !== last) {
7542
+ cursor = cursor.next;
7543
+ if (!cursor || cursor.start < start || cursor.end > end) throw new MagicStringError(`cannot move ${start} to ${end} because an earlier move split that range`);
7544
+ }
7545
+ }
7524
7546
  const oldLeft = first.previous;
7525
7547
  const oldRight = last.next;
7526
7548
  const newRight = this.byStart.get(index);
@@ -7539,6 +7561,7 @@ var MagicString = class MagicString {
7539
7561
  last.next = newRight || null;
7540
7562
  if (!newLeft) this.firstChunk = first;
7541
7563
  if (!newRight) this.lastChunk = last;
7564
+ this.hasMovedChunks = true;
7542
7565
  return this;
7543
7566
  }
7544
7567
  /**
@@ -7568,13 +7591,15 @@ var MagicString = class MagicString {
7568
7591
  update(start, end, content, options) {
7569
7592
  start = start + this.offset;
7570
7593
  end = end + this.offset;
7571
- if (typeof content !== "string") throw new TypeError("replacement content must be a string");
7594
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7572
7595
  if (this.original.length !== 0) {
7573
7596
  while (start < 0) start += this.original.length;
7574
7597
  while (end < 0) end += this.original.length;
7575
7598
  }
7576
- if (end > this.original.length) throw new Error("end is out of bounds");
7577
- if (start === end) throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");
7599
+ if (start < 0) throw new MagicStringError(`start ${start} is out of bounds`);
7600
+ if (end > this.original.length) throw new MagicStringError(`end ${end} is out of bounds`);
7601
+ if (start === end) throw new MagicStringError(`cannot overwrite a zero-length range at ${start}, use appendLeft() or prependRight()`);
7602
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7578
7603
  this._split(start);
7579
7604
  this._split(end);
7580
7605
  if (options === true) {
@@ -7600,7 +7625,7 @@ var MagicString = class MagicString {
7600
7625
  if (first) {
7601
7626
  let chunk = first;
7602
7627
  while (chunk !== last) {
7603
- if (chunk.next !== this.byStart.get(chunk.end)) throw new Error("Cannot overwrite across a split point");
7628
+ if (chunk.next !== this.byStart.get(chunk.end)) throw new MagicStringError("cannot overwrite across a split point");
7604
7629
  chunk = chunk.next;
7605
7630
  chunk.edit("", false);
7606
7631
  }
@@ -7616,7 +7641,7 @@ var MagicString = class MagicString {
7616
7641
  * Prepends the string with the specified content.
7617
7642
  */
7618
7643
  prepend(content) {
7619
- if (typeof content !== "string") throw new TypeError("outro content must be a string");
7644
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7620
7645
  this.intro = content + this.intro;
7621
7646
  return this;
7622
7647
  }
@@ -7625,7 +7650,7 @@ var MagicString = class MagicString {
7625
7650
  */
7626
7651
  prependLeft(index, content) {
7627
7652
  index = index + this.offset;
7628
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7653
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7629
7654
  this._split(index);
7630
7655
  const chunk = this.byEnd.get(index);
7631
7656
  if (chunk) chunk.prependLeft(content);
@@ -7637,7 +7662,7 @@ var MagicString = class MagicString {
7637
7662
  */
7638
7663
  prependRight(index, content) {
7639
7664
  index = index + this.offset;
7640
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7665
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7641
7666
  this._split(index);
7642
7667
  const chunk = this.byStart.get(index);
7643
7668
  if (chunk) chunk.prependRight(content);
@@ -7656,8 +7681,8 @@ var MagicString = class MagicString {
7656
7681
  while (end < 0) end += this.original.length;
7657
7682
  }
7658
7683
  if (start === end) return this;
7659
- if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
7660
- if (start > end) throw new Error("end must be greater than start");
7684
+ if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
7685
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7661
7686
  this._split(start);
7662
7687
  this._split(end);
7663
7688
  let chunk = this.byStart.get(start);
@@ -7680,8 +7705,8 @@ var MagicString = class MagicString {
7680
7705
  while (end < 0) end += this.original.length;
7681
7706
  }
7682
7707
  if (start === end) return this;
7683
- if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
7684
- if (start > end) throw new Error("end must be greater than start");
7708
+ if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
7709
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7685
7710
  this._split(start);
7686
7711
  this._split(end);
7687
7712
  let chunk = this.byStart.get(start);
@@ -7747,12 +7772,12 @@ var MagicString = class MagicString {
7747
7772
  if (chunk.start < end && chunk.end >= end) return result;
7748
7773
  chunk = chunk.next;
7749
7774
  }
7750
- if (chunk && chunk.edited && chunk.start !== start) throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
7775
+ if (chunk && chunk.edited && chunk.start !== start) throw new MagicStringError(`cannot use edited character ${start} as slice start anchor`);
7751
7776
  const startChunk = chunk;
7752
7777
  while (chunk) {
7753
7778
  if (chunk.intro && (startChunk !== chunk || chunk.start === start)) result += chunk.intro;
7754
7779
  const containsEnd = chunk.start < end && chunk.end >= end;
7755
- if (containsEnd && chunk.edited && chunk.end !== end) throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
7780
+ if (containsEnd && chunk.edited && chunk.end !== end) throw new MagicStringError(`cannot use edited character ${end} as slice end anchor`);
7756
7781
  const sliceStart = startChunk === chunk ? start - chunk.start : 0;
7757
7782
  const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
7758
7783
  result += chunk.content.slice(sliceStart, sliceEnd);
@@ -7788,7 +7813,7 @@ var MagicString = class MagicString {
7788
7813
  _splitChunk(chunk, index) {
7789
7814
  if (chunk.edited && chunk.content.length) {
7790
7815
  const loc = getLocator(this.original)(index);
7791
- throw new Error(`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
7816
+ throw new MagicStringError(`cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
7792
7817
  }
7793
7818
  const newChunk = chunk.split(index);
7794
7819
  this.byEnd.set(index, chunk);
@@ -7970,7 +7995,7 @@ var MagicString = class MagicString {
7970
7995
  */
7971
7996
  replaceAll(searchValue, replacement) {
7972
7997
  if (typeof searchValue === "string") return this._replaceAllString(searchValue, replacement);
7973
- if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
7998
+ if (!searchValue.global) throw new MagicStringError("replaceAll() requires a global RegExp");
7974
7999
  return this._replaceRegexp(searchValue, replacement);
7975
8000
  }
7976
8001
  };
@@ -16298,7 +16323,7 @@ var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports,
16298
16323
  };
16299
16324
  }));
16300
16325
  //#endregion
16301
- //#region ../../node_modules/.pnpm/@vercel+detect-agent@1.2.3/node_modules/@vercel/detect-agent/dist/index.js
16326
+ //#region ../../node_modules/.pnpm/@vercel+detect-agent@1.2.5/node_modules/@vercel/detect-agent/dist/index.js
16302
16327
  var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16303
16328
  var __defProp = Object.defineProperty;
16304
16329
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -17230,19 +17255,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport, onStatements
17230
17255
  if (parentScope) setScope(parentScope, node.id.name);
17231
17256
  }
17232
17257
  if (node.type === "FunctionExpression" && node.id) setScope(node, node.id.name);
17233
- node.params.forEach((p) => {
17234
- if (p.type === "ObjectPattern" || p.type === "ArrayPattern") {
17235
- handlePattern(p, node);
17236
- return;
17237
- }
17238
- walk$1(p.type === "AssignmentPattern" ? p.left : p, { enter(child, parent) {
17239
- if (parent?.type === "AssignmentPattern" && parent.right === child) return this.skip();
17240
- if (child.type !== "Identifier") return;
17241
- if (isStaticPropertyKey(child, parent)) return;
17242
- if (parent?.type === "TemplateLiteral" && parent.expressions.includes(child) || parent?.type === "CallExpression" && parent.callee === child) return;
17243
- setScope(node, child.name);
17244
- } });
17245
- });
17258
+ node.params.forEach((p) => handlePattern(p, node));
17246
17259
  } else if (node.type === "ClassDeclaration") {
17247
17260
  const parentScope = findParentScope(parentStack);
17248
17261
  if (parentScope) setScope(parentScope, node.id.name);
@@ -18438,7 +18451,7 @@ function checkPublicFile(url, config) {
18438
18451
  return tryStatSync(publicFile)?.isFile() ? publicFile : void 0;
18439
18452
  }
18440
18453
  //#endregion
18441
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
18454
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/constants.js
18442
18455
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18443
18456
  const BINARY_TYPES = [
18444
18457
  "nodebuffer",
@@ -18461,7 +18474,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18461
18474
  };
18462
18475
  }));
18463
18476
  //#endregion
18464
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js
18477
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/buffer-util.js
18465
18478
  var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18466
18479
  const { EMPTY_BUFFER } = require_constants();
18467
18480
  const FastBuffer = Buffer[Symbol.species];
@@ -18561,7 +18574,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18561
18574
  } catch (e) {}
18562
18575
  }));
18563
18576
  //#endregion
18564
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js
18577
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/limiter.js
18565
18578
  var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18566
18579
  const kDone = Symbol("kDone");
18567
18580
  const kRun = Symbol("kRun");
@@ -18612,7 +18625,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18612
18625
  module.exports = Limiter;
18613
18626
  }));
18614
18627
  //#endregion
18615
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js
18628
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/permessage-deflate.js
18616
18629
  var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18617
18630
  const zlib$1 = __require$1("zlib");
18618
18631
  const bufferUtil = require_buffer_util();
@@ -18732,7 +18745,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
18732
18745
  acceptAsServer(offers) {
18733
18746
  const opts = this._options;
18734
18747
  const accepted = offers.find((params) => {
18735
- if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) return false;
18748
+ if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && (typeof params.client_max_window_bits === "number" ? opts.clientMaxWindowBits > params.client_max_window_bits : !params.client_max_window_bits)) return false;
18736
18749
  return true;
18737
18750
  });
18738
18751
  if (!accepted) throw new Error("None of the extension offers can be accepted");
@@ -18948,7 +18961,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
18948
18961
  }
18949
18962
  }));
18950
18963
  //#endregion
18951
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js
18964
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/validation.js
18952
18965
  var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18953
18966
  const { isUtf8 } = __require$1("buffer");
18954
18967
  const { hasBlob } = require_constants();
@@ -19144,7 +19157,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19144
19157
  } catch (e) {}
19145
19158
  }));
19146
19159
  //#endregion
19147
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js
19160
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/receiver.js
19148
19161
  var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19149
19162
  const { Writable: Writable$1 } = __require$1("stream");
19150
19163
  const PerMessageDeflate = require_permessage_deflate();
@@ -19607,7 +19620,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19607
19620
  module.exports = Receiver;
19608
19621
  }));
19609
19622
  //#endregion
19610
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js
19623
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/sender.js
19611
19624
  var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19612
19625
  const { Duplex: Duplex$3 } = __require$1("stream");
19613
19626
  const { randomFillSync } = __require$1("crypto");
@@ -20105,7 +20118,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20105
20118
  }
20106
20119
  }));
20107
20120
  //#endregion
20108
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js
20121
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/event-target.js
20109
20122
  var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20110
20123
  const { kForOnEventAttribute, kListener } = require_constants();
20111
20124
  const kCode = Symbol("kCode");
@@ -20336,7 +20349,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20336
20349
  }
20337
20350
  }));
20338
20351
  //#endregion
20339
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js
20352
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/extension.js
20340
20353
  var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20341
20354
  const { tokenChars } = require_validation();
20342
20355
  /**
@@ -20482,7 +20495,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20482
20495
  };
20483
20496
  }));
20484
20497
  //#endregion
20485
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js
20498
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/websocket.js
20486
20499
  var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20487
20500
  const EventEmitter$2 = __require$1("events");
20488
20501
  const https$3 = __require$1("https");
@@ -21475,7 +21488,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21475
21488
  }
21476
21489
  }));
21477
21490
  //#endregion
21478
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js
21491
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/stream.js
21479
21492
  var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21480
21493
  require_websocket();
21481
21494
  const { Duplex: Duplex$1 } = __require$1("stream");
@@ -21591,7 +21604,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21591
21604
  module.exports = createWebSocketStream;
21592
21605
  }));
21593
21606
  //#endregion
21594
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js
21607
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/subprotocol.js
21595
21608
  var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21596
21609
  const { tokenChars } = require_validation();
21597
21610
  /**
@@ -21630,7 +21643,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21630
21643
  module.exports = { parse };
21631
21644
  }));
21632
21645
  //#endregion
21633
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js
21646
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/websocket-server.js
21634
21647
  var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21635
21648
  const EventEmitter$1 = __require$1("events");
21636
21649
  const http$4 = __require$1("http");
@@ -25827,13 +25840,20 @@ function isFileInTargetPath(targetPath, filePath) {
25827
25840
  return isSameFilePath(targetPath, filePath) || isParentDirectory(targetPath, filePath);
25828
25841
  }
25829
25842
  const windowsDriveRE = /^[A-Z]:/i;
25843
+ const windowsShortNameSegmentRE = /^[^~.]{1,6}~\d+(?:\.[^~.]{0,3})?$/;
25844
+ /**
25845
+ * Warning: parameters are not validated, only works with normalized absolute paths
25846
+ */
25847
+ function looksLikeWindowsShortNamePath(filePath) {
25848
+ return filePath.includes("~") && filePath.split("/").some((segment) => windowsShortNameSegmentRE.test(segment));
25849
+ }
25830
25850
  /**
25831
25851
  * Warning: parameters are not validated, only works with normalized absolute paths
25832
25852
  */
25833
25853
  function isFileLoadingAllowed(config, filePath) {
25834
25854
  const { fs } = config.server;
25835
25855
  if (!fs.strict) return true;
25836
- if (isWindows && filePath.includes("~")) return false;
25856
+ if (isWindows && looksLikeWindowsShortNamePath(filePath)) return false;
25837
25857
  if ((isWindows && windowsDriveRE.test(filePath) ? filePath.slice(2) : filePath).includes(":")) return false;
25838
25858
  const filePathWithoutTrailingSlash = filePath.endsWith("/") ? filePath.slice(0, -1) : filePath;
25839
25859
  if (config.fsDenyGlob(filePathWithoutTrailingSlash)) return false;
@@ -27275,7 +27295,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27275
27295
  };
27276
27296
  }));
27277
27297
  //#endregion
27278
- //#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/req.js
27298
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
27279
27299
  var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27280
27300
  const { createRequire: createRequire$2 } = __require$1("node:module");
27281
27301
  const { fileURLToPath: fileURLToPath$2, pathToFileURL: pathToFileURL$1 } = __require$1("node:url");
@@ -27317,7 +27337,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27317
27337
  module.exports = req;
27318
27338
  }));
27319
27339
  //#endregion
27320
- //#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/options.js
27340
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
27321
27341
  var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27322
27342
  const req = require_req();
27323
27343
  /**
@@ -27351,7 +27371,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27351
27371
  module.exports = options;
27352
27372
  }));
27353
27373
  //#endregion
27354
- //#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/plugins.js
27374
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
27355
27375
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27356
27376
  const req = require_req();
27357
27377
  /**
@@ -27405,7 +27425,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27405
27425
  module.exports = plugins;
27406
27426
  }));
27407
27427
  //#endregion
27408
- //#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.js
27428
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
27409
27429
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27410
27430
  const { resolve: resolve$3 } = __require$1("node:path");
27411
27431
  const config = require_src$1();
@@ -29450,8 +29470,9 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
29450
29470
  };
29451
29471
  }
29452
29472
  function getLightningCssErrorMessageForIeSyntaxes(code) {
29453
- if (/[\s;{]\*[a-zA-Z-][\w-]+\s*:/.test(code)) return ".\nThis file contains star property hack (e.g. `*zoom`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29454
- if (/min-width:\s*0\\0/.test(code)) return ".\nThis file contains @media zero hack (e.g. `@media (min-width: 0\\0)`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29473
+ const commonIeMessage = ", which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29474
+ if (/[\s;{]\*[a-zA-Z-][\w-]+\s*:/.test(code)) return ".\nThis file contains star property hack (e.g. `*zoom`)" + commonIeMessage;
29475
+ if (/min-width:\s*0\\0/.test(code)) return ".\nThis file contains @media zero hack (e.g. `@media (min-width: 0\\0)`)" + commonIeMessage;
29455
29476
  }
29456
29477
  const map = {
29457
29478
  chrome: "chrome",
@@ -29559,9 +29580,8 @@ const esRE = /es(6|\d{4})/;
29559
29580
  const versionRE = /\d/;
29560
29581
  const convertTargetsCache = /* @__PURE__ */ new Map();
29561
29582
  const convertTargets = (esbuildTarget) => {
29562
- if (!esbuildTarget) return {};
29563
- const cached = convertTargetsCache.get(esbuildTarget);
29564
- if (cached) return cached;
29583
+ if (!esbuildTarget) return void 0;
29584
+ if (convertTargetsCache.has(esbuildTarget)) return convertTargetsCache.get(esbuildTarget);
29565
29585
  const targets = {};
29566
29586
  const entriesWithoutES = arraify(esbuildTarget).flatMap((e) => {
29567
29587
  const match = esRE.exec(e);
@@ -29587,8 +29607,9 @@ const convertTargets = (esbuildTarget) => {
29587
29607
  }
29588
29608
  throw new Error(`Unsupported target "${entry}"`);
29589
29609
  }
29590
- convertTargetsCache.set(esbuildTarget, targets);
29591
- return targets;
29610
+ const result = Object.keys(targets).length > 0 ? targets : void 0;
29611
+ convertTargetsCache.set(esbuildTarget, result);
29612
+ return result;
29592
29613
  };
29593
29614
  function resolveLibCssFilename(libOptions, root, packageCache) {
29594
29615
  if (typeof libOptions.cssFileName === "string") return `${libOptions.cssFileName}.css`;
@@ -30615,7 +30636,7 @@ If you intend to import that asset, put the file in the src directory, and use $
30615
30636
  //#region ../../vite/packages/vite/src/node/plugins/define.ts
30616
30637
  const nonJsRe = /\.json(?:$|\?)/;
30617
30638
  const isNonJsRequest = (request) => nonJsRe.test(request);
30618
- const escapedDotRE = /(?<!\\)\\./g;
30639
+ const escapedDotRE = /(?<!\\)\\\./g;
30619
30640
  function definePlugin(config) {
30620
30641
  const isBuild = config.command === "build";
30621
30642
  const isBuildLib = isBuild && config.build.lib;
@@ -31662,7 +31683,13 @@ function triggerLazyBundlingMiddleware(server) {
31662
31683
  }
31663
31684
  const moduleId = params.get("id");
31664
31685
  const clientId = params.get("clientId");
31665
- const result = await bundledDev.triggerLazyBundling(moduleId, clientId);
31686
+ let result;
31687
+ try {
31688
+ result = await bundledDev.triggerLazyBundling(moduleId, clientId);
31689
+ } catch (e) {
31690
+ server.config.logger.error(`Failed to trigger lazy bundling for ${moduleId} (clientId: ${clientId}):` + e, { error: e });
31691
+ return next(/* @__PURE__ */ new Error(`Failed to trigger lazy bundling`));
31692
+ }
31666
31693
  if (result == null) return next();
31667
31694
  res.setHeader("Content-Type", "application/javascript");
31668
31695
  res.on("finish", () => bundledDev.markPayloadDelivered(result.filename));
@@ -37891,7 +37918,7 @@ async function extractExportsData(environment, filePath) {
37891
37918
  };
37892
37919
  }
37893
37920
  });
37894
- const [, exports, , hasModuleSyntax] = parse$2((await (await rolldown({
37921
+ const build = await rolldown({
37895
37922
  ...remainingRolldownOptions,
37896
37923
  plugins,
37897
37924
  input: [filePath],
@@ -37899,15 +37926,20 @@ async function extractExportsData(environment, filePath) {
37899
37926
  ".css": "js",
37900
37927
  ...remainingRolldownOptions.moduleTypes
37901
37928
  }
37902
- })).generate({
37903
- ...rolldownOptions.output,
37904
- format: "esm",
37905
- sourcemap: false
37906
- })).output[0].code);
37907
- return {
37908
- hasModuleSyntax,
37909
- exports: exports.map((e) => e.n)
37910
- };
37929
+ });
37930
+ try {
37931
+ const [, exports, , hasModuleSyntax] = parse$2((await build.generate({
37932
+ ...rolldownOptions.output,
37933
+ format: "esm",
37934
+ sourcemap: false
37935
+ })).output[0].code);
37936
+ return {
37937
+ hasModuleSyntax,
37938
+ exports: exports.map((e) => e.n)
37939
+ };
37940
+ } finally {
37941
+ await build.close();
37942
+ }
37911
37943
  }
37912
37944
  let parseResult;
37913
37945
  let usedJsxLoader = false;
@@ -41430,6 +41462,7 @@ function idToPathAndNamespace(id) {
41430
41462
  //#endregion
41431
41463
  //#region ../../vite/packages/vite/src/node/config.ts
41432
41464
  var config_exports = /* @__PURE__ */ __exportAll({
41465
+ bundleConfigFile: () => bundleConfigFile,
41433
41466
  defineConfig: () => defineConfig,
41434
41467
  getDefaultEnvironmentOptions: () => getDefaultEnvironmentOptions,
41435
41468
  isResolvedConfig: () => isResolvedConfig,
@@ -41793,7 +41826,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
41793
41826
  if (tsconfigPathsPlugin) logger.warnOnce(import_picocolors.default.yellow(`The plugin ${JSON.stringify(tsconfigPathsPlugin.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${import_picocolors.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${import_picocolors.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`));
41794
41827
  if (process.versions.pnp) logger.warnOnce(import_picocolors.default.yellow(`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different ${import_picocolors.default.bold("nodeLinker")} mode or to a different package manager.`));
41795
41828
  let nonNormalizedResolvedRoot = config.root ? path.resolve(config.root) : process.cwd();
41796
- try {
41829
+ if (!config.resolve?.preserveSymlinks) try {
41797
41830
  nonNormalizedResolvedRoot = safeRealpathSync(nonNormalizedResolvedRoot);
41798
41831
  } catch {}
41799
41832
  const resolvedRoot = normalizePath(nonNormalizedResolvedRoot);
@@ -42199,6 +42232,7 @@ async function bundleConfigFile(fileName, isESM) {
42199
42232
  const importMetaUrlVarName = "__vite_injected_original_import_meta_url";
42200
42233
  const importMetaResolveVarName = "__vite_injected_original_import_meta_resolve";
42201
42234
  const importMetaResolveRegex = /import\.meta\s*\.\s*resolve/;
42235
+ const configFileRegex = /\.[cm]?[jt]s$/;
42202
42236
  const nativeIncompatibilities = [];
42203
42237
  const bundle = await rolldown({
42204
42238
  input: fileName,
@@ -42257,7 +42291,7 @@ async function bundleConfigFile(fileName, isESM) {
42257
42291
  {
42258
42292
  name: "inject-file-scope-variables",
42259
42293
  transform: {
42260
- filter: { id: /\.[cm]?[jt]s$/ },
42294
+ filter: { id: configFileRegex },
42261
42295
  handler(code, id) {
42262
42296
  let injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
42263
42297
  if (importMetaResolveRegex.test(code)) {
@@ -42287,8 +42321,8 @@ async function bundleConfigFile(fileName, isESM) {
42287
42321
  const result = await bundle.generate({
42288
42322
  format: isESM ? "esm" : "cjs",
42289
42323
  sourcemap: "inline",
42290
- sourcemapPathTransform(relative) {
42291
- return path.resolve(fileName, relative);
42324
+ sourcemapPathTransform(relative, sourcemapPath) {
42325
+ return path.resolve(path.dirname(sourcemapPath), relative);
42292
42326
  },
42293
42327
  codeSplitting: false
42294
42328
  });