boltdocs 2.7.10 → 2.8.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.
Files changed (193) hide show
  1. package/README.md +2 -2
  2. package/dist/banner-3N4Jd_L9.d.ts +100 -0
  3. package/dist/banner-MynZD_Ox.d.cts +100 -0
  4. package/dist/cache-BMUyNiiA.mjs +6 -0
  5. package/dist/cache-CKm45d2w.cjs +6 -0
  6. package/dist/client/index.cjs +2268 -1
  7. package/dist/client/index.d.cts +86 -110
  8. package/dist/client/index.d.ts +87 -111
  9. package/dist/client/index.js +2214 -1
  10. package/dist/client/mdx.cjs +12 -1
  11. package/dist/client/mdx.d.cts +39 -93
  12. package/dist/client/mdx.d.ts +38 -93
  13. package/dist/client/mdx.js +7 -1
  14. package/dist/client/primitives.cjs +60 -1
  15. package/dist/client/primitives.d.cts +411 -347
  16. package/dist/client/primitives.d.ts +411 -347
  17. package/dist/client/primitives.js +20 -1
  18. package/dist/docs-layout-CwCq42Zt.cjs +1348 -0
  19. package/dist/docs-layout-Dn6S5g59.js +1167 -0
  20. package/dist/doctor-BArviV8X.cjs +28 -0
  21. package/dist/doctor-CgLA7_Uv.mjs +28 -0
  22. package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
  23. package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
  24. package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
  25. package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
  26. package/dist/icons-dev-DvJ-hh9x.cjs +1209 -0
  27. package/dist/icons-dev-Oju24Wjp.js +845 -0
  28. package/dist/image-Ch4-GxdO.cjs +268 -0
  29. package/dist/image-Do8V9PCW.js +214 -0
  30. package/dist/mdx-D3A2_l7P.js +520 -0
  31. package/dist/mdx-PLhhPJRS.cjs +531 -0
  32. package/dist/node/cli-entry.cjs +3 -1
  33. package/dist/node/cli-entry.mjs +3 -1
  34. package/dist/node/index.cjs +1 -1
  35. package/dist/node/index.d.cts +258 -152
  36. package/dist/node/index.d.mts +258 -150
  37. package/dist/node/index.mjs +1 -1
  38. package/dist/node/routes/worker.cjs +1 -1
  39. package/dist/node/routes/worker.mjs +1 -1
  40. package/dist/node-BmlP0eBP.cjs +159 -0
  41. package/dist/node-Y8_4ayje.mjs +159 -0
  42. package/dist/package-2nFy_NsW.cjs +6 -0
  43. package/dist/{package--0Yf0t1N.mjs → package-DAbtltXX.mjs} +1 -1
  44. package/dist/parser-B7-6PyQz.cjs +6 -0
  45. package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
  46. package/dist/parser-WGZdWs0X.mjs +6 -0
  47. package/dist/routes-BDDSxAl0.mjs +6 -0
  48. package/dist/routes-DJNJ-rTt.cjs +6 -0
  49. package/dist/routes-DiYC4nD2.cjs +6 -0
  50. package/dist/routes-_Bb2f4eI.mjs +6 -0
  51. package/dist/search-dialog-BXVoecTx.cjs +483 -0
  52. package/dist/search-dialog-BYhOov4S.cjs +331 -0
  53. package/dist/search-dialog-C09riYmx.js +313 -0
  54. package/dist/search-dialog-CUeAfy-8.cjs +8 -0
  55. package/dist/search-dialog-D8gLkhUV.js +453 -0
  56. package/dist/search-dialog-DHc_8FFX.js +8 -0
  57. package/dist/{sidebar-CcBkrm06.d.cts → sidebar-DNq4_ZAa.d.ts} +118 -52
  58. package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-Dlkgbxs6.d.cts} +118 -52
  59. package/dist/utils-BYITg7T5.mjs +7 -0
  60. package/dist/utils-Cjmx1hhk.cjs +7 -0
  61. package/dist/worker-pool-CtqklOXq.cjs +6 -0
  62. package/dist/worker-pool-k0DY6k8T.mjs +6 -0
  63. package/package.json +5 -6
  64. package/src/shared/config-utils.ts +4 -0
  65. package/src/shared/types.ts +52 -6
  66. package/dist/cache-Ba-DZQNH.cjs +0 -6
  67. package/dist/cache-BuMZ58L5.mjs +0 -6
  68. package/dist/cards-BakZPTz9.d.ts +0 -30
  69. package/dist/cards-CQn9mXZS.d.cts +0 -30
  70. package/dist/docs-layout-KoWNZc8_.js +0 -6
  71. package/dist/docs-layout-x2yKt2cL.cjs +0 -6
  72. package/dist/doctor-Be7Ly1oM.mjs +0 -21
  73. package/dist/doctor-jMxWZyLJ.cjs +0 -21
  74. package/dist/icons-dev-B_RZIyxu.js +0 -6
  75. package/dist/icons-dev-BlV3wWFT.cjs +0 -6
  76. package/dist/image-BHhTvQzr.cjs +0 -6
  77. package/dist/image-CqKzYD8f.js +0 -6
  78. package/dist/mdx-DudBEac0.js +0 -7
  79. package/dist/mdx-r4cDQxWu.cjs +0 -7
  80. package/dist/node-DtEDyN1u.cjs +0 -111
  81. package/dist/node-_1jhMGYx.mjs +0 -111
  82. package/dist/package-DrwtlXfk.cjs +0 -6
  83. package/dist/parser-CdNbqN5y.cjs +0 -6
  84. package/dist/parser-nE792MLO.mjs +0 -6
  85. package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
  86. package/dist/routes-2k3tbUmC.cjs +0 -6
  87. package/dist/routes-CpxZIsMM.mjs +0 -6
  88. package/dist/search-dialog-B584t9ZF.js +0 -6
  89. package/dist/search-dialog-BvBopRsZ.cjs +0 -6
  90. package/dist/search-dialog-ByvGScjt.js +0 -6
  91. package/dist/search-dialog-Cyko6TJm.cjs +0 -6
  92. package/dist/search-dialog-D6BNohIJ.js +0 -6
  93. package/dist/search-dialog-DuYTIefy.cjs +0 -6
  94. package/dist/utils-CG65J0Sc.mjs +0 -7
  95. package/dist/utils-CKunkU96.cjs +0 -7
  96. package/dist/worker-pool-CGn7DrLb.mjs +0 -6
  97. package/dist/worker-pool-Crbqgw5R.cjs +0 -6
  98. package/src/client/app/config-context.tsx +0 -51
  99. package/src/client/app/doc-page.tsx +0 -38
  100. package/src/client/app/docs-layout.tsx +0 -28
  101. package/src/client/app/head.tsx +0 -122
  102. package/src/client/app/helmet-compat.tsx +0 -36
  103. package/src/client/app/mdx-component.tsx +0 -8
  104. package/src/client/app/mdx-components-context.tsx +0 -72
  105. package/src/client/app/routes-context.tsx +0 -34
  106. package/src/client/app/scroll-handler.tsx +0 -74
  107. package/src/client/app/theme-context.tsx +0 -103
  108. package/src/client/app/ui-context.tsx +0 -42
  109. package/src/client/components/docs-layout-default.tsx +0 -85
  110. package/src/client/components/icons-dev.tsx +0 -282
  111. package/src/client/components/mdx/callout.tsx +0 -97
  112. package/src/client/components/mdx/card.tsx +0 -99
  113. package/src/client/components/mdx/cards.tsx +0 -27
  114. package/src/client/components/mdx/code-block.tsx +0 -184
  115. package/src/client/components/mdx/field.tsx +0 -33
  116. package/src/client/components/mdx/image.tsx +0 -44
  117. package/src/client/components/mdx/index.ts +0 -19
  118. package/src/client/components/mdx/table.tsx +0 -54
  119. package/src/client/components/mdx/typographics.tsx +0 -120
  120. package/src/client/components/mdx/use-code-block.ts +0 -34
  121. package/src/client/components/primitives/breadcrumbs.tsx +0 -54
  122. package/src/client/components/primitives/button-group.tsx +0 -54
  123. package/src/client/components/primitives/button.tsx +0 -6
  124. package/src/client/components/primitives/code-block.tsx +0 -120
  125. package/src/client/components/primitives/docs-layout.tsx +0 -125
  126. package/src/client/components/primitives/error-boundary.tsx +0 -107
  127. package/src/client/components/primitives/heading.tsx +0 -128
  128. package/src/client/components/primitives/helpers/observer.ts +0 -141
  129. package/src/client/components/primitives/image.tsx +0 -26
  130. package/src/client/components/primitives/link.tsx +0 -102
  131. package/src/client/components/primitives/menu.tsx +0 -137
  132. package/src/client/components/primitives/navbar.tsx +0 -466
  133. package/src/client/components/primitives/on-this-page.tsx +0 -430
  134. package/src/client/components/primitives/page-nav.tsx +0 -51
  135. package/src/client/components/primitives/popover.tsx +0 -28
  136. package/src/client/components/primitives/search-dialog.tsx +0 -193
  137. package/src/client/components/primitives/sidebar.tsx +0 -423
  138. package/src/client/components/primitives/skeleton.tsx +0 -26
  139. package/src/client/components/primitives/tabs.tsx +0 -70
  140. package/src/client/components/primitives/tooltip.tsx +0 -81
  141. package/src/client/components/primitives/types.ts +0 -11
  142. package/src/client/components/ui-base/banner.tsx +0 -66
  143. package/src/client/components/ui-base/breadcrumbs.tsx +0 -44
  144. package/src/client/components/ui-base/copy-markdown.tsx +0 -107
  145. package/src/client/components/ui-base/error-boundary.tsx +0 -15
  146. package/src/client/components/ui-base/github-stars.tsx +0 -29
  147. package/src/client/components/ui-base/icons.tsx +0 -240
  148. package/src/client/components/ui-base/index.ts +0 -16
  149. package/src/client/components/ui-base/last-updated.tsx +0 -27
  150. package/src/client/components/ui-base/navbar.tsx +0 -266
  151. package/src/client/components/ui-base/not-found.tsx +0 -26
  152. package/src/client/components/ui-base/on-this-page.tsx +0 -57
  153. package/src/client/components/ui-base/page-nav.tsx +0 -50
  154. package/src/client/components/ui-base/search-dialog.tsx +0 -163
  155. package/src/client/components/ui-base/search-highlight.tsx +0 -10
  156. package/src/client/components/ui-base/sidebar.tsx +0 -92
  157. package/src/client/components/ui-base/tabs.tsx +0 -83
  158. package/src/client/components/ui-base/theme-toggle.tsx +0 -130
  159. package/src/client/components/ui-base/version-i18n.tsx +0 -80
  160. package/src/client/hooks/index.ts +0 -13
  161. package/src/client/hooks/use-analytics.ts +0 -272
  162. package/src/client/hooks/use-breadcrumbs.ts +0 -22
  163. package/src/client/hooks/use-i18n.ts +0 -182
  164. package/src/client/hooks/use-localized-to.ts +0 -113
  165. package/src/client/hooks/use-location.ts +0 -5
  166. package/src/client/hooks/use-navbar.ts +0 -130
  167. package/src/client/hooks/use-page-nav.ts +0 -46
  168. package/src/client/hooks/use-routes.ts +0 -108
  169. package/src/client/hooks/use-search-highlight.ts +0 -185
  170. package/src/client/hooks/use-search.ts +0 -118
  171. package/src/client/hooks/use-sidebar.ts +0 -205
  172. package/src/client/hooks/use-tabs.ts +0 -46
  173. package/src/client/hooks/use-version.ts +0 -111
  174. package/src/client/index.ts +0 -31
  175. package/src/client/mdx.ts +0 -2
  176. package/src/client/primitives.ts +0 -19
  177. package/src/client/ssg/boltdocs-shell.tsx +0 -148
  178. package/src/client/ssg/create-routes.tsx +0 -473
  179. package/src/client/ssg/index.ts +0 -4
  180. package/src/client/ssg/mdx-page.tsx +0 -38
  181. package/src/client/store/boltdocs-context.tsx +0 -137
  182. package/src/client/theme/neutral.css +0 -141
  183. package/src/client/theme/reset.css +0 -189
  184. package/src/client/types.ts +0 -116
  185. package/src/client/utils/cn.ts +0 -6
  186. package/src/client/utils/copy-clipboard.ts +0 -22
  187. package/src/client/utils/get-base-file-path.ts +0 -21
  188. package/src/client/utils/github.ts +0 -121
  189. package/src/client/utils/i18n.ts +0 -23
  190. package/src/client/utils/path.ts +0 -9
  191. package/src/client/utils/react-to-text.ts +0 -34
  192. package/src/client/virtual.d.ts +0 -24
  193. /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
package/README.md CHANGED
@@ -127,7 +127,7 @@ boltdocs doctor --check-external # Verify external links too
127
127
  - **Broken internal link detection** — finds links pointing to non-existent files
128
128
  - **Missing metadata warnings** — flags pages without titles in frontmatter
129
129
  - **Orphaned translation detection** — identifies missing locale counterparts
130
- - **Performance budgets** — upcoming: set thresholds for build time and bundle size
130
+ - **Performance budgets** — `boltdocs doctor --budget` checks JS/CSS/HTML size, image assets, and build time against configurable thresholds in `doctor.json`
131
131
 
132
132
  ### 🔌 Plugin System
133
133
 
@@ -233,7 +233,7 @@ export default defineConfig({
233
233
  - [ ] Streaming SSR in dev
234
234
  - [ ] OpenAPI / Swagger with interactive playground
235
235
  - [ ] Multi-instance docs
236
- - [ ] Performance budgets in Doctor
236
+ - [x] Performance budgets in Doctor
237
237
  - [ ] Preconnect / DNS-prefetch automation
238
238
  - [ ] Distributed build farm
239
239
 
@@ -0,0 +1,100 @@
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-DNq4_ZAa.js";
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 | null;
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 };
@@ -0,0 +1,100 @@
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-Dlkgbxs6.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 | null;
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 };
@@ -0,0 +1,6 @@
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,s as t}from"./utils-BYITg7T5.mjs";import n from"node:path";import r from"node:fs";import i from"node:fs/promises";import a from"node:crypto";import o from"node:zlib";import{promisify as s}from"node:util";import{LRUCache as c}from"lru-cache";const l=i.writeFile,u=i.readFile,d=i.mkdir,f=i.rename,p=s(o.gzip),m=s(o.gunzip),h=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var g=class{entries=new Map;cachePath=null;compress;constructor(t={}){let r=e();if(this.compress=t.compress===void 0?r.compress:t.compress,t.name){let e=t.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.resolve(e,r.dir,`${t.name}.${i}`)}}async load(){if(!e().noCache&&this.cachePath)try{let e=await u(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await m(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch(e){if(e.code===`ENOENT`)return}}save(){if(e().noCache||!this.cachePath)return;let t=Object.fromEntries(this.entries),r=JSON.stringify(t),i=this.cachePath,o=this.compress;h.add(async()=>{try{await d(n.dirname(i),{recursive:!0});let e=Buffer.from(r);o&&(e=await p(e));let t=`${i}.${a.randomBytes(4).toString(`hex`)}.tmp`;await l(t,e),await f(t,i)}catch{}})}get(e){let n=this.entries.get(e);return!n||t(e)!==n.mtime?null:n.data}set(e,n){this.entries.set(e,{data:n,mtime:t(e)})}isValid(e){let n=this.entries.get(e);return n?t(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await h.flush()}},_=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;constructor(t,r=process.cwd()){let i=e();this.baseDir=n.resolve(r,i.dir,`transform-${t}`),this.shardsDir=n.resolve(this.baseDir,`shards`),this.indexPath=n.resolve(this.baseDir,`index.json`),this.memoryCache=new c({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!e().noCache)try{let e=await u(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch(e){if(e.code===`ENOENT`)return}}save(){if(e().noCache)return;let t=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;h.add(async()=>{try{await d(n.dirname(r),{recursive:!0}),await l(r,t)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.resolve(this.shardsDir,`${t}.gz`);try{let t=(await m(await u(r))).toString(`utf-8`);return this.memoryCache.set(e,t),{key:e,val:t}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let r=this.index.get(e);if(!r)return null;let i=n.resolve(this.shardsDir,`${r}.gz`);try{let t=(await m(await u(i))).toString(`utf-8`);return this.memoryCache.set(e,t),t}catch(e){return e.code,null}}set(e,t){let r=a.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,r),this.memoryCache.set(e,t);let o=n.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{try{try{await i.access(o);return}catch{}await d(this.shardsDir,{recursive:!0});let e=await p(Buffer.from(t)),n=`${o}.${a.randomBytes(4).toString(`hex`)}.tmp`;await l(n,e),await f(n,o)}catch{}})}get size(){return this.index.size}async flush(){await h.flush()}};const v=new Map,y=()=>{let t=e();return n.resolve(process.cwd(),t.dir,`cache/parser`)},b=`v2.3`;var x=class{static async get(t){if(e().noCache)return null;try{let e=v.get(t);if(e)return e.data;let i=await r.promises.stat(t),o=y(),s=a.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`);try{let e=await r.promises.readFile(c,`utf-8`),n=JSON.parse(e);return n._mtime!==i.mtimeMs||n._v!==b?null:(v.set(t,{data:n.data,mtime:n._mtime}),n.data)}catch{return null}}catch{return null}}static async set(t,i){if(!e().noCache)try{let e=await r.promises.stat(t);v.set(t,{data:i,mtime:e.mtimeMs});let o=y(),s=a.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`),l={_v:b,_mtime:e.mtimeMs,data:i};h.add(async()=>{try{await r.promises.mkdir(o,{recursive:!0}),await r.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){v.delete(e)}static clear(){v.clear();let e=y();if(r.existsSync(e))try{r.rmSync(e,{recursive:!0,force:!0})}catch{}}};export{g as n,_ as r,x as t};
@@ -0,0 +1,6 @@
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-CU-zTemE.cjs`),t=require(`./utils-Cjmx1hhk.cjs`);let n=require(`node:path`);n=e.t(n);let r=require(`node:fs`);r=e.t(r);let i=require(`node:fs/promises`);i=e.t(i);let a=require(`node:crypto`);a=e.t(a);let o=require(`node:zlib`);o=e.t(o);let s=require(`node:util`),c=require(`lru-cache`);const l=i.default.writeFile,u=i.default.readFile,d=i.default.mkdir,f=i.default.rename,p=(0,s.promisify)(o.default.gzip),m=(0,s.promisify)(o.default.gunzip),h=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var g=class{entries=new Map;cachePath=null;compress;constructor(e={}){let r=t.o();if(this.compress=e.compress===void 0?r.compress:e.compress,e.name){let t=e.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.default.resolve(t,r.dir,`${e.name}.${i}`)}}async load(){if(!t.o().noCache&&this.cachePath)try{let e=await u(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await m(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch(e){if(e.code===`ENOENT`)return}}save(){if(t.o().noCache||!this.cachePath)return;let e=Object.fromEntries(this.entries),r=JSON.stringify(e),i=this.cachePath,o=this.compress;h.add(async()=>{try{await d(n.default.dirname(i),{recursive:!0});let e=Buffer.from(r);o&&(e=await p(e));let t=`${i}.${a.default.randomBytes(4).toString(`hex`)}.tmp`;await l(t,e),await f(t,i)}catch{}})}get(e){let n=this.entries.get(e);return!n||t.s(e)!==n.mtime?null:n.data}set(e,n){this.entries.set(e,{data:n,mtime:t.s(e)})}isValid(e){let n=this.entries.get(e);return n?t.s(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await h.flush()}},_=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;constructor(e,r=process.cwd()){let i=t.o();this.baseDir=n.default.resolve(r,i.dir,`transform-${e}`),this.shardsDir=n.default.resolve(this.baseDir,`shards`),this.indexPath=n.default.resolve(this.baseDir,`index.json`),this.memoryCache=new c.LRUCache({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!t.o().noCache)try{let e=await u(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch(e){if(e.code===`ENOENT`)return}}save(){if(t.o().noCache)return;let e=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;h.add(async()=>{try{await d(n.default.dirname(r),{recursive:!0}),await l(r,e)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.default.resolve(this.shardsDir,`${t}.gz`);try{let t=(await m(await u(r))).toString(`utf-8`);return this.memoryCache.set(e,t),{key:e,val:t}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let r=this.index.get(e);if(!r)return null;let i=n.default.resolve(this.shardsDir,`${r}.gz`);try{let t=(await m(await u(i))).toString(`utf-8`);return this.memoryCache.set(e,t),t}catch(e){return e.code,null}}set(e,t){let r=a.default.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,r),this.memoryCache.set(e,t);let o=n.default.resolve(this.shardsDir,`${r}.gz`);h.add(async()=>{try{try{await i.default.access(o);return}catch{}await d(this.shardsDir,{recursive:!0});let e=await p(Buffer.from(t)),n=`${o}.${a.default.randomBytes(4).toString(`hex`)}.tmp`;await l(n,e),await f(n,o)}catch{}})}get size(){return this.index.size}async flush(){await h.flush()}};const v=new Map,y=()=>{let e=t.o();return n.default.resolve(process.cwd(),e.dir,`cache/parser`)},b=`v2.3`;var x=class{static async get(e){if(t.o().noCache)return null;try{let t=v.get(e);if(t)return t.data;let i=await r.default.promises.stat(e),o=y(),s=a.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`);try{let t=await r.default.promises.readFile(c,`utf-8`),n=JSON.parse(t);return n._mtime!==i.mtimeMs||n._v!==b?null:(v.set(e,{data:n.data,mtime:n._mtime}),n.data)}catch{return null}}catch{return null}}static async set(e,i){if(!t.o().noCache)try{let t=await r.default.promises.stat(e);v.set(e,{data:i,mtime:t.mtimeMs});let o=y(),s=a.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`),l={_v:b,_mtime:t.mtimeMs,data:i};h.add(async()=>{try{await r.default.promises.mkdir(o,{recursive:!0}),await r.default.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){v.delete(e)}static clear(){v.clear();let e=y();if(r.default.existsSync(e))try{r.default.rmSync(e,{recursive:!0,force:!0})}catch{}}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});