nitro-nightly 3.0.1-20260125-215009-8882bc9e → 3.0.1-20260128-210932-ae83c97e

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 (46) hide show
  1. package/dist/_build/common.mjs +2084 -3212
  2. package/dist/_build/rolldown.mjs +12 -25
  3. package/dist/_build/rollup.mjs +11 -27
  4. package/dist/_build/vite.build.mjs +7 -11
  5. package/dist/_chunks/dev.mjs +20 -42
  6. package/dist/_chunks/nitro.mjs +13 -92
  7. package/dist/_chunks/nitro2.mjs +1 -5
  8. package/dist/_chunks/utils.mjs +10 -24
  9. package/dist/_common.mjs +12 -24
  10. package/dist/_libs/citty.mjs +1 -13
  11. package/dist/_libs/commondir+is-reference.mjs +12 -22
  12. package/dist/_libs/compatx.mjs +1 -4
  13. package/dist/_libs/confbox.mjs +363 -376
  14. package/dist/_libs/escape-string-regexp.mjs +1 -4
  15. package/dist/_libs/estree-walker.mjs +4 -92
  16. package/dist/_libs/hasown+resolve+deepmerge.mjs +144 -230
  17. package/dist/_libs/httpxy.mjs +5 -21
  18. package/dist/_libs/klona.mjs +1 -4
  19. package/dist/_libs/nypm+giget+tinyexec.mjs +874 -926
  20. package/dist/_libs/plugin-alias.mjs +1 -5
  21. package/dist/_libs/plugin-inject.mjs +1 -5
  22. package/dist/_libs/plugin-json.mjs +1 -5
  23. package/dist/_libs/pluginutils+plugin-commonjs.d.mts +2 -2
  24. package/dist/_libs/pluginutils.mjs +1 -31
  25. package/dist/_libs/rc9+c12+dotenv.mjs +43 -83
  26. package/dist/_libs/readdirp+chokidar.mjs +184 -360
  27. package/dist/_libs/remapping.mjs +1 -5
  28. package/dist/_libs/resolve-uri+gen-mapping.mjs +12 -48
  29. package/dist/_libs/rou3.mjs +1 -32
  30. package/dist/_libs/tsconfck.mjs +21 -334
  31. package/dist/_libs/ultrahtml.mjs +3 -16
  32. package/dist/_libs/unimport+unplugin.mjs +15 -75
  33. package/dist/_presets.mjs +260 -445
  34. package/dist/builder.mjs +1 -2
  35. package/dist/cli/_chunks/build.mjs +1 -5
  36. package/dist/cli/_chunks/common.mjs +1 -4
  37. package/dist/cli/_chunks/dev.mjs +1 -5
  38. package/dist/cli/_chunks/list.mjs +1 -5
  39. package/dist/cli/_chunks/prepare.mjs +1 -5
  40. package/dist/cli/_chunks/run.mjs +1 -5
  41. package/dist/cli/_chunks/task.mjs +1 -5
  42. package/dist/cli/index.mjs +1 -5
  43. package/dist/types/index.d.mts +5 -5
  44. package/dist/types/index.mjs +1 -2
  45. package/dist/vite.mjs +44 -63
  46. package/package.json +22 -22
@@ -12,8 +12,6 @@ import process$1 from "node:process";
12
12
  import "scule";
13
13
  import { Buffer } from "node:buffer";
14
14
  import * as querystring from "node:querystring";
15
-
16
- //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/chunks/detect-acorn.mjs
17
15
  var detect_acorn_exports = /* @__PURE__ */ __exportAll({
18
16
  createVirtualImportsAcronWalker: () => createVirtualImportsAcronWalker,
19
17
  detectImportsAcorn: () => detectImportsAcorn,
@@ -201,9 +199,6 @@ function createVirtualImportsAcronWalker(importMap, virtualImports = []) {
201
199
  } }
202
200
  };
203
201
  }
204
-
205
- //#endregion
206
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/context-Csj9j3eN.js
207
202
  var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
208
203
  function toArray$2(array) {
209
204
  array = array || [];
@@ -218,9 +213,9 @@ const ABSOLUTE_PATH_REGEX = /^(?:\/|(?:[A-Z]:)?[/\\|])/i;
218
213
  function isAbsolute$1(path$1) {
219
214
  return ABSOLUTE_PATH_REGEX.test(path$1);
220
215
  }
221
- function getMatcherString$1(glob, cwd$1) {
216
+ function getMatcherString$1(glob, cwd) {
222
217
  if (glob.startsWith("**") || isAbsolute$1(glob)) return normalize$1(glob);
223
- return normalize$1(resolve(cwd$1, glob));
218
+ return normalize$1(resolve(cwd, glob));
224
219
  }
225
220
  function patternToIdFilter(pattern) {
226
221
  if (pattern instanceof RegExp) return (id) => {
@@ -311,9 +306,6 @@ function parse(code, opts = {}) {
311
306
  ...opts
312
307
  });
313
308
  }
314
-
315
- //#endregion
316
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/webpack-like-DFGTNSuV.js
317
309
  function transformUse(data, plugin, transformLoader) {
318
310
  if (data.resource == null) return [];
319
311
  const id = normalizeAbsolutePath(data.resource + (data.resourceQuery || ""));
@@ -326,23 +318,10 @@ function transformUse(data, plugin, transformLoader) {
326
318
  ident: plugin.name
327
319
  }];
328
320
  }
329
- /**
330
- * Normalizes a given path when it's absolute. Normalizing means returning a new path by converting
331
- * the input path to the native os format. This is useful in cases where we want to normalize
332
- * the `id` argument of a hook. Any absolute ids should be in the default format
333
- * of the operating system. Any relative imports or node_module imports should remain
334
- * untouched.
335
- *
336
- * @param path - Path to normalize.
337
- * @returns a new normalized path.
338
- */
339
321
  function normalizeAbsolutePath(path$1) {
340
322
  if (isAbsolute(path$1)) return normalize(path$1);
341
323
  else return path$1;
342
324
  }
343
-
344
- //#endregion
345
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/context-DkYlx1xL.js
346
325
  function createBuildContext$1(compiler, compilation, loaderContext, inputSourceMap) {
347
326
  return {
348
327
  getNativeBuildContext() {
@@ -355,8 +334,8 @@ function createBuildContext$1(compiler, compilation, loaderContext, inputSourceM
355
334
  };
356
335
  },
357
336
  addWatchFile(file) {
358
- const cwd$1 = process.cwd();
359
- compilation.fileDependencies.add(resolve(cwd$1, file));
337
+ const cwd = process.cwd();
338
+ compilation.fileDependencies.add(resolve(cwd, file));
360
339
  },
361
340
  getWatchFiles() {
362
341
  return Array.from(compilation.fileDependencies);
@@ -379,9 +358,6 @@ function normalizeMessage$1(error) {
379
358
  }
380
359
  return err;
381
360
  }
382
-
383
- //#endregion
384
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/utils-BosfZ0pB.js
385
361
  function encodeVirtualModuleId(id, plugin) {
386
362
  return resolve(plugin.__virtualModulePrefix, encodeURIComponent(id));
387
363
  }
@@ -429,9 +405,6 @@ var FakeVirtualModulesPlugin = class FakeVirtualModulesPlugin {
429
405
  return fs.promises.writeFile(file, "");
430
406
  }
431
407
  };
432
-
433
- //#endregion
434
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/context-OCFO8EW1.js
435
408
  function contextOptionsFromCompilation(compilation) {
436
409
  return {
437
410
  addWatchFile(file) {
@@ -481,9 +454,6 @@ function normalizeMessage(error) {
481
454
  }
482
455
  return err;
483
456
  }
484
-
485
- //#endregion
486
- //#region node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.js
487
457
  var require_virtual_stats = /* @__PURE__ */ __commonJSMin(((exports) => {
488
458
  var __importDefault = exports && exports.__importDefault || function(mod) {
489
459
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -525,10 +495,7 @@ var require_virtual_stats = /* @__PURE__ */ __commonJSMin(((exports) => {
525
495
  };
526
496
  exports.VirtualStats = VirtualStats;
527
497
  }));
528
-
529
- //#endregion
530
- //#region node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.js
531
- var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
498
+ var import_lib = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
532
499
  const path_1 = (exports && exports.__importDefault || function(mod) {
533
500
  return mod && mod.__esModule ? mod : { "default": mod };
534
501
  })(__require("path"));
@@ -749,11 +716,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
749
716
  }
750
717
  };
751
718
  module.exports = VirtualModulesPlugin;
752
- }));
753
-
754
- //#endregion
755
- //#region node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/index.js
756
- var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
719
+ })))(), 1);
757
720
  const ExtToLoader = {
758
721
  ".js": "js",
759
722
  ".mjs": "js",
@@ -1489,10 +1452,10 @@ function getRspackPlugin(factory) {
1489
1452
  if (plugin.watchChange || plugin.buildStart) compiler.hooks.make.tapPromise(plugin.name, async (compilation) => {
1490
1453
  const context = createBuildContext$1(compiler, compilation);
1491
1454
  if (plugin.watchChange && (compiler.modifiedFiles || compiler.removedFiles)) {
1492
- const promises$1 = [];
1493
- if (compiler.modifiedFiles) compiler.modifiedFiles.forEach((file) => promises$1.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "update" }))));
1494
- if (compiler.removedFiles) compiler.removedFiles.forEach((file) => promises$1.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "delete" }))));
1495
- await Promise.all(promises$1);
1455
+ const promises = [];
1456
+ if (compiler.modifiedFiles) compiler.modifiedFiles.forEach((file) => promises.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "update" }))));
1457
+ if (compiler.removedFiles) compiler.removedFiles.forEach((file) => promises.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "delete" }))));
1458
+ await Promise.all(promises);
1496
1459
  }
1497
1460
  if (plugin.buildStart) return await plugin.buildStart.call(context);
1498
1461
  });
@@ -1626,10 +1589,10 @@ function getWebpackPlugin(factory) {
1626
1589
  if (plugin.watchChange || plugin.buildStart) compiler.hooks.make.tapPromise(plugin.name, async (compilation) => {
1627
1590
  const context = createBuildContext(contextOptionsFromCompilation(compilation), compiler, compilation);
1628
1591
  if (plugin.watchChange && (compiler.modifiedFiles || compiler.removedFiles)) {
1629
- const promises$1 = [];
1630
- if (compiler.modifiedFiles) compiler.modifiedFiles.forEach((file) => promises$1.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "update" }))));
1631
- if (compiler.removedFiles) compiler.removedFiles.forEach((file) => promises$1.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "delete" }))));
1632
- await Promise.all(promises$1);
1592
+ const promises = [];
1593
+ if (compiler.modifiedFiles) compiler.modifiedFiles.forEach((file) => promises.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "update" }))));
1594
+ if (compiler.removedFiles) compiler.removedFiles.forEach((file) => promises.push(Promise.resolve(plugin.watchChange.call(context, file, { event: "delete" }))));
1595
+ await Promise.all(promises);
1633
1596
  }
1634
1597
  if (plugin.buildStart) return await plugin.buildStart.call(context);
1635
1598
  });
@@ -1681,12 +1644,6 @@ function createUnplugin(factory) {
1681
1644
  }
1682
1645
  };
1683
1646
  }
1684
-
1685
- //#endregion
1686
- //#region node_modules/.pnpm/unplugin-utils@0.3.1/node_modules/unplugin-utils/dist/index.js
1687
- /**
1688
- * Converts path separators to forward slash.
1689
- */
1690
1647
  function normalizePath(filename) {
1691
1648
  return filename.replaceAll("\\", "/");
1692
1649
  }
@@ -1701,18 +1658,6 @@ function getMatcherString(id, resolutionBase) {
1701
1658
  if (resolutionBase === false || isAbsolute$2(id) || id.startsWith("**")) return normalizePath(id);
1702
1659
  return join$1(normalizePath(resolve$1(resolutionBase || "")).replaceAll(/[-^$*+?.()|[\]{}]/g, `${escapeMark}$&`), normalizePath(id)).replaceAll(escapeMark, "\\");
1703
1660
  }
1704
- /**
1705
- * Constructs a filter function which can be used to determine whether or not
1706
- * certain modules should be operated upon.
1707
- * @param include If `include` is omitted or has zero length, filter will return `true` by default.
1708
- * @param exclude ID must not match any of the `exclude` patterns.
1709
- * @param options Additional options.
1710
- * @param options.resolve Optionally resolves the patterns against a directory other than `process.cwd()`.
1711
- * If a `string` is specified, then the value will be used as the base directory.
1712
- * Relative paths will be resolved against `process.cwd()` first.
1713
- * If `false`, then the patterns will not be resolved against any directory.
1714
- * This can be useful if you want to create a filter for virtual module names.
1715
- */
1716
1661
  function createFilter(include, exclude, options) {
1717
1662
  const resolutionBase = options && options.resolve;
1718
1663
  const getMatcher = (id) => id instanceof RegExp ? id : { test: (what) => {
@@ -1736,9 +1681,6 @@ function createFilter(include, exclude, options) {
1736
1681
  return !includeMatchers.length;
1737
1682
  };
1738
1683
  }
1739
-
1740
- //#endregion
1741
- //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/unplugin.mjs
1742
1684
  var unplugin_exports = /* @__PURE__ */ __exportAll({
1743
1685
  default: () => unplugin,
1744
1686
  defaultExcludes: () => defaultExcludes,
@@ -1780,6 +1722,4 @@ const unplugin = createUnplugin((options = {}) => {
1780
1722
  }
1781
1723
  };
1782
1724
  });
1783
-
1784
- //#endregion
1785
- export { detect_acorn_exports as n, unplugin_exports as t };
1725
+ export { detect_acorn_exports as n, unplugin_exports as t };