@nuxt/nitro-server-nightly 4.5.2-29762776.d87d1578 → 4.5.2-29764015.2fb5ee82

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.
package/dist/index.mjs CHANGED
@@ -22,7 +22,7 @@ import { ImpoundPlugin } from "impound";
22
22
  import { resolveModulePath } from "exsolve";
23
23
  import { runtimeDependencies } from "nitropack/runtime/meta";
24
24
  //#region package.json
25
- var version = "4.5.2-29762776.d87d1578";
25
+ var version = "4.5.2-29764015.2fb5ee82";
26
26
  //#endregion
27
27
  //#region src/utils.ts
28
28
  function toArray(value) {
@@ -1049,7 +1049,8 @@ function relativeWithDot(from, to) {
1049
1049
  }
1050
1050
  async function spaLoadingTemplatePath(nuxt) {
1051
1051
  if (typeof nuxt.options.spaLoadingTemplate === "string") return resolve(nuxt.options.srcDir, nuxt.options.spaLoadingTemplate);
1052
- return await findPath(nuxt.options._layers.map((layer) => resolve(layer.config.srcDir, layer.config.dir?.app || "app", "spa-loading-template.html"))) ?? resolve(nuxt.options.srcDir, nuxt.options.dir?.app || "app", "spa-loading-template.html");
1052
+ const possiblePaths = nuxt.options._layers.map((layer) => resolve(layer.config.srcDir, layer.config.dir?.app || "app", "spa-loading-template.html"));
1053
+ return await findPath(possiblePaths) ?? resolve(nuxt.options.srcDir, nuxt.options.dir?.app || "app", "spa-loading-template.html");
1053
1054
  }
1054
1055
  function getDevHandlerAllowedHosts(nuxt) {
1055
1056
  const allowedHosts = nuxt.options.vite?.server?.allowedHosts;
@@ -31,10 +31,13 @@ const handler = defineEventHandler(async (event) => {
31
31
  if (!import.meta.prerender) return toResponse(event, await renderIsland(event));
32
32
  const islandPath = (event.path || "").replace(/\?.*$/, "");
33
33
  const stack = prerenderRenderingURLs.getStore();
34
- if (stack?.includes(islandPath)) throw createError({
35
- statusCode: 508,
36
- statusMessage: `Loop detected while prerendering island "${islandPath}" (${[...stack, islandPath].map((url) => `"${url}"`).join(" -> ")}).`
37
- });
34
+ if (stack?.includes(islandPath)) {
35
+ const chain = [...stack, islandPath].map((url) => `"${url}"`).join(" -> ");
36
+ throw createError({
37
+ statusCode: 508,
38
+ statusMessage: `Loop detected while prerendering island "${islandPath}" (${chain}).`
39
+ });
40
+ }
38
41
  const inFlight = !stack?.some((url) => url.startsWith(ISLAND_PATH_PREFIX)) && inFlightIslands.get(islandPath);
39
42
  if (!inFlight) return toResponse(event, await prerenderIsland(event, islandPath));
40
43
  const shared = await inFlight.catch((error) => {
@@ -46,10 +46,13 @@ const handler = defineRenderHandler((event) => {
46
46
  if (import.meta.prerender && prerenderRenderingURLs) {
47
47
  const renderingURL = event.path;
48
48
  const stack = prerenderRenderingURLs.getStore();
49
- if (stack?.includes(renderingURL)) throw createError({
50
- status: 508,
51
- statusText: `Loop detected while prerendering "${renderingURL}" (${[...stack, renderingURL].filter((url) => !url.startsWith("/__nuxt_error")).map((url) => `"${url}"`).join(" -> ")}). Check for \`useFetch\`/\`$fetch\` calls targeting a URL that is currently being rendered.`
52
- });
49
+ if (stack?.includes(renderingURL)) {
50
+ const chain = [...stack, renderingURL].filter((url) => !url.startsWith("/__nuxt_error")).map((url) => `"${url}"`).join(" -> ");
51
+ throw createError({
52
+ status: 508,
53
+ statusText: `Loop detected while prerendering "${renderingURL}" (${chain}). Check for \`useFetch\`/\`$fetch\` calls targeting a URL that is currently being rendered.`
54
+ });
55
+ }
53
56
  return prerenderRenderingURLs.run([...stack || [], renderingURL], () => renderRoute(event, ssrError));
54
57
  }
55
58
  return renderRoute(event, ssrError);
@@ -525,7 +528,8 @@ function getPayloadCacheKey(url) {
525
528
  }
526
529
  function buildPayloadURL(ssrContext) {
527
530
  const url = new URL(ssrContext.url, "http://localhost");
528
- const payloadURL = joinURL(ssrContext.runtimeConfig.app.cdnURL || ssrContext.runtimeConfig.app.baseURL, url.pathname, PAYLOAD_FILENAME);
531
+ const baseURL = ssrContext.runtimeConfig.app.cdnURL || ssrContext.runtimeConfig.app.baseURL;
532
+ const payloadURL = joinURL(baseURL, url.pathname, PAYLOAD_FILENAME);
529
533
  url.searchParams.set(PAYLOAD_BUILD_ID_PARAM, ssrContext.runtimeConfig.app.buildId);
530
534
  return payloadURL + url.search;
531
535
  }
@@ -12,7 +12,7 @@ const template = (messages) => {
12
12
  ..._messages,
13
13
  ...messages
14
14
  };
15
- return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.status) + " - " + escapeHtml(messages.statusText) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1,minimum-scale=1\" name=\"viewport\"><script>!function(){let e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(let e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(let t of e)if(\"childList\"===t.type)for(let e of t.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;let r=function(e){let r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),\"use-credentials\"===e.crossOrigin?r.credentials=\"include\":\"anonymous\"===e.crossOrigin?r.credentials=\"omit\":r.credentials=\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script><style>*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.grid{display:grid}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-\\[80px\\]{font-size:80px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[\\#020420\\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#64748B\\]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (width>=640px){.sm\\:text-\\[110px\\]{font-size:110px}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}</style></head><body class=\"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide\"><div class=\"max-w-520px text-center\"><h1 class=\"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]\">" + escapeHtml(messages.status) + "</h1><h2 class=\"font-semibold mb-2 sm:text-3xl text-2xl\">" + escapeHtml(messages.statusText) + "</h2><p class=\"mb-4 px-2 text-[#64748B] text-md\">" + escapeHtml(messages.description) + "</p></div></body></html>";
15
+ return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.status) + " - " + escapeHtml(messages.statusText) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1,minimum-scale=1\" name=\"viewport\"><script>!function(){let e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(let e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(let t of e)if(\"childList\"===t.type)for(let e of t.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;let r=function(e){let r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),r.credentials=\"use-credentials\"===e.crossOrigin?\"include\":\"anonymous\"===e.crossOrigin?\"omit\":\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script><style>*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.grid{display:grid}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-\\[80px\\]{font-size:80px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[\\#020420\\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#64748B\\]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (width>=640px){.sm\\:text-\\[110px\\]{font-size:110px}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}</style></head><body class=\"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide\"><div class=\"max-w-520px text-center\"><h1 class=\"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]\">" + escapeHtml(messages.status) + "</h1><h2 class=\"font-semibold mb-2 sm:text-3xl text-2xl\">" + escapeHtml(messages.statusText) + "</h2><p class=\"mb-4 px-2 text-[#64748B] text-md\">" + escapeHtml(messages.description) + "</p></div></body></html>";
16
16
  };
17
17
  //#endregion
18
18
  export { template };
@@ -1,6 +1,6 @@
1
1
  //#region src/runtime/utils/island-props.ts
2
2
  /** @internal */
3
- const MAX_ISLAND_BODY_BYTES = 64 * 1024;
3
+ const MAX_ISLAND_BODY_BYTES = 65536;
4
4
  /** @internal */
5
5
  const MAX_ISLAND_PROP_DEPTH = 64;
6
6
  /**
@@ -18,8 +18,9 @@ const getPrecomputedDependencies = () => import("nuxt/precomputed").then((r) =>
18
18
  const getSSRRenderer = lazyCachedFunction(async () => {
19
19
  const createSSRApp = await getServerEntry();
20
20
  if (!createSSRApp) throw serverDiagnostics.NUXT_E8004();
21
+ const precomputed = import.meta.dev ? void 0 : await getPrecomputedDependencies();
21
22
  const renderer = createRenderer(createSSRApp, {
22
- precomputed: import.meta.dev ? void 0 : await getPrecomputedDependencies(),
23
+ precomputed,
23
24
  manifest: import.meta.dev ? await getClientManifest() : void 0,
24
25
  renderToString: renderToString$1,
25
26
  buildAssetsURL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/nitro-server-nightly",
3
- "version": "4.5.2-29762776.d87d1578",
3
+ "version": "4.5.2-29764015.2fb5ee82",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@nuxt/devalue": "^2.0.2",
35
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.5.2-29762776.d87d1578",
35
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.5.2-29764015.2fb5ee82",
36
36
  "@unhead/vue": "^3.2.3",
37
37
  "@vue/shared": "^3.5.40",
38
38
  "consola": "^3.4.2",
@@ -64,7 +64,7 @@
64
64
  "@babel/plugin-proposal-decorators": "^7.25.0 || ^8.0.0",
65
65
  "@babel/plugin-syntax-typescript": "^7.25.0 || ^8.0.0",
66
66
  "@rollup/plugin-babel": "^6.0.0 || ^7.0.0",
67
- "nuxt": "npm:nuxt-nightly@4.5.2-29762776.d87d1578"
67
+ "nuxt": "npm:nuxt-nightly@4.5.2-29764015.2fb5ee82"
68
68
  },
69
69
  "peerDependenciesMeta": {
70
70
  "@babel/plugin-proposal-decorators": {
@@ -80,9 +80,9 @@
80
80
  "devDependencies": {
81
81
  "@babel/plugin-proposal-decorators": "8.0.2",
82
82
  "@babel/plugin-syntax-typescript": "8.0.3",
83
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.5.2-29762776.d87d1578",
83
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.5.2-29764015.2fb5ee82",
84
84
  "@rollup/plugin-babel": "7.1.0",
85
- "nuxt": "npm:nuxt-nightly@4.5.2-29762776.d87d1578",
85
+ "nuxt": "npm:nuxt-nightly@4.5.2-29764015.2fb5ee82",
86
86
  "tsdown": "0.22.14",
87
87
  "vitest": "4.1.10"
88
88
  },