boltdocs 3.2.1 → 3.3.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/bin/boltdocs.js +20 -1
- package/bin/preloader.mjs +28 -0
- package/dist/{adapters-ByYY44Zy.mjs → adapters-BmB4TKCc.mjs} +1 -1
- package/dist/{adapters-DvmtpdSF.cjs → adapters-Cp1Maurn.cjs} +1 -1
- package/dist/audit-CLXjMzwQ.mjs +11 -0
- package/dist/audit-COgjnQ5n.cjs +11 -0
- package/dist/build-BS2hefiL.cjs +6 -0
- package/dist/build-C5mNh9D-.mjs +6 -0
- package/dist/cache-CJE9nWLE.cjs +6 -0
- package/dist/cache-OY4HzIXl.mjs +6 -0
- package/dist/callout-oI_LCbxS.d.ts +71 -0
- package/dist/callout-plqx9Dw-.d.cts +71 -0
- package/dist/client/index.cjs +1265 -569
- package/dist/client/index.d.cts +3 -542
- package/dist/client/index.d.ts +3 -542
- package/dist/client/index.js +1167 -521
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.d.cts +24 -2
- package/dist/client/mdx.d.ts +24 -2
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +14 -4
- package/dist/client/primitives.d.cts +281 -38
- package/dist/client/primitives.d.ts +281 -38
- package/dist/client/primitives.js +5 -5
- package/dist/client/router.cjs +49 -0
- package/dist/client/router.d.cts +3 -0
- package/dist/client/router.d.ts +3 -0
- package/dist/client/router.js +8 -0
- package/dist/client/theme/reset.css +40 -4
- package/dist/{config-BpzaPsJj.d.cts → config-BoRlz0Ca.d.mts} +157 -14
- package/dist/{config-xtS0ZkMm.d.mts → config-CTsX_tGM.d.cts} +157 -14
- package/dist/config-Ceib-AOH.cjs +7 -0
- package/dist/config-DGLQsy7y.mjs +7 -0
- package/dist/{package-BcISI5-P.cjs → config-files-BYHDOrKn.mjs} +1 -1
- package/dist/config-files-D9cdBMl2.cjs +6 -0
- package/dist/config-jJh8WYJI.cjs +6 -0
- package/dist/csp-C4LmN1ko.cjs +6 -0
- package/dist/csp-D6JEOqKh.mjs +6 -0
- package/dist/dev-Ch3hEe5Y.cjs +6 -0
- package/dist/dev-QPNxysrd.mjs +6 -0
- package/dist/{docs-layout-BdtZ9z6s.js → docs-layout-CbZ7LDRe.js} +504 -249
- package/dist/{docs-layout-CFWI15Id.cjs → docs-layout-vzfXed1Q.cjs} +516 -254
- package/dist/{doctor-BBtmNJE0.cjs → doctor-B1_YL0Wt.cjs} +1 -1
- package/dist/doctor-C7whl4ED.cjs +6 -0
- package/dist/doctor-DmQnml2k.mjs +6 -0
- package/dist/{generator-COepVWGi.cjs → generator-BlW45ST7.cjs} +5 -3
- package/dist/{generator-CcOBN5vI.mjs → generator-BwknNejd.mjs} +5 -3
- package/dist/{handler-XX7cLTqe.cjs → handler-CDEoKARD.cjs} +2 -2
- package/dist/{handler-DzQae4eA.mjs → handler-D7UyZlPm.mjs} +2 -2
- package/dist/{image-Bz87fCla.js → image-B-NDSDuY.js} +129 -11
- package/dist/{image-C4TlpMHn.cjs → image-Hnaa2bJd.cjs} +175 -9
- package/dist/index-C56bL-A-.d.cts +1344 -0
- package/dist/{sidebar-COTaMHR-.d.ts → index-CPUUKzxD.d.cts} +344 -327
- package/dist/{sidebar-CrEdJuHX.d.cts → index-Ci4kfOHF.d.ts} +344 -327
- package/dist/index-Cu9H6CRa.d.ts +1344 -0
- package/dist/link-CgdI6O2o.js +872 -0
- package/dist/{link-D1Gjkb-2.cjs → link-vZjmD-es.cjs} +406 -223
- package/dist/{mdx-BuO6a1f7.js → mdx-BRT71V5Q.js} +211 -168
- package/dist/{mdx-CD-tSjRG.cjs → mdx-D0Absdq5.cjs} +225 -169
- package/dist/native-BNCY7PRF.cjs +6 -0
- package/dist/native-Di9Fnfrv.mjs +6 -0
- package/dist/native-Kre2T5eS.cjs +6 -0
- package/dist/node/cache.cjs +1 -1
- package/dist/node/cache.d.cts +19 -3
- package/dist/node/cache.d.mts +19 -3
- package/dist/node/cache.mjs +1 -1
- package/dist/node/cli-entry.cjs +1 -9
- package/dist/node/cli-entry.mjs +1 -9
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +245 -17
- package/dist/node/index.d.mts +246 -18
- package/dist/node/index.mjs +1 -1
- package/dist/node/mdx/shiki-adapter.cjs +1 -1
- package/dist/node/mdx/shiki-adapter.d.cts +24 -3
- package/dist/node/mdx/shiki-adapter.d.mts +24 -2
- package/dist/node/mdx/shiki-adapter.mjs +1 -1
- package/dist/node-Du5UL5wo.mjs +23 -0
- package/dist/node-DunuGqyp.cjs +23 -0
- package/dist/{package-CCYEAYeA.mjs → package-DA848keM.mjs} +1 -1
- package/dist/package-wplzySjz.cjs +6 -0
- package/dist/pages-external-BBw8ObVK.mjs +6 -0
- package/dist/pages-external-DPiPFxxP.cjs +6 -0
- package/dist/parser-BqTOsEUa.cjs +6 -0
- package/dist/parser-CGMY2lJ7.mjs +6 -0
- package/dist/plugin-BcTzvHAJ.mjs +69 -0
- package/dist/plugin-TulVMt1z.cjs +69 -0
- package/dist/plugin-context-C-l90hFt.cjs +15 -0
- package/dist/plugin-context-wqHNSZum.mjs +15 -0
- package/dist/plugin-lifecycle-B1BzSHdn.cjs +6 -0
- package/dist/resolve-B7vWOd8R.cjs +6 -0
- package/dist/resolve-C2kKnk_5.mjs +6 -0
- package/dist/resolve-It1Iug83.cjs +6 -0
- package/dist/resolve-YdTrt_FG.mjs +6 -0
- package/dist/router-C3kygdRK.cjs +1285 -0
- package/dist/router-CZBxMRAH.js +987 -0
- package/dist/routes-BL4y79tb.mjs +6 -0
- package/dist/routes-C2nPecwu.cjs +6 -0
- package/dist/routes-U9L8psZ9.cjs +6 -0
- package/dist/{search-dialog-DHqwjJuG.cjs → search-dialog-BCOHQGSt.cjs} +1 -1
- package/dist/search-dialog-Bp_P1MPP.js +481 -0
- package/dist/{search-dialog-DFnlx8LO.js → search-dialog-BqkzDTq2.js} +107 -57
- package/dist/{search-dialog-BRFno7HD.cjs → search-dialog-CIeIUhAn.cjs} +218 -43
- package/dist/{search-dialog-D6TvjcuV.js → search-dialog-DtmxmfEu.js} +1 -1
- package/dist/{search-dialog-B1NERUNx.cjs → search-dialog-x_qHU8ty.cjs} +107 -58
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/update-check-BKqmYfwT.cjs +11 -0
- package/dist/update-check-QnrVR3q1.mjs +11 -0
- package/dist/utils-8lzafE49.mjs +7 -0
- package/dist/utils-ej6_SjIZ.cjs +7 -0
- package/dist/virtual-modules-Ca5tHk1X.cjs +30 -0
- package/dist/virtual-modules-Dlgt1fP0.mjs +30 -0
- package/package.json +18 -16
- package/src/shared/mdx-path.ts +12 -0
- package/src/shared/structured-data.ts +145 -0
- package/src/shared/types.ts +220 -16
- package/dist/banner-BMop1KLF.d.ts +0 -100
- package/dist/banner-CVD0GugR.d.cts +0 -100
- package/dist/cache-CO4Dy2uQ.cjs +0 -6
- package/dist/cache-Dk53iOo6.mjs +0 -6
- package/dist/config-CCXp3aXO.mjs +0 -7
- package/dist/config-CMd4XoFq.cjs +0 -6
- package/dist/config-DlGoEM9D.cjs +0 -7
- package/dist/csp-CRp_3U7a.cjs +0 -6
- package/dist/csp-oTC2ygvF.mjs +0 -6
- package/dist/doctor-Bv16QSrI.cjs +0 -7
- package/dist/doctor-DOAbSaiL.mjs +0 -7
- package/dist/headers-Ddwek8K7.mjs +0 -6
- package/dist/headers-dg4SDrjY.cjs +0 -6
- package/dist/link-2PzgTnaP.js +0 -673
- package/dist/meta-loader-C4Hu9RN9.mjs +0 -6
- package/dist/meta-loader-Dq1zcFnh.cjs +0 -6
- package/dist/node-BXtqM1uH.mjs +0 -6
- package/dist/node-BlVk4EVg.cjs +0 -104
- package/dist/node-DOf4zhWc.mjs +0 -104
- package/dist/node-aD1eisrR.cjs +0 -6
- package/dist/pages-external-BYa4JSda.mjs +0 -6
- package/dist/pages-external-XkYIs-d5.cjs +0 -6
- package/dist/parser-DCiEWkSk.cjs +0 -8
- package/dist/parser-qk9FIHJ7.mjs +0 -8
- package/dist/plugin-C95kvu6h.mjs +0 -73
- package/dist/plugin-DM3u2bVj.cjs +0 -73
- package/dist/routes-BW6zsk7Z.mjs +0 -6
- package/dist/routes-BgoIB5wb.cjs +0 -6
- package/dist/routes-CORVxc02.cjs +0 -6
- package/dist/search-dialog-BmxHiKwt.js +0 -312
- package/dist/shiki-adapter-CoQ6jyJ4.cjs +0 -6
- package/dist/shiki-adapter-D-aKw7PP.mjs +0 -6
- package/dist/utils-Crm9oPcV.mjs +0 -7
- package/dist/utils-D6Xtj0FZ.cjs +0 -7
- /package/dist/{errors-0zGHRLue.mjs → errors-N-b6Sn2G.mjs} +0 -0
- /package/dist/{index-1KsTDq4o.d.mts → index-lFoyzCXy.d.mts} +0 -0
- /package/dist/{types-generator-BXhv7Ill.cjs → types-generator-DDSA93P3.cjs} +0 -0
- /package/dist/{types-generator-bDPvUztF.mjs → types-generator-DG1GX1EZ.mjs} +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { T as BoltdocsConfig, a as SidebarItem, d as SidebarMobile, f as SidebarRoot, i as SidebarHeader, l as SidebarLink, n as SidebarContent, p as SidebarSubGroup, r as SidebarGroup, s as SidebarItems, v as ComponentRoute, x as OnThisPageProps } from "./sidebar-CrEdJuHX.cjs";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/client/components/ui-base/navbar.d.ts
|
|
7
|
-
declare function Navbar(): _$react_jsx_runtime0.JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/client/components/ui-base/sidebar.d.ts
|
|
10
|
-
interface SidebarProps {
|
|
11
|
-
routes: ComponentRoute[];
|
|
12
|
-
config: BoltdocsConfig;
|
|
13
|
-
}
|
|
14
|
-
declare function SidebarMain({
|
|
15
|
-
routes,
|
|
16
|
-
config
|
|
17
|
-
}: SidebarProps): _$react_jsx_runtime0.JSX.Element;
|
|
18
|
-
declare const Sidebar: typeof SidebarMain & {
|
|
19
|
-
Root: typeof SidebarRoot;
|
|
20
|
-
Mobile: typeof SidebarMobile;
|
|
21
|
-
Header: typeof SidebarHeader;
|
|
22
|
-
Content: typeof SidebarContent;
|
|
23
|
-
Group: typeof SidebarGroup;
|
|
24
|
-
Link: typeof SidebarLink;
|
|
25
|
-
SubGroup: typeof SidebarSubGroup;
|
|
26
|
-
Item: typeof SidebarItem;
|
|
27
|
-
Items: typeof SidebarItems;
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/client/components/ui-base/on-this-page.d.ts
|
|
31
|
-
declare function OnThisPage({
|
|
32
|
-
headings,
|
|
33
|
-
editLink,
|
|
34
|
-
communityHelp,
|
|
35
|
-
filePath
|
|
36
|
-
}: OnThisPageProps): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/client/components/ui-base/breadcrumbs.d.ts
|
|
39
|
-
declare function Breadcrumbs(): _$react_jsx_runtime0.JSX.Element | null;
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/client/components/ui-base/page-nav.d.ts
|
|
42
|
-
/**
|
|
43
|
-
* Component to display the previous and next page navigation buttons.
|
|
44
|
-
* Enhanced with subtle entrance animations, modern card layout, and hover highlights.
|
|
45
|
-
*/
|
|
46
|
-
declare function PageNav(): _$react_jsx_runtime0.JSX.Element | null;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/client/components/ui-base/error-boundary.d.ts
|
|
49
|
-
interface ErrorBoundaryProps {
|
|
50
|
-
children?: ReactNode;
|
|
51
|
-
fallback?: ReactNode;
|
|
52
|
-
}
|
|
53
|
-
declare function ErrorBoundary({
|
|
54
|
-
children,
|
|
55
|
-
fallback
|
|
56
|
-
}: ErrorBoundaryProps): _$react_jsx_runtime0.JSX.Element;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/client/components/ui-base/copy-markdown.d.ts
|
|
59
|
-
interface CopyMarkdownProps {
|
|
60
|
-
content?: string;
|
|
61
|
-
mdxRaw?: string;
|
|
62
|
-
route?: ComponentRoute;
|
|
63
|
-
}
|
|
64
|
-
declare function CopyMarkdown({
|
|
65
|
-
content,
|
|
66
|
-
mdxRaw
|
|
67
|
-
}: CopyMarkdownProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/client/components/ui-base/search-dialog.d.ts
|
|
70
|
-
declare function SearchDialog({
|
|
71
|
-
routes
|
|
72
|
-
}: {
|
|
73
|
-
routes: ComponentRoute[];
|
|
74
|
-
}): _$react_jsx_runtime0.JSX.Element;
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/client/components/ui-base/not-found.d.ts
|
|
77
|
-
declare function NotFound(): _$react_jsx_runtime0.JSX.Element;
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/client/components/ui-base/banner.d.ts
|
|
80
|
-
interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
81
|
-
/**
|
|
82
|
-
* If true, shows a close button to dismiss the banner.
|
|
83
|
-
*/
|
|
84
|
-
dismissible?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Unique identifier for the banner. If provided and dismissible is true,
|
|
87
|
-
* the dismissed state will be saved in localStorage so it doesn't reappear
|
|
88
|
-
* on subsequent visits.
|
|
89
|
-
*/
|
|
90
|
-
id?: string;
|
|
91
|
-
}
|
|
92
|
-
declare function Banner({
|
|
93
|
-
children,
|
|
94
|
-
className,
|
|
95
|
-
dismissible,
|
|
96
|
-
id,
|
|
97
|
-
...props
|
|
98
|
-
}: BannerProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
99
|
-
//#endregion
|
|
100
|
-
export { ErrorBoundary as a, OnThisPage as c, CopyMarkdown as i, Sidebar as l, NotFound as n, PageNav as o, SearchDialog as r, Breadcrumbs as s, Banner as t, Navbar as u };
|
package/dist/cache-CO4Dy2uQ.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
const e=require(`./chunk-D1Md3oWO.cjs`),t=require(`./utils-D6Xtj0FZ.cjs`),n=require(`./node/cache.cjs`);let r=require(`node:path`);r=e.r(r);let i=require(`node:fs`);i=e.r(i);let a=require(`node:crypto`);a=e.r(a);const o=new Map,s=()=>{let e=t.o();return r.default.resolve(process.cwd(),e.dir,`parser`)},c=`v2.5`;var l=class{static async get(e){if(t.o().noCache)return null;try{let t=await i.default.promises.stat(e),n=o.get(e);if(n&&n.mtime===t.mtimeMs)return n.data;let l=s(),u=a.default.createHash(`md5`).update(e).digest(`hex`),d=r.default.join(l,`${u}.json`);try{let n=await i.default.promises.readFile(d,`utf-8`),r=JSON.parse(n);return r._mtime!==t.mtimeMs||r._v!==c?null:(o.set(e,{data:r.data,mtime:r._mtime}),r.data)}catch{return null}}catch{return null}}static async set(e,l){if(!t.o().noCache)try{let t=await i.default.promises.stat(e);o.set(e,{data:l,mtime:t.mtimeMs});let u=s(),d=a.default.createHash(`md5`).update(e).digest(`hex`),f=r.default.join(u,`${d}.json`),p={_v:c,_mtime:t.mtimeMs,data:l};n.globalBackgroundQueue.add(async()=>{try{await i.default.promises.mkdir(u,{recursive:!0}),await i.default.promises.writeFile(f,JSON.stringify(p))}catch{}})}catch{}}static invalidate(e){o.delete(e)}static clear(){o.clear();let e=s();if(i.default.existsSync(e))try{i.default.rmSync(e,{recursive:!0,force:!0})}catch{}}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
package/dist/cache-Dk53iOo6.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import{o as e}from"./utils-Crm9oPcV.mjs";import{globalBackgroundQueue as t}from"./node/cache.mjs";import n from"node:path";import r from"node:fs";import i from"node:crypto";const a=new Map,o=()=>{let t=e();return n.resolve(process.cwd(),t.dir,`parser`)},s=`v2.5`;var c=class{static async get(t){if(e().noCache)return null;try{let e=await r.promises.stat(t),c=a.get(t);if(c&&c.mtime===e.mtimeMs)return c.data;let l=o(),u=i.createHash(`md5`).update(t).digest(`hex`),d=n.join(l,`${u}.json`);try{let n=await r.promises.readFile(d,`utf-8`),i=JSON.parse(n);return i._mtime!==e.mtimeMs||i._v!==s?null:(a.set(t,{data:i.data,mtime:i._mtime}),i.data)}catch{return null}}catch{return null}}static async set(c,l){if(!e().noCache)try{let e=await r.promises.stat(c);a.set(c,{data:l,mtime:e.mtimeMs});let u=o(),d=i.createHash(`md5`).update(c).digest(`hex`),f=n.join(u,`${d}.json`),p={_v:s,_mtime:e.mtimeMs,data:l};t.add(async()=>{try{await r.promises.mkdir(u,{recursive:!0}),await r.promises.writeFile(f,JSON.stringify(p))}catch{}})}catch{}}static invalidate(e){a.delete(e)}static clear(){a.clear();let e=o();if(r.existsSync(e))try{r.rmSync(e,{recursive:!0,force:!0})}catch{}}};export{c as t};
|
package/dist/config-CCXp3aXO.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import{t as e}from"./chunk-BFSpntXv.mjs";import{r as t}from"./errors-0zGHRLue.mjs";import{t as n}from"./types-generator-bDPvUztF.mjs";import r from"node:path";import i from"node:fs";import{z as a}from"zod";import{warn as o}from"@bdocs/dui";function s(e){return e}const c=a.object({icon:a.string().max(50),link:a.string().url()});a.object({text:a.string().max(2e3).optional()});const l=a.object({processor:a.enum([`unified`,`satteri`]).optional()}),u=a.object({name:a.string(),enforce:a.enum([`pre`,`post`]).optional(),version:a.string().optional(),boltdocsVersion:a.string().optional(),clientEntry:a.string().optional(),remarkPlugins:a.array(a.unknown()).optional(),rehypePlugins:a.array(a.unknown()).optional(),vitePlugins:a.array(a.unknown()).optional(),components:a.record(a.string(),a.string()).optional(),metadata:a.record(a.string(),a.unknown()).optional(),middleware:a.array(a.object({name:a.string().optional(),enforce:a.enum([`pre`,`post`]).optional()}).passthrough()).optional(),hooks:a.record(a.string(),a.unknown()).optional()}),d=a.object({title:a.union([a.string(),a.record(a.string(),a.string())]).optional(),description:a.union([a.string(),a.record(a.string(),a.string())]).optional(),logo:a.union([a.string(),a.object({dark:a.string(),light:a.string(),alt:a.string().optional(),width:a.number().optional(),height:a.number().optional()})]).optional(),navbar:a.array(a.object({label:a.union([a.string(),a.record(a.string(),a.string())]),href:a.string(),items:a.array(a.object({label:a.union([a.string(),a.record(a.string(),a.string())]),href:a.string()})).optional()})).optional(),sidebar:a.record(a.string(),a.array(a.object({text:a.string(),link:a.string()}))).optional(),sidebarGroups:a.record(a.string(),a.object({title:a.union([a.string(),a.record(a.string(),a.string())]).optional(),icon:a.string().optional()})).optional(),socialLinks:a.array(c).optional(),editLink:a.string().refine(e=>!e||e.includes(`:path`),{message:`editLink must contain ':path' placeholder if specified`}).optional(),communityHelp:a.string().url().optional(),version:a.string().max(50).optional(),githubRepo:a.string().max(100).optional(),favicon:a.string().optional(),tabs:a.array(a.object({id:a.string(),text:a.union([a.string(),a.record(a.string(),a.string())]),icon:a.string().optional()})).optional(),codeTheme:a.union([a.string(),a.object({light:a.string(),dark:a.string()})]).optional()}),f=a.union([a.string(),a.object({rules:a.array(a.object({userAgent:a.string(),allow:a.union([a.string(),a.array(a.string())]).optional(),disallow:a.union([a.string(),a.array(a.string())]).optional()})).optional(),sitemaps:a.array(a.string().url()).optional()})]),p=a.object({defaultLocale:a.string(),locales:a.union([a.record(a.string(),a.string()),a.array(a.string())]).transform(e=>Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e),localeConfigs:a.record(a.string(),a.object({label:a.string().optional(),direction:a.enum([`ltr`,`rtl`]).optional(),htmlLang:a.string().optional(),calendar:a.string().optional()})).optional()}),m=a.object({defaultVersion:a.string(),prefix:a.string().optional(),versions:a.array(a.object({label:a.string(),path:a.string()}))}),h=a.object({headers:a.record(a.string(),a.string()).optional(),enableCSP:a.boolean().optional(),customHeaders:a.record(a.string(),a.string()).optional()}),g=a.object({google:a.string().optional(),bing:a.string().optional(),yandex:a.string().optional(),pinterest:a.string().optional(),facebook:a.string().optional()}),_=a.object({metatags:a.record(a.string(),a.string()).optional(),indexing:a.enum([`all`,`public`]).optional(),thumbnails:a.object({background:a.string().optional()}).optional(),verification:g.optional()}),v=a.object({measurementId:a.string().min(1,`Measurement ID is required for GA4`),debug:a.boolean().optional(),anonymizeIp:a.boolean().optional(),sendPageView:a.boolean().optional(),cookieFlags:a.string().optional(),autoTrack:a.object({pageViews:a.boolean().optional(),downloads:a.boolean().optional(),externalLinks:a.boolean().optional(),search:a.boolean().optional()}).optional()}),y=a.object({tagId:a.string().min(1,`Tag ID is required for GTM`),dataLayerName:a.string().optional(),preview:a.string().optional()}),b=a.object({appId:a.string().min(1,`Algolia App ID is required`),apiKey:a.string().min(1,`Algolia API Key is required`),indexName:a.string().min(1,`Algolia Index Name is required`)}),x=a.object({repo:a.string().min(1,`Giscus repository is required`),repoId:a.string().min(1,`Giscus repository ID is required`),category:a.string().optional(),categoryId:a.string().optional(),mapping:a.enum([`pathname`,`url`,`title`,`og:title`,`specific`,`number`]).optional(),strict:a.union([a.enum([`0`,`1`]),a.boolean()]).optional(),reactionsEnabled:a.union([a.enum([`0`,`1`]),a.boolean()]).optional(),emitMetadata:a.union([a.enum([`0`,`1`]),a.boolean()]).optional(),inputPosition:a.enum([`top`,`bottom`]).optional(),theme:a.string().optional(),darkTheme:a.string().optional(),lang:a.string().optional(),loading:a.enum([`lazy`,`eager`]).optional()}),S=a.object({enabled:a.boolean(),owner:a.string().min(1,`GitHub owner is required`),repo:a.string().min(1,`GitHub repository name is required`),categorySlug:a.string().optional(),endpoint:a.string().optional()}),C=a.object({analytics:a.boolean().optional(),speedInsights:a.boolean().optional()}),w=a.object({apiKey:a.string().min(1,`API key is required for PostHog`),host:a.string().url().optional(),capturePageview:a.boolean().optional(),capturePageleave:a.boolean().optional(),sessionRecording:a.boolean().optional(),autocapture:a.boolean().optional()}),T=a.object({ga4:v.optional(),gtm:y.optional(),vercel:C.optional(),posthog:w.optional()}),E=a.object({algolia:b.optional()}),D=a.object({giscus:x.optional(),custom:S.optional()}),O=a.object({analytics:T.optional(),search:E.optional(),feedback:D.optional()}),k=a.object({visible:a.boolean().optional(),environments:a.array(a.string()).optional()}),A=a.object({siteUrl:a.string().url().optional(),docsDir:a.string().optional(),base:a.string().optional(),theme:d.optional(),i18n:p.optional(),versions:m.optional(),mdx:l.optional(),plugins:a.array(u).optional(),robots:f.optional(),security:h.optional(),seo:_.optional(),integrations:O.optional(),drafts:k.optional(),featureFlags:a.record(a.string(),a.union([a.boolean(),a.string()])).optional(),vite:a.custom().optional()});var j=e({CONFIG_FILES:()=>M,defineConfig:()=>s,resolveConfig:()=>N,resolveConfigAndGenerateTypes:()=>P});const M=[`boltdocs.config.js`,`boltdocs.config.mjs`,`boltdocs.config.ts`];async function N(e,n=process.cwd()){let a=n,s={docsDir:r.resolve(e),theme:{title:`Boltdocs`,description:`A Vite documentation framework`,navbar:[{label:`Home`,href:`/`},{label:`Documentation`,href:`/docs`}],codeTheme:{light:`github-light`,dark:`github-dark`}}},c={};for(let e of M){let t=r.resolve(a,e);if(i.existsSync(t))try{let{loadConfigFromFile:e}=await import(`vite`),n=await e({command:`serve`,mode:`development`},t,a);if(n){c=n.config;break}}catch(t){t instanceof Error&&o(`Failed to load config from ${e}: ${t}`)}}let l={title:c.title,description:c.description,logo:c.logo,favicon:c.favicon,navbar:c.navbar,sidebar:c.sidebar,sidebarGroups:c.theme?.sidebarGroups,socialLinks:c.socialLinks,githubRepo:c.githubRepo,tabs:c.tabs,codeTheme:c.codeTheme,communityHelp:c.communityHelp,version:c.version,editLink:c.editLink,...c.theme||{}},u=Object.fromEntries(Object.entries(l).filter(([e,t])=>t!==void 0));u.navbar&&=u.navbar.map(e=>({label:e.label||``,href:e.href||``,items:e.items}));let d={docsDir:r.resolve(e),theme:{...s.theme,...u},i18n:c.i18n?{...c.i18n,locales:Array.isArray(c.i18n.locales)?Object.fromEntries(c.i18n.locales.map(e=>[e,e])):c.i18n.locales}:void 0,versions:c.versions,siteUrl:c.siteUrl,base:c.base,seo:c.seo,plugins:c.plugins||[],robots:c.robots,security:c.security,integrations:c.integrations,vite:c.vite},f=A.safeParse(d);if(!f.success)throw new t(`Invalid Boltdocs configuration:\n${f.error.issues.map(e=>` - ${e.path.join(`.`)}: ${e.message}`).join(`
|
|
7
|
-
`)}`);return f.data}async function P(e,t=process.cwd()){let r=await N(e,t);return n(r,e,t),r}export{s as a,u as i,j as n,N as r,M as t};
|
package/dist/config-CMd4XoFq.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
const e=require(`./config-DlGoEM9D.cjs`);exports.CONFIG_FILES=e.t,exports.defineConfig=e.a,exports.resolveConfig=e.n,exports.resolveConfigAndGenerateTypes=e.r;
|
package/dist/config-DlGoEM9D.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
const e=require(`./chunk-D1Md3oWO.cjs`),t=require(`./errors-vKw8CkiX.cjs`),n=require(`./types-generator-BXhv7Ill.cjs`);let r=require(`node:path`);r=e.r(r);let i=require(`node:fs`);i=e.r(i);let a=require(`zod`),o=require(`@bdocs/dui`);function s(e){return e}const c=a.z.object({icon:a.z.string().max(50),link:a.z.string().url()});a.z.object({text:a.z.string().max(2e3).optional()});const l=a.z.object({processor:a.z.enum([`unified`,`satteri`]).optional()}),u=a.z.object({name:a.z.string(),enforce:a.z.enum([`pre`,`post`]).optional(),version:a.z.string().optional(),boltdocsVersion:a.z.string().optional(),clientEntry:a.z.string().optional(),remarkPlugins:a.z.array(a.z.unknown()).optional(),rehypePlugins:a.z.array(a.z.unknown()).optional(),vitePlugins:a.z.array(a.z.unknown()).optional(),components:a.z.record(a.z.string(),a.z.string()).optional(),metadata:a.z.record(a.z.string(),a.z.unknown()).optional(),middleware:a.z.array(a.z.object({name:a.z.string().optional(),enforce:a.z.enum([`pre`,`post`]).optional()}).passthrough()).optional(),hooks:a.z.record(a.z.string(),a.z.unknown()).optional()}),d=a.z.object({title:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]).optional(),description:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]).optional(),logo:a.z.union([a.z.string(),a.z.object({dark:a.z.string(),light:a.z.string(),alt:a.z.string().optional(),width:a.z.number().optional(),height:a.z.number().optional()})]).optional(),navbar:a.z.array(a.z.object({label:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]),href:a.z.string(),items:a.z.array(a.z.object({label:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]),href:a.z.string()})).optional()})).optional(),sidebar:a.z.record(a.z.string(),a.z.array(a.z.object({text:a.z.string(),link:a.z.string()}))).optional(),sidebarGroups:a.z.record(a.z.string(),a.z.object({title:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]).optional(),icon:a.z.string().optional()})).optional(),socialLinks:a.z.array(c).optional(),editLink:a.z.string().refine(e=>!e||e.includes(`:path`),{message:`editLink must contain ':path' placeholder if specified`}).optional(),communityHelp:a.z.string().url().optional(),version:a.z.string().max(50).optional(),githubRepo:a.z.string().max(100).optional(),favicon:a.z.string().optional(),tabs:a.z.array(a.z.object({id:a.z.string(),text:a.z.union([a.z.string(),a.z.record(a.z.string(),a.z.string())]),icon:a.z.string().optional()})).optional(),codeTheme:a.z.union([a.z.string(),a.z.object({light:a.z.string(),dark:a.z.string()})]).optional()}),f=a.z.union([a.z.string(),a.z.object({rules:a.z.array(a.z.object({userAgent:a.z.string(),allow:a.z.union([a.z.string(),a.z.array(a.z.string())]).optional(),disallow:a.z.union([a.z.string(),a.z.array(a.z.string())]).optional()})).optional(),sitemaps:a.z.array(a.z.string().url()).optional()})]),p=a.z.object({defaultLocale:a.z.string(),locales:a.z.union([a.z.record(a.z.string(),a.z.string()),a.z.array(a.z.string())]).transform(e=>Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e),localeConfigs:a.z.record(a.z.string(),a.z.object({label:a.z.string().optional(),direction:a.z.enum([`ltr`,`rtl`]).optional(),htmlLang:a.z.string().optional(),calendar:a.z.string().optional()})).optional()}),m=a.z.object({defaultVersion:a.z.string(),prefix:a.z.string().optional(),versions:a.z.array(a.z.object({label:a.z.string(),path:a.z.string()}))}),h=a.z.object({headers:a.z.record(a.z.string(),a.z.string()).optional(),enableCSP:a.z.boolean().optional(),customHeaders:a.z.record(a.z.string(),a.z.string()).optional()}),g=a.z.object({google:a.z.string().optional(),bing:a.z.string().optional(),yandex:a.z.string().optional(),pinterest:a.z.string().optional(),facebook:a.z.string().optional()}),_=a.z.object({metatags:a.z.record(a.z.string(),a.z.string()).optional(),indexing:a.z.enum([`all`,`public`]).optional(),thumbnails:a.z.object({background:a.z.string().optional()}).optional(),verification:g.optional()}),v=a.z.object({measurementId:a.z.string().min(1,`Measurement ID is required for GA4`),debug:a.z.boolean().optional(),anonymizeIp:a.z.boolean().optional(),sendPageView:a.z.boolean().optional(),cookieFlags:a.z.string().optional(),autoTrack:a.z.object({pageViews:a.z.boolean().optional(),downloads:a.z.boolean().optional(),externalLinks:a.z.boolean().optional(),search:a.z.boolean().optional()}).optional()}),y=a.z.object({tagId:a.z.string().min(1,`Tag ID is required for GTM`),dataLayerName:a.z.string().optional(),preview:a.z.string().optional()}),b=a.z.object({appId:a.z.string().min(1,`Algolia App ID is required`),apiKey:a.z.string().min(1,`Algolia API Key is required`),indexName:a.z.string().min(1,`Algolia Index Name is required`)}),x=a.z.object({repo:a.z.string().min(1,`Giscus repository is required`),repoId:a.z.string().min(1,`Giscus repository ID is required`),category:a.z.string().optional(),categoryId:a.z.string().optional(),mapping:a.z.enum([`pathname`,`url`,`title`,`og:title`,`specific`,`number`]).optional(),strict:a.z.union([a.z.enum([`0`,`1`]),a.z.boolean()]).optional(),reactionsEnabled:a.z.union([a.z.enum([`0`,`1`]),a.z.boolean()]).optional(),emitMetadata:a.z.union([a.z.enum([`0`,`1`]),a.z.boolean()]).optional(),inputPosition:a.z.enum([`top`,`bottom`]).optional(),theme:a.z.string().optional(),darkTheme:a.z.string().optional(),lang:a.z.string().optional(),loading:a.z.enum([`lazy`,`eager`]).optional()}),S=a.z.object({enabled:a.z.boolean(),owner:a.z.string().min(1,`GitHub owner is required`),repo:a.z.string().min(1,`GitHub repository name is required`),categorySlug:a.z.string().optional(),endpoint:a.z.string().optional()}),C=a.z.object({analytics:a.z.boolean().optional(),speedInsights:a.z.boolean().optional()}),w=a.z.object({apiKey:a.z.string().min(1,`API key is required for PostHog`),host:a.z.string().url().optional(),capturePageview:a.z.boolean().optional(),capturePageleave:a.z.boolean().optional(),sessionRecording:a.z.boolean().optional(),autocapture:a.z.boolean().optional()}),T=a.z.object({ga4:v.optional(),gtm:y.optional(),vercel:C.optional(),posthog:w.optional()}),E=a.z.object({algolia:b.optional()}),D=a.z.object({giscus:x.optional(),custom:S.optional()}),O=a.z.object({analytics:T.optional(),search:E.optional(),feedback:D.optional()}),k=a.z.object({visible:a.z.boolean().optional(),environments:a.z.array(a.z.string()).optional()}),A=a.z.object({siteUrl:a.z.string().url().optional(),docsDir:a.z.string().optional(),base:a.z.string().optional(),theme:d.optional(),i18n:p.optional(),versions:m.optional(),mdx:l.optional(),plugins:a.z.array(u).optional(),robots:f.optional(),security:h.optional(),seo:_.optional(),integrations:O.optional(),drafts:k.optional(),featureFlags:a.z.record(a.z.string(),a.z.union([a.z.boolean(),a.z.string()])).optional(),vite:a.z.custom().optional()}),j=[`boltdocs.config.js`,`boltdocs.config.mjs`,`boltdocs.config.ts`];async function M(e,n=process.cwd()){let a=n,s={docsDir:r.default.resolve(e),theme:{title:`Boltdocs`,description:`A Vite documentation framework`,navbar:[{label:`Home`,href:`/`},{label:`Documentation`,href:`/docs`}],codeTheme:{light:`github-light`,dark:`github-dark`}}},c={};for(let e of j){let t=r.default.resolve(a,e);if(i.default.existsSync(t))try{let{loadConfigFromFile:e}=await import(`vite`),n=await e({command:`serve`,mode:`development`},t,a);if(n){c=n.config;break}}catch(t){t instanceof Error&&(0,o.warn)(`Failed to load config from ${e}: ${t}`)}}let l={title:c.title,description:c.description,logo:c.logo,favicon:c.favicon,navbar:c.navbar,sidebar:c.sidebar,sidebarGroups:c.theme?.sidebarGroups,socialLinks:c.socialLinks,githubRepo:c.githubRepo,tabs:c.tabs,codeTheme:c.codeTheme,communityHelp:c.communityHelp,version:c.version,editLink:c.editLink,...c.theme||{}},u=Object.fromEntries(Object.entries(l).filter(([e,t])=>t!==void 0));u.navbar&&=u.navbar.map(e=>({label:e.label||``,href:e.href||``,items:e.items}));let d={docsDir:r.default.resolve(e),theme:{...s.theme,...u},i18n:c.i18n?{...c.i18n,locales:Array.isArray(c.i18n.locales)?Object.fromEntries(c.i18n.locales.map(e=>[e,e])):c.i18n.locales}:void 0,versions:c.versions,siteUrl:c.siteUrl,base:c.base,seo:c.seo,plugins:c.plugins||[],robots:c.robots,security:c.security,integrations:c.integrations,vite:c.vite},f=A.safeParse(d);if(!f.success)throw new t.r(`Invalid Boltdocs configuration:\n${f.error.issues.map(e=>` - ${e.path.join(`.`)}: ${e.message}`).join(`
|
|
7
|
-
`)}`);return f.data}async function N(e,t=process.cwd()){let r=await M(e,t);return n.t(r,e,t),r}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return j}});
|
package/dist/csp-CRp_3U7a.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
var e=require(`./chunk-D1Md3oWO.cjs`).t({getCSPHeader:()=>t});function t(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
package/dist/csp-oTC2ygvF.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import{t as e}from"./chunk-BFSpntXv.mjs";var t=e({getCSPHeader:()=>n});function n(e){let t=process.env.NODE_ENV===`development`,n={"default-src":[`'self'`],"script-src":[`'self'`,`'unsafe-inline'`],"style-src":[`'self'`,`'unsafe-inline'`],"img-src":[`'self'`,`data:`,`https:`],"font-src":[`'self'`],"connect-src":[`'self'`]};return t&&(n[`script-src`]=[`'self'`,`'unsafe-eval'`,`'unsafe-inline'`],n[`style-src`]=[`'self'`,`'unsafe-inline'`]),Object.entries(n).map(([e,t])=>`${e} ${t.join(` `)}`).join(`; `)}export{n,t};
|
package/dist/doctor-Bv16QSrI.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
const e=require(`./chunk-D1Md3oWO.cjs`),t=require(`./utils-D6Xtj0FZ.cjs`),n=require(`./pages-external-XkYIs-d5.cjs`),r=require(`./config-DlGoEM9D.cjs`),i=require(`./node/cli-entry.cjs`);let a=require(`node:path`);a=e.r(a);let o=require(`node:fs`);o=e.r(o);let s=require(`@bdocs/dui`),c=require(`fdir`),l=require(`picomatch`);l=e.r(l);let u=require(`fastest-levenshtein`);const d={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0},performance:{enabled:!0,budgets:{maxJSBundleSize:`200kb`,maxCSSBundleSize:`30kb`,maxPageHTMLSize:`80kb`,maxImagesKB:500,maxBuildTime:3e4,maxFontCount:3}}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/reports/doctor.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`,budgetExceeded:`warning`},exclude:[]};function f(e,t){if(e==null)return t;if(typeof e==`number`)return e;let n=e.toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);if(!n)return t;let r=Number.parseFloat(n[1]),i=n[2]||`b`;return Math.round(r*({b:1,kb:1024,mb:1024*1024,gb:1024*1024*1024}[i]||1))}function p(e,t,n){return e.doctorConfig.severity[t]||n}async function m(e,t){o.default.existsSync(t)||o.default.mkdirSync(t,{recursive:!0});let n=a.default.basename(e),r=new Date().toISOString().replace(/[:.]/g,`-`),i=a.default.join(t,`${n}.${r}.bak`);o.default.copyFileSync(e,i)}const h=new Map;function g(e){let n=h.get(e);if(n)return n;let r=(async()=>{let n=await t.d(e,!1);return{raw:n.raw,data:n.data,content:n.content}})();return h.set(e,r),r}const _=new Map;function v(e){if(_.has(e))return _.get(e);let t=!1;try{t=o.default.existsSync(e)&&o.default.statSync(e).isFile()}catch{t=!1}return _.set(e,t),t}async function y(e){let t=a.default.resolve(e,`doctor.json`);if(o.default.existsSync(t))try{let e=JSON.parse(o.default.readFileSync(t,`utf-8`));return{...d,...e,checks:{...d.checks,...e.checks,metadata:{...d.checks.metadata,...e.checks?.metadata},links:{...d.checks.links,...e.checks?.links},i18n:{...d.checks.i18n,...e.checks?.i18n},performance:{...d.checks.performance,...e.checks?.performance,budgets:{...d.checks.performance?.budgets,...e.checks?.performance?.budgets}}},fix:{...d.fix,...e.fix},reporting:{...d.reporting,...e.reporting},severity:{...d.severity,...e.severity},exclude:[...d.exclude,...e.exclude||[]]}}catch(e){(0,s.warn)(`Failed to parse doctor.json: ${e}`)}return d}async function b(e,r=process.cwd(),i,s){let l=a.default.resolve(r,`.boltdocs`,`generated`);o.default.existsSync(l)||o.default.mkdirSync(l,{recursive:!0});let u=s;u||=await new c.fdir().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let d=i?.base||`/docs`,f=[];for(let n=0;n<u.length;n+=100){let r=u.slice(n,n+100),i=await Promise.all(r.map(async n=>{let r=a.default.isAbsolute(n)?n:a.default.resolve(e,n),i=a.default.relative(e,r),{data:o}=await g(r),s;return s=o.permalink?String(o.permalink).startsWith(`/`)?String(o.permalink):`/${o.permalink}`:t.a(i),d===`/`?s:(d.endsWith(`/`)?d:d+`/`)+(s.startsWith(`/`)?s.substring(1):s)}));f.push(...i)}f.includes(d)||f.push(d);let p=n.t(e,i);for(let e of p)f.includes(e)||f.push(e);let m={routes:Array.from(new Set(f)).sort(),timestamp:Date.now()};return o.default.writeFileSync(a.default.resolve(l,`link-tree.json`),JSON.stringify(m,null,2)),m}function x(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-(0,u.distance)(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-(0,u.distance)(e,t)/Math.max(e.length,t.length)}const S=new Map;function C(e,t){if(S.has(e))return S.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=x(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return S.set(e,a),a}async function w(e){let n=[];if(!e.doctorConfig.checks.metadata.enabled)return n;let{titleMin:r,titleMax:i,descriptionMin:o}=e.doctorConfig.checks.metadata,s=new Map;for(let c of e.files){let l=t.u(a.default.relative(e.docsDir,c));try{let{raw:a,data:u}=await g(c);if(a.trim().startsWith(`---`)&&a.split(`---`).length>=3&&Object.keys(u).length===0){let t=p(e,`malformedFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=t._.safeParse(u);if(!d.success){let t=p(e,`invalidFrontmatter`,`high`);if(t!==`off`)for(let e of d.error.issues)n.push({file:l,level:t,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let t of f)if(u[t]===void 0){let r=p(e,`missingMetadata`,`warning`);r!==`off`&&n.push({file:l,level:r,message:`Missing required frontmatter field: "${t}".`,suggestion:`Add the "${t}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let t=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of t)if(u[r]&&Number.isNaN(Date.parse(String(u[r])))){let t=p(e,`invalidFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Invalid date format in field "${r}": "${u[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(u.title){let t=String(u.title);if(t.length<r){let i=p(e,`shortMetadata`,`low`);i!==`off`&&n.push({file:l,level:i,message:`Title is too short (${t.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(t.length>i){let r=p(e,`shortMetadata`,`low`);r!==`off`&&n.push({file:l,level:r,message:`Title is too long (${t.length} chars).`,suggestion:`Titles should be under ${i} characters.`})}let a=s.get(t)||[];a.push(l),s.set(t,a)}if(u.description&&String(u.description).length<o){let t=p(e,`shortMetadata`,`low`);t!==`off`&&n.push({file:l,level:t,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${o} characters.`})}}catch(t){if(t instanceof Error){let r=p(e,`malformedFrontmatter`,`high`);r!==`off`&&n.push({file:l,level:r,message:`Malformed frontmatter (YAML error): ${t.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}}for(let[t,r]of s.entries())if(r.length>1){let i=p(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)n.push({file:e,level:i,message:`Duplicate title found: "${t}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return n}async function T(e){let n=[],{internal:r,external:i,ignore:c,timeout:l,concurrency:u}=e.doctorConfig.checks.links;if(!r&&!i&&!e.options.checkExternal)return n;let d=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,f=new Set,m=5e5;for(let s of e.files){let l=t.u(a.default.relative(e.docsDir,s)),{content:u}=await g(s),_=[...(u.length>m?u.slice(0,m):u).replace(/```[\s\S]*?```/g,``).replace(/`[^`\n]*`/g,``).matchAll(d)];for(let t of _){let u=t[1]||t[2],d=!!t[1];if(!u||c.some(e=>u.includes(e)))continue;if(/^https?:\/\//i.test(u)){(i||e.options.checkExternal)&&f.add({url:u,file:s});continue}if(!r||/^(mailto|tel|#)/i.test(u))continue;let m;try{m=decodeURIComponent(u.split(`#`)[0].split(`?`)[0])}catch{m=u.split(`#`)[0].split(`?`)[0]}if(!m)continue;let g=!1,_=``;if(m.startsWith(`/`))if(e.routeIndex.has(m)||e.routeIndexWithSlash.has(m)||e.routeIndexWithoutSlash.has(m))g=!0;else{let t=e.basePrefix+(m.startsWith(`/`)?m:`/`+m);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))g=!1,_=t;else{let t=e.config.base!==`/`&&m.startsWith(e.config.base||`/`)?m.substring((e.config.base||`/`).length):m,n=t.startsWith(`/`)?t.substring(1):t;_=a.default.join(e.docsDir,n),g=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>v(_+e))}}else _=a.default.resolve(a.default.dirname(s),m),g=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>v(_+e));if(!g){let{bestMatch:t,similarity:r}=C(m,e.linkTree.routes),i=!1,a=e.basePrefix+(m.startsWith(`/`)?m:`/`+m);(e.routeIndex.has(a)||e.routeIndexWithSlash.has(a))&&(t=a,r=1,i=!0);let c=r>.6||i,f=r>.75&&t!==m||i,g=p(e,`brokenLink`,`high`);g!==`off`&&n.push({file:l,level:g,message:`Broken internal link: "${u}"`,suggestion:c?`Did you mean "${t}"?`:`Ensure the target exists or check for typos.`,fix:f?async()=>{let e=u.includes(`#`)?`#`+u.split(`#`)[1]:``,n=d?`(${u})`:`href="${u}"`,r=d?`(${t}${e})`:`href="${t}${e}"`,i=o.default.readFileSync(s,`utf-8`).replace(n,r);o.default.writeFileSync(s,i),h.delete(s)}:void 0})}}}if(f.size>0){(0,s.info)(s.colors.gray(`Verifying ${f.size} external links...`));let r=new Map;for(let e of f)r.has(e.url)||r.set(e.url,[]),r.get(e.url).push(e.file);let i=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),l),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t instanceof Error?t.message:String(t)}}},o=Array.from(r.keys()),c=[];for(let e=0;e<o.length;e+=u){let t=o.slice(e,e+u),n=await Promise.allSettled(t.map(i));c.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:String(e.reason)}))}for(let i of c)if(!i.ok){let o=p(e,`brokenLink`,`warning`);if(o!==`off`){let s=r.get(i.url)||[];for(let r of s)n.push({file:t.u(a.default.relative(e.docsDir,r)),level:o,message:`Broken external link: "${i.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${i.error||`Status >= 400`}`})}}}return n}async function E(e){let n=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return n;let{defaultLocale:r,locales:i}=e.config.i18n,s=Object.keys(i),c=s.filter(e=>e!==r);for(let i of e.files){let l=t.u(a.default.relative(e.docsDir,i)),u=l.split(`/`),d=u[0];if(d===r){let t=u.slice(1).join(`/`);for(let r of c){let s=a.default.join(e.docsDir,r,t);if(!v(s)){let c=p(e,`missingTranslation`,`warning`);c!==`off`&&n.push({file:l,level:c,message:`Missing translation for locale "${r}"`,suggestion:`Create a version at "${r}/${t}".`,fix:async()=>{let e=a.default.dirname(s);o.default.existsSync(e)||o.default.mkdirSync(e,{recursive:!0}),o.default.copyFileSync(i,s)}})}}}else if(s.includes(d)){let t=u.slice(1).join(`/`);if(!v(a.default.join(e.docsDir,r,t))){let a=p(e,`missingTranslation`,`low`);a!==`off`&&n.push({file:l,level:a,message:`Orphaned translation (source missing in "${r}")`,suggestion:`Remove this file or create the source at "${r}/${t}".`,fix:async()=>{o.default.unlinkSync(i)}})}}}return n}async function D(e){let t=[];if(!e.config.theme?.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=p(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=C(r.link,e.linkTree.routes),a=i>.6,o=p(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=p(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}async function O(e){let t=[],n=e.doctorConfig.checks.performance;if(!n?.enabled)return t;let r=a.default.resolve(e.root,`.boltdocs`,`reports`,`performance.json`);if(!o.default.existsSync(r))return t.push({file:`(build)`,level:p(e,`budgetExceeded`,`warning`)??`warning`,message:"Performance metrics not found. Run `boltdocs build` first."}),t;let i;try{i=JSON.parse(o.default.readFileSync(r,`utf-8`))}catch{return t.push({file:`(build)`,level:p(e,`budgetExceeded`,`warning`)??`warning`,message:`Failed to parse performance metrics file.`}),t}let s=n.budgets,c=p(e,`budgetExceeded`,`warning`),l=f(s?.maxJSBundleSize,1/0),u=f(s?.maxCSSBundleSize,1/0),d=f(s?.maxPageHTMLSize,1/0),m=s?.maxImagesKB??1/0,h=s?.maxBuildTime??1/0,g=s?.maxFontCount??1/0;if(l!==1/0&&i.totalJSBundleSize>l){let e=(i.totalJSBundleSize/1024).toFixed(0),n=(l/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`JS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Code-split large dependencies or lazy-load route components.`})}if(u!==1/0&&i.totalCSSBundleSize>u){let e=(i.totalCSSBundleSize/1024).toFixed(0),n=(u/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`CSS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Remove unused styles or split CSS by route.`})}if(d!==1/0){for(let e of i.pages)if(e.htmlSize>d){let n=(e.htmlSize/1024).toFixed(0),r=(d/1024).toFixed(0);t.push({file:e.route,level:c,message:`Page HTML size exceeds budget: ${n}kb > ${r}kb`,suggestion:`Reduce the amount of inline content or split into sub-pages.`})}}let _=m*1024;if(m!==1/0&&i.totalImagesSize>_){let e=(i.totalImagesSize/1024).toFixed(0);t.push({file:`(build)`,level:c,message:`Image assets exceed budget: ${e}kb > ${m}kb`,suggestion:`Optimize images with lossy compression or use next-gen formats (webp/avif).`})}if(h!==1/0&&i.buildTime>h){let e=(i.buildTime/1e3).toFixed(1),n=(h/1e3).toFixed(1);t.push({file:`(build)`,level:c,message:`Build time exceeds budget: ${e}s > ${n}s`,suggestion:"Check for large unoptimized assets or increase `concurrency` in SSG options."})}return g!==1/0&&i.fontCount>g&&t.push({file:`(build)`,level:c,message:`Font files exceed budget: ${i.fontCount} > ${g}`,suggestion:`Reduce the number of font families or use variable fonts.`}),t}async function k(e){let t=a.default.resolve(e,`doctor.json`);if(o.default.existsSync(t)){(0,s.warn)(`"doctor.json" already exists at ${e}.`);return}try{o.default.writeFileSync(t,JSON.stringify(d,null,2)),(0,s.success)(`Created "doctor.json" with default configuration.`)}catch(e){(0,s.error)(`Failed to create "doctor.json": ${e}`)}}async function A(e=process.cwd(),t={}){if(t.init){await k(e);return}i.t();try{let n=await y(e),{format:i}=n.reporting,u=performance.now(),d=await r.n(`docs`,e),f=a.default.resolve(e,`docs`);o.default.existsSync(f)||(i===`pretty`&&(0,s.error)(`Docs dir not found at ${f}`),process.exit(1)),i===`pretty`&&console.log((0,s.double)([` ${s.colors.dim(`Docs dir:`)} ${f}`,` ${s.colors.dim(`Reports:`)} ${e}/.boltdocs/reports/`],{title:`✦ DOCTOR — Documentation Health Check`})),i===`pretty`&&(0,s.info)(s.colors.dim(`🔍 Discovering files and routes...`));let p=(0,l.default)(n.exclude||[]),h=await new c.fdir().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=a.default.relative(f,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!p(t)&&!n}).crawl(f).withPromise();for(let e of h)_.set(e,!0);let g=await b(f,e,d,h),v=d.base||`/`,x=v===`/`?``:v.endsWith(`/`)?v.slice(0,-1):v,S=new Set(g.routes),C=new Set(g.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),k=new Set(g.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e));i===`pretty`&&(0,s.info)(s.colors.dim(`🧪 Running diagnostic checks in parallel...`));let A={root:e,docsDir:f,config:d,doctorConfig:n,linkTree:g,files:h,options:t,routeIndex:S,routeIndexWithSlash:C,routeIndexWithoutSlash:k,basePrefix:x};i===`pretty`&&(0,s.info)(s.colors.dim(`🧪 Running diagnostic checks in parallel...`));let j=[w(A),T(A),E(A),D(A)];t.budget&&j.push(O(A));let[M,N,P,F,...I]=await Promise.all(j),L=t.budget?I[0]??[]:[],R=[...M,...N,...P,...F,...L];if(i===`pretty`){let e=[{label:`Metadata checks ${M.length>0?`— ${M.length} issue${M.length===1?``:`s`}`:`— OK`}`,done:M.length===0},{label:`Link checks ${N.length>0?`— ${N.length} issue${N.length===1?``:`s`}`:`— OK`}`,done:N.length===0},{label:`i18n checks ${P.length>0?`— ${P.length} issue${P.length===1?``:`s`}`:`— OK`}`,done:P.length===0},{label:`Sidebar checks ${F.length>0?`— ${F.length} issue${F.length===1?``:`s`}`:`— OK`}`,done:F.length===0}];t.budget&&e.push({label:`Performance budget ${L.length>0?`— ${L.length} issue${L.length===1?``:`s`}`:`— OK`}`,done:L.length===0}),console.log(`\n${(0,s.tasks)(e)}`)}let z=0;if(t.fix){for(let e of R)if(e.fix){if(A.doctorConfig.fix.confirmChanges&&!await(0,s.confirm)(`Fix issue in "${e.file}": ${e.message}?`))continue;if(A.doctorConfig.fix.backupFiles){let t=a.default.resolve(A.docsDir,e.file);o.default.existsSync(t)&&await m(t,a.default.resolve(A.root,A.doctorConfig.fix.backupPath))}await e.fix(),z++}}let B=((performance.now()-u)/1e3).toFixed(2),V=R.filter(e=>e.level===`high`).length,H=R.filter(e=>e.level===`warning`).length,U=R.filter(e=>e.level===`low`).length,W={summary:{total:R.length,high:V,warning:H,low:U,fixed:z,duration:B},issues:R.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=a.default.resolve(e,n.reporting.outputFile);o.default.existsSync(a.default.dirname(t))||o.default.mkdirSync(a.default.dirname(t),{recursive:!0}),o.default.writeFileSync(t,JSON.stringify(W,null,2))}if(i===`json`)console.log(JSON.stringify(W,null,2));else if(i===`pretty`){let e=R.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(R.length>0){(0,s.dividerLog)();for(let[n,r]of Object.entries(e)){let e=[];for(let n of r){let r=n.level===`high`?`❌`:n.level===`warning`?`⚠️`:`ℹ️`,i=n.level===`high`?s.colors.red:n.level===`warning`?s.colors.yellow:s.colors.blue;e.push(`${r} ${i(n.level.toUpperCase())}: ${n.message}`),n.suggestion&&e.push(` ${s.colors.dim(`💡 ${n.suggestion}`)}`),t.fix&&n.fix&&e.push(` ${s.colors.green(`✅ Fixed automatically`)}`)}console.log(`\n${(0,s.single)(e,{title:`📄 ${n}`})}`)}(0,s.dividerLog)()}if(R.length===0)console.log((0,s.round)([` Everything looks perfect!`,` Your documentation is in great shape.`,``,` ${s.colors.dim(`Scanned ${h.length} file${h.length===1?``:`s`} in ${B}s`)}`],{title:`✨ Documentation Health Check`}));else{let e=[];V>0&&e.push(s.colors.red(`${V} Critical Error${V===1?``:`s`}`)),H>0&&e.push(s.colors.yellow(`${H} Warning${H===1?``:`s`}`)),U>0&&e.push(s.colors.blue(`${U} Improvement${U===1?``:`s`}`));let t=[...(0,s.bullet)(e).split(`
|
|
7
|
-
`).map(e=>e.trimStart()),``,s.colors.dim(`Scanned ${h.length} file${h.length===1?``:`s`} in ${B}s`)];console.log(`\n${(0,s.double)(t,{title:`Diagnosis Results`})}\n`),z>0&&(0,s.success)(`Successfully fixed ${z} issues automatically!`),V>0?(0,s.error)(`Please fix the critical errors before building for production.`):(0,s.success)(`No critical issues found. You are ready to go!`)}}n.reporting.failOnError&&V>0&&process.exit(1),n.reporting.maxWarnings!==-1&&H>n.reporting.maxWarnings&&(i===`pretty`&&(0,s.error)(`Failed: Too many warnings (${H} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){(0,s.error)(`Doctor failed: ${e}`),process.exit(1)}}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return d}});
|
package/dist/doctor-DOAbSaiL.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import{t as e}from"./chunk-BFSpntXv.mjs";import{_ as t,a as n,d as r,u as i}from"./utils-Crm9oPcV.mjs";import{t as a}from"./pages-external-BYa4JSda.mjs";import{r as o}from"./config-CCXp3aXO.mjs";import{t as s}from"./node/cli-entry.mjs";import c from"node:path";import l from"node:fs";import{bullet as u,colors as d,confirm as f,dividerLog as p,double as m,error as h,info as g,round as _,single as v,success as y,tasks as b,warn as x}from"@bdocs/dui";import{fdir as S}from"fdir";import C from"picomatch";import{distance as w}from"fastest-levenshtein";const T={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0},performance:{enabled:!0,budgets:{maxJSBundleSize:`200kb`,maxCSSBundleSize:`30kb`,maxPageHTMLSize:`80kb`,maxImagesKB:500,maxBuildTime:3e4,maxFontCount:3}}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/reports/doctor.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`,budgetExceeded:`warning`},exclude:[]};function E(e,t){if(e==null)return t;if(typeof e==`number`)return e;let n=e.toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);if(!n)return t;let r=Number.parseFloat(n[1]),i=n[2]||`b`;return Math.round(r*({b:1,kb:1024,mb:1024*1024,gb:1024*1024*1024}[i]||1))}function D(e,t,n){return e.doctorConfig.severity[t]||n}async function ee(e,t){l.existsSync(t)||l.mkdirSync(t,{recursive:!0});let n=c.basename(e),r=new Date().toISOString().replace(/[:.]/g,`-`),i=c.join(t,`${n}.${r}.bak`);l.copyFileSync(e,i)}const O=new Map;function k(e){let t=O.get(e);if(t)return t;let n=(async()=>{let t=await r(e,!1);return{raw:t.raw,data:t.data,content:t.content}})();return O.set(e,n),n}const A=new Map;function j(e){if(A.has(e))return A.get(e);let t=!1;try{t=l.existsSync(e)&&l.statSync(e).isFile()}catch{t=!1}return A.set(e,t),t}async function M(e){let t=c.resolve(e,`doctor.json`);if(l.existsSync(t))try{let e=JSON.parse(l.readFileSync(t,`utf-8`));return{...T,...e,checks:{...T.checks,...e.checks,metadata:{...T.checks.metadata,...e.checks?.metadata},links:{...T.checks.links,...e.checks?.links},i18n:{...T.checks.i18n,...e.checks?.i18n},performance:{...T.checks.performance,...e.checks?.performance,budgets:{...T.checks.performance?.budgets,...e.checks?.performance?.budgets}}},fix:{...T.fix,...e.fix},reporting:{...T.reporting,...e.reporting},severity:{...T.severity,...e.severity},exclude:[...T.exclude,...e.exclude||[]]}}catch(e){x(`Failed to parse doctor.json: ${e}`)}return T}async function N(e,t=process.cwd(),r,i){let o=c.resolve(t,`.boltdocs`,`generated`);l.existsSync(o)||l.mkdirSync(o,{recursive:!0});let s=i;s||=await new S().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let u=r?.base||`/docs`,d=[];for(let t=0;t<s.length;t+=100){let r=s.slice(t,t+100),i=await Promise.all(r.map(async t=>{let r=c.isAbsolute(t)?t:c.resolve(e,t),i=c.relative(e,r),{data:a}=await k(r),o;return o=a.permalink?String(a.permalink).startsWith(`/`)?String(a.permalink):`/${a.permalink}`:n(i),u===`/`?o:(u.endsWith(`/`)?u:u+`/`)+(o.startsWith(`/`)?o.substring(1):o)}));d.push(...i)}d.includes(u)||d.push(u);let f=a(e,r);for(let e of f)d.includes(e)||d.push(e);let p={routes:Array.from(new Set(d)).sort(),timestamp:Date.now()};return l.writeFileSync(c.resolve(o,`link-tree.json`),JSON.stringify(p,null,2)),p}function P(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-w(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-w(e,t)/Math.max(e.length,t.length)}const F=new Map;function I(e,t){if(F.has(e))return F.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=P(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return F.set(e,a),a}async function L(e){let n=[];if(!e.doctorConfig.checks.metadata.enabled)return n;let{titleMin:r,titleMax:a,descriptionMin:o}=e.doctorConfig.checks.metadata,s=new Map;for(let l of e.files){let u=i(c.relative(e.docsDir,l));try{let{raw:i,data:c}=await k(l);if(i.trim().startsWith(`---`)&&i.split(`---`).length>=3&&Object.keys(c).length===0){let t=D(e,`malformedFrontmatter`,`high`);t!==`off`&&n.push({file:u,level:t,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=t.safeParse(c);if(!d.success){let t=D(e,`invalidFrontmatter`,`high`);if(t!==`off`)for(let e of d.error.issues)n.push({file:u,level:t,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let t of f)if(c[t]===void 0){let r=D(e,`missingMetadata`,`warning`);r!==`off`&&n.push({file:u,level:r,message:`Missing required frontmatter field: "${t}".`,suggestion:`Add the "${t}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let t=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of t)if(c[r]&&Number.isNaN(Date.parse(String(c[r])))){let t=D(e,`invalidFrontmatter`,`high`);t!==`off`&&n.push({file:u,level:t,message:`Invalid date format in field "${r}": "${c[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(c.title){let t=String(c.title);if(t.length<r){let i=D(e,`shortMetadata`,`low`);i!==`off`&&n.push({file:u,level:i,message:`Title is too short (${t.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(t.length>a){let r=D(e,`shortMetadata`,`low`);r!==`off`&&n.push({file:u,level:r,message:`Title is too long (${t.length} chars).`,suggestion:`Titles should be under ${a} characters.`})}let i=s.get(t)||[];i.push(u),s.set(t,i)}if(c.description&&String(c.description).length<o){let t=D(e,`shortMetadata`,`low`);t!==`off`&&n.push({file:u,level:t,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${o} characters.`})}}catch(t){if(t instanceof Error){let r=D(e,`malformedFrontmatter`,`high`);r!==`off`&&n.push({file:u,level:r,message:`Malformed frontmatter (YAML error): ${t.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}}for(let[t,r]of s.entries())if(r.length>1){let i=D(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)n.push({file:e,level:i,message:`Duplicate title found: "${t}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return n}async function R(e){let t=[],{internal:n,external:r,ignore:a,timeout:o,concurrency:s}=e.doctorConfig.checks.links;if(!n&&!r&&!e.options.checkExternal)return t;let u=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,f=new Set,p=5e5;for(let o of e.files){let s=i(c.relative(e.docsDir,o)),{content:d}=await k(o),m=[...(d.length>p?d.slice(0,p):d).replace(/```[\s\S]*?```/g,``).replace(/`[^`\n]*`/g,``).matchAll(u)];for(let i of m){let u=i[1]||i[2],d=!!i[1];if(!u||a.some(e=>u.includes(e)))continue;if(/^https?:\/\//i.test(u)){(r||e.options.checkExternal)&&f.add({url:u,file:o});continue}if(!n||/^(mailto|tel|#)/i.test(u))continue;let p;try{p=decodeURIComponent(u.split(`#`)[0].split(`?`)[0])}catch{p=u.split(`#`)[0].split(`?`)[0]}if(!p)continue;let m=!1,h=``;if(p.startsWith(`/`))if(e.routeIndex.has(p)||e.routeIndexWithSlash.has(p)||e.routeIndexWithoutSlash.has(p))m=!0;else{let t=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))m=!1,h=t;else{let t=e.config.base!==`/`&&p.startsWith(e.config.base||`/`)?p.substring((e.config.base||`/`).length):p,n=t.startsWith(`/`)?t.substring(1):t;h=c.join(e.docsDir,n),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>j(h+e))}}else h=c.resolve(c.dirname(o),p),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>j(h+e));if(!m){let{bestMatch:n,similarity:r}=I(p,e.linkTree.routes),i=!1,a=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);(e.routeIndex.has(a)||e.routeIndexWithSlash.has(a))&&(n=a,r=1,i=!0);let c=r>.6||i,f=r>.75&&n!==p||i,m=D(e,`brokenLink`,`high`);m!==`off`&&t.push({file:s,level:m,message:`Broken internal link: "${u}"`,suggestion:c?`Did you mean "${n}"?`:`Ensure the target exists or check for typos.`,fix:f?async()=>{let e=u.includes(`#`)?`#`+u.split(`#`)[1]:``,t=d?`(${u})`:`href="${u}"`,r=d?`(${n}${e})`:`href="${n}${e}"`,i=l.readFileSync(o,`utf-8`).replace(t,r);l.writeFileSync(o,i),O.delete(o)}:void 0})}}}if(f.size>0){g(d.gray(`Verifying ${f.size} external links...`));let n=new Map;for(let e of f)n.has(e.url)||n.set(e.url,[]),n.get(e.url).push(e.file);let r=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),o),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t instanceof Error?t.message:String(t)}}},a=Array.from(n.keys()),l=[];for(let e=0;e<a.length;e+=s){let t=a.slice(e,e+s),n=await Promise.allSettled(t.map(r));l.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:String(e.reason)}))}for(let r of l)if(!r.ok){let a=D(e,`brokenLink`,`warning`);if(a!==`off`){let o=n.get(r.url)||[];for(let n of o)t.push({file:i(c.relative(e.docsDir,n)),level:a,message:`Broken external link: "${r.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${r.error||`Status >= 400`}`})}}}return t}async function z(e){let t=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return t;let{defaultLocale:n,locales:r}=e.config.i18n,a=Object.keys(r),o=a.filter(e=>e!==n);for(let r of e.files){let s=i(c.relative(e.docsDir,r)),u=s.split(`/`),d=u[0];if(d===n){let n=u.slice(1).join(`/`);for(let i of o){let a=c.join(e.docsDir,i,n);if(!j(a)){let o=D(e,`missingTranslation`,`warning`);o!==`off`&&t.push({file:s,level:o,message:`Missing translation for locale "${i}"`,suggestion:`Create a version at "${i}/${n}".`,fix:async()=>{let e=c.dirname(a);l.existsSync(e)||l.mkdirSync(e,{recursive:!0}),l.copyFileSync(r,a)}})}}}else if(a.includes(d)){let i=u.slice(1).join(`/`);if(!j(c.join(e.docsDir,n,i))){let a=D(e,`missingTranslation`,`low`);a!==`off`&&t.push({file:s,level:a,message:`Orphaned translation (source missing in "${n}")`,suggestion:`Remove this file or create the source at "${n}/${i}".`,fix:async()=>{l.unlinkSync(r)}})}}}return t}async function B(e){let t=[];if(!e.config.theme?.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=D(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=I(r.link,e.linkTree.routes),a=i>.6,o=D(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=D(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}async function V(e){let t=[],n=e.doctorConfig.checks.performance;if(!n?.enabled)return t;let r=c.resolve(e.root,`.boltdocs`,`reports`,`performance.json`);if(!l.existsSync(r))return t.push({file:`(build)`,level:D(e,`budgetExceeded`,`warning`)??`warning`,message:"Performance metrics not found. Run `boltdocs build` first."}),t;let i;try{i=JSON.parse(l.readFileSync(r,`utf-8`))}catch{return t.push({file:`(build)`,level:D(e,`budgetExceeded`,`warning`)??`warning`,message:`Failed to parse performance metrics file.`}),t}let a=n.budgets,o=D(e,`budgetExceeded`,`warning`),s=E(a?.maxJSBundleSize,1/0),u=E(a?.maxCSSBundleSize,1/0),d=E(a?.maxPageHTMLSize,1/0),f=a?.maxImagesKB??1/0,p=a?.maxBuildTime??1/0,m=a?.maxFontCount??1/0;if(s!==1/0&&i.totalJSBundleSize>s){let e=(i.totalJSBundleSize/1024).toFixed(0),n=(s/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`JS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Code-split large dependencies or lazy-load route components.`})}if(u!==1/0&&i.totalCSSBundleSize>u){let e=(i.totalCSSBundleSize/1024).toFixed(0),n=(u/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`CSS bundle size exceeds budget: ${e}kb > ${n}kb`,suggestion:`Remove unused styles or split CSS by route.`})}if(d!==1/0){for(let e of i.pages)if(e.htmlSize>d){let n=(e.htmlSize/1024).toFixed(0),r=(d/1024).toFixed(0);t.push({file:e.route,level:o,message:`Page HTML size exceeds budget: ${n}kb > ${r}kb`,suggestion:`Reduce the amount of inline content or split into sub-pages.`})}}let h=f*1024;if(f!==1/0&&i.totalImagesSize>h){let e=(i.totalImagesSize/1024).toFixed(0);t.push({file:`(build)`,level:o,message:`Image assets exceed budget: ${e}kb > ${f}kb`,suggestion:`Optimize images with lossy compression or use next-gen formats (webp/avif).`})}if(p!==1/0&&i.buildTime>p){let e=(i.buildTime/1e3).toFixed(1),n=(p/1e3).toFixed(1);t.push({file:`(build)`,level:o,message:`Build time exceeds budget: ${e}s > ${n}s`,suggestion:"Check for large unoptimized assets or increase `concurrency` in SSG options."})}return m!==1/0&&i.fontCount>m&&t.push({file:`(build)`,level:o,message:`Font files exceed budget: ${i.fontCount} > ${m}`,suggestion:`Reduce the number of font families or use variable fonts.`}),t}var H=e({DEFAULT_DOCTOR_CONFIG:()=>T,checkI18n:()=>z,checkLinks:()=>R,checkMetadata:()=>L,checkPerformance:()=>V,checkSidebar:()=>B,doctorAction:()=>W,doctorInit:()=>U,generateLinkTree:()=>N,loadDoctorConfig:()=>M});async function U(e){let t=c.resolve(e,`doctor.json`);if(l.existsSync(t)){x(`"doctor.json" already exists at ${e}.`);return}try{l.writeFileSync(t,JSON.stringify(T,null,2)),y(`Created "doctor.json" with default configuration.`)}catch(e){h(`Failed to create "doctor.json": ${e}`)}}async function W(e=process.cwd(),t={}){if(t.init){await U(e);return}s();try{let n=await M(e),{format:r}=n.reporting,i=performance.now(),a=await o(`docs`,e),s=c.resolve(e,`docs`);l.existsSync(s)||(r===`pretty`&&h(`Docs dir not found at ${s}`),process.exit(1)),r===`pretty`&&console.log(m([` ${d.dim(`Docs dir:`)} ${s}`,` ${d.dim(`Reports:`)} ${e}/.boltdocs/reports/`],{title:`✦ DOCTOR — Documentation Health Check`})),r===`pretty`&&g(d.dim(`🔍 Discovering files and routes...`));let x=C(n.exclude||[]),w=await new S().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=c.relative(s,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!x(t)&&!n}).crawl(s).withPromise();for(let e of w)A.set(e,!0);let T=await N(s,e,a,w),E=a.base||`/`,D=E===`/`?``:E.endsWith(`/`)?E.slice(0,-1):E,O=new Set(T.routes),k=new Set(T.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),j=new Set(T.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e));r===`pretty`&&g(d.dim(`🧪 Running diagnostic checks in parallel...`));let P={root:e,docsDir:s,config:a,doctorConfig:n,linkTree:T,files:w,options:t,routeIndex:O,routeIndexWithSlash:k,routeIndexWithoutSlash:j,basePrefix:D};r===`pretty`&&g(d.dim(`🧪 Running diagnostic checks in parallel...`));let F=[L(P),R(P),z(P),B(P)];t.budget&&F.push(V(P));let[I,H,U,W,...G]=await Promise.all(F),K=t.budget?G[0]??[]:[],q=[...I,...H,...U,...W,...K];if(r===`pretty`){let e=[{label:`Metadata checks ${I.length>0?`— ${I.length} issue${I.length===1?``:`s`}`:`— OK`}`,done:I.length===0},{label:`Link checks ${H.length>0?`— ${H.length} issue${H.length===1?``:`s`}`:`— OK`}`,done:H.length===0},{label:`i18n checks ${U.length>0?`— ${U.length} issue${U.length===1?``:`s`}`:`— OK`}`,done:U.length===0},{label:`Sidebar checks ${W.length>0?`— ${W.length} issue${W.length===1?``:`s`}`:`— OK`}`,done:W.length===0}];t.budget&&e.push({label:`Performance budget ${K.length>0?`— ${K.length} issue${K.length===1?``:`s`}`:`— OK`}`,done:K.length===0}),console.log(`\n${b(e)}`)}let J=0;if(t.fix){for(let e of q)if(e.fix){if(P.doctorConfig.fix.confirmChanges&&!await f(`Fix issue in "${e.file}": ${e.message}?`))continue;if(P.doctorConfig.fix.backupFiles){let t=c.resolve(P.docsDir,e.file);l.existsSync(t)&&await ee(t,c.resolve(P.root,P.doctorConfig.fix.backupPath))}await e.fix(),J++}}let Y=((performance.now()-i)/1e3).toFixed(2),X=q.filter(e=>e.level===`high`).length,Z=q.filter(e=>e.level===`warning`).length,Q=q.filter(e=>e.level===`low`).length,$={summary:{total:q.length,high:X,warning:Z,low:Q,fixed:J,duration:Y},issues:q.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=c.resolve(e,n.reporting.outputFile);l.existsSync(c.dirname(t))||l.mkdirSync(c.dirname(t),{recursive:!0}),l.writeFileSync(t,JSON.stringify($,null,2))}if(r===`json`)console.log(JSON.stringify($,null,2));else if(r===`pretty`){let e=q.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(q.length>0){p();for(let[n,r]of Object.entries(e)){let e=[];for(let n of r){let r=n.level===`high`?`❌`:n.level===`warning`?`⚠️`:`ℹ️`,i=n.level===`high`?d.red:n.level===`warning`?d.yellow:d.blue;e.push(`${r} ${i(n.level.toUpperCase())}: ${n.message}`),n.suggestion&&e.push(` ${d.dim(`💡 ${n.suggestion}`)}`),t.fix&&n.fix&&e.push(` ${d.green(`✅ Fixed automatically`)}`)}console.log(`\n${v(e,{title:`📄 ${n}`})}`)}p()}if(q.length===0)console.log(_([` Everything looks perfect!`,` Your documentation is in great shape.`,``,` ${d.dim(`Scanned ${w.length} file${w.length===1?``:`s`} in ${Y}s`)}`],{title:`✨ Documentation Health Check`}));else{let e=[];X>0&&e.push(d.red(`${X} Critical Error${X===1?``:`s`}`)),Z>0&&e.push(d.yellow(`${Z} Warning${Z===1?``:`s`}`)),Q>0&&e.push(d.blue(`${Q} Improvement${Q===1?``:`s`}`));let t=[...u(e).split(`
|
|
7
|
-
`).map(e=>e.trimStart()),``,d.dim(`Scanned ${w.length} file${w.length===1?``:`s`} in ${Y}s`)];console.log(`\n${m(t,{title:`Diagnosis Results`})}\n`),J>0&&y(`Successfully fixed ${J} issues automatically!`),X>0?h(`Please fix the critical errors before building for production.`):y(`No critical issues found. You are ready to go!`)}}n.reporting.failOnError&&X>0&&process.exit(1),n.reporting.maxWarnings!==-1&&Z>n.reporting.maxWarnings&&(r===`pretty`&&h(`Failed: Too many warnings (${Z} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){h(`Doctor failed: ${e}`),process.exit(1)}}export{N as n,H as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
import{t as e}from"./chunk-BFSpntXv.mjs";var t=e({SECURITY_HEADERS:()=>n});const n={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains; preload`};export{t as n,n as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
-
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
var e=require(`./chunk-D1Md3oWO.cjs`).t({SECURITY_HEADERS:()=>t});const t={"X-Content-Type-Options":`nosniff`,"X-Frame-Options":`DENY`,"X-XSS-Protection":`1; mode=block`,"Referrer-Policy":`strict-origin-when-cross-origin`,"Permissions-Policy":`camera=(), microphone=(), geolocation=()`,"Strict-Transport-Security":`max-age=31536000; includeSubDomains; preload`};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|