@voidzero-dev/vite-plus-core 0.1.21-alpha.3 → 0.1.21-alpha.4

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 (48) hide show
  1. package/LICENSE +0 -29
  2. package/dist/rolldown/cli.mjs +6 -6
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.mjs +8 -8
  5. package/dist/rolldown/index.mjs +4 -4
  6. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  7. package/dist/rolldown/parse-ast-index.mjs +1 -1
  8. package/dist/rolldown/plugins-index.mjs +2 -2
  9. package/dist/rolldown/shared/{bindingify-input-options-BFomq0CL.mjs → bindingify-input-options-wZdDRbfo.mjs} +27 -5
  10. package/dist/rolldown/shared/{constructors-CqLClvFc.mjs → constructors-D6i2Tbyl.mjs} +1 -1
  11. package/dist/rolldown/shared/define-config-5HJ1b9vG.d.mts +2 -2
  12. package/dist/rolldown/shared/{error-D4ASW9r2.mjs → error-BrnLyQ-g.mjs} +1 -1
  13. package/dist/rolldown/shared/{load-config-nKXo7Yxg.mjs → load-config-BZFgt8GH.mjs} +1 -1
  14. package/dist/rolldown/shared/{normalize-string-or-regex-WerlQkgD.mjs → normalize-string-or-regex-dAjLOSbp.mjs} +3 -1
  15. package/dist/rolldown/shared/{parse-C-X7ajBy.mjs → parse-DFts7Hyl.mjs} +1 -1
  16. package/dist/rolldown/shared/{resolve-tsconfig-CxJB93yb.mjs → resolve-tsconfig-DCdBlPeK.mjs} +2 -2
  17. package/dist/rolldown/shared/{rolldown-DNviFDiu.mjs → rolldown-Cs2eRf4R.mjs} +1 -1
  18. package/dist/rolldown/shared/{rolldown-build-DdPwBoAu.mjs → rolldown-build-CNhzgsn2.mjs} +6 -4
  19. package/dist/rolldown/shared/{watch-BWGrirtv.mjs → watch-De_8Tgeq.mjs} +4 -4
  20. package/dist/rolldown/utils-index.mjs +2 -2
  21. package/dist/tsdown/{build-CgGnBlCD-CmgnJdWt.js → build-5FURNVr0-BYnPlyxS.js} +88 -71
  22. package/dist/tsdown/{debug-CLlnG64L-Bga2f95T.js → debug-CLlnG64L-DgUic6dq.js} +2 -2
  23. package/dist/tsdown/{detect-DN3DXXYt-CQvReX03.js → detect-DN3DXXYt-C8fBJ-Pz.js} +1 -1
  24. package/dist/tsdown/dist-Cv2Z0Bi_.js +1012 -0
  25. package/dist/tsdown/{dist-dEREUhS4.js → dist-DTzJRoOQ.js} +4898 -4741
  26. package/dist/tsdown/{filename-DQnUJlio-CkHYanGh.js → filename-DQnUJlio-D7-CzKqs.js} +1 -1
  27. package/dist/tsdown/index-types.d.ts +259 -92
  28. package/dist/tsdown/index.js +4 -4
  29. package/dist/tsdown/{main-BQC8aVfq.js → main-D7FQqhAT.js} +4 -4
  30. package/dist/tsdown/npm_cjs_chunk_range.cjs +20 -7
  31. package/dist/tsdown/npm_cjs_chunk_semver.cjs +15 -15
  32. package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +1 -1
  33. package/dist/tsdown/run.js +7 -7
  34. package/dist/tsdown/{tsc-ILrjzsA_.js → tsc-Dr9kCkDm.js} +2 -2
  35. package/dist/tsdown/{tsc-context-BBIdwth6.js → tsc-context-CANQEB9U.js} +1 -1
  36. package/dist/vite/client/client.mjs +7 -7
  37. package/dist/vite/node/chunks/build.js +19 -19
  38. package/dist/vite/node/chunks/logger.js +1 -1
  39. package/dist/vite/node/chunks/node.js +75 -49
  40. package/dist/vite/node/chunks/postcss-import.js +10 -10
  41. package/dist/vite/node/index.d.ts +2 -2
  42. package/dist/vite/node/module-runner.js +14 -3
  43. package/package.json +19 -15
  44. package/dist/tsdown/dist-DJhmrSLH.js +0 -739
  45. package/dist/tsdown/dist-D_AJtdxQ.js +0 -848
  46. package/dist/tsdown/npm_cjs_chunk_lt.cjs +0 -28
  47. package/dist/tsdown/npm_entry_semver_functions_lt.cjs +0 -4
  48. /package/dist/rolldown/shared/{binding-Cf9ARhL0.mjs → binding-ESkOU1xr.mjs} +0 -0
@@ -2917,7 +2917,7 @@ const require$1 = createRequire(import.meta.url);
2917
2917
  function log$1(...args) {
2918
2918
  process.stderr.write(`${formatWithOptions(inspectOpts, ...args)}\n`);
2919
2919
  }
2920
- const colors$37 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
2920
+ const colors$38 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
2921
2921
  20,
2922
2922
  21,
2923
2923
  26,
@@ -3047,7 +3047,7 @@ function getDate() {
3047
3047
  function init$1(debug) {
3048
3048
  debug.inspectOpts = Object.assign({}, inspectOpts);
3049
3049
  }
3050
- const createDebug = setup(useColors(), colors$37, log$1, load, save, formatArgs, init$1);
3050
+ const createDebug = setup(useColors(), colors$38, log$1, load, save, formatArgs, init$1);
3051
3051
  createDebug.inspectOpts = inspectOpts;
3052
3052
  createDebug.formatters.o = function(v) {
3053
3053
  this.inspectOpts.colors = this.useColors;
@@ -4655,7 +4655,7 @@ function getTSConfigResolutionCache(config) {
4655
4655
  }
4656
4656
  return cache;
4657
4657
  }
4658
- async function reloadOnTsconfigChange(server, changedFile) {
4658
+ function reloadOnTsconfigChange(server, changedFile) {
4659
4659
  if (changedFile.endsWith(".json")) {
4660
4660
  const cache = getTSConfigResolutionCache(server.config);
4661
4661
  if (changedFile.endsWith("/tsconfig.json")) {
@@ -7154,7 +7154,7 @@ function throwFileNotFoundInOptimizedDep(id) {
7154
7154
  throw err;
7155
7155
  }
7156
7156
  //#endregion
7157
- //#region ../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs
7157
+ //#region ../../node_modules/.pnpm/ufo@1.6.4/node_modules/ufo/dist/index.mjs
7158
7158
  const HASH_RE = /#/g;
7159
7159
  const AMPERSAND_RE = /&/g;
7160
7160
  const SLASH_RE = /\//g;
@@ -15672,6 +15672,7 @@ async function instantiateModule(url, runner, environment, fixStacktrace) {
15672
15672
  }
15673
15673
  }
15674
15674
  var SSRCompatModuleRunner = class extends ModuleRunner {
15675
+ environment;
15675
15676
  constructor(environment) {
15676
15677
  super({
15677
15678
  transport: createServerModuleRunnerTransport({ channel: environment.hot }),
@@ -15697,7 +15698,7 @@ var SSRCompatModuleRunner = class extends ModuleRunner {
15697
15698
  }
15698
15699
  };
15699
15700
  //#endregion
15700
- //#region ../../node_modules/.pnpm/periscopic@4.0.2/node_modules/periscopic/src/index.js
15701
+ //#region ../../node_modules/.pnpm/periscopic@4.0.3/node_modules/periscopic/src/index.js
15701
15702
  /**
15702
15703
  * @param {import('estree').Node} param
15703
15704
  * @returns {string[]}
@@ -15935,7 +15936,7 @@ async function ssrTransform(code, inMap, url, originalCode, options) {
15935
15936
  if (options?.json?.stringify && isJSONRequest(url)) return ssrTransformJSON(code, inMap);
15936
15937
  return ssrTransformScript(code, inMap, url, originalCode);
15937
15938
  }
15938
- async function ssrTransformJSON(code, inMap) {
15939
+ function ssrTransformJSON(code, inMap) {
15939
15940
  return {
15940
15941
  code: code.replace("export default", `${ssrModuleExportsKey}.default =`),
15941
15942
  map: inMap,
@@ -17298,6 +17299,7 @@ function convertToWatcherOptions(options) {
17298
17299
  };
17299
17300
  }
17300
17301
  var NoopWatcher = class extends EventEmitter {
17302
+ options;
17301
17303
  constructor(options) {
17302
17304
  super();
17303
17305
  this.options = options;
@@ -25123,7 +25125,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25123
25125
  };
25124
25126
  }));
25125
25127
  //#endregion
25126
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/req.js
25128
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/req.js
25127
25129
  var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25128
25130
  const { createRequire: createRequire$2 } = __require$1("node:module");
25129
25131
  const { fileURLToPath: fileURLToPath$2, pathToFileURL: pathToFileURL$1 } = __require$1("node:url");
@@ -25165,7 +25167,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25165
25167
  module.exports = req;
25166
25168
  }));
25167
25169
  //#endregion
25168
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/options.js
25170
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/options.js
25169
25171
  var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25170
25172
  const req = require_req();
25171
25173
  /**
@@ -25199,7 +25201,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25199
25201
  module.exports = options;
25200
25202
  }));
25201
25203
  //#endregion
25202
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/plugins.js
25204
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/plugins.js
25203
25205
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25204
25206
  const req = require_req();
25205
25207
  /**
@@ -25253,7 +25255,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25253
25255
  module.exports = plugins;
25254
25256
  }));
25255
25257
  //#endregion
25256
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/index.js
25258
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/index.js
25257
25259
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25258
25260
  const { resolve: resolve$3 } = __require$1("node:path");
25259
25261
  const config = require_src$1();
@@ -26002,7 +26004,7 @@ function cssPlugin(config) {
26002
26004
  },
26003
26005
  load: {
26004
26006
  filter: { id: CSS_LANGS_RE },
26005
- async handler(id) {
26007
+ handler(id) {
26006
26008
  if (urlRE$1.test(id)) {
26007
26009
  if (isModuleCSSRequest(id)) throw new Error(`?url is not supported with CSS modules. (tried to import ${JSON.stringify(id)})`);
26008
26010
  if (isBuild) {
@@ -26386,7 +26388,7 @@ function cssAnalysisPlugin(config) {
26386
26388
  include: CSS_LANGS_RE,
26387
26389
  exclude: [commonjsProxyRE, SPECIAL_QUERY_RE]
26388
26390
  } },
26389
- async handler(_, id) {
26391
+ handler(_, id) {
26390
26392
  const { moduleGraph } = this.environment;
26391
26393
  const thisModule = moduleGraph.getModuleById(id);
26392
26394
  if (thisModule) {
@@ -26715,7 +26717,7 @@ function combineSourcemapsIfExists(filename, map1, map2) {
26715
26717
  const viteHashUpdateMarker = "/*$vite$:1*/";
26716
26718
  const viteHashUpdateMarkerRE = /\/\*\$vite\$:\d+\*\//;
26717
26719
  async function finalizeCss(css, config) {
26718
- if (css.includes("@import") || css.includes("@charset")) css = await hoistAtRules(css);
26720
+ if (css.includes("@import") || css.includes("@charset")) css = hoistAtRules(css);
26719
26721
  if (config.build.cssMinify) css = await minifyCSS(css, config, false);
26720
26722
  css += viteHashUpdateMarker;
26721
26723
  return css;
@@ -26923,7 +26925,7 @@ function resolveMinifyCssEsbuildOptions(options) {
26923
26925
  }
26924
26926
  const atImportRE = /@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
26925
26927
  const atCharsetRE = /@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
26926
- async function hoistAtRules(css) {
26928
+ function hoistAtRules(css) {
26927
26929
  const s = new MagicString(css);
26928
26930
  const cleanCss = emptyCssComments(css);
26929
26931
  let match;
@@ -28490,18 +28492,18 @@ function definePlugin(config) {
28490
28492
  };
28491
28493
  return {
28492
28494
  name: "vite:define",
28493
- transform: { async handler(code, id) {
28495
+ transform: { handler(code, id) {
28494
28496
  if (this.environment.config.consumer === "client") return;
28495
28497
  if (isHTMLRequest(id) || isCSSRequest(id) || isNonJsRequest(id) || config.assetsInclude(id)) return;
28496
28498
  const [define, pattern] = getPattern(this.environment);
28497
28499
  if (!pattern) return;
28498
28500
  pattern.lastIndex = 0;
28499
28501
  if (!pattern.test(code)) return;
28500
- return await replaceDefine(this.environment, code, id, define);
28502
+ return replaceDefine(this.environment, code, id, define);
28501
28503
  } }
28502
28504
  };
28503
28505
  }
28504
- async function replaceDefine(environment, code, id, define) {
28506
+ function replaceDefine(environment, code, id, define) {
28505
28507
  const result = transformSync(id, code, {
28506
28508
  lang: "js",
28507
28509
  sourceType: "module",
@@ -28558,13 +28560,13 @@ function clientInjectionsPlugin(config) {
28558
28560
  async buildStart() {
28559
28561
  injectConfigValues = await createClientConfigValueReplacer(config);
28560
28562
  },
28561
- async transform(code, id) {
28563
+ transform(code, id) {
28562
28564
  const ssr = this.environment.config.consumer === "server";
28563
28565
  const cleanId = cleanUrl(id);
28564
28566
  if (cleanId === normalizedClientEntry$1 || cleanId === normalizedEnvEntry$1) return getDefineReplacer(this)(injectConfigValues(code));
28565
28567
  else if (!ssr && code.includes("process.env.NODE_ENV")) {
28566
28568
  const nodeEnv = this.environment.config.define?.["process.env.NODE_ENV"] || JSON.stringify(process.env.NODE_ENV || config.mode);
28567
- return await replaceDefine(this.environment, code, id, {
28569
+ return replaceDefine(this.environment, code, id, {
28568
28570
  "process.env.NODE_ENV": nodeEnv,
28569
28571
  "global.process.env.NODE_ENV": nodeEnv,
28570
28572
  "globalThis.process.env.NODE_ENV": nodeEnv
@@ -28939,7 +28941,7 @@ function createDepsOptimizer(environment) {
28939
28941
  path: "*"
28940
28942
  });
28941
28943
  }
28942
- async function rerun() {
28944
+ function rerun() {
28943
28945
  const depsString = depsLogString(Object.keys(metadata.discovered));
28944
28946
  debug$9?.(import_picocolors.default.green(`new dependencies found: ${depsString}`));
28945
28947
  runOptimizer();
@@ -30308,7 +30310,7 @@ var DevEnvironment = class extends BaseEnvironment {
30308
30310
  });
30309
30311
  }
30310
30312
  });
30311
- this.hot.on("vite:invalidate", async ({ path, message, firstInvalidatedBy }, client) => {
30313
+ this.hot.on("vite:invalidate", ({ path, message, firstInvalidatedBy }, client) => {
30312
30314
  this.invalidateModule({
30313
30315
  path,
30314
30316
  message,
@@ -30439,7 +30441,7 @@ function setupOnCrawlEnd() {
30439
30441
  if (timeoutHandle) clearTimeout(timeoutHandle);
30440
30442
  timeoutHandle = setTimeout(callOnCrawlEndWhenIdle, callCrawlEndIfIdleAfterMs);
30441
30443
  }
30442
- async function callOnCrawlEndWhenIdle() {
30444
+ function callOnCrawlEndWhenIdle() {
30443
30445
  if (cancelled || registeredIds.size > 0) return;
30444
30446
  onCrawlEndPromiseWithResolvers.resolve();
30445
30447
  }
@@ -32930,7 +32932,7 @@ function webWorkerPlugin(config) {
32930
32932
  },
32931
32933
  transform: {
32932
32934
  filter: { id: workerFileRE },
32933
- async handler(raw, id) {
32935
+ handler(raw, id) {
32934
32936
  const workerFileMatch = workerFileRE.exec(id);
32935
32937
  if (workerFileMatch) {
32936
32938
  const workerType = workerFileMatch[1];
@@ -33565,7 +33567,7 @@ export default ${wasmHelperCode}
33565
33567
  },
33566
33568
  renderChunk: env.config.consumer === "server" ? {
33567
33569
  filter: { code: wasmInitUrlRE },
33568
- async handler(code, chunk, opts, meta) {
33570
+ handler(code, chunk, opts, meta) {
33569
33571
  const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, this.environment.config.isWorker);
33570
33572
  let match;
33571
33573
  let s;
@@ -34348,15 +34350,22 @@ function importGlobPlugin(config) {
34348
34350
  async handler(code, id) {
34349
34351
  const result = await transformGlobImport(code, id, config.root, (im, _, options) => this.resolve(im, id, options).then((i) => i?.id || im), config.experimental.importGlobRestoreExtension, config.logger);
34350
34352
  if (result) {
34351
- const allGlobs = result.matches.map((i) => i.globsResolved);
34352
34353
  if (!importGlobMaps.has(this.environment)) importGlobMaps.set(this.environment, /* @__PURE__ */ new Map());
34353
- const globMatchers = allGlobs.map((globs) => {
34354
+ const globMatchers = result.matches.map((i) => {
34354
34355
  const affirmed = [];
34355
34356
  const negated = [];
34356
- for (const glob of globs) if (glob[0] === "!") negated.push(glob.slice(1));
34357
+ for (const glob of i.globsResolved) if (glob[0] === "!") negated.push(glob.slice(1));
34357
34358
  else affirmed.push(glob);
34358
- const affirmedMatcher = (0, import_picomatch.default)(affirmed);
34359
- const negatedMatcher = (0, import_picomatch.default)(negated);
34359
+ const affirmedMatcher = (0, import_picomatch.default)(affirmed, {
34360
+ noextglob: true,
34361
+ dot: !!i.options.exhaustive,
34362
+ ignore: i.options.exhaustive ? [] : ["**/node_modules/**"]
34363
+ });
34364
+ const negatedMatcher = (0, import_picomatch.default)(negated, {
34365
+ noextglob: true,
34366
+ dot: !!i.options.exhaustive,
34367
+ ignore: i.options.exhaustive ? [] : ["**/node_modules/**"]
34368
+ });
34360
34369
  return (file) => {
34361
34370
  return (affirmed.length === 0 || affirmedMatcher(file)) && !(negated.length > 0 && negatedMatcher(file));
34362
34371
  };
@@ -34742,7 +34751,7 @@ function createFilterForTransform(idFilter, codeFilter, moduleTypeFilter, cwd) {
34742
34751
  };
34743
34752
  }
34744
34753
  //#endregion
34745
- //#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/helpers.js
34754
+ //#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/helpers.js
34746
34755
  function notNullish(v) {
34747
34756
  return v != null;
34748
34757
  }
@@ -34750,7 +34759,7 @@ function isPrimitive(value) {
34750
34759
  return value === null || typeof value !== "function" && typeof value !== "object";
34751
34760
  }
34752
34761
  //#endregion
34753
- //#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
34762
+ //#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
34754
34763
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
34755
34764
  function normalizeWindowsPath(input = "") {
34756
34765
  if (!input) return input;
@@ -34829,7 +34838,7 @@ const isAbsolute$2 = function(p) {
34829
34838
  return _IS_ABSOLUTE_RE.test(p);
34830
34839
  };
34831
34840
  //#endregion
34832
- //#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/source-map.js
34841
+ //#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/source-map.js
34833
34842
  var comma = ",".charCodeAt(0);
34834
34843
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
34835
34844
  var intToChar = new Uint8Array(64);
@@ -35116,7 +35125,7 @@ function parseSingleV8Stack(raw) {
35116
35125
  function parseStacktrace(stack, options = {}) {
35117
35126
  const { ignoreStackEntries = stackIgnorePatterns } = options;
35118
35127
  let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
35119
- const helperIndex = stacks.findLastIndex((s) => s.method === "__VITEST_HELPER__" || s.method === "async*__VITEST_HELPER__" || s.method === "async __VITEST_HELPER__");
35128
+ const helperIndex = stacks.findLastIndex((s) => s.method.includes("__VITEST_HELPER__"));
35120
35129
  if (helperIndex >= 0) stacks = stacks.slice(helperIndex + 1);
35121
35130
  return stacks.map((stack) => {
35122
35131
  if (options.getUrlId) stack.file = options.getUrlId(stack.file);
@@ -35302,10 +35311,11 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
35302
35311
  const isBuild = config.command === "build";
35303
35312
  const isBundled = config.isBundled;
35304
35313
  const isWorker = config.isWorker;
35305
- const buildPlugins = isBundled ? await (await Promise.resolve().then(() => build_exports)).resolveBuildPlugins(config) : {
35314
+ const buildPlugins = isBundled ? (await Promise.resolve().then(() => build_exports)).resolveBuildPlugins(config) : {
35306
35315
  pre: [],
35307
35316
  post: []
35308
35317
  };
35318
+ const devtoolsIntegrationPlugin = config.devtools.enabled && !isWorker ? await loadDevToolsIntegrationPlugin(config) : null;
35309
35319
  const { modulePreload } = config.build;
35310
35320
  return [
35311
35321
  !isBundled ? optimizedDepsPlugin() : null,
@@ -35361,6 +35371,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
35361
35371
  importGlobPlugin(config),
35362
35372
  ...postPlugins,
35363
35373
  ...buildPlugins.post,
35374
+ devtoolsIntegrationPlugin,
35364
35375
  ...isBundled ? [] : [
35365
35376
  clientInjectionsPlugin(config),
35366
35377
  cssAnalysisPlugin(config),
@@ -35368,6 +35379,15 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
35368
35379
  ]
35369
35380
  ].filter(Boolean);
35370
35381
  }
35382
+ async function loadDevToolsIntegrationPlugin(config) {
35383
+ try {
35384
+ const { DevToolsIntegration } = await import("@vitejs/devtools/integration");
35385
+ return DevToolsIntegration({ config });
35386
+ } catch (error) {
35387
+ config.logger.error(import_picocolors.default.red(`Failed to load Vite DevTools integration: ${error?.message || error?.stack}`), { error });
35388
+ return null;
35389
+ }
35390
+ }
35371
35391
  function createPluginHookUtils(plugins) {
35372
35392
  const sortedPluginsCache = /* @__PURE__ */ new Map();
35373
35393
  function getSortedPlugins(hookName) {
@@ -35503,6 +35523,9 @@ async function createEnvironmentPluginContainer(environment, plugins, watcher, a
35503
35523
  return container;
35504
35524
  }
35505
35525
  var EnvironmentPluginContainer = class {
35526
+ environment;
35527
+ plugins;
35528
+ watcher;
35506
35529
  _pluginContextMap = /* @__PURE__ */ new Map();
35507
35530
  _resolvedRollupOptions;
35508
35531
  _processesing = /* @__PURE__ */ new Set();
@@ -35774,6 +35797,8 @@ const basePluginContextMeta = {
35774
35797
  rolldownVersion
35775
35798
  };
35776
35799
  var BasicMinimalPluginContext = class {
35800
+ meta;
35801
+ _logger;
35777
35802
  constructor(meta, _logger) {
35778
35803
  this.meta = meta;
35779
35804
  this._logger = _logger;
@@ -35833,6 +35858,8 @@ const fsModule = {
35833
35858
  writeFile: fsp.writeFile
35834
35859
  };
35835
35860
  var PluginContext = class extends MinimalPluginContext {
35861
+ _plugin;
35862
+ _container;
35836
35863
  ssr = false;
35837
35864
  _scan = false;
35838
35865
  _activeId = null;
@@ -36102,6 +36129,7 @@ var TransformPluginContext = class extends LoadPluginContext {
36102
36129
  }
36103
36130
  };
36104
36131
  var PluginContainer = class {
36132
+ environments;
36105
36133
  constructor(environments) {
36106
36134
  this.environments = environments;
36107
36135
  }
@@ -36788,7 +36816,7 @@ function rolldownDepPlugin(environment, qualified, external) {
36788
36816
  },
36789
36817
  transform: {
36790
36818
  filter: { code: assetImportMetaUrlRE },
36791
- async handler(code, id) {
36819
+ handler(code, id) {
36792
36820
  let s;
36793
36821
  const re = new RegExp(assetImportMetaUrlRE);
36794
36822
  const cleanString = stripLiteral(code);
@@ -38220,7 +38248,7 @@ const licenseFiles = [
38220
38248
  function licensePlugin() {
38221
38249
  return {
38222
38250
  name: "vite:license",
38223
- async generateBundle(_, bundle) {
38251
+ generateBundle(_, bundle) {
38224
38252
  const licenseOption = this.environment.config.build.license;
38225
38253
  if (licenseOption === false) return;
38226
38254
  const packageCache = /* @__PURE__ */ new Map();
@@ -38422,7 +38450,7 @@ function resolveBuildEnvironmentOptions(raw, logger, consumer, isBundledDev, isS
38422
38450
  }
38423
38451
  };
38424
38452
  }
38425
- async function resolveBuildPlugins(config) {
38453
+ function resolveBuildPlugins(config) {
38426
38454
  const isBuild = config.command === "build";
38427
38455
  return {
38428
38456
  pre: [
@@ -39012,12 +39040,11 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
39012
39040
  return output;
39013
39041
  },
39014
39042
  async runDevTools() {
39015
- const devtoolsConfig = config.devtools;
39016
- if (devtoolsConfig.enabled) try {
39017
- const { start } = await import(`@vitejs/devtools/cli-commands`);
39018
- await start(devtoolsConfig.config);
39043
+ if (config.devtools.enabled) try {
39044
+ const { runDevTools } = await import("@vitejs/devtools/integration");
39045
+ await runDevTools(builder);
39019
39046
  } catch (e) {
39020
- config.logger.error(import_picocolors.default.red(`Failed to run Vite DevTools: ${e.message || e.stack}`), { error: e });
39047
+ config.logger.error(import_picocolors.default.red(`Failed to run Vite DevTools: ${e?.message || e?.stack}`), { error: e });
39021
39048
  }
39022
39049
  }
39023
39050
  };
@@ -39666,14 +39693,14 @@ function getDefaultEnvironmentOptions(config) {
39666
39693
  * Check and warn if `path` includes characters that don't work well in Vite,
39667
39694
  * such as `#` and `?` and `*`.
39668
39695
  */
39669
- function checkBadCharactersInPath(name, path, logger) {
39696
+ function checkBadCharactersInPath(name, type, path, logger) {
39670
39697
  const badChars = [];
39671
39698
  if (path.includes("#")) badChars.push("#");
39672
39699
  if (path.includes("?")) badChars.push("?");
39673
39700
  if (path.includes("*")) badChars.push("*");
39674
39701
  if (badChars.length > 0) {
39675
39702
  const charString = badChars.map((c) => `"${c}"`).join(" and ");
39676
- logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path)}), which may not work when running Vite. Consider renaming the directory / file to remove the characters.`));
39703
+ logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path)}), which may not work when running Vite. Consider renaming the ${type} without the characters.`));
39677
39704
  }
39678
39705
  }
39679
39706
  const clientAlias = [{
@@ -39832,7 +39859,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
39832
39859
  const tsconfigPathsPlugin = userPlugins.find((p) => p.name === "vite-tsconfig-paths" || p.name === "vite-plugin-tsconfig-paths");
39833
39860
  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.`));
39834
39861
  const resolvedRoot = normalizePath$1(config.root ? path.resolve(config.root) : process.cwd());
39835
- checkBadCharactersInPath("The project root", resolvedRoot, logger);
39862
+ checkBadCharactersInPath("The project root", "directory", resolvedRoot, logger);
39836
39863
  const configEnvironmentsClient = config.environments.client;
39837
39864
  configEnvironmentsClient.dev ??= {};
39838
39865
  const deprecatedSsrOptimizeDepsConfig = config.ssr?.optimizeDeps ?? {};
@@ -39878,7 +39905,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
39878
39905
  createEnvironment: void 0
39879
39906
  }
39880
39907
  };
39881
- for (const name of Object.keys(config.environments)) config.environments[name] = mergeConfig(name === "client" ? defaultClientEnvironmentOptions : defaultNonClientEnvironmentOptions, config.environments[name]);
39908
+ for (const name of Object.keys(config.environments)) config.environments[name] = mergeConfig(name === "client" ? defaultClientEnvironmentOptions : deepClone(defaultNonClientEnvironmentOptions), config.environments[name]);
39882
39909
  await runConfigEnvironmentHook(config.environments, userPlugins, logger, configEnv, config.ssr?.target === "webworker");
39883
39910
  const isBundledDev = command === "serve" && !!config.experimental?.bundledDev;
39884
39911
  config.resolve ??= {};
@@ -40079,7 +40106,6 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
40079
40106
  optimizeDepsDisabledBackwardCompatibility(resolved, resolved.optimizeDeps);
40080
40107
  optimizeDepsDisabledBackwardCompatibility(resolved, resolved.ssr.optimizeDeps, "ssr.");
40081
40108
  if (!resolved.builder?.sharedConfigBuild && resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
40082
- if (resolved.devtools.enabled) resolved.build.rolldownOptions.devtools ??= {};
40083
40109
  applyDepOptimizationOptionCompat(resolved);
40084
40110
  await setOptimizeDepsPluginNames(resolved);
40085
40111
  debug?.(`using resolved config: %O`, {
@@ -40177,7 +40203,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
40177
40203
  };
40178
40204
  } catch (e) {
40179
40205
  const logger = createLogger(logLevel, { customLogger });
40180
- checkBadCharactersInPath("The config path", resolvedPath, logger);
40206
+ checkBadCharactersInPath("The config path", "file", resolvedPath, logger);
40181
40207
  logger.error(import_picocolors.default.red(`failed to load config from ${resolvedPath}`), { error: e });
40182
40208
  throw e;
40183
40209
  }
@@ -40230,7 +40256,7 @@ async function bundleConfigFile(fileName, isESM) {
40230
40256
  name: "externalize-deps",
40231
40257
  resolveId: {
40232
40258
  filter: { id: /^[^.#].*/ },
40233
- async handler(id, importer, { kind }) {
40259
+ handler(id, importer, { kind }) {
40234
40260
  if (!importer || path.isAbsolute(id) || isNodeBuiltin(id)) return;
40235
40261
  if (isNodeLikeBuiltin(id) || id.startsWith("npm:")) return {
40236
40262
  id,
@@ -1,6 +1,6 @@
1
1
  import { r as __require, t as __commonJSMin } from "./chunk.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.10/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/apply-styles.js
120
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/data-url.js
140
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/parse-statements.js
159
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/process-content.js
284
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/lib/parse-styles.js
318
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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.10/node_modules/postcss-import/index.js
421
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/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();
@@ -31,7 +31,7 @@ import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownA
31
31
 
32
32
  //#region \0rolldown/runtime.js
33
33
  //#endregion
34
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.18_@pnpm+logger@1001.0.1_typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
34
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.20_@pnpm+logger@1001.0.1_typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
35
35
  //#region src/node/cli-commands.d.ts
36
36
  interface StartOptions {
37
37
  root?: string;
@@ -41,7 +41,7 @@ interface StartOptions {
41
41
  open?: boolean;
42
42
  }
43
43
  //#endregion
44
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.18_@pnpm+logger@1001.0.1_typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/config.d.ts
44
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.20_@pnpm+logger@1001.0.1_typescript@6.0.2_vite@packages+core/node_modules/@vitejs/devtools/dist/config.d.ts
45
45
  //#region src/node/config.d.ts
46
46
  interface DevToolsConfig extends Partial<StartOptions> {
47
47
  enabled: boolean;
@@ -225,6 +225,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
225
225
  //#endregion
226
226
  //#region ../../vite/packages/vite/src/module-runner/sourcemap/decoder.ts
227
227
  var DecodedMap = class {
228
+ map;
228
229
  _encoded;
229
230
  _decoded;
230
231
  _decodedMemo;
@@ -256,6 +257,8 @@ function getOriginalPosition(map, needle) {
256
257
  //#region ../../vite/packages/vite/src/module-runner/evaluatedModules.ts
257
258
  const MODULE_RUNNER_SOURCEMAPPING_REGEXP = RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);
258
259
  var EvaluatedModuleNode = class {
260
+ id;
261
+ url;
259
262
  importers = /* @__PURE__ */ new Set();
260
263
  imports = /* @__PURE__ */ new Set();
261
264
  evaluated = !1;
@@ -349,6 +352,8 @@ function normalizeModuleId(file) {
349
352
  //#endregion
350
353
  //#region ../../vite/packages/vite/src/shared/hmr.ts
351
354
  var HMRContext = class {
355
+ hmrClient;
356
+ ownerPath;
352
357
  newListeners;
353
358
  constructor(hmrClient, ownerPath) {
354
359
  this.hmrClient = hmrClient, this.ownerPath = ownerPath, hmrClient.dataMap.has(ownerPath) || hmrClient.dataMap.set(ownerPath, {});
@@ -430,6 +435,9 @@ var HMRContext = class {
430
435
  }), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);
431
436
  }
432
437
  }, HMRClient = class {
438
+ logger;
439
+ transport;
440
+ importUpdatedModule;
433
441
  hotModulesMap = /* @__PURE__ */ new Map();
434
442
  disposeMap = /* @__PURE__ */ new Map();
435
443
  pruneMap = /* @__PURE__ */ new Map();
@@ -526,7 +534,7 @@ const {${missingBindings.join(", ")}} = pkg;
526
534
  }
527
535
  }
528
536
  //#endregion
529
- //#region ../../node_modules/.pnpm/nanoid@5.1.9/node_modules/nanoid/non-secure/index.js
537
+ //#region ../../node_modules/.pnpm/nanoid@5.1.11/node_modules/nanoid/non-secure/index.js
530
538
  let nanoid = (size = 21) => {
531
539
  let id = "", i = size | 0;
532
540
  for (; i--;) id += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random() * 64 | 0];
@@ -652,14 +660,14 @@ const createInvokeableTransport = (transport) => {
652
660
  return {
653
661
  async connect({ onMessage, onDisconnection }) {
654
662
  let socket = options.createConnection();
655
- socket.addEventListener("message", async ({ data }) => {
663
+ socket.addEventListener("message", ({ data }) => {
656
664
  onMessage(JSON.parse(data));
657
665
  });
658
666
  let isOpened = socket.readyState === socket.OPEN;
659
667
  isOpened || await new Promise((resolve, reject) => {
660
668
  socket.addEventListener("open", () => {
661
669
  isOpened = !0, resolve();
662
- }, { once: !0 }), socket.addEventListener("close", async () => {
670
+ }, { once: !0 }), socket.addEventListener("close", () => {
663
671
  if (!isOpened) {
664
672
  reject(/* @__PURE__ */ Error("WebSocket closed without opened."));
665
673
  return;
@@ -1080,6 +1088,9 @@ function createNodeImportMeta(modulePath) {
1080
1088
  //#endregion
1081
1089
  //#region ../../vite/packages/vite/src/module-runner/runner.ts
1082
1090
  var ModuleRunner = class {
1091
+ options;
1092
+ evaluator;
1093
+ debug;
1083
1094
  evaluatedModules;
1084
1095
  hmrClient;
1085
1096
  transport;