hermium 0.1.9 → 0.2.0
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/README.md +56 -0
- package/bin/hermium.mjs +185 -164
- package/dist/api.mjs +3513 -0
- package/dist/public/assets/css/index-Dfs9RUU9.css +1 -0
- package/dist/public/assets/css/styles-B8p6jk5Z.css +1 -0
- package/dist/public/assets/js/ChatInputBlock-Bw7AL70H.js +1 -0
- package/dist/public/assets/js/MarkdownMessage-8d7Y6VL-.js +1 -0
- package/dist/public/assets/js/base-ui-BvQbAt_1.js +1 -0
- package/dist/public/assets/js/chat._sessionId-BG6lVraH.js +1 -0
- package/dist/public/assets/js/chat.index-D2zdMPTT.js +1 -0
- package/dist/public/assets/js/index-C0AK45FU.js +60 -0
- package/dist/public/assets/js/index-Cx5En4FK.js +1 -0
- package/dist/public/assets/js/memory-CeSRdTkW.js +3 -0
- package/dist/public/assets/js/router-8uDKazL-.js +1 -0
- package/dist/public/assets/js/settings-Bc3Y5zXO.js +1 -0
- package/dist/public/assets/js/skills-DZv7sA_5.js +1 -0
- package/dist/public/assets/js/theme-CPkdkpaj.js +1 -0
- package/dist/public/assets/js/usage-DXQsT9_b.js +1 -0
- package/dist/public/assets/woff2/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/public/assets/woff2/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/public/assets/woff2/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/public/assets/woff2/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/public/assets/woff2/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/logo.png +0 -0
- package/package.json +1 -1
- package/dist/public/assets/IconAlertCircle-BHkmI3j7.js +0 -1
- package/dist/public/assets/IconAlertTriangle-wCJudlVg.js +0 -1
- package/dist/public/assets/IconCheck-CFuEh_p7.js +0 -1
- package/dist/public/assets/IconLoader2-BIx3OuF9.js +0 -1
- package/dist/public/assets/IconRefresh-Dgm93w3T.js +0 -1
- package/dist/public/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/public/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/public/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/public/assets/index-Bbz3abmO.js +0 -14
- package/dist/public/assets/index-CWUaRwcE.js +0 -1
- package/dist/public/assets/index-CinLq3cd.js +0 -1
- package/dist/public/assets/index-CrQs9n6q.js +0 -29
- package/dist/public/assets/index-CtacpN3I.js +0 -1
- package/dist/public/assets/index-DY7aE-9s.js +0 -2
- package/dist/public/assets/index-DkYGodJj.js +0 -94
- package/dist/public/assets/index-DvDLadUx.js +0 -1
- package/dist/public/assets/index-U6RcWedt.js +0 -1
- package/dist/public/assets/index-_6iFZ0fh.js +0 -1
- package/dist/public/assets/index-enFS26SU.js +0 -1
- package/dist/public/assets/input-eNcwlDHp.js +0 -1
- package/dist/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/public/assets/queries-iHRgZzw2.js +0 -1
- package/dist/public/assets/styles-KcflDlA_.css +0 -1
- package/dist/public/assets/switch-B1DcZLwL.js +0 -1
- package/dist/public/assets/syntax-highlighter-DWPF-A_h.js +0 -6
- package/dist/public/assets/textarea-Di_syYTS.js +0 -1
- package/dist/public/favicon.png +0 -0
- package/dist/public/nous-logo.png +0 -0
- package/dist/server/index.mjs +0 -244
- package/dist/web-server/__23tanstack-start-plugin-adapters-Cwee5PKy.mjs +0 -6
- package/dist/web-server/_chunks/ssr-renderer.mjs +0 -22
- package/dist/web-server/_libs/babel__runtime.mjs +0 -237
- package/dist/web-server/_libs/bail.mjs +0 -8
- package/dist/web-server/_libs/base-ui__react.mjs +0 -9554
- package/dist/web-server/_libs/base-ui__utils.mjs +0 -1101
- package/dist/web-server/_libs/ccount.mjs +0 -16
- package/dist/web-server/_libs/character-entities-legacy.mjs +0 -111
- package/dist/web-server/_libs/character-entities.mjs +0 -2130
- package/dist/web-server/_libs/character-reference-invalid.mjs +0 -33
- package/dist/web-server/_libs/class-variance-authority.mjs +0 -44
- package/dist/web-server/_libs/clsx.mjs +0 -16
- package/dist/web-server/_libs/comma-separated-tokens.mjs +0 -31
- package/dist/web-server/_libs/cookie-es.mjs +0 -44
- package/dist/web-server/_libs/croner.mjs +0 -1
- package/dist/web-server/_libs/crossws.mjs +0 -1
- package/dist/web-server/_libs/decode-named-character-reference+[...].mjs +0 -8
- package/dist/web-server/_libs/devlop.mjs +0 -8
- package/dist/web-server/_libs/escape-string-regexp.mjs +0 -9
- package/dist/web-server/_libs/estree-util-is-identifier-name.mjs +0 -11
- package/dist/web-server/_libs/extend.mjs +0 -97
- package/dist/web-server/_libs/fault.mjs +0 -1
- package/dist/web-server/_libs/floating-ui__core.mjs +0 -663
- package/dist/web-server/_libs/floating-ui__dom.mjs +0 -624
- package/dist/web-server/_libs/floating-ui__react-dom.mjs +0 -279
- package/dist/web-server/_libs/floating-ui__utils.mjs +0 -322
- package/dist/web-server/_libs/format.mjs +0 -1
- package/dist/web-server/_libs/h3.mjs +0 -408
- package/dist/web-server/_libs/hast-util-parse-selector.mjs +0 -39
- package/dist/web-server/_libs/hast-util-to-jsx-runtime.mjs +0 -388
- package/dist/web-server/_libs/hast-util-whitespace.mjs +0 -10
- package/dist/web-server/_libs/hastscript.mjs +0 -200
- package/dist/web-server/_libs/highlight.js.mjs +0 -1
- package/dist/web-server/_libs/hookable.mjs +0 -1
- package/dist/web-server/_libs/html-url-attributes.mjs +0 -26
- package/dist/web-server/_libs/inline-style-parser.mjs +0 -142
- package/dist/web-server/_libs/is-alphabetical.mjs +0 -7
- package/dist/web-server/_libs/is-alphanumerical.mjs +0 -8
- package/dist/web-server/_libs/is-decimal.mjs +0 -7
- package/dist/web-server/_libs/is-hexadecimal.mjs +0 -7
- package/dist/web-server/_libs/is-plain-obj.mjs +0 -10
- package/dist/web-server/_libs/isbot.mjs +0 -21
- package/dist/web-server/_libs/longest-streak.mjs +0 -25
- package/dist/web-server/_libs/lowlight.mjs +0 -1
- package/dist/web-server/_libs/markdown-table.mjs +0 -142
- package/dist/web-server/_libs/mdast-util-find-and-replace.mjs +0 -109
- package/dist/web-server/_libs/mdast-util-from-markdown.mjs +0 -717
- package/dist/web-server/_libs/mdast-util-gfm-autolink-literal+[...].mjs +0 -156
- package/dist/web-server/_libs/mdast-util-gfm-footnote.mjs +0 -117
- package/dist/web-server/_libs/mdast-util-gfm-strikethrough.mjs +0 -54
- package/dist/web-server/_libs/mdast-util-gfm-table.mjs +0 -157
- package/dist/web-server/_libs/mdast-util-gfm-task-list-item.mjs +0 -77
- package/dist/web-server/_libs/mdast-util-gfm.mjs +0 -29
- package/dist/web-server/_libs/mdast-util-phrasing.mjs +0 -30
- package/dist/web-server/_libs/mdast-util-to-hast.mjs +0 -710
- package/dist/web-server/_libs/mdast-util-to-markdown.mjs +0 -798
- package/dist/web-server/_libs/mdast-util-to-string.mjs +0 -38
- package/dist/web-server/_libs/micromark-core-commonmark.mjs +0 -2259
- package/dist/web-server/_libs/micromark-extension-gfm-autolink-literal+[...].mjs +0 -344
- package/dist/web-server/_libs/micromark-extension-gfm-footnote+[...].mjs +0 -279
- package/dist/web-server/_libs/micromark-extension-gfm-strikethrough+[...].mjs +0 -98
- package/dist/web-server/_libs/micromark-extension-gfm-table.mjs +0 -491
- package/dist/web-server/_libs/micromark-extension-gfm-tagfilter+[...].mjs +0 -1
- package/dist/web-server/_libs/micromark-extension-gfm-task-list-item+[...].mjs +0 -77
- package/dist/web-server/_libs/micromark-extension-gfm.mjs +0 -18
- package/dist/web-server/_libs/micromark-factory-destination.mjs +0 -94
- package/dist/web-server/_libs/micromark-factory-label.mjs +0 -63
- package/dist/web-server/_libs/micromark-factory-space.mjs +0 -24
- package/dist/web-server/_libs/micromark-factory-title.mjs +0 -65
- package/dist/web-server/_libs/micromark-factory-whitespace.mjs +0 -22
- package/dist/web-server/_libs/micromark-util-character.mjs +0 -44
- package/dist/web-server/_libs/micromark-util-chunked.mjs +0 -36
- package/dist/web-server/_libs/micromark-util-classify-character+[...].mjs +0 -12
- package/dist/web-server/_libs/micromark-util-combine-extensions+[...].mjs +0 -41
- package/dist/web-server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +0 -19
- package/dist/web-server/_libs/micromark-util-decode-string.mjs +0 -21
- package/dist/web-server/_libs/micromark-util-encode.mjs +0 -1
- package/dist/web-server/_libs/micromark-util-html-tag-name.mjs +0 -69
- package/dist/web-server/_libs/micromark-util-normalize-identifier+[...].mjs +0 -6
- package/dist/web-server/_libs/micromark-util-resolve-all.mjs +0 -15
- package/dist/web-server/_libs/micromark-util-sanitize-uri.mjs +0 -41
- package/dist/web-server/_libs/micromark-util-subtokenize.mjs +0 -346
- package/dist/web-server/_libs/micromark.mjs +0 -906
- package/dist/web-server/_libs/ocache.mjs +0 -1
- package/dist/web-server/_libs/ohash.mjs +0 -1
- package/dist/web-server/_libs/parse-entities.mjs +0 -245
- package/dist/web-server/_libs/property-information.mjs +0 -1210
- package/dist/web-server/_libs/react-dom.mjs +0 -10779
- package/dist/web-server/_libs/react-markdown.mjs +0 -147
- package/dist/web-server/_libs/react-syntax-highlighter.mjs +0 -941
- package/dist/web-server/_libs/react.mjs +0 -513
- package/dist/web-server/_libs/refractor.mjs +0 -2425
- package/dist/web-server/_libs/remark-gfm.mjs +0 -20
- package/dist/web-server/_libs/remark-parse.mjs +0 -19
- package/dist/web-server/_libs/remark-rehype.mjs +0 -21
- package/dist/web-server/_libs/reselect.mjs +0 -1
- package/dist/web-server/_libs/rou3.mjs +0 -8
- package/dist/web-server/_libs/seroval-plugins.mjs +0 -58
- package/dist/web-server/_libs/seroval.mjs +0 -1775
- package/dist/web-server/_libs/space-separated-tokens.mjs +0 -11
- package/dist/web-server/_libs/srvx.mjs +0 -781
- package/dist/web-server/_libs/style-to-js.mjs +0 -72
- package/dist/web-server/_libs/style-to-object.mjs +0 -38
- package/dist/web-server/_libs/tabler__icons-react.mjs +0 -230
- package/dist/web-server/_libs/tanstack__history.mjs +0 -204
- package/dist/web-server/_libs/tanstack__query-core.mjs +0 -2552
- package/dist/web-server/_libs/tanstack__react-query.mjs +0 -190
- package/dist/web-server/_libs/tanstack__react-router.mjs +0 -1120
- package/dist/web-server/_libs/tanstack__react-store.mjs +0 -2
- package/dist/web-server/_libs/tanstack__router-core.mjs +0 -4288
- package/dist/web-server/_libs/tanstack__store.mjs +0 -1
- package/dist/web-server/_libs/trim-lines.mjs +0 -41
- package/dist/web-server/_libs/trough.mjs +0 -85
- package/dist/web-server/_libs/ufo.mjs +0 -54
- package/dist/web-server/_libs/unctx.mjs +0 -1
- package/dist/web-server/_libs/ungap__structured-clone.mjs +0 -224
- package/dist/web-server/_libs/unified.mjs +0 -661
- package/dist/web-server/_libs/unist-util-is.mjs +0 -100
- package/dist/web-server/_libs/unist-util-position.mjs +0 -27
- package/dist/web-server/_libs/unist-util-stringify-position.mjs +0 -27
- package/dist/web-server/_libs/unist-util-visit-parents.mjs +0 -83
- package/dist/web-server/_libs/unist-util-visit.mjs +0 -24
- package/dist/web-server/_libs/unstorage.mjs +0 -1
- package/dist/web-server/_libs/use-sync-external-store.mjs +0 -139
- package/dist/web-server/_libs/vfile-message.mjs +0 -138
- package/dist/web-server/_libs/vfile.mjs +0 -467
- package/dist/web-server/_libs/zod.mjs +0 -3915
- package/dist/web-server/_libs/zustand.mjs +0 -343
- package/dist/web-server/_libs/zwitch.mjs +0 -1
- package/dist/web-server/_ssr/index-0n2Z3BPQ.mjs +0 -369
- package/dist/web-server/_ssr/index-6itDALOw.mjs +0 -339
- package/dist/web-server/_ssr/index-BIRTrOmp.mjs +0 -449
- package/dist/web-server/_ssr/index-BPzfADac.mjs +0 -66
- package/dist/web-server/_ssr/index-BQE3bF14.mjs +0 -1870
- package/dist/web-server/_ssr/index-C5HpvlUP.mjs +0 -190
- package/dist/web-server/_ssr/index-C_ZxnypN.mjs +0 -213
- package/dist/web-server/_ssr/index-Ca8JFH8f.mjs +0 -612
- package/dist/web-server/_ssr/index-DNVESZiA.mjs +0 -513
- package/dist/web-server/_ssr/index.mjs +0 -1558
- package/dist/web-server/_ssr/input-CqXjTRQg.mjs +0 -20
- package/dist/web-server/_ssr/queries-3H_19mUt.mjs +0 -16
- package/dist/web-server/_ssr/router-sbsNus0Y.mjs +0 -2093
- package/dist/web-server/_ssr/start-HYkvq4Ni.mjs +0 -4
- package/dist/web-server/_ssr/switch-usf2F1UM.mjs +0 -33
- package/dist/web-server/_ssr/syntax-highlighter-5vezNTce.mjs +0 -62
- package/dist/web-server/_ssr/textarea-DfRheWY0.mjs +0 -18
- package/dist/web-server/_tanstack-start-manifest_v-DqW-pKEH.mjs +0 -4
- package/dist/web-server/index.mjs +0 -597
|
@@ -1,597 +0,0 @@
|
|
|
1
|
-
globalThis.__nitro_main__ = import.meta.url;
|
|
2
|
-
import { N as NodeResponse, s as serve } from "./_libs/srvx.mjs";
|
|
3
|
-
import { H as HTTPError, d as defineHandler, t as toEventHandler, a as defineLazyEventHandler, b as H3Core } from "./_libs/h3.mjs";
|
|
4
|
-
import { d as decodePath, w as withLeadingSlash, a as withoutTrailingSlash, j as joinURL } from "./_libs/ufo.mjs";
|
|
5
|
-
import { promises } from "node:fs";
|
|
6
|
-
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { dirname, resolve } from "node:path";
|
|
8
|
-
import "node:http";
|
|
9
|
-
import "node:stream";
|
|
10
|
-
import "node:stream/promises";
|
|
11
|
-
import "node:https";
|
|
12
|
-
import "node:http2";
|
|
13
|
-
import "./_libs/rou3.mjs";
|
|
14
|
-
function lazyService(loader) {
|
|
15
|
-
let promise, mod;
|
|
16
|
-
return {
|
|
17
|
-
fetch(req) {
|
|
18
|
-
if (mod) {
|
|
19
|
-
return mod.fetch(req);
|
|
20
|
-
}
|
|
21
|
-
if (!promise) {
|
|
22
|
-
promise = loader().then((_mod) => mod = _mod.default || _mod);
|
|
23
|
-
}
|
|
24
|
-
return promise.then((mod2) => mod2.fetch(req));
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const services = {
|
|
29
|
-
["ssr"]: lazyService(() => import("./_ssr/index.mjs"))
|
|
30
|
-
};
|
|
31
|
-
globalThis.__nitro_vite_envs__ = services;
|
|
32
|
-
const errorHandler$1 = (error, event) => {
|
|
33
|
-
const res = defaultHandler(error, event);
|
|
34
|
-
return new NodeResponse(typeof res.body === "string" ? res.body : JSON.stringify(res.body, null, 2), res);
|
|
35
|
-
};
|
|
36
|
-
function defaultHandler(error, event) {
|
|
37
|
-
const unhandled = error.unhandled ?? !HTTPError.isError(error);
|
|
38
|
-
const { status = 500, statusText = "" } = unhandled ? {} : error;
|
|
39
|
-
if (status === 404) {
|
|
40
|
-
const url = event.url || new URL(event.req.url);
|
|
41
|
-
const baseURL = "/";
|
|
42
|
-
if (/^\/[^/]/.test(baseURL) && !url.pathname.startsWith(baseURL)) {
|
|
43
|
-
return {
|
|
44
|
-
status: 302,
|
|
45
|
-
headers: new Headers({ location: `${baseURL}${url.pathname.slice(1)}${url.search}` })
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const headers2 = new Headers(unhandled ? {} : error.headers);
|
|
50
|
-
headers2.set("content-type", "application/json; charset=utf-8");
|
|
51
|
-
const jsonBody = unhandled ? {
|
|
52
|
-
status,
|
|
53
|
-
unhandled: true
|
|
54
|
-
} : typeof error.toJSON === "function" ? error.toJSON() : {
|
|
55
|
-
status,
|
|
56
|
-
statusText,
|
|
57
|
-
message: error.message
|
|
58
|
-
};
|
|
59
|
-
return {
|
|
60
|
-
status,
|
|
61
|
-
statusText,
|
|
62
|
-
headers: headers2,
|
|
63
|
-
body: {
|
|
64
|
-
error: true,
|
|
65
|
-
...jsonBody
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const errorHandlers = [errorHandler$1];
|
|
70
|
-
async function errorHandler(error, event) {
|
|
71
|
-
for (const handler of errorHandlers) {
|
|
72
|
-
try {
|
|
73
|
-
const response = await handler(error, event, { defaultHandler });
|
|
74
|
-
if (response) {
|
|
75
|
-
return response;
|
|
76
|
-
}
|
|
77
|
-
} catch (error2) {
|
|
78
|
-
console.error(error2);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const headers = ((m) => function headersRouteRule(event) {
|
|
83
|
-
for (const [key2, value] of Object.entries(m.options || {})) {
|
|
84
|
-
event.res.headers.set(key2, value);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const assets = {
|
|
88
|
-
"/manifest.json": {
|
|
89
|
-
"type": "application/json",
|
|
90
|
-
"etag": '"1f2-Oqn/x1R1hBTtEjA8nFhpBeFJJNg"',
|
|
91
|
-
"mtime": "2026-05-16T06:33:38.950Z",
|
|
92
|
-
"size": 498,
|
|
93
|
-
"path": "../public/manifest.json"
|
|
94
|
-
},
|
|
95
|
-
"/robots.txt": {
|
|
96
|
-
"type": "text/plain; charset=utf-8",
|
|
97
|
-
"etag": '"43-BEzmj4PuhUNHX+oW9uOnPSihxtU"',
|
|
98
|
-
"mtime": "2026-05-16T06:33:38.950Z",
|
|
99
|
-
"size": 67,
|
|
100
|
-
"path": "../public/robots.txt"
|
|
101
|
-
},
|
|
102
|
-
"/assets/IconAlertCircle-BHkmI3j7.js": {
|
|
103
|
-
"type": "text/javascript; charset=utf-8",
|
|
104
|
-
"etag": '"f9-KdA0Bw5PejbQsi5Y2kKurKk8cCk"',
|
|
105
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
106
|
-
"size": 249,
|
|
107
|
-
"path": "../public/assets/IconAlertCircle-BHkmI3j7.js"
|
|
108
|
-
},
|
|
109
|
-
"/assets/IconAlertTriangle-wCJudlVg.js": {
|
|
110
|
-
"type": "text/javascript; charset=utf-8",
|
|
111
|
-
"etag": '"161-oP0y+NGtdFoHFR6fi6fOpE3q0dg"',
|
|
112
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
113
|
-
"size": 353,
|
|
114
|
-
"path": "../public/assets/IconAlertTriangle-wCJudlVg.js"
|
|
115
|
-
},
|
|
116
|
-
"/assets/IconCheck-CFuEh_p7.js": {
|
|
117
|
-
"type": "text/javascript; charset=utf-8",
|
|
118
|
-
"etag": '"8a-WdXLF+zTf7rMWPqsNBBj/7N025A"',
|
|
119
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
120
|
-
"size": 138,
|
|
121
|
-
"path": "../public/assets/IconCheck-CFuEh_p7.js"
|
|
122
|
-
},
|
|
123
|
-
"/assets/IconLoader2-BIx3OuF9.js": {
|
|
124
|
-
"type": "text/javascript; charset=utf-8",
|
|
125
|
-
"etag": '"97-4CnV4LJ4vnTlibWRMY8rynSc1ao"',
|
|
126
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
127
|
-
"size": 151,
|
|
128
|
-
"path": "../public/assets/IconLoader2-BIx3OuF9.js"
|
|
129
|
-
},
|
|
130
|
-
"/assets/IconRefresh-Dgm93w3T.js": {
|
|
131
|
-
"type": "text/javascript; charset=utf-8",
|
|
132
|
-
"etag": '"ec-/OuLjwmIc1x5ldidfVlVPMQYrDs"',
|
|
133
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
134
|
-
"size": 236,
|
|
135
|
-
"path": "../public/assets/IconRefresh-Dgm93w3T.js"
|
|
136
|
-
},
|
|
137
|
-
"/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2": {
|
|
138
|
-
"type": "font/woff2",
|
|
139
|
-
"etag": '"3964-jfUkxTfHRj1cpO33jEsDk2lkrvM"',
|
|
140
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
141
|
-
"size": 14692,
|
|
142
|
-
"path": "../public/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2"
|
|
143
|
-
},
|
|
144
|
-
"/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2": {
|
|
145
|
-
"type": "font/woff2",
|
|
146
|
-
"etag": '"3bcc-oSFlPnDlb7fAcQTPv6sqm6NgXXU"',
|
|
147
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
148
|
-
"size": 15308,
|
|
149
|
-
"path": "../public/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2"
|
|
150
|
-
},
|
|
151
|
-
"/assets/geist-latin-wght-normal-Dm3htQBi.woff2": {
|
|
152
|
-
"type": "font/woff2",
|
|
153
|
-
"etag": '"6ef0-pZqr0k2V92t+lxQ/ogxqTIOgDGM"',
|
|
154
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
155
|
-
"size": 28400,
|
|
156
|
-
"path": "../public/assets/geist-latin-wght-normal-Dm3htQBi.woff2"
|
|
157
|
-
},
|
|
158
|
-
"/assets/index-Bbz3abmO.js": {
|
|
159
|
-
"type": "text/javascript; charset=utf-8",
|
|
160
|
-
"etag": '"a7e0-qNOlHe/X846nRR5FptLq+Z5OK64"',
|
|
161
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
162
|
-
"size": 42976,
|
|
163
|
-
"path": "../public/assets/index-Bbz3abmO.js"
|
|
164
|
-
},
|
|
165
|
-
"/assets/index-CWUaRwcE.js": {
|
|
166
|
-
"type": "text/javascript; charset=utf-8",
|
|
167
|
-
"etag": '"24f9-lfJ8C//0U/hYNrgb6rnqWuWpjT4"',
|
|
168
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
169
|
-
"size": 9465,
|
|
170
|
-
"path": "../public/assets/index-CWUaRwcE.js"
|
|
171
|
-
},
|
|
172
|
-
"/assets/index-CinLq3cd.js": {
|
|
173
|
-
"type": "text/javascript; charset=utf-8",
|
|
174
|
-
"etag": '"3e60-kiUPmTXXmB61dKKxXJz5AzW+Ytw"',
|
|
175
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
176
|
-
"size": 15968,
|
|
177
|
-
"path": "../public/assets/index-CinLq3cd.js"
|
|
178
|
-
},
|
|
179
|
-
"/assets/index-CrQs9n6q.js": {
|
|
180
|
-
"type": "text/javascript; charset=utf-8",
|
|
181
|
-
"etag": '"265b4-7aW1fKAQy8MfZgK2uqFmhfA+yNM"',
|
|
182
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
183
|
-
"size": 157108,
|
|
184
|
-
"path": "../public/assets/index-CrQs9n6q.js"
|
|
185
|
-
},
|
|
186
|
-
"/assets/index-CtacpN3I.js": {
|
|
187
|
-
"type": "text/javascript; charset=utf-8",
|
|
188
|
-
"etag": '"191b-zqUsItfaXl8qq7iS+owM1+1lbHY"',
|
|
189
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
190
|
-
"size": 6427,
|
|
191
|
-
"path": "../public/assets/index-CtacpN3I.js"
|
|
192
|
-
},
|
|
193
|
-
"/assets/index-DY7aE-9s.js": {
|
|
194
|
-
"type": "text/javascript; charset=utf-8",
|
|
195
|
-
"etag": '"2d07-y19F3R4N55tG0K/13ROWY1hCkkA"',
|
|
196
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
197
|
-
"size": 11527,
|
|
198
|
-
"path": "../public/assets/index-DY7aE-9s.js"
|
|
199
|
-
},
|
|
200
|
-
"/assets/index-DvDLadUx.js": {
|
|
201
|
-
"type": "text/javascript; charset=utf-8",
|
|
202
|
-
"etag": '"25b-BMT94fyZ3u1fJgtcsS7sDZKhfw8"',
|
|
203
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
204
|
-
"size": 603,
|
|
205
|
-
"path": "../public/assets/index-DvDLadUx.js"
|
|
206
|
-
},
|
|
207
|
-
"/assets/index-U6RcWedt.js": {
|
|
208
|
-
"type": "text/javascript; charset=utf-8",
|
|
209
|
-
"etag": '"230b-YRWPBSYp9L6h+Ewvx+Wcmlso/Y4"',
|
|
210
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
211
|
-
"size": 8971,
|
|
212
|
-
"path": "../public/assets/index-U6RcWedt.js"
|
|
213
|
-
},
|
|
214
|
-
"/assets/index-_6iFZ0fh.js": {
|
|
215
|
-
"type": "text/javascript; charset=utf-8",
|
|
216
|
-
"etag": '"1904-7g1ZPNCOhbPpA/T66MKE8/ygS40"',
|
|
217
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
218
|
-
"size": 6404,
|
|
219
|
-
"path": "../public/assets/index-_6iFZ0fh.js"
|
|
220
|
-
},
|
|
221
|
-
"/assets/index-enFS26SU.js": {
|
|
222
|
-
"type": "text/javascript; charset=utf-8",
|
|
223
|
-
"etag": '"53ca-MvCLAjuyJXXswe7zSgQ8yt2pwck"',
|
|
224
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
225
|
-
"size": 21450,
|
|
226
|
-
"path": "../public/assets/index-enFS26SU.js"
|
|
227
|
-
},
|
|
228
|
-
"/assets/input-eNcwlDHp.js": {
|
|
229
|
-
"type": "text/javascript; charset=utf-8",
|
|
230
|
-
"etag": '"1101-e78f6GA83dF47i+3/vk/YyI+uAs"',
|
|
231
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
232
|
-
"size": 4353,
|
|
233
|
-
"path": "../public/assets/input-eNcwlDHp.js"
|
|
234
|
-
},
|
|
235
|
-
"/favicon.png": {
|
|
236
|
-
"type": "image/png",
|
|
237
|
-
"etag": '"51fc-nI7ucKzqH3tY+82NQSPy6oksg+o"',
|
|
238
|
-
"mtime": "2026-05-16T06:33:38.951Z",
|
|
239
|
-
"size": 20988,
|
|
240
|
-
"path": "../public/favicon.png"
|
|
241
|
-
},
|
|
242
|
-
"/nous-logo.png": {
|
|
243
|
-
"type": "image/png",
|
|
244
|
-
"etag": '"51fc-nI7ucKzqH3tY+82NQSPy6oksg+o"',
|
|
245
|
-
"mtime": "2026-05-16T06:33:38.951Z",
|
|
246
|
-
"size": 20988,
|
|
247
|
-
"path": "../public/nous-logo.png"
|
|
248
|
-
},
|
|
249
|
-
"/favicon.ico": {
|
|
250
|
-
"type": "image/vnd.microsoft.icon",
|
|
251
|
-
"etag": '"16b86-whSNzIq4ettmTwOPeSIamFPNU70"',
|
|
252
|
-
"mtime": "2026-05-16T06:33:38.949Z",
|
|
253
|
-
"size": 93062,
|
|
254
|
-
"path": "../public/favicon.ico"
|
|
255
|
-
},
|
|
256
|
-
"/assets/index-DkYGodJj.js": {
|
|
257
|
-
"type": "text/javascript; charset=utf-8",
|
|
258
|
-
"etag": '"9b135-i78MHQR+allJ0UJbPXbry8KrfeA"',
|
|
259
|
-
"mtime": "2026-05-16T06:33:37.789Z",
|
|
260
|
-
"size": 635189,
|
|
261
|
-
"path": "../public/assets/index-DkYGodJj.js"
|
|
262
|
-
},
|
|
263
|
-
"/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2": {
|
|
264
|
-
"type": "font/woff2",
|
|
265
|
-
"etag": '"493c-n3Oy9D6jvzfMjpClqox+Zo7ERQQ"',
|
|
266
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
267
|
-
"size": 18748,
|
|
268
|
-
"path": "../public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2"
|
|
269
|
-
},
|
|
270
|
-
"/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2": {
|
|
271
|
-
"type": "font/woff2",
|
|
272
|
-
"etag": '"6568-cF1iUGbboMFZ8TfnP5HiMgl9II0"',
|
|
273
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
274
|
-
"size": 25960,
|
|
275
|
-
"path": "../public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2"
|
|
276
|
-
},
|
|
277
|
-
"/assets/inter-greek-wght-normal-CkhJZR-_.woff2": {
|
|
278
|
-
"type": "font/woff2",
|
|
279
|
-
"etag": '"4a34-xor/hj4YNqI52zFecXnUbzQ4Xs4"',
|
|
280
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
281
|
-
"size": 18996,
|
|
282
|
-
"path": "../public/assets/inter-greek-wght-normal-CkhJZR-_.woff2"
|
|
283
|
-
},
|
|
284
|
-
"/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2": {
|
|
285
|
-
"type": "font/woff2",
|
|
286
|
-
"etag": '"2be0-BP5iTzJeB8nLqYAgKpWNi5o1Zm8"',
|
|
287
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
288
|
-
"size": 11232,
|
|
289
|
-
"path": "../public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2"
|
|
290
|
-
},
|
|
291
|
-
"/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2": {
|
|
292
|
-
"type": "font/woff2",
|
|
293
|
-
"etag": '"14c4c-zz61D7IQFMB9QxHvTAOk/Vh4ibQ"',
|
|
294
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
295
|
-
"size": 85068,
|
|
296
|
-
"path": "../public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2"
|
|
297
|
-
},
|
|
298
|
-
"/assets/inter-latin-wght-normal-Dx4kXJAl.woff2": {
|
|
299
|
-
"type": "font/woff2",
|
|
300
|
-
"etag": '"bc80-8R1ym7Ck2DUNLqPQ/AYs9u8tUpg"',
|
|
301
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
302
|
-
"size": 48256,
|
|
303
|
-
"path": "../public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2"
|
|
304
|
-
},
|
|
305
|
-
"/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2": {
|
|
306
|
-
"type": "font/woff2",
|
|
307
|
-
"etag": '"280c-nBythjoDQ0+5wVAendJ6wU7Xz2M"',
|
|
308
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
309
|
-
"size": 10252,
|
|
310
|
-
"path": "../public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2"
|
|
311
|
-
},
|
|
312
|
-
"/assets/queries-iHRgZzw2.js": {
|
|
313
|
-
"type": "text/javascript; charset=utf-8",
|
|
314
|
-
"etag": '"350-fxrAJt01r+CvMCb0vzvhuGI3J3Y"',
|
|
315
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
316
|
-
"size": 848,
|
|
317
|
-
"path": "../public/assets/queries-iHRgZzw2.js"
|
|
318
|
-
},
|
|
319
|
-
"/assets/switch-B1DcZLwL.js": {
|
|
320
|
-
"type": "text/javascript; charset=utf-8",
|
|
321
|
-
"etag": '"2c1-yeMhOpfHD6TISpBxZW2gDAQD96M"',
|
|
322
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
323
|
-
"size": 705,
|
|
324
|
-
"path": "../public/assets/switch-B1DcZLwL.js"
|
|
325
|
-
},
|
|
326
|
-
"/assets/styles-KcflDlA_.css": {
|
|
327
|
-
"type": "text/css; charset=utf-8",
|
|
328
|
-
"etag": '"1d919-iiR5k/SfMPSpRyBNYdwOfZ0huCE"',
|
|
329
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
330
|
-
"size": 121113,
|
|
331
|
-
"path": "../public/assets/styles-KcflDlA_.css"
|
|
332
|
-
},
|
|
333
|
-
"/assets/textarea-Di_syYTS.js": {
|
|
334
|
-
"type": "text/javascript; charset=utf-8",
|
|
335
|
-
"etag": '"443-UERjnMZaSGHVd6oN+ACi9M+xBYE"',
|
|
336
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
337
|
-
"size": 1091,
|
|
338
|
-
"path": "../public/assets/textarea-Di_syYTS.js"
|
|
339
|
-
},
|
|
340
|
-
"/assets/syntax-highlighter-DWPF-A_h.js": {
|
|
341
|
-
"type": "text/javascript; charset=utf-8",
|
|
342
|
-
"etag": '"13640-KlNCPkTaW+wSMWRa3YON+7PAZYY"',
|
|
343
|
-
"mtime": "2026-05-16T06:33:37.788Z",
|
|
344
|
-
"size": 79424,
|
|
345
|
-
"path": "../public/assets/syntax-highlighter-DWPF-A_h.js"
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
function readAsset(id) {
|
|
349
|
-
const serverDir = dirname(fileURLToPath(globalThis.__nitro_main__));
|
|
350
|
-
return promises.readFile(resolve(serverDir, assets[id].path));
|
|
351
|
-
}
|
|
352
|
-
const publicAssetBases = {};
|
|
353
|
-
function isPublicAssetURL(id = "") {
|
|
354
|
-
if (assets[id]) {
|
|
355
|
-
return true;
|
|
356
|
-
}
|
|
357
|
-
for (const base in publicAssetBases) {
|
|
358
|
-
if (id.startsWith(base)) {
|
|
359
|
-
return true;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
return false;
|
|
363
|
-
}
|
|
364
|
-
function getAsset(id) {
|
|
365
|
-
return assets[id];
|
|
366
|
-
}
|
|
367
|
-
const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
|
|
368
|
-
const EncodingMap = {
|
|
369
|
-
gzip: ".gz",
|
|
370
|
-
br: ".br",
|
|
371
|
-
zstd: ".zst"
|
|
372
|
-
};
|
|
373
|
-
const _Blc79K = defineHandler((event) => {
|
|
374
|
-
if (event.req.method && !METHODS.has(event.req.method)) {
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
let id = decodePath(withLeadingSlash(withoutTrailingSlash(event.url.pathname)));
|
|
378
|
-
let asset;
|
|
379
|
-
const encodingHeader = event.req.headers.get("accept-encoding") || "";
|
|
380
|
-
const encodings = [...encodingHeader.split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(), ""];
|
|
381
|
-
for (const encoding of encodings) {
|
|
382
|
-
for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
|
|
383
|
-
const _asset = getAsset(_id);
|
|
384
|
-
if (_asset) {
|
|
385
|
-
asset = _asset;
|
|
386
|
-
id = _id;
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
if (!asset) {
|
|
392
|
-
if (isPublicAssetURL(id)) {
|
|
393
|
-
event.res.headers.delete("Cache-Control");
|
|
394
|
-
throw new HTTPError({ status: 404 });
|
|
395
|
-
}
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
if (encodings.length > 1) {
|
|
399
|
-
event.res.headers.append("Vary", "Accept-Encoding");
|
|
400
|
-
}
|
|
401
|
-
const ifNotMatch = event.req.headers.get("if-none-match") === asset.etag;
|
|
402
|
-
if (ifNotMatch) {
|
|
403
|
-
event.res.status = 304;
|
|
404
|
-
event.res.statusText = "Not Modified";
|
|
405
|
-
return "";
|
|
406
|
-
}
|
|
407
|
-
const ifModifiedSinceH = event.req.headers.get("if-modified-since");
|
|
408
|
-
const mtimeDate = new Date(asset.mtime);
|
|
409
|
-
if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
|
|
410
|
-
event.res.status = 304;
|
|
411
|
-
event.res.statusText = "Not Modified";
|
|
412
|
-
return "";
|
|
413
|
-
}
|
|
414
|
-
if (asset.type) {
|
|
415
|
-
event.res.headers.set("Content-Type", asset.type);
|
|
416
|
-
}
|
|
417
|
-
if (asset.etag && !event.res.headers.has("ETag")) {
|
|
418
|
-
event.res.headers.set("ETag", asset.etag);
|
|
419
|
-
}
|
|
420
|
-
if (asset.mtime && !event.res.headers.has("Last-Modified")) {
|
|
421
|
-
event.res.headers.set("Last-Modified", mtimeDate.toUTCString());
|
|
422
|
-
}
|
|
423
|
-
if (asset.encoding && !event.res.headers.has("Content-Encoding")) {
|
|
424
|
-
event.res.headers.set("Content-Encoding", asset.encoding);
|
|
425
|
-
}
|
|
426
|
-
if (asset.size > 0 && !event.res.headers.has("Content-Length")) {
|
|
427
|
-
event.res.headers.set("Content-Length", asset.size.toString());
|
|
428
|
-
}
|
|
429
|
-
return readAsset(id);
|
|
430
|
-
});
|
|
431
|
-
const findRouteRules = /* @__PURE__ */ (() => {
|
|
432
|
-
const $0 = [{ name: "headers", route: "/assets/**", handler: headers, options: { "cache-control": "public, max-age=31536000, immutable" } }];
|
|
433
|
-
return (m, p) => {
|
|
434
|
-
let r = [];
|
|
435
|
-
if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/";
|
|
436
|
-
let s = p.split("/"), l = s.length;
|
|
437
|
-
if (l > 1) {
|
|
438
|
-
if (s[1] === "assets") {
|
|
439
|
-
r.unshift({ data: $0, params: { "_": s.slice(2).join("/") } });
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return r;
|
|
443
|
-
};
|
|
444
|
-
})();
|
|
445
|
-
const _lazy_e_pUQd = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
|
|
446
|
-
const findRoute = /* @__PURE__ */ (() => {
|
|
447
|
-
const data = { route: "/**", handler: _lazy_e_pUQd };
|
|
448
|
-
return ((_m, p) => {
|
|
449
|
-
return { data, params: { "_": p.slice(1) } };
|
|
450
|
-
});
|
|
451
|
-
})();
|
|
452
|
-
const globalMiddleware = [
|
|
453
|
-
toEventHandler(_Blc79K)
|
|
454
|
-
].filter(Boolean);
|
|
455
|
-
const APP_ID = "default";
|
|
456
|
-
function useNitroApp() {
|
|
457
|
-
let instance = useNitroApp._instance;
|
|
458
|
-
if (instance) {
|
|
459
|
-
return instance;
|
|
460
|
-
}
|
|
461
|
-
instance = useNitroApp._instance = createNitroApp();
|
|
462
|
-
globalThis.__nitro__ = globalThis.__nitro__ || {};
|
|
463
|
-
globalThis.__nitro__[APP_ID] = instance;
|
|
464
|
-
return instance;
|
|
465
|
-
}
|
|
466
|
-
function createNitroApp() {
|
|
467
|
-
const hooks = void 0;
|
|
468
|
-
const captureError = (error, errorCtx) => {
|
|
469
|
-
if (errorCtx?.event) {
|
|
470
|
-
const errors = errorCtx.event.req.context?.nitro?.errors;
|
|
471
|
-
if (errors) {
|
|
472
|
-
errors.push({
|
|
473
|
-
error,
|
|
474
|
-
context: errorCtx
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
const h3App = createH3App({ onError(error, event) {
|
|
480
|
-
return errorHandler(error, event);
|
|
481
|
-
} });
|
|
482
|
-
let appHandler = (req) => {
|
|
483
|
-
req.context ||= {};
|
|
484
|
-
req.context.nitro = req.context.nitro || { errors: [] };
|
|
485
|
-
return h3App.fetch(req);
|
|
486
|
-
};
|
|
487
|
-
const app = {
|
|
488
|
-
fetch: appHandler,
|
|
489
|
-
h3: h3App,
|
|
490
|
-
hooks,
|
|
491
|
-
captureError
|
|
492
|
-
};
|
|
493
|
-
return app;
|
|
494
|
-
}
|
|
495
|
-
function createH3App(config) {
|
|
496
|
-
const h3App = new H3Core(config);
|
|
497
|
-
h3App["~findRoute"] = (event) => findRoute(event.req.method, event.url.pathname);
|
|
498
|
-
h3App["~middleware"].push(...globalMiddleware);
|
|
499
|
-
{
|
|
500
|
-
h3App["~getMiddleware"] = (event, route) => {
|
|
501
|
-
const pathname = event.url.pathname;
|
|
502
|
-
const method = event.req.method;
|
|
503
|
-
const middleware = [];
|
|
504
|
-
{
|
|
505
|
-
const routeRules = getRouteRules(method, pathname);
|
|
506
|
-
event.context.routeRules = routeRules?.routeRules;
|
|
507
|
-
if (routeRules?.routeRuleMiddleware.length) {
|
|
508
|
-
middleware.push(...routeRules.routeRuleMiddleware);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
middleware.push(...h3App["~middleware"]);
|
|
512
|
-
if (route?.data?.middleware?.length) {
|
|
513
|
-
middleware.push(...route.data.middleware);
|
|
514
|
-
}
|
|
515
|
-
return middleware;
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
return h3App;
|
|
519
|
-
}
|
|
520
|
-
function getRouteRules(method, pathname) {
|
|
521
|
-
const m = findRouteRules(method, pathname);
|
|
522
|
-
if (!m?.length) {
|
|
523
|
-
return { routeRuleMiddleware: [] };
|
|
524
|
-
}
|
|
525
|
-
const routeRules = {};
|
|
526
|
-
for (const layer of m) {
|
|
527
|
-
for (const rule of layer.data) {
|
|
528
|
-
const currentRule = routeRules[rule.name];
|
|
529
|
-
if (currentRule) {
|
|
530
|
-
if (rule.options === false) {
|
|
531
|
-
delete routeRules[rule.name];
|
|
532
|
-
continue;
|
|
533
|
-
}
|
|
534
|
-
if (typeof currentRule.options === "object" && typeof rule.options === "object") {
|
|
535
|
-
currentRule.options = {
|
|
536
|
-
...currentRule.options,
|
|
537
|
-
...rule.options
|
|
538
|
-
};
|
|
539
|
-
} else {
|
|
540
|
-
currentRule.options = rule.options;
|
|
541
|
-
}
|
|
542
|
-
currentRule.route = rule.route;
|
|
543
|
-
currentRule.params = {
|
|
544
|
-
...currentRule.params,
|
|
545
|
-
...layer.params
|
|
546
|
-
};
|
|
547
|
-
} else if (rule.options !== false) {
|
|
548
|
-
routeRules[rule.name] = {
|
|
549
|
-
...rule,
|
|
550
|
-
params: layer.params
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
const middleware = [];
|
|
556
|
-
const orderedRules = Object.values(routeRules).sort((a, b) => (a.handler?.order || 0) - (b.handler?.order || 0));
|
|
557
|
-
for (const rule of orderedRules) {
|
|
558
|
-
if (rule.options === false || !rule.handler) {
|
|
559
|
-
continue;
|
|
560
|
-
}
|
|
561
|
-
middleware.push(rule.handler(rule));
|
|
562
|
-
}
|
|
563
|
-
return {
|
|
564
|
-
routeRules,
|
|
565
|
-
routeRuleMiddleware: middleware
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
function _captureError(error, type) {
|
|
569
|
-
console.error(`[${type}]`, error);
|
|
570
|
-
useNitroApp().captureError?.(error, { tags: [type] });
|
|
571
|
-
}
|
|
572
|
-
function trapUnhandledErrors() {
|
|
573
|
-
process.on("unhandledRejection", (error) => _captureError(error, "unhandledRejection"));
|
|
574
|
-
process.on("uncaughtException", (error) => _captureError(error, "uncaughtException"));
|
|
575
|
-
}
|
|
576
|
-
const tracingSrvxPlugins = [];
|
|
577
|
-
const _parsedPort = Number.parseInt(process.env.NITRO_PORT ?? process.env.PORT ?? "");
|
|
578
|
-
const port = Number.isNaN(_parsedPort) ? 3e3 : _parsedPort;
|
|
579
|
-
const host = process.env.NITRO_HOST || process.env.HOST;
|
|
580
|
-
const cert = process.env.NITRO_SSL_CERT;
|
|
581
|
-
const key = process.env.NITRO_SSL_KEY;
|
|
582
|
-
const nitroApp = useNitroApp();
|
|
583
|
-
serve({
|
|
584
|
-
port,
|
|
585
|
-
hostname: host,
|
|
586
|
-
tls: cert && key ? {
|
|
587
|
-
cert,
|
|
588
|
-
key
|
|
589
|
-
} : void 0,
|
|
590
|
-
fetch: nitroApp.fetch,
|
|
591
|
-
plugins: [...tracingSrvxPlugins]
|
|
592
|
-
});
|
|
593
|
-
trapUnhandledErrors();
|
|
594
|
-
const nodeServer = {};
|
|
595
|
-
export {
|
|
596
|
-
nodeServer as default
|
|
597
|
-
};
|