@nostale/cli 0.1.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/LICENSE +21 -0
- package/README.md +36 -0
- package/assets/docker-compose.server.yml +70 -0
- package/dist/commands/config/generation.js +23 -0
- package/dist/commands/config/providers.js +138 -0
- package/dist/commands/config/sources.js +145 -0
- package/dist/commands/config/templates.js +117 -0
- package/dist/commands/config/tokens.js +83 -0
- package/dist/commands/config.js +43 -0
- package/dist/commands/doctor.js +98 -0
- package/dist/commands/setup.js +5 -0
- package/dist/commands/start.js +23 -0
- package/dist/commands/status.js +17 -0
- package/dist/commands/stop.js +16 -0
- package/dist/index.js +23 -0
- package/dist/lib/api-config.js +21 -0
- package/dist/lib/env-writer.js +41 -0
- package/dist/lib/http.js +117 -0
- package/dist/lib/install-root.js +75 -0
- package/dist/lib/paths.js +12 -0
- package/dist/lib/ports.js +19 -0
- package/dist/lib/process-manager.js +151 -0
- package/dist/lib/repo-root.js +34 -0
- package/dist/lib/wizard.js +267 -0
- package/dist/tui/prompts.js +54 -0
- package/package.json +69 -0
- package/services/mcp-server/index.cjs +48326 -0
- package/services/migrations/001_init_rag_v1.sql +128 -0
- package/services/migrations/002_doc_lifecycle.sql +96 -0
- package/services/migrations/004_mcp_tokens.sql +11 -0
- package/services/migrations/005_settings.sql +28 -0
- package/services/migrations/006_document_sources.sql +14 -0
- package/services/migrations/007_generation_settings.sql +9 -0
- package/services/migrations/008_llm_provider_configs_unique.sql +5 -0
- package/services/wasm/tree-sitter-c.wasm +0 -0
- package/services/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/services/wasm/tree-sitter-cpp.wasm +0 -0
- package/services/wasm/tree-sitter-dart.wasm +0 -0
- package/services/wasm/tree-sitter-go.wasm +0 -0
- package/services/wasm/tree-sitter-java.wasm +0 -0
- package/services/wasm/tree-sitter-javascript.wasm +0 -0
- package/services/wasm/tree-sitter-kotlin.wasm +0 -0
- package/services/wasm/tree-sitter-php.wasm +0 -0
- package/services/wasm/tree-sitter-python.wasm +0 -0
- package/services/wasm/tree-sitter-rust.wasm +0 -0
- package/services/wasm/tree-sitter-tsx.wasm +0 -0
- package/services/wasm/tree-sitter-typescript.wasm +0 -0
- package/services/wasm/tree-sitter.wasm +0 -0
- package/services/wiki-api/index.cjs +82370 -0
- package/services/wiki-web/.output/nitro.json +15 -0
- package/services/wiki-web/.output/public/_nuxt/68caad34b1e80fa12b3a.4Cpu5VkB.woff +0 -0
- package/services/wiki-web/.output/public/_nuxt/6b042d50787d4a81d659.D7JGeKLp.svg +1835 -0
- package/services/wiki-web/.output/public/_nuxt/9065bfe481020b04b68a.CMveUrS1.woff2 +0 -0
- package/services/wiki-web/.output/public/_nuxt/B5j-AdCY.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/BAgZ2ZFT.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/BcxnhBGC.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/BeIDAJKt.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/BebqDWPm.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/CFx_Wb7e.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/CSEkmdhK.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/CXYMfke_.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/Cap3hpB7.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/Ckd7UvSj.js +3 -0
- package/services/wiki-web/.output/public/_nuxt/D0DJQL09.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/DRDlUXmk.js +66 -0
- package/services/wiki-web/.output/public/_nuxt/DW42QLqA.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/DdDtdYim.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/Dm1y7TW1.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/DptiLPkM.js +4 -0
- package/services/wiki-web/.output/public/_nuxt/QFl-TMXl.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/_id_.JvKV2jiN.css +1 -0
- package/services/wiki-web/.output/public/_nuxt/a9c9056a643325579e2a.CCNAgZDa.ttf +0 -0
- package/services/wiki-web/.output/public/_nuxt/bojElwT6.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/builds/latest.json +1 -0
- package/services/wiki-web/.output/public/_nuxt/builds/meta/f68e5546-2919-478b-b4ad-702826e8383c.json +1 -0
- package/services/wiki-web/.output/public/_nuxt/d495aba62101f856c80f.DJ4Lg1TH.eot +0 -0
- package/services/wiki-web/.output/public/_nuxt/entry.isoIPAS3.css +1 -0
- package/services/wiki-web/.output/public/_nuxt/f8QtLg7g.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/nhMvlSQm.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/pFBugkEL.js +1 -0
- package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-latin-ext-wght-normal.DmpS2jIq.woff2 +0 -0
- package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-latin-wght-normal.eXO_dkmS.woff2 +0 -0
- package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-vietnamese-wght-normal.qRpaaN48.woff2 +0 -0
- package/services/wiki-web/.output/public/favicon.svg +6 -0
- package/services/wiki-web/.output/public/robots.txt +2 -0
- package/services/wiki-web/.output/server/chunks/_/error-500.mjs +19 -0
- package/services/wiki-web/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/services/wiki-web/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/services/wiki-web/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/services/wiki-web/.output/server/chunks/nitro/nitro.mjs +5352 -0
- package/services/wiki-web/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/services/wiki-web/.output/server/chunks/routes/api-proxy/_...path_.mjs +34 -0
- package/services/wiki-web/.output/server/chunks/routes/api-proxy/_...path_.mjs.map +1 -0
- package/services/wiki-web/.output/server/chunks/routes/renderer.mjs +369 -0
- package/services/wiki-web/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/services/wiki-web/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/services/wiki-web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/services/wiki-web/.output/server/index.mjs +10 -0
- package/services/wiki-web/.output/server/index.mjs.map +1 -0
- package/services/wiki-web/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
- package/services/wiki-web/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/services/wiki-web/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/services/wiki-web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
- package/services/wiki-web/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/services/wiki-web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
- package/services/wiki-web/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/services/wiki-web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
- package/services/wiki-web/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/services/wiki-web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
- package/services/wiki-web/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/services/wiki-web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/services/wiki-web/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/services/wiki-web/.output/server/node_modules/devalue/index.js +4 -0
- package/services/wiki-web/.output/server/node_modules/devalue/package.json +40 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/base64.js +60 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/constants.js +12 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/parse.js +283 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/stringify.js +401 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/uneval.js +552 -0
- package/services/wiki-web/.output/server/node_modules/devalue/src/utils.js +160 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/services/wiki-web/.output/server/node_modules/entities/package.json +120 -0
- package/services/wiki-web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/services/wiki-web/.output/server/node_modules/estree-walker/package.json +37 -0
- package/services/wiki-web/.output/server/node_modules/hookable/dist/index.mjs +257 -0
- package/services/wiki-web/.output/server/node_modules/hookable/package.json +53 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/package.json +71 -0
- package/services/wiki-web/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/services/wiki-web/.output/server/node_modules/ufo/dist/index.mjs +645 -0
- package/services/wiki-web/.output/server/node_modules/ufo/package.json +48 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/server.mjs +180 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/services/wiki-web/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/services/wiki-web/.output/server/node_modules/unhead/package.json +105 -0
- package/services/wiki-web/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/services/wiki-web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/services/wiki-web/.output/server/node_modules/vue/index.js +7 -0
- package/services/wiki-web/.output/server/node_modules/vue/index.mjs +1 -0
- package/services/wiki-web/.output/server/node_modules/vue/package.json +112 -0
- package/services/wiki-web/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/services/wiki-web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
- package/services/wiki-web/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
- package/services/wiki-web/.output/server/package.json +26 -0
- package/services/wiki-worker/index.cjs +66661 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/destr/dist/index.mjs","../../../../../../node_modules/ufo/dist/index.mjs","../../../../../../node_modules/radix3/dist/index.mjs","../../../../../../node_modules/defu/dist/defu.mjs","../../../../../../node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/h3/dist/index.mjs","../../../../../../node_modules/nitropack/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/klona/dist/index.mjs","../../../../../../node_modules/scule/dist/index.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/unctx/dist/index.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/route-rules-utils.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/error.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["getQuery","createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","_inlineAppConfig","createRadixRouter","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { d as defineEventHandler, u as useRuntimeConfig, g as getMethod, a as getRequestHeader, b as getRequestURL, c as createError, p as proxyRequest } from '../../nitro/nitro.mjs';
|
|
2
|
+
import 'node:http';
|
|
3
|
+
import 'node:https';
|
|
4
|
+
import 'node:events';
|
|
5
|
+
import 'node:buffer';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:path';
|
|
8
|
+
import 'node:crypto';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
|
|
11
|
+
const SAFE_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
|
|
12
|
+
function refererOrigin(referer) {
|
|
13
|
+
if (!referer) return void 0;
|
|
14
|
+
try {
|
|
15
|
+
return new URL(referer).origin;
|
|
16
|
+
} catch {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const ____path_ = defineEventHandler((event) => {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
const { apiBase } = useRuntimeConfig();
|
|
23
|
+
if (!SAFE_METHODS.has(getMethod(event))) {
|
|
24
|
+
const requestOrigin = (_a = getRequestHeader(event, "origin")) != null ? _a : refererOrigin(getRequestHeader(event, "referer"));
|
|
25
|
+
if (!requestOrigin || requestOrigin !== getRequestURL(event).origin) {
|
|
26
|
+
throw createError({ statusCode: 403, statusMessage: "cross-origin state-changing request blocked" });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const path = (_c = (_b = event.context.params) == null ? void 0 : _b.path) != null ? _c : "";
|
|
30
|
+
return proxyRequest(event, `${apiBase}/${path}`);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export { ____path_ as default };
|
|
34
|
+
//# sourceMappingURL=_...path_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_...path_.mjs","sources":["../../../../../server/routes/api-proxy/[...path].ts"],"names":[],"mappings":";;;;;;;;;;AAEA,MAAA,+BAAA,IAAA,GAAA,CAAA,CAAA,KAAA,EAAA,MAAA,EAAA,SAAA,CAAA,CAAA;AAEA,SAAA,cAAA,OAAA,EAAA;AACA,EAAA,IAAA,CAAA,SAAA,OAAA,MAAA;AACA,EAAA,IAAA;AACA,IAAA,OAAA,IAAA,GAAA,CAAA,OAAA,CAAA,CAAA,MAAA;AAAA,EACA,CAAA,CAAA,MAAA;AACA,IAAA,OAAA,MAAA;AAAA,EACA;AACA;AAEA,kBAAA,kBAAA,CAAA,CAAA,KAAA,KAAA;;AACA,EAAA,MAAA,EAAA,OAAA,EAAA,GAAA,gBAAA,EAAA;AAMA,EAAA,IAAA,CAAA,YAAA,CAAA,GAAA,CAAA,SAAA,CAAA,KAAA,CAAA,CAAA,EAAA;AACA,IAAA,MAAA,aAAA,GAAA,CAAA,EAAA,GAAA,gBAAA,CAAA,KAAA,EAAA,QAAA,CAAA,KAAA,YAAA,aAAA,CAAA,gBAAA,CAAA,KAAA,EAAA,SAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,aAAA,IAAA,aAAA,KAAA,aAAA,CAAA,KAAA,EAAA,MAAA,EAAA;AACA,MAAA,MAAA,YAAA,EAAA,UAAA,EAAA,GAAA,EAAA,aAAA,EAAA,+CAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA,EAAA,MAAA,QAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,OAAA,CAAA,MAAA,KAAA,IAAA,GAAA,MAAA,GAAA,EAAA,CAAA,SAAA,IAAA,GAAA,EAAA,GAAA,EAAA;AACA,EAAA,OAAA,aAAA,KAAA,EAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AACA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
|
|
2
|
+
import { j as joinRelativeURL, u as useRuntimeConfig, e as encodePath, f as defineRenderHandler, h as getQuery, c as createError, i as destr, k as getRouteRules, l as getResponseStatusText, m as getResponseStatus, n as useNitroApp } from '../nitro/nitro.mjs';
|
|
3
|
+
import { createHead as createHead$1, propsToString, renderSSRHead } from 'unhead/server';
|
|
4
|
+
import { stringify, uneval } from 'devalue';
|
|
5
|
+
import { isRef, toValue } from 'vue';
|
|
6
|
+
import 'node:http';
|
|
7
|
+
import 'node:https';
|
|
8
|
+
import 'node:events';
|
|
9
|
+
import 'node:buffer';
|
|
10
|
+
import 'node:fs';
|
|
11
|
+
import 'node:path';
|
|
12
|
+
import 'node:crypto';
|
|
13
|
+
import 'node:url';
|
|
14
|
+
|
|
15
|
+
const VueResolver = (_, value) => {
|
|
16
|
+
return isRef(value) ? toValue(value) : value;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const headSymbol = "usehead";
|
|
20
|
+
// @__NO_SIDE_EFFECTS__
|
|
21
|
+
function vueInstall(head) {
|
|
22
|
+
const plugin = {
|
|
23
|
+
install(app) {
|
|
24
|
+
app.config.globalProperties.$unhead = head;
|
|
25
|
+
app.config.globalProperties.$head = head;
|
|
26
|
+
app.provide(headSymbol, head);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return plugin.install;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// @__NO_SIDE_EFFECTS__
|
|
33
|
+
function createHead(options = {}) {
|
|
34
|
+
const head = createHead$1({
|
|
35
|
+
...options,
|
|
36
|
+
propResolvers: [VueResolver]
|
|
37
|
+
});
|
|
38
|
+
head.install = vueInstall(head);
|
|
39
|
+
return head;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const NUXT_RUNTIME_PAYLOAD_EXTRACTION = false;
|
|
43
|
+
|
|
44
|
+
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"}],"link":[{"rel":"icon","type":"image/svg+xml","href":"/favicon.svg"}],"style":[],"script":[{"innerHTML":"(function(){try{var k='nostale-color-scheme';var m=window.matchMedia('(prefers-color-scheme: dark)');var f=function(){var v=localStorage.getItem(k);var d=v==='dark'||((v===null||v==='auto')&&m.matches);document.documentElement.classList.toggle('dark',d)};f();m.addEventListener('change',f)}catch(e){}})()","tagPosition":"head"}],"noscript":[]};
|
|
45
|
+
|
|
46
|
+
const appRootTag = "div";
|
|
47
|
+
|
|
48
|
+
const appRootAttrs = {"id":"__nuxt"};
|
|
49
|
+
|
|
50
|
+
const appTeleportTag = "div";
|
|
51
|
+
|
|
52
|
+
const appTeleportAttrs = {"id":"teleports"};
|
|
53
|
+
|
|
54
|
+
const appSpaLoaderTag = "div";
|
|
55
|
+
|
|
56
|
+
const appSpaLoaderAttrs = {"id":"__nuxt-loader"};
|
|
57
|
+
|
|
58
|
+
const appId = "nuxt-app";
|
|
59
|
+
|
|
60
|
+
function buildAssetsDir() {
|
|
61
|
+
|
|
62
|
+
return useRuntimeConfig().app.buildAssetsDir;
|
|
63
|
+
}
|
|
64
|
+
function buildAssetsURL(...path) {
|
|
65
|
+
return joinRelativeURL(publicAssetsURL(), buildAssetsDir(), ...path);
|
|
66
|
+
}
|
|
67
|
+
function publicAssetsURL(...path) {
|
|
68
|
+
|
|
69
|
+
const app = useRuntimeConfig().app;
|
|
70
|
+
const publicBase = app.cdnURL || app.baseURL;
|
|
71
|
+
return path.length ? joinRelativeURL(publicBase, ...path) : publicBase;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// @ts-expect-error private property consumed by vite-generated url helpers
|
|
75
|
+
globalThis.__buildAssetsURL = buildAssetsURL;
|
|
76
|
+
// @ts-expect-error private property consumed by vite-generated url helpers
|
|
77
|
+
globalThis.__publicAssetsURL = publicAssetsURL;
|
|
78
|
+
const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
|
|
79
|
+
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
|
|
80
|
+
// @ts-expect-error file will be produced after app build
|
|
81
|
+
const getPrecomputedDependencies = () => import('../build/client.precomputed.mjs').then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
|
|
82
|
+
|
|
83
|
+
const getSPARenderer = lazyCachedFunction(async () => {
|
|
84
|
+
const precomputed = await getPrecomputedDependencies();
|
|
85
|
+
// @ts-expect-error virtual file
|
|
86
|
+
const spaTemplate = await import('../virtual/_virtual_spa-template.mjs').then((r) => r.template).catch(() => "").then((r) => {
|
|
87
|
+
{
|
|
88
|
+
const APP_SPA_LOADER_OPEN_TAG = `<${appSpaLoaderTag}${propsToString(appSpaLoaderAttrs)}>`;
|
|
89
|
+
const APP_SPA_LOADER_CLOSE_TAG = `</${appSpaLoaderTag}>`;
|
|
90
|
+
const appTemplate = APP_ROOT_OPEN_TAG + APP_ROOT_CLOSE_TAG;
|
|
91
|
+
const loaderTemplate = r ? APP_SPA_LOADER_OPEN_TAG + r + APP_SPA_LOADER_CLOSE_TAG : "";
|
|
92
|
+
return appTemplate + loaderTemplate;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const renderer = createRenderer(() => () => {}, {
|
|
97
|
+
precomputed,
|
|
98
|
+
manifest: undefined,
|
|
99
|
+
renderToString: () => spaTemplate,
|
|
100
|
+
buildAssetsURL
|
|
101
|
+
});
|
|
102
|
+
const result = await renderer.renderToString({});
|
|
103
|
+
const renderToString = (ssrContext) => {
|
|
104
|
+
const config = useRuntimeConfig(ssrContext.event);
|
|
105
|
+
ssrContext.modules ||= new Set();
|
|
106
|
+
ssrContext.payload.serverRendered = false;
|
|
107
|
+
ssrContext.config = {
|
|
108
|
+
public: config.public,
|
|
109
|
+
app: config.app
|
|
110
|
+
};
|
|
111
|
+
return Promise.resolve(result);
|
|
112
|
+
};
|
|
113
|
+
return {
|
|
114
|
+
rendererContext: renderer.rendererContext,
|
|
115
|
+
renderToString
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
function lazyCachedFunction(fn) {
|
|
119
|
+
let res = null;
|
|
120
|
+
return () => {
|
|
121
|
+
if (res === null) {
|
|
122
|
+
res = fn().catch((err) => {
|
|
123
|
+
res = null;
|
|
124
|
+
throw err;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return res;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function getRenderer(ssrContext) {
|
|
131
|
+
return getSPARenderer() ;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function renderPayloadJsonScript(opts) {
|
|
135
|
+
const contents = opts.data ? encodeForwardSlashes(stringify(opts.data, opts.ssrContext["~payloadReducers"])) : "";
|
|
136
|
+
const payload = {
|
|
137
|
+
"type": "application/json",
|
|
138
|
+
"innerHTML": contents,
|
|
139
|
+
"data-nuxt-data": appId,
|
|
140
|
+
"data-ssr": false
|
|
141
|
+
};
|
|
142
|
+
{
|
|
143
|
+
payload.id = "__NUXT_DATA__";
|
|
144
|
+
}
|
|
145
|
+
if (opts.src) {
|
|
146
|
+
payload["data-src"] = opts.src;
|
|
147
|
+
}
|
|
148
|
+
const config = uneval(opts.ssrContext.config);
|
|
149
|
+
return [payload, { innerHTML: `window.__NUXT__={};window.__NUXT__.config=${config}` }];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function encodeForwardSlashes(str) {
|
|
153
|
+
return str.replaceAll("/", "\\u002F");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const unheadOptions = {
|
|
157
|
+
disableDefaults: true,
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
function encodeEventPath(path) {
|
|
161
|
+
const queryIndex = path.indexOf("?");
|
|
162
|
+
if (queryIndex === -1) {
|
|
163
|
+
return encodePath(path);
|
|
164
|
+
}
|
|
165
|
+
return encodePath(path.slice(0, queryIndex)) + path.slice(queryIndex);
|
|
166
|
+
}
|
|
167
|
+
function createSSRContext(event) {
|
|
168
|
+
const url = encodeEventPath(event.path);
|
|
169
|
+
const ssrContext = {
|
|
170
|
+
url,
|
|
171
|
+
event,
|
|
172
|
+
runtimeConfig: useRuntimeConfig(event),
|
|
173
|
+
noSSR: true,
|
|
174
|
+
head: createHead(unheadOptions),
|
|
175
|
+
error: false,
|
|
176
|
+
nuxt: undefined,
|
|
177
|
+
payload: {},
|
|
178
|
+
["~payloadReducers"]: Object.create(null),
|
|
179
|
+
modules: new Set()
|
|
180
|
+
};
|
|
181
|
+
return ssrContext;
|
|
182
|
+
}
|
|
183
|
+
function setSSRError(ssrContext, error) {
|
|
184
|
+
ssrContext.error = true;
|
|
185
|
+
ssrContext.payload = { error };
|
|
186
|
+
ssrContext.url = error.url;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const renderSSRHeadOptions = {"omitLineBreaks":true};
|
|
190
|
+
|
|
191
|
+
// @ts-expect-error private property consumed by vite-generated url helpers
|
|
192
|
+
globalThis.__buildAssetsURL = buildAssetsURL;
|
|
193
|
+
// @ts-expect-error private property consumed by vite-generated url helpers
|
|
194
|
+
globalThis.__publicAssetsURL = publicAssetsURL;
|
|
195
|
+
const HAS_APP_TELEPORTS = !!(appTeleportAttrs.id);
|
|
196
|
+
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : "";
|
|
197
|
+
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : "";
|
|
198
|
+
const handler = defineRenderHandler((event) => {
|
|
199
|
+
|
|
200
|
+
const ssrError = event.path.startsWith("/__nuxt_error") ? getQuery(event) : null;
|
|
201
|
+
if (ssrError && !("__unenv__" in event.node.req)) {
|
|
202
|
+
throw createError({
|
|
203
|
+
status: 404,
|
|
204
|
+
statusText: "Page Not Found: /__nuxt_error",
|
|
205
|
+
message: "Page Not Found: /__nuxt_error"
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
return renderRoute(event, ssrError);
|
|
209
|
+
});
|
|
210
|
+
async function renderRoute(event, ssrError) {
|
|
211
|
+
const nitroApp = useNitroApp();
|
|
212
|
+
|
|
213
|
+
const ssrContext = createSSRContext(event);
|
|
214
|
+
|
|
215
|
+
const headEntryOptions = { mode: "server" };
|
|
216
|
+
ssrContext.head.push(appHead, headEntryOptions);
|
|
217
|
+
if (ssrError) {
|
|
218
|
+
|
|
219
|
+
const status = ssrError.status || ssrError.statusCode;
|
|
220
|
+
if (status) {
|
|
221
|
+
|
|
222
|
+
ssrError.status = ssrError.statusCode = Number.parseInt(status);
|
|
223
|
+
}
|
|
224
|
+
if (typeof ssrError.data === "string") {
|
|
225
|
+
try {
|
|
226
|
+
ssrError.data = destr(ssrError.data);
|
|
227
|
+
} catch {}
|
|
228
|
+
}
|
|
229
|
+
setSSRError(ssrContext, ssrError);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const routeOptions = getRouteRules(event);
|
|
233
|
+
if (routeOptions.ssr === false) {
|
|
234
|
+
ssrContext.noSSR = true;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
!ssrContext.noSSR && (NUXT_RUNTIME_PAYLOAD_EXTRACTION);
|
|
238
|
+
|
|
239
|
+
const renderer = await getRenderer();
|
|
240
|
+
const _rendered = await renderer.renderToString(ssrContext).catch(async (error) => {
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
if ((ssrContext["~renderResponse"] || ssrContext._renderResponse) && error.message === "skipping render") {
|
|
244
|
+
return {};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const _err = !ssrError && ssrContext.payload?.error || error;
|
|
248
|
+
await ssrContext.nuxt?.hooks.callHook("app:error", _err);
|
|
249
|
+
throw _err;
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
const inlinedStyles = [];
|
|
254
|
+
await ssrContext.nuxt?.hooks.callHook("app:rendered", {
|
|
255
|
+
ssrContext,
|
|
256
|
+
renderResult: _rendered
|
|
257
|
+
});
|
|
258
|
+
if (ssrContext["~renderResponse"] || ssrContext._renderResponse) {
|
|
259
|
+
|
|
260
|
+
return ssrContext["~renderResponse"] || ssrContext._renderResponse;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (ssrContext.payload?.error && !ssrError) {
|
|
264
|
+
throw ssrContext.payload.error;
|
|
265
|
+
}
|
|
266
|
+
const NO_SCRIPTS = routeOptions.noScripts;
|
|
267
|
+
|
|
268
|
+
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
|
269
|
+
|
|
270
|
+
if (inlinedStyles.length) {
|
|
271
|
+
ssrContext.head.push({ style: inlinedStyles });
|
|
272
|
+
}
|
|
273
|
+
const link = [];
|
|
274
|
+
for (const resource of Object.values(styles)) {
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
link.push({
|
|
279
|
+
rel: "stylesheet",
|
|
280
|
+
href: renderer.rendererContext.buildAssetsURL(resource.file),
|
|
281
|
+
crossorigin: ""
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
if (link.length) {
|
|
285
|
+
ssrContext.head.push({ link }, headEntryOptions);
|
|
286
|
+
}
|
|
287
|
+
if (!NO_SCRIPTS) {
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
if (ssrContext["~lazyHydratedModules"]) {
|
|
292
|
+
for (const id of ssrContext["~lazyHydratedModules"]) {
|
|
293
|
+
ssrContext.modules?.delete(id);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
ssrContext.head.push({ link: getPreloadLinks(ssrContext, renderer.rendererContext) }, headEntryOptions);
|
|
297
|
+
ssrContext.head.push({ link: getPrefetchLinks(ssrContext, renderer.rendererContext) }, headEntryOptions);
|
|
298
|
+
|
|
299
|
+
ssrContext.head.push({ script: renderPayloadJsonScript({
|
|
300
|
+
ssrContext,
|
|
301
|
+
data: ssrContext.payload
|
|
302
|
+
}) }, {
|
|
303
|
+
...headEntryOptions,
|
|
304
|
+
|
|
305
|
+
tagPosition: "bodyClose",
|
|
306
|
+
tagPriority: "high"
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (!routeOptions.noScripts) {
|
|
311
|
+
const tagPosition = "head";
|
|
312
|
+
ssrContext.head.push({ script: Object.values(scripts).map((resource) => ({
|
|
313
|
+
type: resource.module ? "module" : null,
|
|
314
|
+
src: renderer.rendererContext.buildAssetsURL(resource.file),
|
|
315
|
+
defer: resource.module ? null : true,
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
tagPosition,
|
|
319
|
+
crossorigin: ""
|
|
320
|
+
})) }, headEntryOptions);
|
|
321
|
+
}
|
|
322
|
+
const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = await renderSSRHead(ssrContext.head, renderSSRHeadOptions);
|
|
323
|
+
|
|
324
|
+
const htmlContext = {
|
|
325
|
+
htmlAttrs: htmlAttrs ? [htmlAttrs] : [],
|
|
326
|
+
head: normalizeChunks([headTags]),
|
|
327
|
+
bodyAttrs: bodyAttrs ? [bodyAttrs] : [],
|
|
328
|
+
bodyPrepend: normalizeChunks([bodyTagsOpen, ssrContext.teleports?.body]),
|
|
329
|
+
body: [_rendered.html, APP_TELEPORT_OPEN_TAG + (HAS_APP_TELEPORTS ? joinTags([ssrContext.teleports?.[`#${appTeleportAttrs.id}`]]) : "") + APP_TELEPORT_CLOSE_TAG],
|
|
330
|
+
bodyAppend: [bodyTags]
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
await nitroApp.hooks.callHook("render:html", htmlContext, { event });
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
body: renderHTMLDocument(htmlContext),
|
|
337
|
+
statusCode: getResponseStatus(event),
|
|
338
|
+
statusMessage: getResponseStatusText(event),
|
|
339
|
+
headers: {
|
|
340
|
+
"content-type": "text/html;charset=utf-8",
|
|
341
|
+
"x-powered-by": "Nuxt"
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function normalizeChunks(chunks) {
|
|
346
|
+
const result = [];
|
|
347
|
+
for (const _chunk of chunks) {
|
|
348
|
+
const chunk = _chunk?.trim();
|
|
349
|
+
if (chunk) {
|
|
350
|
+
result.push(chunk);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return result;
|
|
354
|
+
}
|
|
355
|
+
function joinTags(tags) {
|
|
356
|
+
return tags.join("");
|
|
357
|
+
}
|
|
358
|
+
function joinAttrs(chunks) {
|
|
359
|
+
if (chunks.length === 0) {
|
|
360
|
+
return "";
|
|
361
|
+
}
|
|
362
|
+
return " " + chunks.join(" ");
|
|
363
|
+
}
|
|
364
|
+
function renderHTMLDocument(html) {
|
|
365
|
+
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>";
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export { handler as default };
|
|
369
|
+
//# sourceMappingURL=renderer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.mjs","sources":["../../../../../../node_modules/@unhead/vue/dist/shared/vue.N9zWjxoK.mjs","../../../../../../node_modules/@unhead/vue/dist/shared/vue.Cr7xSEtD.mjs","../../../../../../node_modules/@unhead/vue/dist/server.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/build-files.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/payload.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/app.mjs","../../../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_virtual_spa-template.mjs","sources":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import 'node:http';
|
|
2
|
+
import 'node:https';
|
|
3
|
+
export { o as default } from './chunks/nitro/nitro.mjs';
|
|
4
|
+
import 'node:events';
|
|
5
|
+
import 'node:buffer';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:path';
|
|
8
|
+
import 'node:crypto';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":";;;;;;;;"}
|