@vite-hub/docs 0.5.0 → 0.6.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 +3 -1
- package/dist/{agent-copy-xPaWye_g.js → agent-copy-CY9_RkHN.js} +2 -3
- package/dist/{assistant-pages-CqNlHsx-.js → assistant-pages-BbWfd69g.js} +3 -4
- package/dist/{assistant-shared-CWIKRtBv.d.ts → assistant-shared-BWeRcmVS.d.ts} +0 -2
- package/dist/{assistant-shared-DhiLHKSl.js → assistant-shared-JcfjK-qg.js} +3 -4
- package/dist/assistant-worker.d.ts +1 -3
- package/dist/assistant-worker.js +2 -3
- package/dist/assistant.d.ts +1 -3
- package/dist/assistant.js +2 -3
- package/dist/{content-BQVlMshL.js → content-C_WXjV3y.js} +7 -15
- package/dist/{draft-CSsTYSeb.js → draft-rOGhtXch.js} +3 -4
- package/dist/{error-diagnostics-CmgtG9xa.js → error-diagnostics-Daz9oBJS.js} +1 -2
- package/dist/{files-UY4h1_36.js → files-BBoAGhhM.js} +1 -2
- package/dist/index.d.ts +5 -7
- package/dist/index.js +3 -4
- package/dist/link-checker-redirects.d.ts +0 -2
- package/dist/link-checker-redirects.js +2 -3
- package/dist/{manifest-DvECmwX-.js → manifest-Bti_WxDZ.js} +5 -7
- package/dist/{manifest-Drbdw1us.d.ts → manifest-DJ2DyNue.d.ts} +1 -5
- package/dist/{markdown-BiKrT08O.d.ts → markdown-B97RuMXs.d.ts} +1 -3
- package/dist/{markdown-1M1FbjCw.js → markdown-BzZkYb24.js} +2 -3
- package/dist/navigation.d.ts +2 -4
- package/dist/navigation.js +1 -2
- package/dist/{nuxt-8O2OB_hI.d.ts → nuxt-CYAIBEHE.d.ts} +3 -13
- package/dist/nuxt.d.ts +2 -2
- package/dist/nuxt.js +45 -57
- package/dist/{page-BryUCmYf.d.ts → page-B8_70-5D.d.ts} +2 -4
- package/dist/{page-Bb0TfRKi.js → page-DWsretqk.js} +1 -2
- package/dist/primitive-rail.d.ts +0 -6
- package/dist/primitive-rail.js +3 -6
- package/dist/{raw-BChwipz_.js → raw-CQukuLuj.js} +1 -2
- package/dist/{redirects-BJj58IsY.js → redirects-BEFu4KLR.js} +2 -3
- package/dist/runnable.d.ts +2 -6
- package/dist/runnable.js +2 -3
- package/dist/runtime/server/llms.d.ts +0 -2
- package/dist/runtime/server/llms.js +2 -3
- package/dist/runtime/server/markdown.d.ts +0 -2
- package/dist/runtime/server/markdown.js +3 -4
- package/dist/runtime/server/mcp.d.ts +0 -2
- package/dist/runtime/server/mcp.js +2 -3
- package/dist/runtime/server/page.d.ts +1 -3
- package/dist/runtime/server/page.js +4 -5
- package/dist/runtime/server/raw.d.ts +0 -2
- package/dist/runtime/server/raw.js +2 -3
- package/dist/runtime/server/search.d.ts +1 -3
- package/dist/runtime/server/search.js +3 -4
- package/dist/runtime/server/sitemap.d.ts +0 -2
- package/dist/runtime/server/sitemap.js +3 -5
- package/dist/runtime/server/trailing-slash.d.ts +0 -2
- package/dist/runtime/server/trailing-slash.js +1 -2
- package/dist/{schema-DcWZ3Q3M.js → schema-CmSiwC4t.js} +1 -2
- package/dist/server.d.ts +3 -5
- package/dist/server.js +4 -4
- package/dist/{steps-DBlkJwtD.d.ts → steps-C3tGwhNK.d.ts} +1 -3
- package/dist/{steps-DF-11dJn.js → steps-muDP1nYT.js} +1 -2
- package/dist/{theme-BXyu4uFL.d.ts → theme-CgJRnVdT.d.ts} +0 -4
- package/dist/{theme-DzC8LtMH.js → theme-CxBzPBZ9.js} +2 -4
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -2
- package/dist/{types-CHU_fy9l.d.ts → types-B6YlHil4.d.ts} +0 -4
- package/package.json +35 -34
package/dist/nuxt.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { t as docsErrorDiagnostics } from "./error-diagnostics-Daz9oBJS.js";
|
|
2
|
+
import { t as dependencyKey } from "./steps-muDP1nYT.js";
|
|
3
|
+
import { a as docsAppManifestSource, c as resolveDocsSources, d as docsLinkExclusion, f as docsOutputFile, i as docsAppManifest, l as checkDocsLinks, n as createDocsContent, o as docsAppPanelSource, s as readDocsContent, t as contentName, u as docsLinkError } from "./manifest-Bti_WxDZ.js";
|
|
1
4
|
import { docsAppPath, docsIndexedPages, docsManifestPages, docsPageIcon, docsPageIndexed, docsRailIcon, docsRawPath, docsSectionIcon, isDocsPath, isDocsWorkspaceLayout, normalizeDocsBase, normalizeDocsPath } from "./navigation.js";
|
|
2
|
-
import { a as replacesDocsPage, o as routePaths, t as docsMount } from "./page-
|
|
3
|
-
import {
|
|
4
|
-
import { i as docsServerRoutes, n as docsRedirectProblems, r as docsRedirects, t as docsRedirectError } from "./redirects-
|
|
5
|
-
import { t as
|
|
6
|
-
import { a as docsAppManifestSource, c as resolveDocsSources, d as docsLinkExclusion, f as docsOutputFile, i as docsAppManifest, l as checkDocsLinks, n as createDocsContent, o as docsAppPanelSource, s as readDocsContent, t as contentName, u as docsLinkError } from "./manifest-DvECmwX-.js";
|
|
7
|
-
import { r as docsContentSource } from "./agent-copy-xPaWye_g.js";
|
|
8
|
-
import { i as docsThemeScope, n as docsThemeAdditions, r as docsUi, t as docsAppConfigUi } from "./theme-DzC8LtMH.js";
|
|
5
|
+
import { a as replacesDocsPage, o as routePaths, t as docsMount } from "./page-DWsretqk.js";
|
|
6
|
+
import { r as docsContentSource } from "./agent-copy-CY9_RkHN.js";
|
|
7
|
+
import { i as docsServerRoutes, n as docsRedirectProblems, r as docsRedirects, t as docsRedirectError } from "./redirects-BEFu4KLR.js";
|
|
8
|
+
import { i as docsThemeScope, n as docsThemeAdditions, r as docsUi, t as docsAppConfigUi } from "./theme-CxBzPBZ9.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { addComponent, addComponentsDir, addImportsDir, addPlugin, addRouteMiddleware, addServerHandler, addTemplate, addTypeTemplate, createResolver, defineNuxtModule, extendPages, updateTemplates, useLogger } from "@nuxt/kit";
|
|
11
11
|
import { addRoute, createRouter, findAllRoutes, routeToRegExp } from "rou3";
|
|
@@ -26,7 +26,7 @@ import { execFileSync, spawn } from "node:child_process";
|
|
|
26
26
|
import { ELEMENT_NODE, parse as parse$2, walkSync } from "ultrahtml";
|
|
27
27
|
import { gzipSync } from "node:zlib";
|
|
28
28
|
import postcss from "postcss";
|
|
29
|
-
|
|
29
|
+
// ../internal/dist/invariant.js
|
|
30
30
|
const invariantDiagnostics = /*#__PURE__*/ defineDiagnostics({
|
|
31
31
|
docsBase: "https://vitehub.dev/docs/development/diagnostics",
|
|
32
32
|
codes: { INTERNAL_INVARIANT_FAILED: {
|
|
@@ -45,8 +45,7 @@ function invariantError(what) {
|
|
|
45
45
|
function invariant(condition, what) {
|
|
46
46
|
if (!condition) throw invariantError(what);
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
48
|
+
// ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
50
49
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
51
50
|
function normalizeWindowsPath(input = "") {
|
|
52
51
|
if (!input) return input;
|
|
@@ -130,8 +129,7 @@ const dirname$1 = function(p) {
|
|
|
130
129
|
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
131
130
|
return segments.join("/") || (isAbsolute$1(p) ? "/" : ".");
|
|
132
131
|
};
|
|
133
|
-
|
|
134
|
-
//#region ../internal/dist/build/paths.js
|
|
132
|
+
// ../internal/dist/build/paths.js
|
|
135
133
|
function resolveRuntimeModule(packageDir, modulePath) {
|
|
136
134
|
const distFile = resolve$1(packageDir, "dist", `${modulePath}.js`);
|
|
137
135
|
return existsSync(distFile) ? distFile : resolve$1(packageDir, "src", `${modulePath}.ts`);
|
|
@@ -158,8 +156,7 @@ function findPackageDir(file) {
|
|
|
158
156
|
function ownModule(importMetaUrl, modulePath) {
|
|
159
157
|
return resolveRuntimeModule(findPackageDir(fileURLToPath(importMetaUrl)), modulePath);
|
|
160
158
|
}
|
|
161
|
-
|
|
162
|
-
//#region ../internal/dist/vite-DGZFNpcx.js
|
|
159
|
+
// ../internal/dist/vite-D86Q14G4.js
|
|
163
160
|
const projectRootDirectoryMarkers = [
|
|
164
161
|
["server", "agents"],
|
|
165
162
|
["server", "channels"],
|
|
@@ -227,8 +224,7 @@ function isMissingProjectMarker(error) {
|
|
|
227
224
|
const code = error.code;
|
|
228
225
|
return code === "ENOENT" || code === "ENOTDIR";
|
|
229
226
|
}
|
|
230
|
-
|
|
231
|
-
//#region ../internal/dist/hints.js
|
|
227
|
+
// ../internal/dist/hints.js
|
|
232
228
|
/**
|
|
233
229
|
* The file that lists the hints of the last build or dev server, relative to the project root. A hint is a warning
|
|
234
230
|
* about something that works now and fails later, such as counts that stay in one server's memory. Agents and CI read
|
|
@@ -306,8 +302,7 @@ function startViteHubHints(config, owner = config) {
|
|
|
306
302
|
started.add(owner);
|
|
307
303
|
write(startRun(config));
|
|
308
304
|
}
|
|
309
|
-
|
|
310
|
-
//#region src/module-options.ts
|
|
305
|
+
// src/module-options.ts
|
|
311
306
|
/** The module name: a string entry, or the `getMeta()` name of an imported module function. */
|
|
312
307
|
async function moduleName(module) {
|
|
313
308
|
if (typeof module !== "function") return module;
|
|
@@ -345,8 +340,7 @@ async function readModuleOptions(nuxt, names, configKey, requireInstalled = fals
|
|
|
345
340
|
async function viteHubModuleOptions(nuxt) {
|
|
346
341
|
return await readModuleOptions(nuxt, ["vite-hub/nuxt"], "vitehub", true);
|
|
347
342
|
}
|
|
348
|
-
|
|
349
|
-
//#region src/assistant-nuxt.ts
|
|
343
|
+
// src/assistant-nuxt.ts
|
|
350
344
|
/**
|
|
351
345
|
* Checks what the docs assistant needs, when `docs.assistant` is on. The docs module calls it from its setup.
|
|
352
346
|
*
|
|
@@ -364,8 +358,7 @@ function setupDocsAssistant(nuxt, config) {
|
|
|
364
358
|
if (!(await viteHubModuleOptions(nuxt))?.agent) throw docsErrorDiagnostics.DOCS_ASSISTANT_AGENTS_MISSING({ agent: assistant.agent });
|
|
365
359
|
});
|
|
366
360
|
}
|
|
367
|
-
|
|
368
|
-
//#region src/comark-blocks.ts
|
|
361
|
+
// src/comark-blocks.ts
|
|
369
362
|
/**
|
|
370
363
|
* The source of a module whose default export is comark-ui's block components by tag, each one loaded on first use.
|
|
371
364
|
* `comark-ui/vue` imports every block package, so a page that rendered with it downloaded all of them. Each tag imports
|
|
@@ -403,8 +396,7 @@ async function comarkBlocksSource() {
|
|
|
403
396
|
return ` ${JSON.stringify(tag)}: defineAsyncComponent(() => import(${file}).then(module => ${map}[${JSON.stringify(tag)}])),`;
|
|
404
397
|
}).join("\n")}\n}\n`;
|
|
405
398
|
}
|
|
406
|
-
|
|
407
|
-
//#region src/comments-nuxt.ts
|
|
399
|
+
// src/comments-nuxt.ts
|
|
408
400
|
/** Whether the app can import `name`, as `vite-hub` resolves its optional peers. */
|
|
409
401
|
function installed(name, rootDir) {
|
|
410
402
|
try {
|
|
@@ -438,8 +430,7 @@ async function docsCommentsDependencies(nuxt, comments) {
|
|
|
438
430
|
defaults: { comments: comments === void 0 || comments === true ? true : comments }
|
|
439
431
|
} };
|
|
440
432
|
}
|
|
441
|
-
|
|
442
|
-
//#region src/runnable/build.ts
|
|
433
|
+
// src/runnable/build.ts
|
|
443
434
|
const ignoredEntries = /* @__PURE__ */ new Set([
|
|
444
435
|
"node_modules",
|
|
445
436
|
".output",
|
|
@@ -697,8 +688,7 @@ async function buildRunnableTutorial(input) {
|
|
|
697
688
|
steps
|
|
698
689
|
};
|
|
699
690
|
}
|
|
700
|
-
|
|
701
|
-
//#region src/runnable/workspaces.ts
|
|
691
|
+
// src/runnable/workspaces.ts
|
|
702
692
|
/** The `playground` and `learn` pages of the site. */
|
|
703
693
|
function workspacePages(pages) {
|
|
704
694
|
return pages.filter((page) => (page.layout === "playground" || page.layout === "learn") && !!page.workspace);
|
|
@@ -878,8 +868,7 @@ function pageModule(data, loaders, decode = []) {
|
|
|
878
868
|
lines.push("export default data", "");
|
|
879
869
|
return lines.join("\n");
|
|
880
870
|
}
|
|
881
|
-
|
|
882
|
-
//#region src/workspace-nuxt.ts
|
|
871
|
+
// src/workspace-nuxt.ts
|
|
883
872
|
/**
|
|
884
873
|
* The `webContainer` defaults of `vite-hub/nuxt` for the pages that run a WebContainer. `vite-hub/nuxt` sends the
|
|
885
874
|
* cross-origin isolation headers on these routes only. The defaults merge with the app's own `vitehub.webContainer.routes`,
|
|
@@ -890,8 +879,7 @@ async function docsWebContainerDefaults(nuxt, routes) {
|
|
|
890
879
|
if (!await viteHubModuleOptions(nuxt)) throw docsErrorDiagnostics.DOCS_WORKSPACE_VITEHUB_MISSING({ pages: routes });
|
|
891
880
|
return { webContainer: { routes: [...routes] } };
|
|
892
881
|
}
|
|
893
|
-
|
|
894
|
-
//#region src/runnable/learn.ts
|
|
882
|
+
// src/runnable/learn.ts
|
|
895
883
|
/**
|
|
896
884
|
* Reading at 200 words a minute, plus 2 minutes to do each step, rounded up to 5 minutes.
|
|
897
885
|
* Code blocks do not count as reading, because the reader copies or opens them.
|
|
@@ -912,8 +900,7 @@ function tutorialPageFacts(markdown) {
|
|
|
912
900
|
minutes: tutorialMinutes(markdown)
|
|
913
901
|
};
|
|
914
902
|
}
|
|
915
|
-
|
|
916
|
-
//#region src/runnable/playground.ts
|
|
903
|
+
// src/runnable/playground.ts
|
|
917
904
|
/**
|
|
918
905
|
* Reads the files of each example from its fixture.
|
|
919
906
|
*
|
|
@@ -970,8 +957,7 @@ function snapshotSources(tutorials, examples, templates) {
|
|
|
970
957
|
};
|
|
971
958
|
})];
|
|
972
959
|
}
|
|
973
|
-
|
|
974
|
-
//#region src/runnable/snapshots.ts
|
|
960
|
+
// src/runnable/snapshots.ts
|
|
975
961
|
const SNAPSHOT_CONCURRENCY = 3;
|
|
976
962
|
/** Runs `snapshot-worker.mjs` and returns its stdout. Its warnings, such as an updated lockfile, go to stderr. */
|
|
977
963
|
function runSnapshotWorker(args) {
|
|
@@ -1269,8 +1255,7 @@ async function buildTutorialSnapshots(input) {
|
|
|
1269
1255
|
await writeFile(resolve(outDir, "snapshots.json"), `${JSON.stringify(file, null, 2)}\n`);
|
|
1270
1256
|
return snapshots;
|
|
1271
1257
|
}
|
|
1272
|
-
|
|
1273
|
-
//#region src/runnable/nuxt.ts
|
|
1258
|
+
// src/runnable/nuxt.ts
|
|
1274
1259
|
/** Where Nitro serves the snapshot parts, under the app base. */
|
|
1275
1260
|
const baseURL = "/_tutorials";
|
|
1276
1261
|
/**
|
|
@@ -1467,8 +1452,7 @@ async function setupDocsRunnable(options, input) {
|
|
|
1467
1452
|
function docsWorkspacesSource(pages) {
|
|
1468
1453
|
return `export default {\n${pages.map((page) => ` ${JSON.stringify(page.path)}: () => import(${JSON.stringify(`./workspaces/${workspacePageSlug(page.path)}.mjs`)}),`).join("\n")}\n}\n`;
|
|
1469
1454
|
}
|
|
1470
|
-
|
|
1471
|
-
//#region src/content-check.ts
|
|
1455
|
+
// src/content-check.ts
|
|
1472
1456
|
/**
|
|
1473
1457
|
* `content.check()` over the docs pages, as `vitehub content check` runs it: links to missing pages, and the title and
|
|
1474
1458
|
* description rules of `seoAudit`, from the Markdown and without built HTML. Each page has its URL from the manifest.
|
|
@@ -1524,8 +1508,7 @@ function problem(finding) {
|
|
|
1524
1508
|
function docsAppPageLinks(routes) {
|
|
1525
1509
|
return [...new Set(routePaths(routes).filter((path) => !/\(\.\*\)\*?|\*$/.test(path)).map((path) => path.replace(/:\w+(?:\([^)]*\))?\??/g, "*") || "/"))];
|
|
1526
1510
|
}
|
|
1527
|
-
|
|
1528
|
-
//#region src/files.ts
|
|
1511
|
+
// src/files.ts
|
|
1529
1512
|
/** The Markdown files of a folder, without dot files or dot folders, as Nitro's server assets list them. */
|
|
1530
1513
|
function markdownFiles(dir) {
|
|
1531
1514
|
if (!existsSync(dir)) return [];
|
|
@@ -1569,17 +1552,22 @@ function packDocsFiles(stores, order = []) {
|
|
|
1569
1552
|
};
|
|
1570
1553
|
}
|
|
1571
1554
|
/**
|
|
1572
|
-
* The source of `#docs/files` in development.
|
|
1573
|
-
* next read. The server can run in workerd, which cannot read the folders from disk.
|
|
1555
|
+
* The source of `#docs/files` in development. When Nitro runs in Vite, each file is a `?raw` import, so Vite watches it,
|
|
1556
|
+
* and an edit shows on the next read. The server can run in workerd, which cannot read the folders from disk. When
|
|
1557
|
+
* Nitro builds the server with its own bundler, as on Nuxt 4.7, that bundler cannot load `?raw`, and the server reads
|
|
1558
|
+
* each file from disk on request.
|
|
1574
1559
|
*/
|
|
1575
|
-
function docsDevFilesModule(stores) {
|
|
1560
|
+
function docsDevFilesModule(stores, { nitroInVite }) {
|
|
1561
|
+
const loader = (path) => nitroInVite ? `() => import(${JSON.stringify(`${path}?raw`)}).then(module => module.default)` : `() => readFile(${JSON.stringify(path)}, "utf8")`;
|
|
1562
|
+
const loaders = stores.map((store) => ` ${JSON.stringify(store.name)}: {\n${markdownFiles(store.dir).map((file) => ` ${JSON.stringify(file)}: ${loader(join(store.dir, file).split(sep).join("/"))},`).join("\n")}\n },`);
|
|
1576
1563
|
return [
|
|
1577
|
-
|
|
1564
|
+
...nitroInVite ? [] : [`import { readFile } from "node:fs/promises"`],
|
|
1565
|
+
`const files = {\n${loaders.join("\n")}\n}`,
|
|
1578
1566
|
"const has = (store, file) => Object.hasOwn(files, store) && Object.hasOwn(files[store], file)",
|
|
1579
1567
|
"export default {",
|
|
1580
1568
|
" has,",
|
|
1581
1569
|
" async read(store, file) {",
|
|
1582
|
-
" return has(store, file) ?
|
|
1570
|
+
" return has(store, file) ? await files[store][file]() : null",
|
|
1583
1571
|
" },",
|
|
1584
1572
|
"}",
|
|
1585
1573
|
""
|
|
@@ -1590,8 +1578,7 @@ function docsFilesModule(stores, order) {
|
|
|
1590
1578
|
const { index, packed } = packDocsFiles(stores, order);
|
|
1591
1579
|
return `export default { index: JSON.parse(${JSON.stringify(JSON.stringify(index))}), packed: ${JSON.stringify(packed)} }\n`;
|
|
1592
1580
|
}
|
|
1593
|
-
|
|
1594
|
-
//#region src/seo-audit.ts
|
|
1581
|
+
// src/seo-audit.ts
|
|
1595
1582
|
/**
|
|
1596
1583
|
* The search checks that every prerendered page must pass. The limits are those of common site audits, such as OpenSEO
|
|
1597
1584
|
* and Ahrefs: a title of 10 to 60 characters, a description of 70 to 160, one `h1`, headings that go down one level at
|
|
@@ -1772,8 +1759,7 @@ function decode(value) {
|
|
|
1772
1759
|
return Number.isNaN(code) ? match : String.fromCodePoint(code);
|
|
1773
1760
|
});
|
|
1774
1761
|
}
|
|
1775
|
-
|
|
1776
|
-
//#region src/theme-css.ts
|
|
1762
|
+
// src/theme-css.ts
|
|
1777
1763
|
function readTheme(file) {
|
|
1778
1764
|
const css = postcss.parse(readFileSync(file, "utf8"), { from: file });
|
|
1779
1765
|
css.walkAtRules("import", (rule) => {
|
|
@@ -1833,8 +1819,7 @@ function docsThemeCss(file) {
|
|
|
1833
1819
|
});
|
|
1834
1820
|
return css.toString();
|
|
1835
1821
|
}
|
|
1836
|
-
|
|
1837
|
-
//#region src/nuxt.ts
|
|
1822
|
+
// src/nuxt.ts
|
|
1838
1823
|
function docsContentOf(options, rootDir) {
|
|
1839
1824
|
const contentDir = resolve(rootDir, options.dir ?? "content");
|
|
1840
1825
|
const sources = options.sources && resolveDocsSources(options.sources, rootDir);
|
|
@@ -1882,7 +1867,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
1882
1867
|
optional: true,
|
|
1883
1868
|
defaults: vitehubDefaults
|
|
1884
1869
|
} } : {},
|
|
1885
|
-
"@nuxt/fonts": {},
|
|
1870
|
+
"@nuxt/fonts": { defaults: { throwOnError: false } },
|
|
1886
1871
|
"@nuxt/ui": { defaults: {
|
|
1887
1872
|
prose: true,
|
|
1888
1873
|
content: true
|
|
@@ -2203,6 +2188,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2203
2188
|
page.workspace
|
|
2204
2189
|
])
|
|
2205
2190
|
]);
|
|
2191
|
+
let packDevFiles = false;
|
|
2206
2192
|
const agentFile = addTemplate({
|
|
2207
2193
|
filename: "docs/agent.mjs",
|
|
2208
2194
|
write: true,
|
|
@@ -2418,7 +2404,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2418
2404
|
regeneration = regeneration.then(async () => {
|
|
2419
2405
|
const change = await result;
|
|
2420
2406
|
if (closed || !change) return;
|
|
2421
|
-
if (change === "restart") return restart();
|
|
2407
|
+
if (change === "restart" || packDevFiles) return restart();
|
|
2422
2408
|
if (!change.shapeChanged && await reloadPages({
|
|
2423
2409
|
files: change.files,
|
|
2424
2410
|
manifest: change.manifestChanged,
|
|
@@ -2613,6 +2599,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2613
2599
|
});
|
|
2614
2600
|
addServerHandler({
|
|
2615
2601
|
middleware: true,
|
|
2602
|
+
route: "/**",
|
|
2616
2603
|
handler: resolver.resolve("./runtime/server/trailing-slash.js")
|
|
2617
2604
|
});
|
|
2618
2605
|
for (const method of ["get", "head"]) for (const route of [
|
|
@@ -2630,6 +2617,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2630
2617
|
});
|
|
2631
2618
|
if (config.markdownPages) addServerHandler({
|
|
2632
2619
|
middleware: true,
|
|
2620
|
+
route: "/**",
|
|
2633
2621
|
handler: resolver.resolve("./runtime/server/markdown.js")
|
|
2634
2622
|
});
|
|
2635
2623
|
/**
|
|
@@ -2661,6 +2649,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2661
2649
|
Reflect.apply(nuxt.hook, nuxt, ["nitro:build:before", startHints]);
|
|
2662
2650
|
let checkSourceLinks;
|
|
2663
2651
|
Reflect.apply(nuxt.hook, nuxt, ["nitro:init", (nitro) => {
|
|
2652
|
+
packDevFiles = nuxt.options.dev && nuxt.options.experimental.nitroViteEnvironment !== true && (nitro.options.devServer?.runner || process.env.NITRO_DEV_RUNNER) === "miniflare";
|
|
2664
2653
|
const building = !nuxt.options.dev && !Reflect.get(nuxt.options, "_prepare");
|
|
2665
2654
|
const seoAudit = options.seoAudit ?? "warn";
|
|
2666
2655
|
const redirects = docsRedirects(nitro.options.routeRules ?? {});
|
|
@@ -2785,7 +2774,7 @@ const docsNuxtModule = defineNuxtModule({
|
|
|
2785
2774
|
const order = () => docsManifestPages(manifest).flatMap((page) => [[page.source ?? "docs", page.file], ["docs-agent", `${docsContentSource(page)}/${page.file}`]]);
|
|
2786
2775
|
nitro.virtual = {
|
|
2787
2776
|
...nitro.virtual,
|
|
2788
|
-
"#docs/files": nuxt.options.dev
|
|
2777
|
+
"#docs/files": () => nuxt.options.dev && !packDevFiles ? docsDevFilesModule(stores, { nitroInVite: nuxt.options.experimental.nitroViteEnvironment === true }) : docsFilesModule(stores, order())
|
|
2789
2778
|
};
|
|
2790
2779
|
nitro.publicAssets = [...nitro.publicAssets ?? [], {
|
|
2791
2780
|
baseURL: "/_docs",
|
|
@@ -3075,5 +3064,4 @@ async function githubStars(repo) {
|
|
|
3075
3064
|
return null;
|
|
3076
3065
|
}
|
|
3077
3066
|
}
|
|
3078
|
-
//#endregion
|
|
3079
3067
|
export { docsNuxtModule as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/page.d.ts
|
|
1
|
+
import { t as DocsDocument } from "./markdown-B97RuMXs.js";
|
|
2
|
+
import { n as DocsManifest, o as DocsSection, r as DocsPage } from "./types-B6YlHil4.js";
|
|
4
3
|
interface DocsPageLink {
|
|
5
4
|
path: string;
|
|
6
5
|
title: string;
|
|
@@ -22,5 +21,4 @@ declare function docsPageResponse(manifest: DocsManifest, found: {
|
|
|
22
21
|
page: DocsPage;
|
|
23
22
|
section: DocsSection | null;
|
|
24
23
|
}, document: DocsDocument, credits?: DocsDocument | null): DocsPageResponse;
|
|
25
|
-
//#endregion
|
|
26
24
|
export { DocsPageResponse as n, docsPageResponse as r, DocsPageLink as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { docsManifestPages, docsPanelOf, docsPanelPages, isDocsPath, isDocsWorkspaceLayout } from "./navigation.js";
|
|
2
|
-
|
|
2
|
+
// src/page.ts
|
|
3
3
|
/** Previous and next follow the sidebar order of the page's section, or of its panel for a page inside one. */
|
|
4
4
|
function docsPageResponse(manifest, found, document, credits = null) {
|
|
5
5
|
const section = found.section;
|
|
@@ -94,5 +94,4 @@ function routePaths(routes, parent = "") {
|
|
|
94
94
|
return [path, ...routePaths(route.children ?? [], path)];
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
//#endregion
|
|
98
97
|
export { replacesDocsPage as a, docsPageResponse as i, docsPageOf as n, routePaths as o, docsPagePath as r, docsMount as t };
|
package/dist/primitive-rail.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Component, PropType, SlotsType, VNode } from "vue";
|
|
2
|
-
//#region ../icons/dist/index.d.ts
|
|
3
2
|
/** Name of an icon in the ViteHub set, such as `kv` for `i-vitehub-kv`. */
|
|
4
3
|
type ViteHubIconName = "agent" | "auth" | "blob" | "browser" | "bundle" | "cache" | "channels" | "choices" | "cli" | "cms" | "codemods" | "comments" | "compare" | "connections" | "console" | "content" | "database" | "development" | "device" | "docs" | "email" | "env" | "forge" | "forms" | "gateways" | "guides" | "hosts" | "i18n" | "kv" | "logs" | "markdown-template" | "mcp" | "presets" | "queue" | "rate-limit" | "realtime" | "reference" | "runtime" | "sandbox" | "schedule" | "shell" | "skills" | "source" | "start" | "sync" | "ui" | "usage" | "web-container" | "webhooks" | "workflow" | "workspace";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/components/primitive-icon.d.ts
|
|
7
4
|
/** Name of an icon in the `@vite-hub/icons` set: one for each Server Primitive, Console area, and docs area. */
|
|
8
5
|
type PrimitiveIconName = ViteHubIconName;
|
|
9
6
|
export declare function isPrimitiveIconName(value: unknown): value is PrimitiveIconName;
|
|
@@ -24,8 +21,6 @@ export declare const PrimitiveIcon: import("vue").DefineComponent<import("vue").
|
|
|
24
21
|
type: PropType<PrimitiveIconName>;
|
|
25
22
|
};
|
|
26
23
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/components/primitive-rail.d.ts
|
|
29
24
|
/** Props of every rail slot. `expanded` is true while the rail shows its labels, for example to turn off tooltips. */
|
|
30
25
|
interface PrimitiveRailSlotProps {
|
|
31
26
|
expanded: boolean;
|
|
@@ -103,5 +98,4 @@ export declare const PrimitiveRailItem: import("vue").DefineComponent<import("vu
|
|
|
103
98
|
current: boolean;
|
|
104
99
|
as: string | Component;
|
|
105
100
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
|
-
//#endregion
|
|
107
101
|
export type { PrimitiveIconName, PrimitiveRailSlotProps };
|
package/dist/primitive-rail.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, getCurrentInstance, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
2
|
-
|
|
2
|
+
// ../icons/dist/index.js
|
|
3
3
|
const icons = {
|
|
4
4
|
"prefix": "vitehub",
|
|
5
5
|
"info": {
|
|
@@ -74,8 +74,7 @@ const icons = {
|
|
|
74
74
|
"width": 24,
|
|
75
75
|
"height": 24
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
//#region src/components/primitive-icon.ts
|
|
77
|
+
// src/components/primitive-icon.ts
|
|
79
78
|
function isPrimitiveIconName(value) {
|
|
80
79
|
return typeof value === "string" && Object.hasOwn(icons.icons, value);
|
|
81
80
|
}
|
|
@@ -103,8 +102,7 @@ const PrimitiveIcon = defineComponent({
|
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
});
|
|
106
|
-
|
|
107
|
-
//#region src/components/primitive-rail.ts
|
|
105
|
+
// src/components/primitive-rail.ts
|
|
108
106
|
const hoverIntentDelay = 200;
|
|
109
107
|
/**
|
|
110
108
|
* The narrow icon rail that ViteHub docs and the Console show at the left edge.
|
|
@@ -282,5 +280,4 @@ const PrimitiveRailItem = defineComponent({
|
|
|
282
280
|
};
|
|
283
281
|
}
|
|
284
282
|
});
|
|
285
|
-
//#endregion
|
|
286
283
|
export { PrimitiveIcon, PrimitiveRail, PrimitiveRailGroup, PrimitiveRailItem, isPrimitiveIconName, primitiveIconNames, resolvePrimitiveIconName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { parse } from "yaml";
|
|
3
|
-
|
|
3
|
+
// src/raw.ts
|
|
4
4
|
const frontmatterBoundary = "---";
|
|
5
5
|
const frontmatterSchema = z.object({ title: z.string().optional() });
|
|
6
6
|
const pageCardSchema = z.object({
|
|
@@ -853,5 +853,4 @@ function toRawMarkdown(source, options = {}) {
|
|
|
853
853
|
const startsWithH1 = /^[ \t]{0,3}#(?:[ \t]+|$)/.test(content) || /^[^\n]+\n[ \t]{0,3}=+[ \t]*(?:\n|$)/.test(content);
|
|
854
854
|
return `${title && !startsWithH1 ? `# ${title}\n\n${content}` : content}\n`;
|
|
855
855
|
}
|
|
856
|
-
//#endregion
|
|
857
856
|
export { toRawMarkdown as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { t as docsErrorDiagnostics } from "./error-diagnostics-Daz9oBJS.js";
|
|
1
2
|
import { docsManifestPages, docsRawPath, docsSectionForPath, isDocsPath, normalizeDocsPath } from "./navigation.js";
|
|
2
|
-
import { t as docsErrorDiagnostics } from "./error-diagnostics-CmgtG9xa.js";
|
|
3
3
|
import { addRoute, createRouter, findRoute } from "rou3";
|
|
4
|
-
|
|
4
|
+
// src/redirects.ts
|
|
5
5
|
/**
|
|
6
6
|
* The redirect route rules from an exact app path. Keep external targets so a chain can end at another site.
|
|
7
7
|
* A wildcard rule, such as `/docs/old/**`, has no single target page, so it is left out.
|
|
@@ -83,5 +83,4 @@ function localTargetPath(to) {
|
|
|
83
83
|
function docsRedirectError(problems) {
|
|
84
84
|
return Object.assign(docsErrorDiagnostics.DOCS_REDIRECTS_BROKEN({ problems }), { problems });
|
|
85
85
|
}
|
|
86
|
-
//#endregion
|
|
87
86
|
export { docsServerRoutes as i, docsRedirectProblems as n, docsRedirects as r, docsRedirectError as t };
|
package/dist/runnable.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
//#region src/runnable/document.d.ts
|
|
1
|
+
import { a as DocsWorkspaceData, c as RunnableTutorialData, d as dependencyKey, f as restartsDevServer, i as DocsRenderFunction, l as RunnableTutorialStep, m as tutorialWorkspaceFiles, n as DocsPlaygroundData, o as DocsWorkspaceTab, p as tutorialStepFiles, r as DocsPlaygroundExampleData, s as PlaygroundTemplate, t as DocsLearnData, u as TutorialFiles } from "./steps-C3tGwhNK.js";
|
|
2
|
+
import { t as DocsDocument } from "./markdown-B97RuMXs.js";
|
|
4
3
|
type DocsNode = DocsDocument["nodes"][number];
|
|
5
4
|
/**
|
|
6
5
|
* The nodes as a reader of one framework sees them: each `::tabs{sync="framework"}` block becomes the content of that
|
|
@@ -24,8 +23,6 @@ interface TutorialRequest {
|
|
|
24
23
|
export declare function parseCurl(command: string): TutorialRequest | undefined;
|
|
25
24
|
/** A Node script that sends the request from inside the workspace and prints the status and the body, like `curl`. */
|
|
26
25
|
export declare function requestScript(request: TutorialRequest): string;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/runnable/learn.d.ts
|
|
29
26
|
/** What the Learn page shows about one tutorial page, read from its Markdown. */
|
|
30
27
|
interface LearnPageFacts {
|
|
31
28
|
/** The `::tutorial-step` blocks. */
|
|
@@ -33,5 +30,4 @@ interface LearnPageFacts {
|
|
|
33
30
|
/** About how long the tutorial takes, in minutes. */
|
|
34
31
|
minutes: number;
|
|
35
32
|
}
|
|
36
|
-
//#endregion
|
|
37
33
|
export { type DocsLearnData, type DocsPlaygroundData, type DocsPlaygroundExampleData, type DocsRenderFunction, type DocsWorkspaceData, type DocsWorkspaceTab, type LearnPageFacts, type PlaygroundTemplate, type RunnableTutorialData, type RunnableTutorialStep, type TutorialFiles, type TutorialRequest, dependencyKey, restartsDevServer, tutorialStepFiles, tutorialWorkspaceFiles };
|
package/dist/runnable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as tutorialWorkspaceFiles, n as restartsDevServer, r as tutorialStepFiles, t as dependencyKey } from "./steps-
|
|
2
|
-
|
|
1
|
+
import { i as tutorialWorkspaceFiles, n as restartsDevServer, r as tutorialStepFiles, t as dependencyKey } from "./steps-muDP1nYT.js";
|
|
2
|
+
// src/runnable/document.ts
|
|
3
3
|
/**
|
|
4
4
|
* The nodes as a reader of one framework sees them: each `::tabs{sync="framework"}` block becomes the content of that
|
|
5
5
|
* framework's tab. A runnable lesson runs a Vite workspace, so its guide shows the Vite tab, whatever the reader picked.
|
|
@@ -101,5 +101,4 @@ function requestScript(request) {
|
|
|
101
101
|
`console.log(await response.text())`
|
|
102
102
|
].join("\n");
|
|
103
103
|
}
|
|
104
|
-
//#endregion
|
|
105
104
|
export { dependencyKey, frameworkNodes, parseCurl, requestScript, restartsDevServer, splitTutorialDocument, tutorialStepFiles, tutorialWorkspaceFiles };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ContentHandler } from "@vite-hub/content";
|
|
2
|
-
//#region src/runtime/server/llms.d.ts
|
|
3
2
|
/** `/llms.txt`, `/llms-full.txt`, and `/sitemap.md`, from Content. The build prerenders them. */
|
|
4
3
|
declare const handler: ContentHandler;
|
|
5
|
-
//#endregion
|
|
6
4
|
export { handler as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as docsContent } from "../../content-
|
|
1
|
+
import { n as docsContent } from "../../content-C_WXjV3y.js";
|
|
2
2
|
import { defineContentLlmsHandler } from "@vite-hub/content";
|
|
3
|
-
|
|
3
|
+
// src/runtime/server/llms.ts
|
|
4
4
|
/** `/llms.txt`, `/llms-full.txt`, and `/sitemap.md`, from Content. The build prerenders them. */
|
|
5
5
|
const handler = { fetch: (request) => defineContentLlmsHandler(docsContent()).fetch(request) };
|
|
6
|
-
//#endregion
|
|
7
6
|
export { handler as default };
|
|
@@ -2,19 +2,18 @@ import { docsAppPath } from "../../navigation.js";
|
|
|
2
2
|
import { useRuntimeConfig } from "nitro/runtime-config";
|
|
3
3
|
import { defineContentMarkdownHandler } from "@vite-hub/content/markdown";
|
|
4
4
|
import { serverFetch } from "nitro";
|
|
5
|
-
|
|
5
|
+
// src/runtime/server/markdown.ts
|
|
6
6
|
/**
|
|
7
7
|
* The Markdown copy of each app page that is not a docs page, at its URL plus `.md` and for `Accept: text/markdown`.
|
|
8
8
|
* Content converts the HTML that Nitro renders for the same request. nuxt-agent-discovery answers the docs pages first.
|
|
9
9
|
* Content loads on the first request that asks for Markdown or gets an HTML page.
|
|
10
10
|
*/
|
|
11
|
-
const markdown = defineContentMarkdownHandler(() => import("../../content-
|
|
12
|
-
const rawMarkdown = defineContentMarkdownHandler(() => import("../../content-
|
|
11
|
+
const markdown = defineContentMarkdownHandler(() => import("../../content-C_WXjV3y.js").then((n) => n.t).then((module) => module.docsMarkdownContent()), { render: (request) => serverFetch(request) });
|
|
12
|
+
const rawMarkdown = defineContentMarkdownHandler(() => import("../../content-C_WXjV3y.js").then((n) => n.t).then((module) => module.docsMarkdownContent(true)));
|
|
13
13
|
const handler = async (event, next) => {
|
|
14
14
|
const path = new URL(event.req.url).pathname;
|
|
15
15
|
const raw = docsAppPath("/raw/", useRuntimeConfig().public.docs.appBase);
|
|
16
16
|
if (path.startsWith(raw) && path.endsWith(".md")) return await rawMarkdown(event, next);
|
|
17
17
|
return await markdown(event, next);
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { handler as default };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ContentHandler } from "@vite-hub/content";
|
|
2
|
-
//#region src/runtime/server/mcp.d.ts
|
|
3
2
|
/** The docs MCP server at `/mcp`, with the `list-pages` and `get-page` tools of Content. */
|
|
4
3
|
declare const handler: ContentHandler;
|
|
5
|
-
//#endregion
|
|
6
4
|
export { handler as default };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as docsContent } from "../../content-
|
|
1
|
+
import { n as docsContent } from "../../content-C_WXjV3y.js";
|
|
2
2
|
import { defineContentMcpHandler } from "@vite-hub/content";
|
|
3
|
-
|
|
3
|
+
// src/runtime/server/mcp.ts
|
|
4
4
|
/** The docs MCP server at `/mcp`, with the `list-pages` and `get-page` tools of Content. */
|
|
5
5
|
const handler = { fetch: (request) => defineContentMcpHandler(docsContent()).fetch(request) };
|
|
6
|
-
//#endregion
|
|
7
6
|
export { handler as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { n as DocsPageResponse } from "../../page-
|
|
1
|
+
import { n as DocsPageResponse } from "../../page-B8_70-5D.js";
|
|
2
2
|
import { EventHandler, EventHandlerRequest } from "nitro/h3";
|
|
3
|
-
//#region src/runtime/server/page.d.ts
|
|
4
3
|
/** `/api/_docs/page/docs/kv.json` is the page at `/docs/kv`. The `.json` suffix lets static hosts store every page beside its folder. */
|
|
5
4
|
declare const handler: EventHandler<EventHandlerRequest, Promise<DocsPageResponse>>;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { handler as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as parseDocsDocument, r as readDocsPage } from "../../content-
|
|
1
|
+
import { a as parseDocsDocument, r as readDocsPage } from "../../content-C_WXjV3y.js";
|
|
2
2
|
import { findDocsPage } from "../../navigation.js";
|
|
3
|
-
import { i as docsPageResponse } from "../../page-
|
|
3
|
+
import { i as docsPageResponse } from "../../page-DWsretqk.js";
|
|
4
4
|
import manifest from "#docs/manifest";
|
|
5
5
|
import { HTTPError, defineHandler, getRouterParam } from "nitro/h3";
|
|
6
6
|
import { content } from "#docs/content";
|
|
7
|
-
|
|
7
|
+
// src/runtime/server/page.ts
|
|
8
8
|
/** `/api/_docs/page/docs/kv.json` is the page at `/docs/kv`. The `.json` suffix lets static hosts store every page beside its folder. */
|
|
9
9
|
const handler = defineHandler(async (event) => {
|
|
10
10
|
const path = `/${(getRouterParam(event, "_") ?? "").replace(/\.json$/, "")}`;
|
|
11
11
|
if (content && (content.preview.active() || content.preview.frame())) {
|
|
12
|
-
const { docsDraftResponse } = await import("../../draft-
|
|
12
|
+
const { docsDraftResponse } = await import("../../draft-rOGhtXch.js");
|
|
13
13
|
const draft = await docsDraftResponse(content, manifest, path, parseDocsDocument);
|
|
14
14
|
if (draft) {
|
|
15
15
|
event.res.headers.set("cache-control", "private, no-store");
|
|
@@ -23,5 +23,4 @@ const handler = defineHandler(async (event) => {
|
|
|
23
23
|
const credits = found.page.credits ? await parseDocsDocument(found.page.credits) : null;
|
|
24
24
|
return docsPageResponse(manifest, found, document, credits);
|
|
25
25
|
});
|
|
26
|
-
//#endregion
|
|
27
26
|
export { handler as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { EventHandler, EventHandlerRequest } from "nitro/h3";
|
|
2
|
-
//#region src/runtime/server/raw.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* `/raw/<page>.md`: the agent copy of a page, the one that Content serves in `llms-full.txt` and the MCP server. The
|
|
5
4
|
* build prerenders the copy of every page, so static hosts serve those files first. Negotiated pages and `.md` twins
|
|
6
5
|
* fetch the copy inside the server, from this route.
|
|
7
6
|
*/
|
|
8
7
|
declare const handler: EventHandler<EventHandlerRequest, Promise<string>>;
|
|
9
|
-
//#endregion
|
|
10
8
|
export { handler as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as readDocsRawCopy } from "../../content-
|
|
1
|
+
import { i as readDocsRawCopy } from "../../content-C_WXjV3y.js";
|
|
2
2
|
import { HTTPError, defineHandler } from "nitro/h3";
|
|
3
|
-
|
|
3
|
+
// src/runtime/server/raw.ts
|
|
4
4
|
/**
|
|
5
5
|
* `/raw/<page>.md`: the agent copy of a page, the one that Content serves in `llms-full.txt` and the MCP server. The
|
|
6
6
|
* build prerenders the copy of every page, so static hosts serve those files first. Negotiated pages and `.md` twins
|
|
@@ -12,5 +12,4 @@ const handler = defineHandler(async (event) => {
|
|
|
12
12
|
event.res.headers.set("content-type", "text/markdown; charset=utf-8");
|
|
13
13
|
return markdown;
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { handler as default };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { a as DocsSearchSection } from "../../types-
|
|
1
|
+
import { a as DocsSearchSection } from "../../types-B6YlHil4.js";
|
|
2
2
|
import { EventHandler, EventHandlerRequest } from "nitro/h3";
|
|
3
|
-
//#region src/runtime/server/search.d.ts
|
|
4
3
|
declare const handler: EventHandler<EventHandlerRequest, Promise<DocsSearchSection[]>>;
|
|
5
|
-
//#endregion
|
|
6
4
|
export { handler as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as readDocsPage } from "../../content-BQVlMshL.js";
|
|
2
1
|
import { docsIndexedPages, docsManifestPages, docsUnindexedSearchSections } from "../../navigation.js";
|
|
3
|
-
import { a as docsSearchSections } from "../../markdown-
|
|
2
|
+
import { a as docsSearchSections } from "../../markdown-BzZkYb24.js";
|
|
3
|
+
import { r as readDocsPage } from "../../content-C_WXjV3y.js";
|
|
4
4
|
import manifest from "#docs/manifest";
|
|
5
5
|
import { defineHandler } from "nitro/h3";
|
|
6
|
-
|
|
6
|
+
// src/runtime/server/search.ts
|
|
7
7
|
/** Every page split by heading, read through the Content of the page route, for the search dialog. The build prerenders it. */
|
|
8
8
|
async function buildIndex() {
|
|
9
9
|
const sections = [];
|
|
@@ -29,5 +29,4 @@ const handler = defineHandler(() => {
|
|
|
29
29
|
throw error;
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
//#endregion
|
|
33
32
|
export { handler as default };
|