nitro-nightly 3.0.1-20251103-224844-6310433d → 3.0.1-20251104-000640-50897794

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 (30) hide show
  1. package/dist/_build/common.mjs +1 -1
  2. package/dist/_build/rolldown.mjs +2 -2
  3. package/dist/_build/rollup.mjs +2 -2
  4. package/dist/_build/vite.build.mjs +2 -2
  5. package/dist/_build/vite.plugin.mjs +2 -2
  6. package/dist/_chunks/{DceqUfmv.mjs → DPnDpScB.mjs} +1 -1
  7. package/dist/_chunks/{obQOKJCv.mjs → DnETaDxL.mjs} +1 -1
  8. package/dist/_chunks/{C8pztJ87.mjs → vJX08MVt.mjs} +10 -7
  9. package/dist/_libs/unimport.mjs +1 -1
  10. package/dist/_libs/unwasm.mjs +79 -66
  11. package/dist/_libs/vite-plugin-fullstack.mjs +1 -1
  12. package/dist/builder.mjs +2 -2
  13. package/dist/node_modules/@poppinss/dumper/build/formatters/html/main.js +1 -1
  14. package/dist/node_modules/@poppinss/dumper/package.json +1 -1
  15. package/dist/node_modules/@speed-highlight/core/dist/index.js +2 -2
  16. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -2
  17. package/dist/node_modules/@speed-highlight/core/package.json +1 -1
  18. package/dist/node_modules/youch/build/{chunk-VE4LENUR.js → chunk-F4I6KX4R.js} +2 -1
  19. package/dist/node_modules/youch/build/{chunk-JAN2TFI2.js → chunk-YYEJ3AGB.js} +4 -1
  20. package/dist/node_modules/youch/build/index.js +16 -8
  21. package/dist/node_modules/youch/build/public/error_stack/script.js +20 -22
  22. package/dist/node_modules/youch/build/public/header/script.js +0 -2
  23. package/dist/node_modules/youch/build/public/layout/script.js +0 -8
  24. package/dist/node_modules/youch/build/public/layout/style.css +4 -0
  25. package/dist/node_modules/youch/package.json +16 -17
  26. package/dist/types/index.d.mts +1 -1
  27. package/dist/vite.mjs +2 -2
  28. package/package.json +7 -7
  29. package/dist/node_modules/cookie/dist/index.js +0 -239
  30. package/dist/node_modules/cookie/package.json +0 -42
@@ -2,7 +2,7 @@ import { s as __toESM } from "../_chunks/DXMHy5ca.mjs";
2
2
  import { T as resolve$1, _ as dirname$1, b as join$1, v as extname$1, w as relative$1 } from "../_libs/c12.mjs";
3
3
  import { i as unplugin } from "../_libs/unimport.mjs";
4
4
  import { t as glob } from "../_libs/tinyglobby.mjs";
5
- import { u as writeFile$1 } from "../_chunks/obQOKJCv.mjs";
5
+ import { u as writeFile$1 } from "../_chunks/DnETaDxL.mjs";
6
6
  import { t as src_default } from "../_libs/mime.mjs";
7
7
  import { i as genSafeVariableName, t as genImport } from "../_libs/knitwork.mjs";
8
8
  import { t as require_etag } from "../_libs/etag.mjs";
@@ -14,7 +14,7 @@ import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
14
14
  import "../_libs/klona.mjs";
15
15
  import "../_libs/std-env.mjs";
16
16
  import "../_libs/dot-prop.mjs";
17
- import { n as writeTypes, o as scanHandlers } from "../_chunks/obQOKJCv.mjs";
17
+ import { n as writeTypes, o as scanHandlers } from "../_chunks/DnETaDxL.mjs";
18
18
  import "../_libs/mime.mjs";
19
19
  import "../_libs/pathe.mjs";
20
20
  import "../_libs/untyped.mjs";
@@ -27,7 +27,7 @@ import "../_libs/plugin-replace.mjs";
27
27
  import { i as replace, n as baseBuildPlugins, r as baseBuildConfig, t as writeBuildInfo } from "./common.mjs";
28
28
  import "../_libs/remapping.mjs";
29
29
  import "../_libs/unwasm.mjs";
30
- import { i as raw, n as generateFSTree, r as nitroServerName, t as snapshot } from "../_chunks/DceqUfmv.mjs";
30
+ import { i as raw, n as generateFSTree, r as nitroServerName, t as snapshot } from "../_chunks/DPnDpScB.mjs";
31
31
  import "../_libs/duplexer.mjs";
32
32
  import "../_libs/gzip-size.mjs";
33
33
  import "../_libs/pretty-bytes.mjs";
@@ -14,7 +14,7 @@ import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
14
14
  import "../_libs/klona.mjs";
15
15
  import "../_libs/std-env.mjs";
16
16
  import "../_libs/dot-prop.mjs";
17
- import { n as writeTypes, o as scanHandlers } from "../_chunks/obQOKJCv.mjs";
17
+ import { n as writeTypes, o as scanHandlers } from "../_chunks/DnETaDxL.mjs";
18
18
  import "../_libs/mime.mjs";
19
19
  import "../_libs/pathe.mjs";
20
20
  import "../_libs/untyped.mjs";
@@ -29,7 +29,7 @@ import "../_libs/plugin-replace.mjs";
29
29
  import { i as replace, n as baseBuildPlugins, r as baseBuildConfig, t as writeBuildInfo } from "./common.mjs";
30
30
  import "../_libs/remapping.mjs";
31
31
  import "../_libs/unwasm.mjs";
32
- import { i as raw, n as generateFSTree, r as nitroServerName, t as snapshot } from "../_chunks/DceqUfmv.mjs";
32
+ import { i as raw, n as generateFSTree, r as nitroServerName, t as snapshot } from "../_chunks/DPnDpScB.mjs";
33
33
  import "../_libs/duplexer.mjs";
34
34
  import "../_libs/gzip-size.mjs";
35
35
  import "../_libs/pretty-bytes.mjs";
@@ -13,10 +13,10 @@ import "../_libs/tinyglobby.mjs";
13
13
  import "../_libs/compatx.mjs";
14
14
  import "../_libs/klona.mjs";
15
15
  import { n as a } from "../_libs/std-env.mjs";
16
- import "../_chunks/C8pztJ87.mjs";
16
+ import "../_chunks/vJX08MVt.mjs";
17
17
  import "../_libs/escape-string-regexp.mjs";
18
18
  import "../_libs/dot-prop.mjs";
19
- import "../_chunks/obQOKJCv.mjs";
19
+ import "../_chunks/DnETaDxL.mjs";
20
20
  import "../_libs/rou3.mjs";
21
21
  import "../_libs/mime.mjs";
22
22
  import "../_libs/pathe.mjs";
@@ -2,8 +2,8 @@ import { T as resolve$1, _ as dirname$1, b as join$1, f as resolveModulePath, g
2
2
  import { f as sanitizeFilePath } from "../_libs/local-pkg.mjs";
3
3
  import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
4
4
  import { n as a, t as T } from "../_libs/std-env.mjs";
5
- import { a as createNitro, n as prepare, r as copyPublicAssets } from "../_chunks/C8pztJ87.mjs";
6
- import { c as prettyPath, o as scanHandlers } from "../_chunks/obQOKJCv.mjs";
5
+ import { a as createNitro, n as prepare, r as copyPublicAssets } from "../_chunks/vJX08MVt.mjs";
6
+ import { c as prettyPath, o as scanHandlers } from "../_chunks/DnETaDxL.mjs";
7
7
  import { t as createProxyServer } from "../_libs/httpxy.mjs";
8
8
  import { i as NodeDevWorker, r as NitroDevApp } from "../_dev.mjs";
9
9
  import { i as watch$1 } from "../_libs/chokidar.mjs";
@@ -1,7 +1,7 @@
1
1
  import { T as resolve, _ as dirname, b as join, v as extname, w as relative } from "../_libs/c12.mjs";
2
2
  import { t as glob } from "../_libs/tinyglobby.mjs";
3
3
  import { n as a } from "../_libs/std-env.mjs";
4
- import { i as snapshotStorage, t as runParallel } from "./obQOKJCv.mjs";
4
+ import { i as snapshotStorage, t as runParallel } from "./DnETaDxL.mjs";
5
5
  import { t as src_default } from "../_libs/mime.mjs";
6
6
  import { t as gzipSize } from "../_libs/gzip-size.mjs";
7
7
  import { t as prettyBytes } from "../_libs/pretty-bytes.mjs";
@@ -1,7 +1,7 @@
1
1
  import { s as __toESM } from "./DXMHy5ca.mjs";
2
2
  import { T as resolve, _ as dirname, b as join, f as resolveModulePath, w as relative, y as isAbsolute } from "../_libs/c12.mjs";
3
3
  import { c as parseNodeModulePath, s as lookupNodeModuleSubpath } from "../_libs/local-pkg.mjs";
4
- import { c as toExports } from "../_libs/unimport.mjs";
4
+ import { s as toExports } from "../_libs/unimport.mjs";
5
5
  import { t as glob } from "../_libs/tinyglobby.mjs";
6
6
  import { t as klona } from "../_libs/klona.mjs";
7
7
  import { t as getProperty } from "../_libs/dot-prop.mjs";
@@ -1,13 +1,13 @@
1
1
  import { s as __toESM } from "./DXMHy5ca.mjs";
2
2
  import { T as resolve, b as join, f as resolveModulePath, o as findWorkspaceDir, r as loadConfig, t as watchConfig, w as relative, x as normalize } from "../_libs/c12.mjs";
3
3
  import { d as resolveModuleExportNames } from "../_libs/local-pkg.mjs";
4
- import { s as createUnimport } from "../_libs/unimport.mjs";
4
+ import { o as createUnimport } from "../_libs/unimport.mjs";
5
5
  import { t as glob } from "../_libs/tinyglobby.mjs";
6
6
  import { n as resolveCompatibilityDates, r as resolveCompatibilityDatesFromEnv } from "../_libs/compatx.mjs";
7
7
  import { n as klona } from "../_libs/klona.mjs";
8
8
  import { n as a, r as d } from "../_libs/std-env.mjs";
9
9
  import { t as escapeStringRegexp } from "../_libs/escape-string-regexp.mjs";
10
- import { a as scanAndSyncOptions, c as prettyPath, l as resolveNitroPath, o as scanHandlers, r as createStorage, s as isDirectory, t as runParallel, u as writeFile$1 } from "./obQOKJCv.mjs";
10
+ import { a as scanAndSyncOptions, c as prettyPath, l as resolveNitroPath, o as scanHandlers, r as createStorage, s as isDirectory, t as runParallel, u as writeFile$1 } from "./DnETaDxL.mjs";
11
11
  import { a as findRoute, i as findAllRoutes, n as addRoute, r as createRouter, t as compileRouterToString } from "../_libs/rou3.mjs";
12
12
  import { t as src_default } from "../_libs/mime.mjs";
13
13
  import { n as z, t as P } from "../_libs/ultrahtml.mjs";
@@ -786,10 +786,10 @@ function initNitroRouting(nitro) {
786
786
  const envs = (Array.isArray(h.env) ? h.env : [h.env]).filter(Boolean);
787
787
  return envs.length === 0 || envs.some((env) => envConditions.has(env));
788
788
  };
789
- const routes = new Router();
790
- const routeRules = new Router();
789
+ const routes = new Router(nitro.options.baseURL);
790
+ const routeRules = new Router(nitro.options.baseURL);
791
791
  const globalMiddleware = [];
792
- const routedMiddleware = new Router();
792
+ const routedMiddleware = new Router(nitro.options.baseURL);
793
793
  const sync = () => {
794
794
  routeRules._update(Object.entries(nitro.options.routeRules).map(([route, data]) => ({
795
795
  route,
@@ -853,8 +853,11 @@ var Router = class {
853
853
  #routes;
854
854
  #router;
855
855
  #compiled;
856
- constructor() {
856
+ #baseURL;
857
+ constructor(baseURL) {
857
858
  this._update([]);
859
+ this.#baseURL = baseURL || "";
860
+ if (this.#baseURL.endsWith("/")) this.#baseURL = this.#baseURL.slice(0, -1);
858
861
  }
859
862
  get routes() {
860
863
  return this.#routes;
@@ -863,7 +866,7 @@ var Router = class {
863
866
  this.#routes = routes;
864
867
  this.#router = createRouter();
865
868
  this.#compiled = void 0;
866
- for (const route of routes) addRoute(this.#router, route.method, route.route, route.data);
869
+ for (const route of routes) addRoute(this.#router, route.method, this.#baseURL + route.route, route.data);
867
870
  if (opts?.merge) mergeCatchAll(this.#router);
868
871
  }
869
872
  hasRoutes() {
@@ -3517,4 +3517,4 @@ function createVirtualImportsAcronWalker(importMap, virtualImports = []) {
3517
3517
  }
3518
3518
 
3519
3519
  //#endregion
3520
- export { createFilter as a, toExports as c, unplugin as i, detectImportsAcorn as n, createUnplugin as o, traveseScopes as r, createUnimport as s, createVirtualImportsAcronWalker as t };
3520
+ export { createFilter as a, unplugin as i, detectImportsAcorn as n, createUnimport as o, traveseScopes as r, toExports as s, createVirtualImportsAcronWalker as t };
@@ -1,11 +1,10 @@
1
- import { g as basename } from "./c12.mjs";
1
+ import { f as resolveModulePath, g as basename } from "./c12.mjs";
2
2
  import { t as MagicString } from "./magic-string.mjs";
3
- import { o as createUnplugin } from "./unimport.mjs";
4
3
  import { a as genString, i as genSafeVariableName, n as genObjectFromRaw, t as genImport } from "./knitwork.mjs";
5
4
  import { existsSync, promises } from "node:fs";
6
5
  import { createHash } from "node:crypto";
7
6
 
8
- //#region node_modules/.pnpm/unwasm@0.3.11/node_modules/unwasm/dist/tools.mjs
7
+ //#region node_modules/.pnpm/unwasm@0.4.2/node_modules/unwasm/dist/plugin/index.mjs
9
8
  var __create = Object.create;
10
9
  var __defProp = Object.defineProperty;
11
10
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -24,10 +23,10 @@ var __copyProps = (to, from, except, desc) => {
24
23
  }
25
24
  return to;
26
25
  };
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(__defProp(target, "default", {
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
27
  value: mod,
29
28
  enumerable: true
30
- }), mod));
29
+ }) : target, mod));
31
30
  var require_lib = __commonJS({ "node_modules/.pnpm/@webassemblyjs+helper-api-error@1.13.2/node_modules/@webassemblyjs/helper-api-error/lib/index.js"(exports) {
32
31
  function _typeof(obj) {
33
32
  "@babel/helpers - typeof";
@@ -2958,7 +2957,7 @@ var require_utils = __commonJS({ "node_modules/.pnpm/@webassemblyjs+ast@1.14.1/n
2958
2957
  })(nodeInterop);
2959
2958
  }
2960
2959
  function _interopRequireWildcard(obj, nodeInterop) {
2961
- if (obj && obj.__esModule) return obj;
2960
+ if (!nodeInterop && obj && obj.__esModule) return obj;
2962
2961
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") return { "default": obj };
2963
2962
  var cache = _getRequireWildcardCache(nodeInterop);
2964
2963
  if (cache && cache.has(obj)) return cache.get(obj);
@@ -3189,6 +3188,7 @@ var require_ast_module_to_module_context = __commonJS({ "node_modules/.pnpm/@web
3189
3188
  }
3190
3189
  function _createClass(Constructor, protoProps, staticProps) {
3191
3190
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
3191
+ if (staticProps) _defineProperties(Constructor, staticProps);
3192
3192
  return Constructor;
3193
3193
  }
3194
3194
  function moduleContextFromModuleAST(m) {
@@ -3767,7 +3767,7 @@ var require_leb = __commonJS({ "node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/
3767
3767
  })(nodeInterop);
3768
3768
  }
3769
3769
  function _interopRequireWildcard(obj, nodeInterop) {
3770
- if (obj && obj.__esModule) return obj;
3770
+ if (!nodeInterop && obj && obj.__esModule) return obj;
3771
3771
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") return { "default": obj };
3772
3772
  var cache = _getRequireWildcardCache(nodeInterop);
3773
3773
  if (cache && cache.has(obj)) return cache.get(obj);
@@ -3815,7 +3815,7 @@ var require_leb = __commonJS({ "node_modules/.pnpm/@webassemblyjs+leb128@1.14.1/
3815
3815
  var result = 0;
3816
3816
  while (encodedBuffer[index + result] >= 128) result++;
3817
3817
  result++;
3818
- if (index + result > encodedBuffer.length);
3818
+ if (index + result > encodedBuffer.length) {}
3819
3819
  return result;
3820
3820
  }
3821
3821
  function decodeBufferCommon(encodedBuffer, index, signed) {
@@ -4024,7 +4024,7 @@ var require_decoder2 = __commonJS({ "node_modules/.pnpm/@webassemblyjs+wasm-pars
4024
4024
  })(nodeInterop);
4025
4025
  }
4026
4026
  function _interopRequireWildcard(obj, nodeInterop) {
4027
- if (obj && obj.__esModule) return obj;
4027
+ if (!nodeInterop && obj && obj.__esModule) return obj;
4028
4028
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") return { "default": obj };
4029
4029
  var cache = _getRequireWildcardCache(nodeInterop);
4030
4030
  if (cache && cache.has(obj)) return cache.get(obj);
@@ -4095,6 +4095,7 @@ var require_decoder2 = __commonJS({ "node_modules/.pnpm/@webassemblyjs+wasm-pars
4095
4095
  console.log(";", msg);
4096
4096
  }
4097
4097
  var state = {
4098
+ elementsInFuncSection: [],
4098
4099
  elementsInExportSection: [],
4099
4100
  elementsInCodeSection: [],
4100
4101
  memoriesInModule: [],
@@ -5317,7 +5318,7 @@ var export_decode = __toESM(__commonJS({ "node_modules/.pnpm/@webassemblyjs+wasm
5317
5318
  })(nodeInterop);
5318
5319
  }
5319
5320
  function _interopRequireWildcard(obj, nodeInterop) {
5320
- if (obj && obj.__esModule) return obj;
5321
+ if (!nodeInterop && obj && obj.__esModule) return obj;
5321
5322
  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") return { "default": obj };
5322
5323
  var cache = _getRequireWildcardCache(nodeInterop);
5323
5324
  if (cache && cache.has(obj)) return cache.get(obj);
@@ -5500,7 +5501,7 @@ var export_decode = __toESM(__commonJS({ "node_modules/.pnpm/@webassemblyjs+wasm
5500
5501
  }
5501
5502
  return ast;
5502
5503
  }
5503
- } })()).decode;
5504
+ } })(), 1).decode;
5504
5505
  function parseWasm(source, opts = {}) {
5505
5506
  let ast;
5506
5507
  try {
@@ -5532,9 +5533,6 @@ function parseWasm(source, opts = {}) {
5532
5533
  }
5533
5534
  return { modules };
5534
5535
  }
5535
-
5536
- //#endregion
5537
- //#region node_modules/.pnpm/unwasm@0.3.11/node_modules/unwasm/dist/plugin.mjs
5538
5536
  const UNWASM_EXTERNAL_PREFIX = "\0unwasm:external:";
5539
5537
  const UNWASM_EXTERNAL_RE = /(\0|\\0)unwasm:external:([^"']+)/gu;
5540
5538
  const UMWASM_HELPERS_ID = "\0unwasm:helpers";
@@ -5548,33 +5546,35 @@ async function getWasmImports(asset, _opts) {
5548
5546
  resolved: true
5549
5547
  };
5550
5548
  const { readPackageJSON } = await import("../cli/_chunks/dist.mjs");
5551
- const pkgJSON = await readPackageJSON(asset.id);
5552
- let resolved = true;
5549
+ const pkg = await readPackageJSON(asset.id);
5550
+ const resolved = true;
5553
5551
  const imports = [];
5554
5552
  const importsObject = {};
5555
5553
  for (const moduleName of importNames) {
5556
- const importNames2 = asset.imports[moduleName];
5557
- const pkgImport = pkgJSON.imports?.[moduleName] || pkgJSON.imports?.[`#${moduleName}`];
5554
+ const importNames$1 = asset.imports[moduleName];
5555
+ const importAlias = pkg.imports?.[moduleName] || pkg.imports?.[`#${moduleName}`];
5556
+ const resolved$1 = importAlias && typeof importAlias === "string" ? importAlias : resolveModulePath(moduleName, {
5557
+ from: asset.id,
5558
+ try: true
5559
+ });
5558
5560
  const importName = "_imports_" + genSafeVariableName(moduleName);
5559
- if (pkgImport && typeof pkgImport === "string") imports.push(genImport(pkgImport, {
5561
+ if (resolved$1) imports.push(genImport(resolved$1, {
5560
5562
  name: "*",
5561
5563
  as: importName
5562
5564
  }));
5563
- else resolved = false;
5564
- importsObject[moduleName] = Object.fromEntries(importNames2.map((name) => [name, pkgImport ? `${importName}[${genString(name)}]` : `() => { throw new Error(${genString(moduleName + "." + importName)} + " is not provided!")}`]));
5565
+ importsObject[moduleName] = Object.fromEntries(importNames$1.map((name) => [name, resolved$1 ? `${importName}[${genString(name)}]` : `() => { throw new Error(${genString(moduleName + "." + importName)} + " is not provided!")}`]));
5565
5566
  }
5566
5567
  return {
5567
- code: `${imports.join("\n")}
5568
-
5569
- const _imports = ${genObjectFromRaw(importsObject)}`,
5568
+ code: `${imports.join("\n")}\n\nconst _imports = ${genObjectFromRaw(importsObject)}`,
5570
5569
  resolved
5571
5570
  };
5572
5571
  }
5573
5572
  async function getWasmESMBinding(asset, opts) {
5574
- const autoImports = await getWasmImports(asset);
5573
+ const autoImports = await getWasmImports(asset, opts);
5575
5574
  const instantiateCode = opts.esmImport ? getESMImportInstantiate(asset, autoImports.code) : getBase64Instantiate(asset, autoImports.code);
5576
5575
  return opts.lazy !== true && autoImports.resolved ? getExports(asset, instantiateCode) : getLazyExports(asset, instantiateCode);
5577
5576
  }
5577
+ /** Generate WebAssembly.Module binding for compatibility */
5578
5578
  function getWasmModuleBinding(asset, opts) {
5579
5579
  return opts.esmImport ? `
5580
5580
  const _mod = ${opts.lazy === true ? "" : `await`} import("${UNWASM_EXTERNAL_PREFIX}${asset.name}").then(r => r.default || r);
@@ -5586,6 +5586,7 @@ const _mod = new WebAssembly.Module(_data);
5586
5586
  export default _mod;
5587
5587
  `;
5588
5588
  }
5589
+ /** Get the code to instantiate module with direct import */
5589
5590
  function getESMImportInstantiate(asset, importsCode) {
5590
5591
  return `
5591
5592
  ${importsCode}
@@ -5596,6 +5597,7 @@ return WebAssembly.instantiate(_mod, imports)
5596
5597
  }
5597
5598
  `;
5598
5599
  }
5600
+ /** Get the code to instantiate module from inlined base64 data */
5599
5601
  function getBase64Instantiate(asset, importsCode) {
5600
5602
  return `
5601
5603
  import { base64ToUint8Array } from "${UMWASM_HELPERS_ID}";
@@ -5607,6 +5609,7 @@ function _instantiate(imports = _imports) {
5607
5609
  return WebAssembly.instantiate(_data, imports) }
5608
5610
  `;
5609
5611
  }
5612
+ /** Get the exports code with top level await support */
5610
5613
  function getExports(asset, instantiateCode) {
5611
5614
  return `
5612
5615
  import { getExports } from "${UMWASM_HELPERS_ID}";
@@ -5622,6 +5625,7 @@ ${asset.exports.map((name) => `defaultExport["${name}"] = $exports.${name};`).jo
5622
5625
  export default defaultExport;
5623
5626
  `;
5624
5627
  }
5628
+ /** Proxied exports when imports are needed or we can't have top-level await */
5625
5629
  function getLazyExports(asset, instantiateCode) {
5626
5630
  return `
5627
5631
  import { createLazyWasmModule } from "${UMWASM_HELPERS_ID}";
@@ -5709,12 +5713,12 @@ export function createLazyWasmModule(_instantiator) {
5709
5713
  `;
5710
5714
  }
5711
5715
  const WASM_ID_RE = /\.wasm\??.*$/i;
5712
- const rollup = createUnplugin((opts) => {
5713
- const assets = /* @__PURE__ */ Object.create(null);
5714
- const _parseCache = /* @__PURE__ */ Object.create(null);
5716
+ function unwasm(opts) {
5717
+ const assets = Object.create(null);
5718
+ const _parseCache = Object.create(null);
5715
5719
  function parse(name, source) {
5716
5720
  if (_parseCache[name]) return _parseCache[name];
5717
- const imports = /* @__PURE__ */ Object.create(null);
5721
+ const imports = Object.create(null);
5718
5722
  const exports = [];
5719
5723
  try {
5720
5724
  const parsed = parseWasm(source, { name });
@@ -5736,8 +5740,9 @@ const rollup = createUnplugin((opts) => {
5736
5740
  }
5737
5741
  return {
5738
5742
  name: "unwasm",
5739
- rollup: {
5740
- async resolveId(id, importer) {
5743
+ resolveId: {
5744
+ order: "pre",
5745
+ async handler(id, importer) {
5741
5746
  if (id === UMWASM_HELPERS_ID) return id;
5742
5747
  if (id.startsWith(UNWASM_EXTERNAL_PREFIX)) return {
5743
5748
  id,
@@ -5751,43 +5756,49 @@ const rollup = createUnplugin((opts) => {
5751
5756
  moduleSideEffects: false
5752
5757
  };
5753
5758
  }
5754
- },
5755
- generateBundle() {
5756
- if (opts.esmImport) for (const asset of Object.values(assets)) this.emitFile({
5757
- type: "asset",
5758
- source: asset.source,
5759
- fileName: asset.name
5760
- });
5761
5759
  }
5762
5760
  },
5763
- async load(id) {
5764
- if (id === UMWASM_HELPERS_ID) return getPluginUtils();
5765
- if (!WASM_ID_RE.test(id)) return;
5766
- const idPath = id.split("?")[0];
5767
- if (!existsSync(idPath)) return;
5768
- this.addWatchFile(idPath);
5769
- return (await promises.readFile(idPath)).toString("binary");
5761
+ generateBundle() {
5762
+ if (opts.esmImport) for (const asset of Object.values(assets)) this.emitFile({
5763
+ type: "asset",
5764
+ source: asset.source,
5765
+ fileName: asset.name
5766
+ });
5770
5767
  },
5771
- async transform(code, id) {
5772
- if (!WASM_ID_RE.test(id)) return;
5773
- const buff = Buffer.from(code, "binary");
5774
- const isModule = id.endsWith("?module");
5775
- const name = `wasm/${basename(id.split("?")[0], ".wasm")}-${sha1(buff)}.wasm`;
5776
- const parsed = isModule ? {
5777
- imports: [],
5778
- exports: ["default"]
5779
- } : parse(name, buff);
5780
- const asset = assets[name] = {
5781
- name,
5782
- id,
5783
- source: buff,
5784
- imports: parsed.imports,
5785
- exports: parsed.exports
5786
- };
5787
- return {
5788
- code: isModule ? await getWasmModuleBinding(asset, opts) : await getWasmESMBinding(asset, opts),
5789
- map: { mappings: "" }
5790
- };
5768
+ load: {
5769
+ order: "pre",
5770
+ async handler(id) {
5771
+ if (id === UMWASM_HELPERS_ID) return getPluginUtils();
5772
+ if (!WASM_ID_RE.test(id)) return;
5773
+ const idPath = id.split("?")[0];
5774
+ if (!existsSync(idPath)) return;
5775
+ this.addWatchFile(idPath);
5776
+ return (await promises.readFile(idPath)).toString("binary");
5777
+ }
5778
+ },
5779
+ transform: {
5780
+ order: "pre",
5781
+ async handler(code, id) {
5782
+ if (!WASM_ID_RE.test(id)) return;
5783
+ const buff = Buffer.from(code, "binary");
5784
+ const isModule = id.endsWith("?module");
5785
+ const name = `wasm/${basename(id.split("?")[0], ".wasm")}-${sha1(buff)}.wasm`;
5786
+ const parsed = isModule ? {
5787
+ imports: [],
5788
+ exports: ["default"]
5789
+ } : parse(name, buff);
5790
+ const asset = assets[name] = {
5791
+ name,
5792
+ id,
5793
+ source: buff,
5794
+ imports: parsed.imports,
5795
+ exports: parsed.exports
5796
+ };
5797
+ return {
5798
+ code: isModule ? await getWasmModuleBinding(asset, opts) : await getWasmESMBinding(asset, opts),
5799
+ map: { mappings: "" }
5800
+ };
5801
+ }
5791
5802
  },
5792
5803
  renderChunk(code, chunk) {
5793
5804
  if (!opts.esmImport) return;
@@ -5819,7 +5830,9 @@ const rollup = createUnplugin((opts) => {
5819
5830
  };
5820
5831
  }
5821
5832
  };
5822
- }).rollup;
5833
+ }
5834
+ /** @deprecated use unwasm export */
5835
+ const rollup = unwasm;
5823
5836
 
5824
5837
  //#endregion
5825
5838
  export { rollup as t };
@@ -9,7 +9,7 @@ import { createHash } from "node:crypto";
9
9
  import { isCSSRequest, normalizePath } from "vite";
10
10
  import assert$1 from "node:assert/strict";
11
11
 
12
- //#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@7.1.12_@types+node@24.9.2_jiti@2.6.1_ligh_862ed611dda58ad3dd2cf16e8f22f63d/node_modules/@pi0/vite-plugin-fullstack/dist/index.js
12
+ //#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@7.1.12_@types+node@24.10.0_jiti@2.6.1_lig_3b9794b2cdb89cbf22b72e909c62c5fa/node_modules/@pi0/vite-plugin-fullstack/dist/index.js
13
13
  function parseIdQuery(id) {
14
14
  if (!id.includes("?")) return {
15
15
  filename: id,
package/dist/builder.mjs CHANGED
@@ -13,10 +13,10 @@ import "./_libs/tinyglobby.mjs";
13
13
  import "./_libs/compatx.mjs";
14
14
  import "./_libs/klona.mjs";
15
15
  import "./_libs/std-env.mjs";
16
- import { a as createNitro, c as loadOptions, i as build, n as prepare, o as listTasks, r as copyPublicAssets, s as runTask, t as prerender } from "./_chunks/C8pztJ87.mjs";
16
+ import { a as createNitro, c as loadOptions, i as build, n as prepare, o as listTasks, r as copyPublicAssets, s as runTask, t as prerender } from "./_chunks/vJX08MVt.mjs";
17
17
  import "./_libs/escape-string-regexp.mjs";
18
18
  import "./_libs/dot-prop.mjs";
19
- import { n as writeTypes } from "./_chunks/obQOKJCv.mjs";
19
+ import { n as writeTypes } from "./_chunks/DnETaDxL.mjs";
20
20
  import "./_libs/rou3.mjs";
21
21
  import "./_libs/mime.mjs";
22
22
  import "./_libs/pathe.mjs";
@@ -624,7 +624,7 @@ function createStyleSheet() {
624
624
  .dumper-dump pre {
625
625
  line-height: 24px;
626
626
  font-size: 15px;
627
- overflow-x: scroll;
627
+ overflow-x: auto;
628
628
  position:relative;
629
629
  z-index:99999;
630
630
  padding: 10px 15px;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poppinss/dumper",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Pretty print JavaScript data types in the terminal and the browser",
5
5
  "main": "build/index.js",
6
6
  "type": "module",