@nuxt/nitro-server-nightly 4.3.0-29461891.8f4fbecd → 4.3.0-29466366.fa21bb17
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.d.mts +178 -80
- package/dist/index.mjs +664 -810
- package/dist/runtime/handlers/{error.d.ts → error.d.mts} +1 -1
- package/dist/runtime/handlers/error.mjs +77 -0
- package/dist/runtime/handlers/island.d.mts +2 -0
- package/dist/runtime/handlers/island.mjs +120 -0
- package/dist/runtime/handlers/renderer.d.mts +2 -0
- package/dist/runtime/handlers/renderer.mjs +298 -0
- package/dist/runtime/middleware/no-ssr.d.mts +2 -0
- package/dist/runtime/middleware/no-ssr.mjs +7 -0
- package/dist/runtime/plugins/dev-server-logs.d.mts +2 -0
- package/dist/runtime/plugins/dev-server-logs.mjs +94 -0
- package/dist/runtime/templates/error-500.mjs +15 -0
- package/dist/runtime/utils/app-config.d.mts +3 -0
- package/dist/runtime/utils/app-config.mjs +31 -0
- package/dist/runtime/utils/cache.d.mts +5 -0
- package/dist/runtime/utils/{cache.js → cache.mjs} +13 -12
- package/dist/runtime/utils/config.d.mts +1 -0
- package/dist/runtime/utils/{dev.d.ts → dev.d.mts} +1 -1
- package/dist/runtime/utils/{dev.js → dev.mjs} +15 -27
- package/dist/runtime/utils/error.d.mts +6 -0
- package/dist/runtime/utils/error.mjs +15 -0
- package/dist/runtime/utils/paths.mjs +19 -0
- package/dist/runtime/utils/renderer/{app.d.ts → app.d.mts} +4 -4
- package/dist/runtime/utils/renderer/app.mjs +39 -0
- package/dist/runtime/utils/renderer/build-files.d.mts +18 -0
- package/dist/runtime/utils/renderer/build-files.mjs +100 -0
- package/dist/runtime/utils/renderer/{inline-styles.d.ts → inline-styles.d.mts} +1 -1
- package/dist/runtime/utils/renderer/inline-styles.mjs +13 -0
- package/dist/runtime/utils/renderer/{islands.d.ts → islands.d.mts} +5 -5
- package/dist/runtime/utils/renderer/islands.mjs +87 -0
- package/dist/runtime/utils/renderer/payload.d.mts +24 -0
- package/dist/runtime/utils/renderer/payload.mjs +64 -0
- package/package.json +8 -8
- package/dist/index.d.ts +0 -87
- package/dist/runtime/handlers/error.js +0 -65
- package/dist/runtime/handlers/island.d.ts +0 -4
- package/dist/runtime/handlers/island.js +0 -101
- package/dist/runtime/handlers/renderer.d.ts +0 -2
- package/dist/runtime/handlers/renderer.js +0 -237
- package/dist/runtime/middleware/no-ssr.d.ts +0 -2
- package/dist/runtime/middleware/no-ssr.js +0 -7
- package/dist/runtime/plugins/dev-server-logs.d.ts +0 -3
- package/dist/runtime/plugins/dev-server-logs.js +0 -82
- package/dist/runtime/templates/error-500.js +0 -6
- package/dist/runtime/utils/app-config.d.ts +0 -3
- package/dist/runtime/utils/app-config.js +0 -25
- package/dist/runtime/utils/cache-driver.d.ts +0 -6
- package/dist/runtime/utils/cache.d.ts +0 -8
- package/dist/runtime/utils/config.d.ts +0 -1
- package/dist/runtime/utils/error.d.ts +0 -6
- package/dist/runtime/utils/error.js +0 -11
- package/dist/runtime/utils/paths.js +0 -16
- package/dist/runtime/utils/renderer/app.js +0 -34
- package/dist/runtime/utils/renderer/build-files.d.ts +0 -16
- package/dist/runtime/utils/renderer/build-files.js +0 -86
- package/dist/runtime/utils/renderer/inline-styles.js +0 -13
- package/dist/runtime/utils/renderer/islands.js +0 -82
- package/dist/runtime/utils/renderer/payload.d.ts +0 -24
- package/dist/runtime/utils/renderer/payload.js +0 -67
- /package/dist/runtime/templates/{error-500.d.ts → error-500.d.mts} +0 -0
- /package/dist/runtime/utils/{config.js → config.mjs} +0 -0
- /package/dist/runtime/utils/{paths.d.ts → paths.d.mts} +0 -0
package/dist/index.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Nuxt } from '@nuxt/schema';
|
|
2
|
-
import { Nitro } from 'nitropack/types';
|
|
3
|
-
import { H3Event } from 'h3';
|
|
4
|
-
import { LogObject } from 'consola';
|
|
5
|
-
import { NuxtRenderHTMLContext, NuxtIslandResponse, NuxtIslandContext } from 'nuxt/app';
|
|
6
|
-
import { RuntimeConfig } from 'nuxt/schema';
|
|
7
|
-
|
|
8
|
-
declare module 'nitropack' {
|
|
9
|
-
interface NitroRuntimeConfigApp {
|
|
10
|
-
buildAssetsDir: string;
|
|
11
|
-
cdnURL: string;
|
|
12
|
-
}
|
|
13
|
-
interface NitroRouteRules {
|
|
14
|
-
ssr?: boolean;
|
|
15
|
-
noScripts?: boolean;
|
|
16
|
-
/** @deprecated Use `noScripts` instead */
|
|
17
|
-
experimentalNoScripts?: boolean;
|
|
18
|
-
appMiddleware?: Record<string, boolean>;
|
|
19
|
-
appLayout?: string | false;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
declare module 'nitropack' {
|
|
23
|
-
interface NitroRuntimeConfig extends RuntimeConfig {
|
|
24
|
-
}
|
|
25
|
-
interface NitroRouteConfig {
|
|
26
|
-
ssr?: boolean;
|
|
27
|
-
noScripts?: boolean;
|
|
28
|
-
/** @deprecated Use `noScripts` instead */
|
|
29
|
-
experimentalNoScripts?: boolean;
|
|
30
|
-
}
|
|
31
|
-
interface NitroRuntimeHooks {
|
|
32
|
-
'dev:ssr-logs': (ctx: {
|
|
33
|
-
logs: LogObject[];
|
|
34
|
-
path: string;
|
|
35
|
-
}) => void | Promise<void>;
|
|
36
|
-
'render:html': (htmlContext: NuxtRenderHTMLContext, context: {
|
|
37
|
-
event: H3Event;
|
|
38
|
-
}) => void | Promise<void>;
|
|
39
|
-
'render:island': (islandResponse: NuxtIslandResponse, context: {
|
|
40
|
-
event: H3Event;
|
|
41
|
-
islandContext: NuxtIslandContext;
|
|
42
|
-
}) => void | Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
declare module 'nitropack/types' {
|
|
46
|
-
interface NitroRuntimeConfigApp {
|
|
47
|
-
buildAssetsDir: string;
|
|
48
|
-
cdnURL: string;
|
|
49
|
-
}
|
|
50
|
-
interface NitroRouteRules {
|
|
51
|
-
ssr?: boolean;
|
|
52
|
-
noScripts?: boolean;
|
|
53
|
-
/** @deprecated Use `noScripts` instead */
|
|
54
|
-
experimentalNoScripts?: boolean;
|
|
55
|
-
appMiddleware?: Record<string, boolean>;
|
|
56
|
-
appLayout?: string | false;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
declare module 'nitropack/types' {
|
|
60
|
-
interface NitroRuntimeConfig extends RuntimeConfig {
|
|
61
|
-
}
|
|
62
|
-
interface NitroRouteConfig {
|
|
63
|
-
ssr?: boolean;
|
|
64
|
-
noScripts?: boolean;
|
|
65
|
-
/** @deprecated Use `noScripts` instead */
|
|
66
|
-
experimentalNoScripts?: boolean;
|
|
67
|
-
}
|
|
68
|
-
interface NitroRuntimeHooks {
|
|
69
|
-
'dev:ssr-logs': (ctx: {
|
|
70
|
-
logs: LogObject[];
|
|
71
|
-
path: string;
|
|
72
|
-
}) => void | Promise<void>;
|
|
73
|
-
'render:html': (htmlContext: NuxtRenderHTMLContext, context: {
|
|
74
|
-
event: H3Event;
|
|
75
|
-
}) => void | Promise<void>;
|
|
76
|
-
'render:island': (islandResponse: NuxtIslandResponse, context: {
|
|
77
|
-
event: H3Event;
|
|
78
|
-
islandContext: NuxtIslandContext;
|
|
79
|
-
}) => void | Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
declare function bundle(nuxt: Nuxt & {
|
|
84
|
-
_nitro?: Nitro;
|
|
85
|
-
}): Promise<void>;
|
|
86
|
-
|
|
87
|
-
export { bundle };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { joinURL, withQuery, withoutBase } from "ufo";
|
|
2
|
-
import { appendResponseHeader, getRequestHeaders, send, setResponseHeader, setResponseHeaders, setResponseStatus } from "h3";
|
|
3
|
-
import { useNitroApp, useRuntimeConfig } from "nitropack/runtime";
|
|
4
|
-
import { isJsonRequest } from "../utils/error.js";
|
|
5
|
-
import { generateErrorOverlayHTML } from "../utils/dev.js";
|
|
6
|
-
export default (async function errorhandler(error, event, { defaultHandler }) {
|
|
7
|
-
if (event.handled || isJsonRequest(event)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const defaultRes = await defaultHandler(error, event, { json: true });
|
|
11
|
-
const status = error.status || error.statusCode || 500;
|
|
12
|
-
if (status === 404 && defaultRes.status === 302) {
|
|
13
|
-
setResponseHeaders(event, defaultRes.headers);
|
|
14
|
-
setResponseStatus(event, defaultRes.status, defaultRes.statusText);
|
|
15
|
-
return send(event, JSON.stringify(defaultRes.body, null, 2));
|
|
16
|
-
}
|
|
17
|
-
if (import.meta.dev && typeof defaultRes.body !== "string" && Array.isArray(defaultRes.body.stack)) {
|
|
18
|
-
defaultRes.body.stack = defaultRes.body.stack.join("\n");
|
|
19
|
-
}
|
|
20
|
-
const errorObject = defaultRes.body;
|
|
21
|
-
const url = new URL(errorObject.url);
|
|
22
|
-
errorObject.url = withoutBase(url.pathname, useRuntimeConfig(event).app.baseURL) + url.search + url.hash;
|
|
23
|
-
errorObject.message ||= "Server Error";
|
|
24
|
-
errorObject.data ||= error.data;
|
|
25
|
-
errorObject.statusText ||= error.statusText || error.statusMessage;
|
|
26
|
-
delete defaultRes.headers["content-type"];
|
|
27
|
-
delete defaultRes.headers["content-security-policy"];
|
|
28
|
-
setResponseHeaders(event, defaultRes.headers);
|
|
29
|
-
const reqHeaders = getRequestHeaders(event);
|
|
30
|
-
const isRenderingError = event.path.startsWith("/__nuxt_error") || !!reqHeaders["x-nuxt-error"];
|
|
31
|
-
const res = isRenderingError ? null : await useNitroApp().localFetch(
|
|
32
|
-
withQuery(joinURL(useRuntimeConfig(event).app.baseURL, "/__nuxt_error"), errorObject),
|
|
33
|
-
{
|
|
34
|
-
headers: { ...reqHeaders, "x-nuxt-error": "true" },
|
|
35
|
-
redirect: "manual"
|
|
36
|
-
}
|
|
37
|
-
).catch(() => null);
|
|
38
|
-
if (event.handled) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (!res) {
|
|
42
|
-
const { template } = await import("../templates/error-500.js");
|
|
43
|
-
if (import.meta.dev) {
|
|
44
|
-
errorObject.description = errorObject.message;
|
|
45
|
-
}
|
|
46
|
-
setResponseHeader(event, "Content-Type", "text/html;charset=UTF-8");
|
|
47
|
-
return send(event, template(errorObject));
|
|
48
|
-
}
|
|
49
|
-
const html = await res.text();
|
|
50
|
-
for (const [header, value] of res.headers.entries()) {
|
|
51
|
-
if (header === "set-cookie") {
|
|
52
|
-
appendResponseHeader(event, header, value);
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
setResponseHeader(event, header, value);
|
|
56
|
-
}
|
|
57
|
-
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
58
|
-
if (import.meta.dev && !import.meta.test && typeof html === "string") {
|
|
59
|
-
const prettyResponse = await defaultHandler(error, event, { json: false });
|
|
60
|
-
if (typeof prettyResponse.body === "string") {
|
|
61
|
-
return send(event, html.replace("</body>", `${generateErrorOverlayHTML(prettyResponse.body, { startMinimized: 300 <= status && status < 500 })}</body>`));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return send(event, html);
|
|
65
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RenderResponse } from 'nitropack/types';
|
|
2
|
-
import type { NuxtIslandResponse } from 'nuxt/app';
|
|
3
|
-
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<NuxtIslandResponse | Partial<RenderResponse>>>;
|
|
4
|
-
export default _default;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { useNitroApp } from "nitropack/runtime";
|
|
2
|
-
import { destr } from "destr";
|
|
3
|
-
import { defineEventHandler, getQuery, readBody, setResponseHeaders } from "h3";
|
|
4
|
-
import { resolveUnrefHeadInput } from "@unhead/vue";
|
|
5
|
-
import { getRequestDependencies } from "vue-bundle-renderer/runtime";
|
|
6
|
-
import { getQuery as getURLQuery } from "ufo";
|
|
7
|
-
import { islandCache, islandPropCache } from "../utils/cache.js";
|
|
8
|
-
import { createSSRContext } from "../utils/renderer/app.js";
|
|
9
|
-
import { getSSRRenderer } from "../utils/renderer/build-files.js";
|
|
10
|
-
import { renderInlineStyles } from "../utils/renderer/inline-styles.js";
|
|
11
|
-
import { getClientIslandResponse, getServerComponentHTML, getSlotIslandResponse } from "../utils/renderer/islands.js";
|
|
12
|
-
const ISLAND_SUFFIX_RE = /\.json(?:\?.*)?$/;
|
|
13
|
-
export default defineEventHandler(async (event) => {
|
|
14
|
-
const nitroApp = useNitroApp();
|
|
15
|
-
setResponseHeaders(event, {
|
|
16
|
-
"content-type": "application/json;charset=utf-8",
|
|
17
|
-
"x-powered-by": "Nuxt"
|
|
18
|
-
});
|
|
19
|
-
if (import.meta.prerender && event.path && await islandCache.hasItem(event.path)) {
|
|
20
|
-
return islandCache.getItem(event.path);
|
|
21
|
-
}
|
|
22
|
-
const islandContext = await getIslandContext(event);
|
|
23
|
-
const ssrContext = {
|
|
24
|
-
...createSSRContext(event),
|
|
25
|
-
islandContext,
|
|
26
|
-
noSSR: false,
|
|
27
|
-
url: islandContext.url
|
|
28
|
-
};
|
|
29
|
-
const renderer = await getSSRRenderer();
|
|
30
|
-
const renderResult = await renderer.renderToString(ssrContext).catch(async (err) => {
|
|
31
|
-
await ssrContext.nuxt?.hooks.callHook("app:error", err);
|
|
32
|
-
throw err;
|
|
33
|
-
});
|
|
34
|
-
if (ssrContext.payload?.error) {
|
|
35
|
-
throw ssrContext.payload.error;
|
|
36
|
-
}
|
|
37
|
-
const inlinedStyles = await renderInlineStyles(ssrContext.modules ?? []);
|
|
38
|
-
await ssrContext.nuxt?.hooks.callHook("app:rendered", { ssrContext, renderResult });
|
|
39
|
-
if (inlinedStyles.length) {
|
|
40
|
-
ssrContext.head.push({ style: inlinedStyles });
|
|
41
|
-
}
|
|
42
|
-
if (import.meta.dev) {
|
|
43
|
-
const { styles } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
|
44
|
-
const link = [];
|
|
45
|
-
for (const resource of Object.values(styles)) {
|
|
46
|
-
if ("inline" in getURLQuery(resource.file)) {
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (resource.file.includes("scoped") && !resource.file.includes("pages/")) {
|
|
50
|
-
link.push({ rel: "stylesheet", href: renderer.rendererContext.buildAssetsURL(resource.file), crossorigin: "" });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (link.length) {
|
|
54
|
-
ssrContext.head.push({ link }, { mode: "server" });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const islandHead = {};
|
|
58
|
-
for (const entry of ssrContext.head.entries.values()) {
|
|
59
|
-
for (const [key, value] of Object.entries(resolveUnrefHeadInput(entry.input))) {
|
|
60
|
-
const currentValue = islandHead[key];
|
|
61
|
-
if (Array.isArray(currentValue)) {
|
|
62
|
-
currentValue.push(...value);
|
|
63
|
-
} else {
|
|
64
|
-
islandHead[key] = value;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
const islandResponse = {
|
|
69
|
-
id: islandContext.id,
|
|
70
|
-
head: islandHead,
|
|
71
|
-
html: getServerComponentHTML(renderResult.html),
|
|
72
|
-
components: getClientIslandResponse(ssrContext),
|
|
73
|
-
slots: getSlotIslandResponse(ssrContext)
|
|
74
|
-
};
|
|
75
|
-
await nitroApp.hooks.callHook("render:island", islandResponse, { event, islandContext });
|
|
76
|
-
if (import.meta.prerender) {
|
|
77
|
-
await islandCache.setItem(`/__nuxt_island/${islandContext.name}_${islandContext.id}.json`, islandResponse);
|
|
78
|
-
await islandPropCache.setItem(`/__nuxt_island/${islandContext.name}_${islandContext.id}.json`, event.path);
|
|
79
|
-
}
|
|
80
|
-
return islandResponse;
|
|
81
|
-
});
|
|
82
|
-
async function getIslandContext(event) {
|
|
83
|
-
let url = event.path || "";
|
|
84
|
-
if (import.meta.prerender && event.path && await islandPropCache.hasItem(event.path)) {
|
|
85
|
-
url = await islandPropCache.getItem(event.path);
|
|
86
|
-
}
|
|
87
|
-
const componentParts = url.substring("/__nuxt_island".length + 1).replace(ISLAND_SUFFIX_RE, "").split("_");
|
|
88
|
-
const hashId = componentParts.length > 1 ? componentParts.pop() : void 0;
|
|
89
|
-
const componentName = componentParts.join("_");
|
|
90
|
-
const context = event.method === "GET" ? getQuery(event) : await readBody(event);
|
|
91
|
-
const ctx = {
|
|
92
|
-
url: "/",
|
|
93
|
-
...context,
|
|
94
|
-
id: hashId,
|
|
95
|
-
name: componentName,
|
|
96
|
-
props: destr(context.props) || {},
|
|
97
|
-
slots: {},
|
|
98
|
-
components: {}
|
|
99
|
-
};
|
|
100
|
-
return ctx;
|
|
101
|
-
}
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
import { getPrefetchLinks, getPreloadLinks, getRequestDependencies, renderResourceHeaders } from "vue-bundle-renderer/runtime";
|
|
3
|
-
import { appendResponseHeader, createError, getQuery, getResponseStatus, getResponseStatusText, writeEarlyHints } from "h3";
|
|
4
|
-
import { getQuery as getURLQuery, joinURL } from "ufo";
|
|
5
|
-
import { propsToString, renderSSRHead } from "@unhead/vue/server";
|
|
6
|
-
import destr from "destr";
|
|
7
|
-
import { defineRenderHandler, getRouteRules, useNitroApp } from "nitropack/runtime";
|
|
8
|
-
import { getRenderer } from "../utils/renderer/build-files.js";
|
|
9
|
-
import { payloadCache } from "../utils/cache.js";
|
|
10
|
-
import { renderPayloadJsonScript, renderPayloadResponse, renderPayloadScript, splitPayload } from "../utils/renderer/payload.js";
|
|
11
|
-
import { createSSRContext, setSSRError } from "../utils/renderer/app.js";
|
|
12
|
-
import { renderInlineStyles } from "../utils/renderer/inline-styles.js";
|
|
13
|
-
import { replaceIslandTeleports } from "../utils/renderer/islands.js";
|
|
14
|
-
import { renderSSRHeadOptions } from "#internal/unhead.config.mjs";
|
|
15
|
-
import { NUXT_ASYNC_CONTEXT, NUXT_EARLY_HINTS, NUXT_INLINE_STYLES, NUXT_JSON_PAYLOADS, NUXT_NO_SCRIPTS, NUXT_PAYLOAD_EXTRACTION, NUXT_RUNTIME_PAYLOAD_EXTRACTION, PARSE_ERROR_DATA } from "#internal/nuxt/nitro-config.mjs";
|
|
16
|
-
import { appHead, appTeleportAttrs, appTeleportTag, componentIslands, appManifest as isAppManifestEnabled } from "#internal/nuxt.config.mjs";
|
|
17
|
-
import entryIds from "#internal/nuxt/entry-ids.mjs";
|
|
18
|
-
import { entryFileName } from "#internal/entry-chunk.mjs";
|
|
19
|
-
import { buildAssetsURL, publicAssetsURL } from "#internal/nuxt/paths";
|
|
20
|
-
import { relative } from "pathe";
|
|
21
|
-
globalThis.__buildAssetsURL = buildAssetsURL;
|
|
22
|
-
globalThis.__publicAssetsURL = publicAssetsURL;
|
|
23
|
-
if (NUXT_ASYNC_CONTEXT && !("AsyncLocalStorage" in globalThis)) {
|
|
24
|
-
globalThis.AsyncLocalStorage = AsyncLocalStorage;
|
|
25
|
-
}
|
|
26
|
-
const HAS_APP_TELEPORTS = !!(appTeleportTag && appTeleportAttrs.id);
|
|
27
|
-
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : "";
|
|
28
|
-
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : "";
|
|
29
|
-
const PAYLOAD_URL_RE = NUXT_JSON_PAYLOADS ? /^[^?]*\/_payload.json(?:\?.*)?$/ : /^[^?]*\/_payload.js(?:\?.*)?$/;
|
|
30
|
-
const PAYLOAD_FILENAME = NUXT_JSON_PAYLOADS ? "_payload.json" : "_payload.js";
|
|
31
|
-
let entryPath;
|
|
32
|
-
export default defineRenderHandler(async (event) => {
|
|
33
|
-
const nitroApp = useNitroApp();
|
|
34
|
-
const ssrError = event.path.startsWith("/__nuxt_error") ? getQuery(event) : null;
|
|
35
|
-
if (ssrError && !("__unenv__" in event.node.req)) {
|
|
36
|
-
throw createError({
|
|
37
|
-
status: 404,
|
|
38
|
-
statusText: "Page Not Found: /__nuxt_error",
|
|
39
|
-
message: "Page Not Found: /__nuxt_error"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const ssrContext = createSSRContext(event);
|
|
43
|
-
const headEntryOptions = { mode: "server" };
|
|
44
|
-
ssrContext.head.push(appHead, headEntryOptions);
|
|
45
|
-
if (ssrError) {
|
|
46
|
-
const status = ssrError.status || ssrError.statusCode;
|
|
47
|
-
if (status) {
|
|
48
|
-
ssrError.status = ssrError.statusCode = Number.parseInt(status);
|
|
49
|
-
}
|
|
50
|
-
if (PARSE_ERROR_DATA && typeof ssrError.data === "string") {
|
|
51
|
-
try {
|
|
52
|
-
ssrError.data = destr(ssrError.data);
|
|
53
|
-
} catch {
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
setSSRError(ssrContext, ssrError);
|
|
57
|
-
}
|
|
58
|
-
const routeOptions = getRouteRules(event);
|
|
59
|
-
const _PAYLOAD_EXTRACTION = !ssrContext.noSSR && (import.meta.prerender && NUXT_PAYLOAD_EXTRACTION || NUXT_RUNTIME_PAYLOAD_EXTRACTION && (routeOptions.isr || routeOptions.cache));
|
|
60
|
-
const isRenderingPayload = (_PAYLOAD_EXTRACTION || import.meta.dev && routeOptions.prerender) && PAYLOAD_URL_RE.test(ssrContext.url);
|
|
61
|
-
if (isRenderingPayload) {
|
|
62
|
-
const url = ssrContext.url.substring(0, ssrContext.url.lastIndexOf("/")) || "/";
|
|
63
|
-
ssrContext.url = url;
|
|
64
|
-
event._path = event.node.req.url = url;
|
|
65
|
-
if (import.meta.prerender && await payloadCache.hasItem(url)) {
|
|
66
|
-
return payloadCache.getItem(url);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (routeOptions.ssr === false) {
|
|
70
|
-
ssrContext.noSSR = true;
|
|
71
|
-
}
|
|
72
|
-
const payloadURL = _PAYLOAD_EXTRACTION ? joinURL(ssrContext.runtimeConfig.app.cdnURL || ssrContext.runtimeConfig.app.baseURL, ssrContext.url.replace(/\?.*$/, ""), PAYLOAD_FILENAME) + "?" + ssrContext.runtimeConfig.app.buildId : void 0;
|
|
73
|
-
const renderer = await getRenderer(ssrContext);
|
|
74
|
-
if (NUXT_EARLY_HINTS && !isRenderingPayload && !import.meta.prerender) {
|
|
75
|
-
const { link: link2 } = renderResourceHeaders({}, renderer.rendererContext);
|
|
76
|
-
if (link2) {
|
|
77
|
-
writeEarlyHints(event, link2);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (NUXT_INLINE_STYLES) {
|
|
81
|
-
for (const id of entryIds) {
|
|
82
|
-
ssrContext.modules.add(id);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const _rendered = await renderer.renderToString(ssrContext).catch(async (error) => {
|
|
86
|
-
if ((ssrContext["~renderResponse"] || ssrContext._renderResponse) && error.message === "skipping render") {
|
|
87
|
-
return {};
|
|
88
|
-
}
|
|
89
|
-
const _err = !ssrError && ssrContext.payload?.error || error;
|
|
90
|
-
await ssrContext.nuxt?.hooks.callHook("app:error", _err);
|
|
91
|
-
throw _err;
|
|
92
|
-
});
|
|
93
|
-
const inlinedStyles = NUXT_INLINE_STYLES && !ssrContext["~renderResponse"] && !ssrContext._renderResponse && !isRenderingPayload ? await renderInlineStyles(ssrContext.modules ?? []) : [];
|
|
94
|
-
await ssrContext.nuxt?.hooks.callHook("app:rendered", { ssrContext, renderResult: _rendered });
|
|
95
|
-
if (ssrContext["~renderResponse"] || ssrContext._renderResponse) {
|
|
96
|
-
return ssrContext["~renderResponse"] || ssrContext._renderResponse;
|
|
97
|
-
}
|
|
98
|
-
if (ssrContext.payload?.error && !ssrError) {
|
|
99
|
-
throw ssrContext.payload.error;
|
|
100
|
-
}
|
|
101
|
-
if (isRenderingPayload) {
|
|
102
|
-
const response = renderPayloadResponse(ssrContext);
|
|
103
|
-
if (import.meta.prerender) {
|
|
104
|
-
await payloadCache.setItem(ssrContext.url, response);
|
|
105
|
-
}
|
|
106
|
-
return response;
|
|
107
|
-
}
|
|
108
|
-
if (_PAYLOAD_EXTRACTION && import.meta.prerender) {
|
|
109
|
-
appendResponseHeader(event, "x-nitro-prerender", joinURL(ssrContext.url.replace(/\?.*$/, ""), PAYLOAD_FILENAME));
|
|
110
|
-
await payloadCache.setItem(ssrContext.url === "/" ? "/" : ssrContext.url.replace(/\/$/, ""), renderPayloadResponse(ssrContext));
|
|
111
|
-
}
|
|
112
|
-
const NO_SCRIPTS = NUXT_NO_SCRIPTS || routeOptions.noScripts;
|
|
113
|
-
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
|
114
|
-
if (entryFileName && !NO_SCRIPTS) {
|
|
115
|
-
let path = entryPath;
|
|
116
|
-
if (!path) {
|
|
117
|
-
path = buildAssetsURL(entryFileName);
|
|
118
|
-
if (ssrContext.runtimeConfig.app.cdnURL || /^(?:\/|\.+\/)/.test(path)) {
|
|
119
|
-
entryPath = path;
|
|
120
|
-
} else {
|
|
121
|
-
path = relative(event.path.replace(/\/[^/]+$/, "/"), joinURL("/", path));
|
|
122
|
-
if (!/^(?:\/|\.+\/)/.test(path)) {
|
|
123
|
-
path = `./${path}`;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
ssrContext.head.push({
|
|
128
|
-
script: [{
|
|
129
|
-
tagPosition: "head",
|
|
130
|
-
tagPriority: -2,
|
|
131
|
-
type: "importmap",
|
|
132
|
-
innerHTML: JSON.stringify({ imports: { "#entry": path } })
|
|
133
|
-
}]
|
|
134
|
-
}, headEntryOptions);
|
|
135
|
-
}
|
|
136
|
-
if (_PAYLOAD_EXTRACTION && !NO_SCRIPTS) {
|
|
137
|
-
ssrContext.head.push({
|
|
138
|
-
link: [
|
|
139
|
-
NUXT_JSON_PAYLOADS ? { rel: "preload", as: "fetch", crossorigin: "anonymous", href: payloadURL } : { rel: "modulepreload", crossorigin: "", href: payloadURL }
|
|
140
|
-
]
|
|
141
|
-
}, headEntryOptions);
|
|
142
|
-
}
|
|
143
|
-
if (isAppManifestEnabled && ssrContext["~preloadManifest"] && !NO_SCRIPTS) {
|
|
144
|
-
ssrContext.head.push({
|
|
145
|
-
link: [
|
|
146
|
-
{ rel: "preload", as: "fetch", fetchpriority: "low", crossorigin: "anonymous", href: buildAssetsURL(`builds/meta/${ssrContext.runtimeConfig.app.buildId}.json`) }
|
|
147
|
-
]
|
|
148
|
-
}, { ...headEntryOptions, tagPriority: "low" });
|
|
149
|
-
}
|
|
150
|
-
if (inlinedStyles.length) {
|
|
151
|
-
ssrContext.head.push({ style: inlinedStyles });
|
|
152
|
-
}
|
|
153
|
-
const link = [];
|
|
154
|
-
for (const resource of Object.values(styles)) {
|
|
155
|
-
if (import.meta.dev && "inline" in getURLQuery(resource.file)) {
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
link.push({ rel: "stylesheet", href: renderer.rendererContext.buildAssetsURL(resource.file), crossorigin: "" });
|
|
159
|
-
}
|
|
160
|
-
if (link.length) {
|
|
161
|
-
ssrContext.head.push({ link }, headEntryOptions);
|
|
162
|
-
}
|
|
163
|
-
if (!NO_SCRIPTS) {
|
|
164
|
-
ssrContext.head.push({
|
|
165
|
-
link: getPreloadLinks(ssrContext, renderer.rendererContext)
|
|
166
|
-
}, headEntryOptions);
|
|
167
|
-
ssrContext.head.push({
|
|
168
|
-
link: getPrefetchLinks(ssrContext, renderer.rendererContext)
|
|
169
|
-
}, headEntryOptions);
|
|
170
|
-
ssrContext.head.push({
|
|
171
|
-
script: _PAYLOAD_EXTRACTION ? NUXT_JSON_PAYLOADS ? renderPayloadJsonScript({ ssrContext, data: splitPayload(ssrContext).initial, src: payloadURL }) : renderPayloadScript({ ssrContext, data: splitPayload(ssrContext).initial, routeOptions, src: payloadURL }) : NUXT_JSON_PAYLOADS ? renderPayloadJsonScript({ ssrContext, data: ssrContext.payload }) : renderPayloadScript({ ssrContext, data: ssrContext.payload, routeOptions })
|
|
172
|
-
}, {
|
|
173
|
-
...headEntryOptions,
|
|
174
|
-
// this should come before another end of body scripts
|
|
175
|
-
tagPosition: "bodyClose",
|
|
176
|
-
tagPriority: "high"
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
if (!routeOptions.noScripts) {
|
|
180
|
-
const tagPosition = _PAYLOAD_EXTRACTION && !NUXT_JSON_PAYLOADS ? "bodyClose" : "head";
|
|
181
|
-
ssrContext.head.push({
|
|
182
|
-
script: Object.values(scripts).map((resource) => ({
|
|
183
|
-
type: resource.module ? "module" : null,
|
|
184
|
-
src: renderer.rendererContext.buildAssetsURL(resource.file),
|
|
185
|
-
defer: resource.module ? null : true,
|
|
186
|
-
// if we are rendering script tag payloads that import an async payload
|
|
187
|
-
// we need to ensure this resolves before executing the Nuxt entry
|
|
188
|
-
tagPosition,
|
|
189
|
-
crossorigin: ""
|
|
190
|
-
}))
|
|
191
|
-
}, headEntryOptions);
|
|
192
|
-
}
|
|
193
|
-
const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = await renderSSRHead(ssrContext.head, renderSSRHeadOptions);
|
|
194
|
-
const htmlContext = {
|
|
195
|
-
htmlAttrs: htmlAttrs ? [htmlAttrs] : [],
|
|
196
|
-
head: normalizeChunks([headTags]),
|
|
197
|
-
bodyAttrs: bodyAttrs ? [bodyAttrs] : [],
|
|
198
|
-
bodyPrepend: normalizeChunks([bodyTagsOpen, ssrContext.teleports?.body]),
|
|
199
|
-
body: [
|
|
200
|
-
componentIslands ? replaceIslandTeleports(ssrContext, _rendered.html) : _rendered.html,
|
|
201
|
-
APP_TELEPORT_OPEN_TAG + (HAS_APP_TELEPORTS ? joinTags([ssrContext.teleports?.[`#${appTeleportAttrs.id}`]]) : "") + APP_TELEPORT_CLOSE_TAG
|
|
202
|
-
],
|
|
203
|
-
bodyAppend: [bodyTags]
|
|
204
|
-
};
|
|
205
|
-
await nitroApp.hooks.callHook("render:html", htmlContext, { event });
|
|
206
|
-
return {
|
|
207
|
-
body: renderHTMLDocument(htmlContext),
|
|
208
|
-
statusCode: getResponseStatus(event),
|
|
209
|
-
statusMessage: getResponseStatusText(event),
|
|
210
|
-
headers: {
|
|
211
|
-
"content-type": "text/html;charset=utf-8",
|
|
212
|
-
"x-powered-by": "Nuxt"
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
function normalizeChunks(chunks) {
|
|
217
|
-
const result = [];
|
|
218
|
-
for (const _chunk of chunks) {
|
|
219
|
-
const chunk = _chunk?.trim();
|
|
220
|
-
if (chunk) {
|
|
221
|
-
result.push(chunk);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return result;
|
|
225
|
-
}
|
|
226
|
-
function joinTags(tags) {
|
|
227
|
-
return tags.join("");
|
|
228
|
-
}
|
|
229
|
-
function joinAttrs(chunks) {
|
|
230
|
-
if (chunks.length === 0) {
|
|
231
|
-
return "";
|
|
232
|
-
}
|
|
233
|
-
return " " + chunks.join(" ");
|
|
234
|
-
}
|
|
235
|
-
function renderHTMLDocument(html) {
|
|
236
|
-
return `<!DOCTYPE html><html${joinAttrs(html.htmlAttrs)}><head>${joinTags(html.head)}</head><body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body></html>`;
|
|
237
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
import { consola } from "consola";
|
|
3
|
-
import { stringify } from "devalue";
|
|
4
|
-
import { withTrailingSlash } from "ufo";
|
|
5
|
-
import { getContext } from "unctx";
|
|
6
|
-
import { captureRawStackTrace, parseRawStackTrace } from "errx";
|
|
7
|
-
import { isVNode } from "vue";
|
|
8
|
-
import { rootDir } from "#internal/dev-server-logs-options";
|
|
9
|
-
import { appId } from "#internal/nuxt.config.mjs";
|
|
10
|
-
const devReducers = {
|
|
11
|
-
VNode: (data) => isVNode(data) ? { type: data.type, props: data.props } : void 0,
|
|
12
|
-
URL: (data) => data instanceof URL ? data.toString() : void 0
|
|
13
|
-
};
|
|
14
|
-
const asyncContext = getContext("nuxt-dev", { asyncContext: true, AsyncLocalStorage });
|
|
15
|
-
export default (nitroApp) => {
|
|
16
|
-
const handler = nitroApp.h3App.handler;
|
|
17
|
-
nitroApp.h3App.handler = (event) => {
|
|
18
|
-
return asyncContext.callAsync({ logs: [], event }, () => handler(event));
|
|
19
|
-
};
|
|
20
|
-
onConsoleLog((_log) => {
|
|
21
|
-
const ctx = asyncContext.tryUse();
|
|
22
|
-
if (!ctx) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const rawStack = captureRawStackTrace();
|
|
26
|
-
if (!rawStack || rawStack.includes("runtime/vite-node.mjs")) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const trace = [];
|
|
30
|
-
let filename = "";
|
|
31
|
-
for (const entry of parseRawStackTrace(rawStack)) {
|
|
32
|
-
if (entry.source === import.meta.url) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if (EXCLUDE_TRACE_RE.test(entry.source)) {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
filename ||= entry.source.replace(withTrailingSlash(rootDir), "");
|
|
39
|
-
trace.push({
|
|
40
|
-
...entry,
|
|
41
|
-
source: entry.source.startsWith("file://") ? entry.source.replace("file://", "") : entry.source
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const log = {
|
|
45
|
-
..._log,
|
|
46
|
-
// Pass along filename to allow the client to display more info about where log comes from
|
|
47
|
-
filename,
|
|
48
|
-
// Clean up file names in stack trace
|
|
49
|
-
stack: trace
|
|
50
|
-
};
|
|
51
|
-
ctx.logs.push(log);
|
|
52
|
-
});
|
|
53
|
-
nitroApp.hooks.hook("afterResponse", () => {
|
|
54
|
-
const ctx = asyncContext.tryUse();
|
|
55
|
-
if (!ctx) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
return nitroApp.hooks.callHook("dev:ssr-logs", { logs: ctx.logs, path: ctx.event.path });
|
|
59
|
-
});
|
|
60
|
-
nitroApp.hooks.hook("render:html", (htmlContext) => {
|
|
61
|
-
const ctx = asyncContext.tryUse();
|
|
62
|
-
if (!ctx) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
const reducers = Object.assign(/* @__PURE__ */ Object.create(null), devReducers, ctx.event.context["~payloadReducers"]);
|
|
67
|
-
htmlContext.bodyAppend.unshift(`<script type="application/json" data-nuxt-logs="${appId}">${stringify(ctx.logs, reducers)}<\/script>`);
|
|
68
|
-
} catch (e) {
|
|
69
|
-
const shortError = e instanceof Error && "toString" in e ? ` Received \`${e.toString()}\`.` : "";
|
|
70
|
-
console.warn(`[nuxt] Failed to stringify dev server logs.${shortError} You can define your own reducer/reviver for rich types following the instructions in https://nuxt.com/docs/4.x/api/composables/use-nuxt-app#payload.`);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
const EXCLUDE_TRACE_RE = /\/node_modules\/(?:.*\/)?(?:nuxt|nuxt-nightly|nuxt-edge|nuxt3|consola|@vue)\/|core\/runtime\/nitro/;
|
|
75
|
-
function onConsoleLog(callback) {
|
|
76
|
-
consola.addReporter({
|
|
77
|
-
log(logObj) {
|
|
78
|
-
callback(logObj);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
consola.wrapConsole();
|
|
82
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { escapeHtml } from "@vue/shared";
|
|
2
|
-
const _messages = { "appName": "Nuxt", "status": 500, "statusText": "Internal server error", "description": "This page is temporarily unavailable.", "refresh": "Refresh this page" };
|
|
3
|
-
export const template = (messages) => {
|
|
4
|
-
messages = { ..._messages, ...messages };
|
|
5
|
-
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.0,minimum-scale=1.0" name="viewport"><script>!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.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;const r=function(e){const 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{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}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 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--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(min-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>";
|
|
6
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { klona } from "klona";
|
|
2
|
-
import _inlineAppConfig from "#internal/nuxt/app-config";
|
|
3
|
-
const _sharedAppConfig = _deepFreeze(klona(_inlineAppConfig));
|
|
4
|
-
export function useAppConfig(event) {
|
|
5
|
-
if (!event) {
|
|
6
|
-
return _sharedAppConfig;
|
|
7
|
-
}
|
|
8
|
-
event.context.nuxt ||= {};
|
|
9
|
-
if (event.context.nuxt.appConfig) {
|
|
10
|
-
return event.context.nuxt.appConfig;
|
|
11
|
-
}
|
|
12
|
-
const appConfig = klona(_inlineAppConfig);
|
|
13
|
-
event.context.nuxt.appConfig = appConfig;
|
|
14
|
-
return appConfig;
|
|
15
|
-
}
|
|
16
|
-
function _deepFreeze(object) {
|
|
17
|
-
const propNames = Object.getOwnPropertyNames(object);
|
|
18
|
-
for (const name of propNames) {
|
|
19
|
-
const value = object[name];
|
|
20
|
-
if (value && typeof value === "object") {
|
|
21
|
-
_deepFreeze(value);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return Object.freeze(object);
|
|
25
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const payloadCache: import("unstorage").Storage<import("unstorage").StorageValue> | null;
|
|
2
|
-
export declare const islandCache: import("unstorage").Storage<import("unstorage").StorageValue> | null;
|
|
3
|
-
export declare const islandPropCache: import("unstorage").Storage<import("unstorage").StorageValue> | null;
|
|
4
|
-
export declare const sharedPrerenderPromises: Map<string, Promise<any>> | null;
|
|
5
|
-
export declare const sharedPrerenderCache: {
|
|
6
|
-
get<T = unknown>(key: string): Promise<T> | undefined;
|
|
7
|
-
set<T>(key: string, value: Promise<T>): Promise<void>;
|
|
8
|
-
} | null;
|