blume 2.1.0 → 2.1.2

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 (450) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/dist/cli/{chunk-ga0pf4aj.js → chunk-0n9xkp3d.js} +12 -3
  3. package/dist/cli/{chunk-ga0pf4aj.js.map → chunk-0n9xkp3d.js.map} +3 -3
  4. package/dist/cli/{chunk-43zcf4gz.js → chunk-0pmb4tr4.js} +541 -368
  5. package/dist/cli/chunk-0pmb4tr4.js.map +35 -0
  6. package/dist/cli/{chunk-9geymqns.js → chunk-0w6hs479.js} +15 -15
  7. package/dist/cli/{chunk-xkz5xbtv.js → chunk-124fvmzq.js} +2802 -1422
  8. package/dist/cli/chunk-124fvmzq.js.map +220 -0
  9. package/dist/cli/chunk-150jk7km.js +52 -0
  10. package/dist/cli/chunk-150jk7km.js.map +10 -0
  11. package/dist/cli/{chunk-y4ykbark.js → chunk-1f882900.js} +2 -2
  12. package/dist/cli/{chunk-5ffywsmb.js → chunk-297ajdcv.js} +8 -6
  13. package/dist/cli/{chunk-5ffywsmb.js.map → chunk-297ajdcv.js.map} +3 -3
  14. package/dist/cli/{chunk-h2a48yhd.js → chunk-32khwcb6.js} +120 -16
  15. package/dist/cli/{chunk-h2a48yhd.js.map → chunk-32khwcb6.js.map} +10 -10
  16. package/dist/cli/{chunk-5cg2rzgf.js → chunk-36bxs9c7.js} +20 -49
  17. package/dist/cli/{chunk-5cg2rzgf.js.map → chunk-36bxs9c7.js.map} +4 -5
  18. package/dist/cli/{chunk-py62fewh.js → chunk-53jqw8z0.js} +3 -3
  19. package/dist/cli/{chunk-5wj2qwn2.js → chunk-58bt3hag.js} +4 -4
  20. package/dist/cli/{chunk-e7vvk5ya.js → chunk-5cmts6dv.js} +3 -3
  21. package/dist/cli/{chunk-y5h4r2y0.js → chunk-60hz265r.js} +15 -5
  22. package/dist/cli/chunk-60hz265r.js.map +10 -0
  23. package/dist/cli/chunk-74wfhv79.js +65 -0
  24. package/dist/cli/chunk-74wfhv79.js.map +10 -0
  25. package/dist/cli/{chunk-g2z9x01v.js → chunk-9qzgg6mj.js} +3 -3
  26. package/dist/cli/{chunk-q3wxxq39.js → chunk-a57yh0h9.js} +5 -5
  27. package/dist/cli/{chunk-713mngdq.js → chunk-ave1wcbr.js} +76 -10
  28. package/dist/cli/chunk-ave1wcbr.js.map +14 -0
  29. package/dist/cli/{chunk-2n4ps1b3.js → chunk-bqxaqn5p.js} +40 -22
  30. package/dist/cli/chunk-bqxaqn5p.js.map +15 -0
  31. package/dist/cli/{chunk-jnwj5kjj.js → chunk-bxwhtvw8.js} +20 -7
  32. package/dist/cli/{chunk-jnwj5kjj.js.map → chunk-bxwhtvw8.js.map} +3 -3
  33. package/dist/cli/chunk-ckrcm08h.js +324 -0
  34. package/dist/cli/chunk-ckrcm08h.js.map +14 -0
  35. package/dist/cli/{chunk-2f3ndkpw.js → chunk-desvm72z.js} +3 -3
  36. package/dist/cli/{chunk-gp84za0h.js → chunk-dhwtqnnd.js} +2 -2
  37. package/dist/cli/{chunk-4h8z9vv5.js → chunk-dpy8qdjf.js} +93 -47
  38. package/dist/cli/chunk-dpy8qdjf.js.map +17 -0
  39. package/dist/cli/{chunk-2f7n4qzt.js → chunk-dqhg54mr.js} +1 -1
  40. package/dist/cli/{chunk-0gz36akr.js → chunk-dv2z0rzf.js} +21 -5
  41. package/dist/cli/chunk-dv2z0rzf.js.map +12 -0
  42. package/dist/cli/{chunk-cm89scdv.js → chunk-es8h0v3j.js} +9 -11
  43. package/dist/cli/{chunk-cm89scdv.js.map → chunk-es8h0v3j.js.map} +3 -3
  44. package/dist/cli/{chunk-zhvd6adm.js → chunk-gfc5fqvf.js} +14 -14
  45. package/dist/cli/{chunk-nd1821sk.js → chunk-gxtg6ed2.js} +33 -19
  46. package/dist/cli/chunk-gxtg6ed2.js.map +10 -0
  47. package/dist/cli/{chunk-p804f3pe.js → chunk-hvcxng5f.js} +6 -6
  48. package/dist/cli/{chunk-ta27feev.js → chunk-j1x92mx9.js} +21 -2
  49. package/dist/cli/chunk-j1x92mx9.js.map +10 -0
  50. package/dist/cli/{chunk-rekqz4qg.js → chunk-k3gr1nm9.js} +19 -16
  51. package/dist/cli/chunk-k3gr1nm9.js.map +10 -0
  52. package/dist/cli/{chunk-1n228xqb.js → chunk-kdpzw38a.js} +2 -2
  53. package/dist/cli/{chunk-cy5bm0j0.js → chunk-ms9z66nz.js} +2 -2
  54. package/dist/cli/{chunk-cy5bm0j0.js.map → chunk-ms9z66nz.js.map} +2 -2
  55. package/dist/cli/{chunk-zf748avv.js → chunk-nbyvgnnm.js} +193 -286
  56. package/dist/cli/chunk-nbyvgnnm.js.map +36 -0
  57. package/dist/cli/{chunk-6bm0xpgd.js → chunk-s0bdnc7v.js} +2 -2
  58. package/dist/cli/{chunk-yxmk4pec.js → chunk-sc93apfs.js} +17 -16
  59. package/dist/cli/{chunk-yxmk4pec.js.map → chunk-sc93apfs.js.map} +3 -3
  60. package/dist/cli/{chunk-cmtcnh9f.js → chunk-tfycddbt.js} +2 -2
  61. package/dist/cli/{chunk-9xr4dgee.js → chunk-twy7psdz.js} +29 -16
  62. package/dist/cli/chunk-twy7psdz.js.map +10 -0
  63. package/dist/cli/{chunk-ntv4qrt7.js → chunk-y4msrwm9.js} +15 -15
  64. package/dist/cli/{chunk-yj17vs39.js → chunk-ydp3065p.js} +5 -5
  65. package/dist/cli/index.js +24 -19
  66. package/dist/cli/index.js.map +3 -3
  67. package/dist/types/ai/ask-context.d.ts +6 -2
  68. package/dist/types/ai/ask.d.ts +24 -5
  69. package/dist/types/ai/component-markdown.d.ts +2 -0
  70. package/dist/types/ai/openapi-components.d.ts +4 -1
  71. package/dist/types/analytics/clics.d.ts +37 -0
  72. package/dist/types/analytics/index.d.ts +2 -0
  73. package/dist/types/analytics/schema.d.ts +18 -0
  74. package/dist/types/astro/integration.d.ts +11 -4
  75. package/dist/types/astro/markdown-negotiation.d.ts +3 -0
  76. package/dist/types/astro/pages.d.ts +10 -0
  77. package/dist/types/cli/init/scaffold.d.ts +1 -1
  78. package/dist/types/components/content/api-field.d.ts +4 -1
  79. package/dist/types/components/content/api-page.d.ts +6 -1
  80. package/dist/types/components/openapi/code-samples.d.ts +29 -0
  81. package/dist/types/components/openapi/helpers.d.ts +22 -1
  82. package/dist/types/components/openapi/security.d.ts +10 -0
  83. package/dist/types/components/openapi/snippets.d.ts +60 -0
  84. package/dist/types/core/changelog-index.d.ts +8 -0
  85. package/dist/types/core/config-input.d.ts +37 -6
  86. package/dist/types/core/data.d.ts +4 -0
  87. package/dist/types/core/i18n-ui.d.ts +2 -0
  88. package/dist/types/core/links.d.ts +8 -0
  89. package/dist/types/core/powered-by.d.ts +12 -0
  90. package/dist/types/core/probe.d.ts +2 -0
  91. package/dist/types/core/project-graph.d.ts +6 -0
  92. package/dist/types/core/redirect-patterns.d.ts +11 -3
  93. package/dist/types/core/schema.d.ts +228 -3
  94. package/dist/types/core/sources/cache.d.ts +3 -0
  95. package/dist/types/core/sources/contentful-rich-text.d.ts +11 -2
  96. package/dist/types/core/sources/contentful.d.ts +17 -1
  97. package/dist/types/core/sources/lexical.d.ts +5 -0
  98. package/dist/types/core/sources/lower.d.ts +10 -2
  99. package/dist/types/core/sources/normalize.d.ts +20 -1
  100. package/dist/types/core/sources/notion.d.ts +8 -0
  101. package/dist/types/core/sources/remote.d.ts +37 -10
  102. package/dist/types/core/sources/sanity.d.ts +1 -1
  103. package/dist/types/core/types.d.ts +17 -0
  104. package/dist/types/deploy/adapter-output.d.ts +2 -1
  105. package/dist/types/deploy/adapters/cloudflare.d.ts +7 -5
  106. package/dist/types/deploy/adapters/node.d.ts +58 -23
  107. package/dist/types/deploy/adapters/registry.d.ts +10 -0
  108. package/dist/types/deploy/adapters/types.d.ts +3 -2
  109. package/dist/types/deploy/cloudflare-negotiation.d.ts +5 -2
  110. package/dist/types/deploy/node-headers.d.ts +12 -4
  111. package/dist/types/deploy/platforms/cloudflare.d.ts +10 -7
  112. package/dist/types/deploy/platforms/node.d.ts +3 -1
  113. package/dist/types/deploy/platforms/types.d.ts +18 -7
  114. package/dist/types/deploy/platforms/vercel.d.ts +21 -2
  115. package/dist/types/deploy/redirects.d.ts +17 -1
  116. package/dist/types/deploy/sitemap.d.ts +2 -1
  117. package/dist/types/deploy/vercel-negotiation.d.ts +44 -21
  118. package/dist/types/narration/build.d.ts +34 -12
  119. package/dist/types/narration/provider.d.ts +96 -8
  120. package/dist/types/openapi/checks.d.ts +27 -0
  121. package/dist/types/openapi/graphql.d.ts +6 -0
  122. package/dist/types/openapi/model.d.ts +15 -4
  123. package/dist/types/openapi/parse.d.ts +3 -0
  124. package/dist/types/openapi/references.d.ts +16 -0
  125. package/dist/types/openapi/sentence.d.ts +11 -1
  126. package/dist/types/ratelimit/index.d.ts +1 -1
  127. package/dist/types/ratelimit/schema.d.ts +8 -0
  128. package/dist/types/ratelimit/upstash.d.ts +39 -14
  129. package/dist/types/reference/graphql.d.ts +76 -1
  130. package/dist/types/reference/index.d.ts +1 -1
  131. package/dist/types/reference/openapi.d.ts +2 -2
  132. package/dist/types/reference/options.d.ts +37 -1
  133. package/dist/types/reference/schema.d.ts +84 -0
  134. package/dist/types/search/adapters/registry.d.ts +3 -0
  135. package/dist/types/search/adapters/typesense.d.ts +14 -4
  136. package/dist/types/search/build.d.ts +3 -1
  137. package/dist/types/search/orama-index.d.ts +9 -9
  138. package/dist/types/search/sync/algolia.d.ts +5 -2
  139. package/dist/types/search/sync/index.d.ts +3 -1
  140. package/dist/types/search/sync/typesense.d.ts +11 -7
  141. package/dist/types/seo/jsonld.d.ts +11 -6
  142. package/dist/types/sources/contentful.d.ts +16 -0
  143. package/dist/types/sources/github-releases.d.ts +8 -1
  144. package/dist/types/sources/notion.d.ts +8 -0
  145. package/dist/types/sources/payload.d.ts +2 -0
  146. package/dist/types/sources/registry.d.ts +63 -0
  147. package/dist/types/sources/shared.d.ts +3 -0
  148. package/dist/types/sources/strapi.d.ts +2 -0
  149. package/docs/01-quickstart.mdx +4 -2
  150. package/docs/02-deployment.mdx +59 -13
  151. package/docs/03-upgrading.mdx +2 -1
  152. package/docs/04-migrating.mdx +9 -9
  153. package/docs/08-faq.mdx +12 -12
  154. package/docs/advanced/changelog.mdx +30 -2
  155. package/docs/advanced/custom-pages.mdx +1 -1
  156. package/docs/advanced/skills.mdx +1 -1
  157. package/docs/cli/audit.mdx +30 -7
  158. package/docs/cli/doctor.mdx +6 -2
  159. package/docs/cli/evals.mdx +4 -4
  160. package/docs/cli/translate.mdx +1 -0
  161. package/docs/cli/validate.mdx +4 -3
  162. package/docs/configuration/analytics.mdx +19 -1
  163. package/docs/configuration/assistant.mdx +6 -2
  164. package/docs/configuration/customization.mdx +4 -2
  165. package/docs/configuration/export.mdx +5 -3
  166. package/docs/configuration/index.mdx +4 -2
  167. package/docs/configuration/narration.mdx +43 -6
  168. package/docs/configuration/rate-limiting.mdx +23 -2
  169. package/docs/configuration/search.mdx +37 -14
  170. package/docs/content/components.mdx +2 -2
  171. package/docs/content/frontmatter.mdx +5 -3
  172. package/docs/content/i18n.mdx +2 -2
  173. package/docs/content/includes.mdx +1 -1
  174. package/docs/content/navigation.mdx +8 -6
  175. package/docs/content/sources/contentful.mdx +9 -4
  176. package/docs/content/sources/custom.mdx +7 -3
  177. package/docs/content/sources/github-releases.mdx +12 -2
  178. package/docs/content/sources/index.mdx +3 -3
  179. package/docs/content/sources/notion.mdx +17 -2
  180. package/docs/content/sources/obsidian.mdx +3 -1
  181. package/docs/content/sources/payload.mdx +5 -2
  182. package/docs/content/sources/remote-mdx.mdx +6 -0
  183. package/docs/content/sources/sanity.mdx +4 -2
  184. package/docs/content/sources/strapi.mdx +5 -2
  185. package/docs/content/syntax.mdx +2 -2
  186. package/docs/discoverability/agent-discovery.mdx +1 -1
  187. package/docs/discoverability/index.mdx +1 -1
  188. package/docs/discoverability/json-api.mdx +2 -0
  189. package/docs/discoverability/llms-txt.mdx +1 -1
  190. package/docs/discoverability/markdown.mdx +3 -1
  191. package/docs/discoverability/mcp.mdx +6 -0
  192. package/docs/discoverability/sitemap-and-robots.mdx +1 -1
  193. package/docs/discoverability/structured-data.mdx +8 -6
  194. package/docs/references/api-pages.mdx +1 -1
  195. package/docs/references/asyncapi.mdx +5 -1
  196. package/docs/references/graphql.mdx +15 -1
  197. package/docs/references/openapi.mdx +64 -8
  198. package/package.json +9 -9
  199. package/skills/blume/SKILL.md +1 -1
  200. package/skills/blume-migrate/SKILL.md +2 -2
  201. package/skills/blume-migrate/assets/{oxfmt@0.67.0.patch → oxfmt@0.71.0.patch} +7 -7
  202. package/skills/blume-migrate/references/docusaurus.md +4 -4
  203. package/skills/blume-migrate/references/fumadocs.md +17 -13
  204. package/skills/blume-migrate/references/monorepo.md +5 -5
  205. package/skills/blume-migrate/references/nextra.md +8 -5
  206. package/skills/blume-migrate/references/starlight.md +9 -7
  207. package/src/ai/ask-context.ts +33 -3
  208. package/src/ai/ask-limits.ts +13 -0
  209. package/src/ai/ask.ts +24 -6
  210. package/src/ai/changelog-markdown.ts +11 -6
  211. package/src/ai/component-markdown.ts +1 -1
  212. package/src/ai/cors.ts +12 -3
  213. package/src/ai/mcp/query.ts +14 -6
  214. package/src/ai/openapi-components.ts +28 -4
  215. package/src/ai/relative-links.ts +4 -38
  216. package/src/analytics/clics.ts +58 -0
  217. package/src/analytics/head.ts +5 -0
  218. package/src/analytics/index.ts +2 -0
  219. package/src/analytics/schema.ts +2 -0
  220. package/src/astro/generate.ts +91 -56
  221. package/src/astro/integration.ts +72 -22
  222. package/src/astro/markdown-negotiation.ts +3 -0
  223. package/src/astro/module-types.ts +3 -1
  224. package/src/astro/pages.ts +23 -0
  225. package/src/astro/render-deps.ts +10 -5
  226. package/src/astro/runtime-deps.ts +23 -2
  227. package/src/astro/templates.ts +129 -81
  228. package/src/audit/catalog.ts +19 -3
  229. package/src/audit/checks/links.ts +14 -1
  230. package/src/audit/checks/network.ts +110 -6
  231. package/src/audit/checks/redirects.ts +6 -4
  232. package/src/audit/checks/robots.ts +58 -2
  233. package/src/audit/run.ts +3 -0
  234. package/src/audit/types.ts +2 -0
  235. package/src/audit/url.ts +14 -5
  236. package/src/blume-modules.d.ts +5 -1
  237. package/src/cli/args.ts +51 -0
  238. package/src/cli/build-failure.ts +23 -0
  239. package/src/cli/commands/audit.ts +10 -1
  240. package/src/cli/commands/dev.ts +18 -2
  241. package/src/cli/commands/doctor.ts +45 -12
  242. package/src/cli/commands/eval.ts +36 -4
  243. package/src/cli/commands/init.ts +6 -4
  244. package/src/cli/commands/validate.ts +10 -1
  245. package/src/cli/init/scaffold.ts +9 -6
  246. package/src/cli/prepare.ts +6 -3
  247. package/src/cli/required-secrets.ts +3 -2
  248. package/src/components/content/ApiPlayground.astro +6 -2
  249. package/src/components/content/api-field.ts +4 -1
  250. package/src/components/content/api-page.ts +31 -7
  251. package/src/components/content/mermaid-element.ts +15 -1
  252. package/src/components/content/view-switcher.ts +7 -4
  253. package/src/components/islands/hooks.ts +27 -1
  254. package/src/components/layout/NavTree.astro +49 -5
  255. package/src/components/layout/NavTreeScript.astro +18 -0
  256. package/src/components/layout/PageActions.astro +139 -24
  257. package/src/components/layout/PageLayout.astro +13 -3
  258. package/src/components/layout/RootLayout.astro +27 -14
  259. package/src/components/layout/Search.astro +17 -3
  260. package/src/components/layout/TableOfContents.astro +24 -17
  261. package/src/components/layout/analytics-client.ts +8 -8
  262. package/src/components/layout/head-scripts.ts +6 -1
  263. package/src/components/layout/search/algolia.ts +10 -1
  264. package/src/components/layout/search/analytics.ts +42 -14
  265. package/src/components/layout/search/endpoint.ts +48 -5
  266. package/src/components/layout/search/pagefind.ts +114 -5
  267. package/src/components/layout/search/types.ts +12 -0
  268. package/src/components/layout/search/typesense.ts +18 -6
  269. package/src/components/openapi/AsyncApiOperation.astro +14 -7
  270. package/src/components/openapi/Authorization.astro +10 -0
  271. package/src/components/openapi/GraphqlOperation.astro +5 -0
  272. package/src/components/openapi/Operation.astro +24 -1
  273. package/src/components/openapi/ParametersTable.astro +8 -4
  274. package/src/components/openapi/Playground.astro +7 -1
  275. package/src/components/openapi/RequestBody.astro +19 -2
  276. package/src/components/openapi/Responses.astro +1 -0
  277. package/src/components/openapi/SchemaTable.astro +15 -3
  278. package/src/components/openapi/async-snippets.ts +61 -5
  279. package/src/components/openapi/async.ts +123 -29
  280. package/src/components/openapi/graphql-helpers.ts +35 -12
  281. package/src/components/openapi/helpers.ts +36 -2
  282. package/src/components/openapi/message-model.ts +54 -11
  283. package/src/components/openapi/message.ts +14 -4
  284. package/src/components/openapi/operation-model.ts +16 -7
  285. package/src/components/openapi/playground-client.ts +77 -58
  286. package/src/components/openapi/playground-schema.ts +1 -1
  287. package/src/components/openapi/schema-tree.ts +44 -14
  288. package/src/components/openapi/security.ts +10 -0
  289. package/src/components/openapi/snippets.ts +5 -3
  290. package/src/components/openapi/validate-json.ts +4 -3
  291. package/src/components/powered-by-middleware.ts +33 -0
  292. package/src/core/changelog-index.ts +31 -1
  293. package/src/core/component-diagnostics.ts +53 -0
  294. package/src/core/component-overrides.ts +32 -0
  295. package/src/core/config-input.ts +42 -6
  296. package/src/core/data.ts +2 -0
  297. package/src/core/diagnostics.ts +5 -0
  298. package/src/core/i18n-ui.ts +2 -0
  299. package/src/core/includes.ts +1 -1
  300. package/src/core/links.ts +47 -17
  301. package/src/core/powered-by.ts +12 -0
  302. package/src/core/probe.ts +26 -6
  303. package/src/core/project-graph.ts +59 -18
  304. package/src/core/redirect-patterns.ts +36 -7
  305. package/src/core/schema.ts +26 -6
  306. package/src/core/sources/cache.ts +6 -0
  307. package/src/core/sources/contentful-rich-text.ts +29 -6
  308. package/src/core/sources/contentful.ts +135 -25
  309. package/src/core/sources/filesystem.ts +26 -4
  310. package/src/core/sources/github-releases.ts +12 -1
  311. package/src/core/sources/lexical.ts +15 -10
  312. package/src/core/sources/lower.ts +19 -3
  313. package/src/core/sources/mdx-remote.ts +62 -10
  314. package/src/core/sources/normalize.ts +227 -41
  315. package/src/core/sources/notion.ts +34 -10
  316. package/src/core/sources/obsidian.ts +16 -3
  317. package/src/core/sources/payload.ts +38 -15
  318. package/src/core/sources/remote.ts +72 -15
  319. package/src/core/sources/resolve.ts +11 -1
  320. package/src/core/sources/sanity.ts +43 -25
  321. package/src/core/sources/strapi.ts +2 -2
  322. package/src/core/types.ts +18 -0
  323. package/src/core/ui-packs/ar.ts +1 -0
  324. package/src/core/ui-packs/bg.ts +1 -0
  325. package/src/core/ui-packs/bn.ts +1 -0
  326. package/src/core/ui-packs/ca.ts +1 -0
  327. package/src/core/ui-packs/cs.ts +1 -0
  328. package/src/core/ui-packs/da.ts +1 -0
  329. package/src/core/ui-packs/de.ts +1 -0
  330. package/src/core/ui-packs/el.ts +1 -0
  331. package/src/core/ui-packs/es.ts +1 -0
  332. package/src/core/ui-packs/fa.ts +1 -0
  333. package/src/core/ui-packs/fi.ts +1 -0
  334. package/src/core/ui-packs/fr.ts +1 -0
  335. package/src/core/ui-packs/he.ts +1 -0
  336. package/src/core/ui-packs/hi.ts +1 -0
  337. package/src/core/ui-packs/hr.ts +1 -0
  338. package/src/core/ui-packs/hu.ts +1 -0
  339. package/src/core/ui-packs/id.ts +1 -0
  340. package/src/core/ui-packs/it.ts +1 -0
  341. package/src/core/ui-packs/ja.ts +1 -0
  342. package/src/core/ui-packs/ko.ts +1 -0
  343. package/src/core/ui-packs/nl.ts +1 -0
  344. package/src/core/ui-packs/no.ts +1 -0
  345. package/src/core/ui-packs/pl.ts +1 -0
  346. package/src/core/ui-packs/pt-br.ts +1 -0
  347. package/src/core/ui-packs/pt.ts +1 -0
  348. package/src/core/ui-packs/ro.ts +1 -0
  349. package/src/core/ui-packs/ru.ts +1 -0
  350. package/src/core/ui-packs/sk.ts +1 -0
  351. package/src/core/ui-packs/sr.ts +1 -0
  352. package/src/core/ui-packs/sv.ts +1 -0
  353. package/src/core/ui-packs/th.ts +1 -0
  354. package/src/core/ui-packs/tr.ts +1 -0
  355. package/src/core/ui-packs/uk.ts +1 -0
  356. package/src/core/ui-packs/vi.ts +1 -0
  357. package/src/core/ui-packs/zh-tw.ts +1 -0
  358. package/src/core/ui-packs/zh.ts +1 -0
  359. package/src/deploy/adapter-output.ts +7 -2
  360. package/src/deploy/adapters/cloudflare.ts +7 -5
  361. package/src/deploy/adapters/node.ts +47 -9
  362. package/src/deploy/adapters/types.ts +7 -3
  363. package/src/deploy/artifacts.ts +2 -1
  364. package/src/deploy/cloudflare-negotiation.ts +36 -7
  365. package/src/deploy/headers.ts +15 -1
  366. package/src/deploy/node-headers.ts +32 -20
  367. package/src/deploy/platforms/cloudflare.ts +14 -9
  368. package/src/deploy/platforms/netlify.ts +2 -1
  369. package/src/deploy/platforms/node.ts +12 -2
  370. package/src/deploy/platforms/types.ts +21 -7
  371. package/src/deploy/platforms/vercel.ts +115 -17
  372. package/src/deploy/redirects.ts +66 -6
  373. package/src/deploy/rss.ts +3 -1
  374. package/src/deploy/sitemap.ts +39 -5
  375. package/src/deploy/vercel-negotiation.ts +325 -103
  376. package/src/eval/agents.ts +18 -1
  377. package/src/eval/prompts.ts +6 -3
  378. package/src/eval/report.ts +34 -13
  379. package/src/eval/run.ts +5 -0
  380. package/src/markdown/base-links.ts +15 -14
  381. package/src/markdown/package-commands.ts +9 -8
  382. package/src/markdown/relative-links.ts +3 -2
  383. package/src/narration/build.ts +218 -40
  384. package/src/narration/provider.ts +89 -9
  385. package/src/openapi/checks.ts +273 -0
  386. package/src/openapi/graphql-build.ts +21 -0
  387. package/src/openapi/graphql.ts +11 -0
  388. package/src/openapi/model.ts +15 -3
  389. package/src/openapi/parse.ts +127 -2
  390. package/src/openapi/references.ts +43 -3
  391. package/src/openapi/render-mdx.ts +68 -8
  392. package/src/openapi/sentence.ts +29 -2
  393. package/src/openapi/source.ts +39 -14
  394. package/src/ratelimit/index.ts +1 -1
  395. package/src/ratelimit/runtime.ts +37 -19
  396. package/src/ratelimit/upstash.ts +40 -10
  397. package/src/reference/graphql.ts +15 -1
  398. package/src/reference/index.ts +1 -0
  399. package/src/reference/openapi.ts +2 -2
  400. package/src/reference/options.ts +29 -1
  401. package/src/registry/eject.ts +8 -2
  402. package/src/search/adapters/locale-scope.ts +30 -0
  403. package/src/search/adapters/typesense.ts +14 -4
  404. package/src/search/build.ts +21 -3
  405. package/src/search/orama-index.ts +163 -31
  406. package/src/search/source-pages.ts +29 -0
  407. package/src/search/sync/algolia.ts +99 -9
  408. package/src/search/sync/index.ts +52 -13
  409. package/src/search/sync/typesense.ts +72 -27
  410. package/src/seo/jsonld.ts +38 -20
  411. package/src/sources/contentful.ts +12 -0
  412. package/src/sources/github-releases.ts +7 -1
  413. package/src/sources/notion.ts +7 -0
  414. package/src/sources/shared.ts +3 -0
  415. package/src/theme/color.ts +9 -10
  416. package/src/theme/entry.ts +43 -6
  417. package/src/translate/validate.ts +23 -1
  418. package/dist/cli/chunk-0gz36akr.js.map +0 -12
  419. package/dist/cli/chunk-2n4ps1b3.js.map +0 -15
  420. package/dist/cli/chunk-43zcf4gz.js.map +0 -36
  421. package/dist/cli/chunk-4ejxbzee.js +0 -39
  422. package/dist/cli/chunk-4ejxbzee.js.map +0 -10
  423. package/dist/cli/chunk-4h8z9vv5.js.map +0 -16
  424. package/dist/cli/chunk-713mngdq.js.map +0 -14
  425. package/dist/cli/chunk-9xr4dgee.js.map +0 -10
  426. package/dist/cli/chunk-amrb6hgh.js +0 -145
  427. package/dist/cli/chunk-amrb6hgh.js.map +0 -11
  428. package/dist/cli/chunk-nd1821sk.js.map +0 -10
  429. package/dist/cli/chunk-rekqz4qg.js.map +0 -10
  430. package/dist/cli/chunk-ta27feev.js.map +0 -10
  431. package/dist/cli/chunk-xkz5xbtv.js.map +0 -213
  432. package/dist/cli/chunk-y5h4r2y0.js.map +0 -10
  433. package/dist/cli/chunk-zf748avv.js.map +0 -37
  434. /package/dist/cli/{chunk-9geymqns.js.map → chunk-0w6hs479.js.map} +0 -0
  435. /package/dist/cli/{chunk-y4ykbark.js.map → chunk-1f882900.js.map} +0 -0
  436. /package/dist/cli/{chunk-py62fewh.js.map → chunk-53jqw8z0.js.map} +0 -0
  437. /package/dist/cli/{chunk-5wj2qwn2.js.map → chunk-58bt3hag.js.map} +0 -0
  438. /package/dist/cli/{chunk-e7vvk5ya.js.map → chunk-5cmts6dv.js.map} +0 -0
  439. /package/dist/cli/{chunk-g2z9x01v.js.map → chunk-9qzgg6mj.js.map} +0 -0
  440. /package/dist/cli/{chunk-q3wxxq39.js.map → chunk-a57yh0h9.js.map} +0 -0
  441. /package/dist/cli/{chunk-2f3ndkpw.js.map → chunk-desvm72z.js.map} +0 -0
  442. /package/dist/cli/{chunk-gp84za0h.js.map → chunk-dhwtqnnd.js.map} +0 -0
  443. /package/dist/cli/{chunk-2f7n4qzt.js.map → chunk-dqhg54mr.js.map} +0 -0
  444. /package/dist/cli/{chunk-zhvd6adm.js.map → chunk-gfc5fqvf.js.map} +0 -0
  445. /package/dist/cli/{chunk-p804f3pe.js.map → chunk-hvcxng5f.js.map} +0 -0
  446. /package/dist/cli/{chunk-1n228xqb.js.map → chunk-kdpzw38a.js.map} +0 -0
  447. /package/dist/cli/{chunk-6bm0xpgd.js.map → chunk-s0bdnc7v.js.map} +0 -0
  448. /package/dist/cli/{chunk-cmtcnh9f.js.map → chunk-tfycddbt.js.map} +0 -0
  449. /package/dist/cli/{chunk-ntv4qrt7.js.map → chunk-y4msrwm9.js.map} +0 -0
  450. /package/dist/cli/{chunk-yj17vs39.js.map → chunk-ydp3065p.js.map} +0 -0
@@ -1,21 +1,46 @@
1
+ import { z } from "zod";
1
2
  import type { AdapterDescriptor } from "../core/adapter.ts";
2
3
  import type { RateLimitOptions } from "./memory.ts";
3
- /** The env vars holding the Upstash Redis REST endpoint and its token. */
4
- export declare const UPSTASH_SECRETS: readonly ["UPSTASH_REDIS_REST_URL", "UPSTASH_REDIS_REST_TOKEN"];
5
- export type UpstashAdapter = AdapterDescriptor<"upstash", RateLimitOptions>;
6
- export declare const upstashAdapterSchema: import("zod").ZodObject<{
7
- kind: import("zod").ZodLiteral<"upstash">;
8
- options: import("zod").ZodObject<{
9
- requests: import("zod").ZodOptional<import("zod").ZodNumber>;
10
- window: import("zod").ZodOptional<import("zod").ZodNumber>;
11
- }, import("zod/v4/core").$strict>;
12
- requiredSecrets: import("zod").ZodArray<import("zod").ZodString>;
13
- runtimeDeps: import("zod").ZodArray<import("zod").ZodString>;
14
- }, import("zod/v4/core").$strict>;
4
+ /** Options for {@link upstash}. */
5
+ export interface UpstashOptions extends RateLimitOptions {
6
+ /**
7
+ * Name of the env var holding the REST token. Defaults to
8
+ * `UPSTASH_REDIS_REST_TOKEN`; a database added from Vercel's Marketplace
9
+ * sets `KV_REST_API_TOKEN`.
10
+ */
11
+ tokenEnv?: string;
12
+ /**
13
+ * Name of the env var holding the REST endpoint. Defaults to
14
+ * `UPSTASH_REDIS_REST_URL`; a database added from Vercel's Marketplace
15
+ * sets `KV_REST_API_URL`.
16
+ */
17
+ urlEnv?: string;
18
+ }
19
+ export declare const upstashOptionsSchema: z.ZodObject<{
20
+ requests: z.ZodOptional<z.ZodNumber>;
21
+ window: z.ZodOptional<z.ZodNumber>;
22
+ tokenEnv: z.ZodOptional<z.ZodString>;
23
+ urlEnv: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strict>;
25
+ export type UpstashAdapter = AdapterDescriptor<"upstash", UpstashOptions>;
26
+ export declare const upstashAdapterSchema: z.ZodObject<{
27
+ kind: z.ZodLiteral<"upstash">;
28
+ options: z.ZodObject<{
29
+ requests: z.ZodOptional<z.ZodNumber>;
30
+ window: z.ZodOptional<z.ZodNumber>;
31
+ tokenEnv: z.ZodOptional<z.ZodString>;
32
+ urlEnv: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strict>;
34
+ requiredSecrets: z.ZodArray<z.ZodString>;
35
+ runtimeDeps: z.ZodArray<z.ZodString>;
36
+ }, z.core.$strict>;
37
+ /** The env vars the endpoint and its token are read from, in that order. */
38
+ export declare const upstashSecrets: (options: UpstashOptions) => [string, string];
15
39
  /**
16
40
  * Keeps the count in Upstash Redis, which every instance on every host shares,
17
41
  * so the limit holds exactly. It talks to Upstash's REST API, so there is
18
42
  * nothing to install; the endpoint and token come from
19
- * `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`.
43
+ * `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`, or the env vars
44
+ * `urlEnv` and `tokenEnv` name.
20
45
  */
21
- export declare const upstash: (options?: RateLimitOptions) => UpstashAdapter;
46
+ export declare const upstash: (options?: UpstashOptions) => UpstashAdapter;
@@ -1,8 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import type { AdapterDescriptor } from "../core/adapter.ts";
3
- import type { GraphqlSourceOptions, PlaygroundOptions } from "./options.ts";
3
+ import type { GraphqlAuthOptions, GraphqlSourceOptions, PlaygroundOptions } from "./options.ts";
4
4
  /** Options for {@link graphql}. */
5
5
  export interface GraphqlOptions {
6
+ /**
7
+ * How the endpoint authenticates, like the site's `api.auth`: `bearer`,
8
+ * `basic`, or `key` (sent in the `name` header, `x-api-key` by default).
9
+ * The Try it panel gets a field for the credential and the code samples
10
+ * send a placeholder. Applies to every source; a per-source `auth` wins.
11
+ */
12
+ auth?: GraphqlAuthOptions;
6
13
  /**
7
14
  * Code-sample languages shown per operation, in order. Defaults to
8
15
  * `["curl", "js", "python"]`; `false` shows none.
@@ -36,6 +43,15 @@ export interface GraphqlOptions {
36
43
  * AsyncAPI documents only.
37
44
  */
38
45
  export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
46
+ auth: z.ZodOptional<z.ZodObject<{
47
+ method: z.ZodEnum<{
48
+ none: "none";
49
+ key: "key";
50
+ bearer: "bearer";
51
+ basic: "basic";
52
+ }>;
53
+ name: z.ZodOptional<z.ZodString>;
54
+ }, z.core.$strict>>;
39
55
  endpoint: z.ZodOptional<z.ZodString>;
40
56
  sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
41
57
  includeInLlms: z.ZodDefault<z.ZodBoolean>;
@@ -45,6 +61,15 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
45
61
  route: z.ZodOptional<z.ZodString>;
46
62
  seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
47
63
  spec: z.ZodString;
64
+ auth: z.ZodOptional<z.ZodObject<{
65
+ method: z.ZodEnum<{
66
+ none: "none";
67
+ key: "key";
68
+ bearer: "bearer";
69
+ basic: "basic";
70
+ }>;
71
+ name: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strict>>;
48
73
  endpoint: z.ZodOptional<z.ZodString>;
49
74
  }, z.core.$strict>>>;
50
75
  codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
@@ -69,6 +94,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
69
94
  spec: string;
70
95
  label?: string | undefined;
71
96
  route?: string | undefined;
97
+ auth?: {
98
+ method: "none" | "key" | "bearer" | "basic";
99
+ name?: string | undefined;
100
+ } | undefined;
72
101
  endpoint?: string | undefined;
73
102
  }[];
74
103
  codeSamples: false | string[];
@@ -77,6 +106,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
77
106
  proxy: string | boolean;
78
107
  };
79
108
  route: string;
109
+ auth?: {
110
+ method: "none" | "key" | "bearer" | "basic";
111
+ name?: string | undefined;
112
+ } | undefined;
80
113
  endpoint?: string | undefined;
81
114
  spec?: string | undefined;
82
115
  }, "spec" | "overlays">, {
@@ -88,6 +121,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
88
121
  spec: string;
89
122
  label?: string | undefined;
90
123
  route?: string | undefined;
124
+ auth?: {
125
+ method: "none" | "key" | "bearer" | "basic";
126
+ name?: string | undefined;
127
+ } | undefined;
91
128
  endpoint?: string | undefined;
92
129
  }[];
93
130
  codeSamples: false | string[];
@@ -96,6 +133,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
96
133
  proxy: string | boolean;
97
134
  };
98
135
  route: string;
136
+ auth?: {
137
+ method: "none" | "key" | "bearer" | "basic";
138
+ name?: string | undefined;
139
+ } | undefined;
99
140
  endpoint?: string | undefined;
100
141
  spec?: string | undefined;
101
142
  }>>;
@@ -107,6 +148,15 @@ export type ResolvedGraphqlAdapter = AdapterDescriptor<"graphql", ResolvedGraphq
107
148
  export declare const graphqlAdapterSchema: z.ZodObject<{
108
149
  kind: z.ZodLiteral<"graphql">;
109
150
  options: z.ZodPipe<z.ZodObject<{
151
+ auth: z.ZodOptional<z.ZodObject<{
152
+ method: z.ZodEnum<{
153
+ none: "none";
154
+ key: "key";
155
+ bearer: "bearer";
156
+ basic: "basic";
157
+ }>;
158
+ name: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strict>>;
110
160
  endpoint: z.ZodOptional<z.ZodString>;
111
161
  sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
112
162
  includeInLlms: z.ZodDefault<z.ZodBoolean>;
@@ -116,6 +166,15 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
116
166
  route: z.ZodOptional<z.ZodString>;
117
167
  seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
118
168
  spec: z.ZodString;
169
+ auth: z.ZodOptional<z.ZodObject<{
170
+ method: z.ZodEnum<{
171
+ none: "none";
172
+ key: "key";
173
+ bearer: "bearer";
174
+ basic: "basic";
175
+ }>;
176
+ name: z.ZodOptional<z.ZodString>;
177
+ }, z.core.$strict>>;
119
178
  endpoint: z.ZodOptional<z.ZodString>;
120
179
  }, z.core.$strict>>>;
121
180
  codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
@@ -140,6 +199,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
140
199
  spec: string;
141
200
  label?: string | undefined;
142
201
  route?: string | undefined;
202
+ auth?: {
203
+ method: "none" | "key" | "bearer" | "basic";
204
+ name?: string | undefined;
205
+ } | undefined;
143
206
  endpoint?: string | undefined;
144
207
  }[];
145
208
  codeSamples: false | string[];
@@ -148,6 +211,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
148
211
  proxy: string | boolean;
149
212
  };
150
213
  route: string;
214
+ auth?: {
215
+ method: "none" | "key" | "bearer" | "basic";
216
+ name?: string | undefined;
217
+ } | undefined;
151
218
  endpoint?: string | undefined;
152
219
  spec?: string | undefined;
153
220
  }, "spec" | "overlays">, {
@@ -159,6 +226,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
159
226
  spec: string;
160
227
  label?: string | undefined;
161
228
  route?: string | undefined;
229
+ auth?: {
230
+ method: "none" | "key" | "bearer" | "basic";
231
+ name?: string | undefined;
232
+ } | undefined;
162
233
  endpoint?: string | undefined;
163
234
  }[];
164
235
  codeSamples: false | string[];
@@ -167,6 +238,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
167
238
  proxy: string | boolean;
168
239
  };
169
240
  route: string;
241
+ auth?: {
242
+ method: "none" | "key" | "bearer" | "basic";
243
+ name?: string | undefined;
244
+ } | undefined;
170
245
  endpoint?: string | undefined;
171
246
  spec?: string | undefined;
172
247
  }>>;
@@ -26,7 +26,7 @@ export { graphql } from "./graphql.ts";
26
26
  export type { GraphqlAdapter, GraphqlOptions } from "./graphql.ts";
27
27
  export { openapi } from "./openapi.ts";
28
28
  export type { OpenApiAdapter, OpenApiOptions } from "./openapi.ts";
29
- export type { GraphqlSourceOptions, PlaygroundOptions, ReferenceSourceOptions, } from "./options.ts";
29
+ export type { GraphqlAuthOptions, GraphqlSourceOptions, PlaygroundOptions, ReferenceSourceOptions, } from "./options.ts";
30
30
  export { scalar } from "./scalar.ts";
31
31
  export type { ScalarAdapter, ScalarOptions, ScalarSourceOptions, } from "./scalar.ts";
32
32
  export type { ReferenceAdapter, ResolvedReferenceAdapter } from "./schema.ts";
@@ -5,8 +5,8 @@ import type { OpenApiSourceOptions, PlaygroundOptions } from "./options.ts";
5
5
  export interface OpenApiOptions {
6
6
  /**
7
7
  * Code-sample languages generated per operation (Blume renderer), in
8
- * order. Defaults to `["curl", "js", "python"]`; `false` generates none, so
9
- * only the spec's own `x-codeSamples` show.
8
+ * order. Defaults to `["curl", "js", "python"]`; `false` (or an empty list)
9
+ * generates none, so only the spec's own `x-codeSamples` show.
10
10
  */
11
11
  codeSamples?: string[] | false;
12
12
  /** Start nested schema rows expanded rather than collapsed (Blume renderer). Defaults to `false`. */
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { AuthMethod } from "../components/content/api-page.ts";
2
3
  /**
3
4
  * A single spec rendered by a reference. `spec` is a local path or an
4
5
  * `http(s)` URL (an OpenAPI document for `openapi()`, an AsyncAPI document
@@ -71,10 +72,34 @@ export interface OpenApiSourceOptions extends ReferenceSourceOptions {
71
72
  */
72
73
  overlays?: string[];
73
74
  }
75
+ /**
76
+ * How a GraphQL endpoint authenticates, in the shape the site's `api.auth`
77
+ * takes for hand-written endpoints: `bearer`, `basic`, or `key` (sent in the
78
+ * `name` header, `x-api-key` by default). A schema, unlike an OpenAPI
79
+ * document, declares no security schemes, so this is what gives the Try it
80
+ * panel its credential field.
81
+ */
82
+ export declare const graphqlAuthSchema: z.ZodObject<{
83
+ method: z.ZodEnum<{
84
+ none: "none";
85
+ key: "key";
86
+ bearer: "bearer";
87
+ basic: "basic";
88
+ }>;
89
+ name: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strict>;
91
+ /** The `auth` option of `graphql()` and its sources. */
92
+ export interface GraphqlAuthOptions {
93
+ /** `bearer`, `basic`, `key`, or `none`. */
94
+ method: AuthMethod;
95
+ /** The header an API key goes in. Defaults to `x-api-key`. */
96
+ name?: string;
97
+ }
74
98
  /**
75
99
  * A single GraphQL schema: the shared source shape plus `endpoint`, the live
76
100
  * GraphQL API URL the playground and code samples target (a schema, unlike an
77
- * OpenAPI document, names no server).
101
+ * OpenAPI document, names no server), and `auth`, how that endpoint
102
+ * authenticates.
78
103
  */
79
104
  export declare const graphqlSourceSchema: z.ZodObject<{
80
105
  includeInLlms: z.ZodDefault<z.ZodBoolean>;
@@ -84,10 +109,21 @@ export declare const graphqlSourceSchema: z.ZodObject<{
84
109
  route: z.ZodOptional<z.ZodString>;
85
110
  seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
86
111
  spec: z.ZodString;
112
+ auth: z.ZodOptional<z.ZodObject<{
113
+ method: z.ZodEnum<{
114
+ none: "none";
115
+ key: "key";
116
+ bearer: "bearer";
117
+ basic: "basic";
118
+ }>;
119
+ name: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strict>>;
87
121
  endpoint: z.ZodOptional<z.ZodString>;
88
122
  }, z.core.$strict>;
89
123
  /** One schema source, as `graphql()` accepts it. */
90
124
  export interface GraphqlSourceOptions extends ReferenceSourceOptions {
125
+ /** How the endpoint authenticates; wins over the adapter's `auth`. */
126
+ auth?: GraphqlAuthOptions;
91
127
  /** URL of the live GraphQL endpoint (playground + code samples); wins over the adapter's `endpoint`. */
92
128
  endpoint?: string;
93
129
  }
@@ -81,6 +81,15 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
81
81
  }, z.core.$strict>, z.ZodObject<{
82
82
  kind: z.ZodLiteral<"graphql">;
83
83
  options: z.ZodPipe<z.ZodObject<{
84
+ auth: z.ZodOptional<z.ZodObject<{
85
+ method: z.ZodEnum<{
86
+ none: "none";
87
+ key: "key";
88
+ bearer: "bearer";
89
+ basic: "basic";
90
+ }>;
91
+ name: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strict>>;
84
93
  endpoint: z.ZodOptional<z.ZodString>;
85
94
  sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
86
95
  includeInLlms: z.ZodDefault<z.ZodBoolean>;
@@ -90,6 +99,15 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
90
99
  route: z.ZodOptional<z.ZodString>;
91
100
  seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
92
101
  spec: z.ZodString;
102
+ auth: z.ZodOptional<z.ZodObject<{
103
+ method: z.ZodEnum<{
104
+ none: "none";
105
+ key: "key";
106
+ bearer: "bearer";
107
+ basic: "basic";
108
+ }>;
109
+ name: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strict>>;
93
111
  endpoint: z.ZodOptional<z.ZodString>;
94
112
  }, z.core.$strict>>>;
95
113
  codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
@@ -114,6 +132,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
114
132
  spec: string;
115
133
  label?: string | undefined;
116
134
  route?: string | undefined;
135
+ auth?: {
136
+ method: "none" | "key" | "bearer" | "basic";
137
+ name?: string | undefined;
138
+ } | undefined;
117
139
  endpoint?: string | undefined;
118
140
  }[];
119
141
  codeSamples: false | string[];
@@ -122,6 +144,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
122
144
  proxy: string | boolean;
123
145
  };
124
146
  route: string;
147
+ auth?: {
148
+ method: "none" | "key" | "bearer" | "basic";
149
+ name?: string | undefined;
150
+ } | undefined;
125
151
  endpoint?: string | undefined;
126
152
  spec?: string | undefined;
127
153
  }, "spec" | "overlays">, {
@@ -133,6 +159,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
133
159
  spec: string;
134
160
  label?: string | undefined;
135
161
  route?: string | undefined;
162
+ auth?: {
163
+ method: "none" | "key" | "bearer" | "basic";
164
+ name?: string | undefined;
165
+ } | undefined;
136
166
  endpoint?: string | undefined;
137
167
  }[];
138
168
  codeSamples: false | string[];
@@ -141,6 +171,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
141
171
  proxy: string | boolean;
142
172
  };
143
173
  route: string;
174
+ auth?: {
175
+ method: "none" | "key" | "bearer" | "basic";
176
+ name?: string | undefined;
177
+ } | undefined;
144
178
  endpoint?: string | undefined;
145
179
  spec?: string | undefined;
146
180
  }>>;
@@ -286,6 +320,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
286
320
  spec: string;
287
321
  label?: string | undefined;
288
322
  route?: string | undefined;
323
+ auth?: {
324
+ method: "none" | "key" | "bearer" | "basic";
325
+ name?: string | undefined;
326
+ } | undefined;
289
327
  endpoint?: string | undefined;
290
328
  }[];
291
329
  codeSamples: false | string[];
@@ -294,6 +332,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
294
332
  proxy: string | boolean;
295
333
  };
296
334
  route: string;
335
+ auth?: {
336
+ method: "none" | "key" | "bearer" | "basic";
337
+ name?: string | undefined;
338
+ } | undefined;
297
339
  endpoint?: string | undefined;
298
340
  spec?: string | undefined;
299
341
  }, "spec" | "overlays">;
@@ -398,6 +440,15 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
398
440
  }, z.core.$strict>, z.ZodObject<{
399
441
  kind: z.ZodLiteral<"graphql">;
400
442
  options: z.ZodPipe<z.ZodObject<{
443
+ auth: z.ZodOptional<z.ZodObject<{
444
+ method: z.ZodEnum<{
445
+ none: "none";
446
+ key: "key";
447
+ bearer: "bearer";
448
+ basic: "basic";
449
+ }>;
450
+ name: z.ZodOptional<z.ZodString>;
451
+ }, z.core.$strict>>;
401
452
  endpoint: z.ZodOptional<z.ZodString>;
402
453
  sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
403
454
  includeInLlms: z.ZodDefault<z.ZodBoolean>;
@@ -407,6 +458,15 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
407
458
  route: z.ZodOptional<z.ZodString>;
408
459
  seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
409
460
  spec: z.ZodString;
461
+ auth: z.ZodOptional<z.ZodObject<{
462
+ method: z.ZodEnum<{
463
+ none: "none";
464
+ key: "key";
465
+ bearer: "bearer";
466
+ basic: "basic";
467
+ }>;
468
+ name: z.ZodOptional<z.ZodString>;
469
+ }, z.core.$strict>>;
410
470
  endpoint: z.ZodOptional<z.ZodString>;
411
471
  }, z.core.$strict>>>;
412
472
  codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
@@ -431,6 +491,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
431
491
  spec: string;
432
492
  label?: string | undefined;
433
493
  route?: string | undefined;
494
+ auth?: {
495
+ method: "none" | "key" | "bearer" | "basic";
496
+ name?: string | undefined;
497
+ } | undefined;
434
498
  endpoint?: string | undefined;
435
499
  }[];
436
500
  codeSamples: false | string[];
@@ -439,6 +503,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
439
503
  proxy: string | boolean;
440
504
  };
441
505
  route: string;
506
+ auth?: {
507
+ method: "none" | "key" | "bearer" | "basic";
508
+ name?: string | undefined;
509
+ } | undefined;
442
510
  endpoint?: string | undefined;
443
511
  spec?: string | undefined;
444
512
  }, "spec" | "overlays">, {
@@ -450,6 +518,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
450
518
  spec: string;
451
519
  label?: string | undefined;
452
520
  route?: string | undefined;
521
+ auth?: {
522
+ method: "none" | "key" | "bearer" | "basic";
523
+ name?: string | undefined;
524
+ } | undefined;
453
525
  endpoint?: string | undefined;
454
526
  }[];
455
527
  codeSamples: false | string[];
@@ -458,6 +530,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
458
530
  proxy: string | boolean;
459
531
  };
460
532
  route: string;
533
+ auth?: {
534
+ method: "none" | "key" | "bearer" | "basic";
535
+ name?: string | undefined;
536
+ } | undefined;
461
537
  endpoint?: string | undefined;
462
538
  spec?: string | undefined;
463
539
  }>>;
@@ -603,6 +679,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
603
679
  spec: string;
604
680
  label?: string | undefined;
605
681
  route?: string | undefined;
682
+ auth?: {
683
+ method: "none" | "key" | "bearer" | "basic";
684
+ name?: string | undefined;
685
+ } | undefined;
606
686
  endpoint?: string | undefined;
607
687
  }[];
608
688
  codeSamples: false | string[];
@@ -611,6 +691,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
611
691
  proxy: string | boolean;
612
692
  };
613
693
  route: string;
694
+ auth?: {
695
+ method: "none" | "key" | "bearer" | "basic";
696
+ name?: string | undefined;
697
+ } | undefined;
614
698
  endpoint?: string | undefined;
615
699
  spec?: string | undefined;
616
700
  }, "spec" | "overlays">;
@@ -69,6 +69,7 @@ declare const adapterVariants: readonly [z.ZodObject<{
69
69
  apiKey: z.ZodString;
70
70
  collection: z.ZodString;
71
71
  host: z.ZodString;
72
+ locale: z.ZodOptional<z.ZodString>;
72
73
  port: z.ZodOptional<z.ZodNumber>;
73
74
  protocol: z.ZodOptional<z.ZodEnum<{
74
75
  http: "http";
@@ -141,6 +142,7 @@ export declare const resolvedSearchAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUn
141
142
  apiKey: z.ZodString;
142
143
  collection: z.ZodString;
143
144
  host: z.ZodString;
145
+ locale: z.ZodOptional<z.ZodString>;
144
146
  port: z.ZodOptional<z.ZodNumber>;
145
147
  protocol: z.ZodOptional<z.ZodEnum<{
146
148
  http: "http";
@@ -212,6 +214,7 @@ export declare const resolvedSearchAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUn
212
214
  apiKey: string;
213
215
  collection: string;
214
216
  host: string;
217
+ locale?: string | undefined;
215
218
  port?: number | undefined;
216
219
  protocol?: "http" | "https" | undefined;
217
220
  };
@@ -4,14 +4,22 @@ import type { SearchAdapter } from "./types.ts";
4
4
  /**
5
5
  * Connection details for a self-hosted or cloud Typesense node. The browser
6
6
  * queries the collection with the search-only `apiKey`; the build-time sync
7
- * recreates the collection with `TYPESENSE_ADMIN_API_KEY`, which never enters
8
- * the config.
7
+ * rebuilds it with `TYPESENSE_ADMIN_API_KEY`, which never enters the config.
9
8
  */
10
9
  export interface TypesenseNamedOptions {
11
10
  /** The search-only API key (public — it ships to the browser). */
12
11
  apiKey: string;
12
+ /** The alias the sync points at each new collection, and searches read. */
13
13
  collection: string;
14
14
  host: string;
15
+ /**
16
+ * The language Typesense tokenizes the text fields for, as a two-letter
17
+ * code (`ja`, `zh`, `ko`, `th`, …). Typesense's default tokenizer splits on
18
+ * spaces, so text in a script written without them — Chinese, Japanese,
19
+ * Thai — only matches from the start of a run. Omitted, the fields keep
20
+ * that default.
21
+ */
22
+ locale?: string;
15
23
  /** Defaults to 443. */
16
24
  port?: number;
17
25
  /** Defaults to `https`. */
@@ -29,6 +37,7 @@ export declare const typesenseOptionsSchema: z.ZodObject<{
29
37
  apiKey: z.ZodString;
30
38
  collection: z.ZodString;
31
39
  host: z.ZodString;
40
+ locale: z.ZodOptional<z.ZodString>;
32
41
  port: z.ZodOptional<z.ZodNumber>;
33
42
  protocol: z.ZodOptional<z.ZodEnum<{
34
43
  http: "http";
@@ -36,7 +45,8 @@ export declare const typesenseOptionsSchema: z.ZodObject<{
36
45
  }>>;
37
46
  }, z.core.$catchall<z.ZodJSONSchema>>;
38
47
  /**
39
- * Hosted search on Typesense. Each `blume build` drops and recreates the
40
- * collection so deleted or renamed pages don't linger as stale hits.
48
+ * Hosted search on Typesense. Each `blume build` imports into a new
49
+ * collection and swaps the `collection` alias onto it, so deleted or renamed
50
+ * pages don't linger as stale hits and searches never read a partial index.
41
51
  */
42
52
  export declare const typesense: (options: TypesenseOptions) => TypesenseAdapter;
@@ -18,6 +18,8 @@
18
18
  * Pagefind/pagefind#1272; switch back to `writeFiles()` once a release ships
19
19
  * that fix.
20
20
  *
21
- * Returns the number of pages indexed.
21
+ * Returns the number of pages indexed: the index's own count, summed over its
22
+ * languages from `pagefind-entry.json`. `addDirectory`'s `page_count` counts
23
+ * every HTML file it read, including the ones kept out of the index.
22
24
  */
23
25
  export declare const buildSearchIndex: (outDir: string) => Promise<number>;
@@ -35,11 +35,11 @@ export interface OramaDoc {
35
35
  * so ranking is identical wherever docs are queried. `locale` — the site's
36
36
  * `i18n.defaultLocale` — swaps in a word-segmenting tokenizer for every
37
37
  * non-Latin script, all of which Orama's default tokenizer reduces to zero
38
- * tokens; the tokenizer belongs to the database, so on a mixed-locale site it
39
- * applies to every document. That is safe in one direction only: Latin words
38
+ * tokens. A non-Latin default's tokenizer serves every page: Latin words
40
39
  * survive segmentation intact, so English pages on a segmented index stay
41
- * searchable, but non-Latin translations on a Latin-default index still
42
- * collapse to zero tokens.
40
+ * searchable. A Latin default keeps Orama's tokenizer for its Latin-script
41
+ * pages, and each page in a non-Latin locale (the Japanese and Hindi
42
+ * translations of an English site) is indexed with its own locale's tokenizer.
43
43
  */
44
44
  export declare const buildOramaIndex: (documents: OramaDoc[], locale?: string) => Promise<AnyOrama>;
45
45
  /** Optional exact-match filters applied to a query via Orama's `where`. */
@@ -65,10 +65,10 @@ export interface OramaQueryFilters {
65
65
  * `locale` to one language, `contentTypes` to a set of page types, `facets`
66
66
  * to documents carrying every requested `key:value` term.
67
67
  *
68
- * On a bigrammed index the strict pass runs first: a term is only meant to
69
- * match where its bigrams sit together, and scoring them independently lets a
70
- * page sharing a couple of windows outrank the page the term is about. Terms
71
- * spanning several words rarely appear in full on one page, so an empty strict
72
- * result falls back to the default pass rather than reporting no matches.
68
+ * On an index whose translations have tokenizers of their own, a query scoped
69
+ * to a locale is tokenized with that locale's tokenizer. An unscoped query
70
+ * searches each locale's pages with its own tokenizer, and the Latin-script
71
+ * pages with Orama's, then merges the matches by score: every search runs over
72
+ * the one index, so their scores share its term statistics.
73
73
  */
74
74
  export declare const queryOramaIndex: (db: AnyOrama, term: string, limit: number, filters?: OramaQueryFilters) => Promise<OramaDoc[]>;
@@ -9,8 +9,11 @@ export type AlgoliaSyncConfig = Pick<AlgoliaOptions, "appId" | "indexName">;
9
9
  *
10
10
  * Uses `replaceAllObjects`, which atomically replaces the index contents, so
11
11
  * pages deleted or renamed since the last sync don't linger as stale search
12
- * hits that 404 when clicked. Then adds `filterOnly(locale)` and
12
+ * hits that 404 when clicked. A page too long for one record is split across
13
+ * several (see {@link toObjects}). Then adds `filterOnly(locale)` and
13
14
  * `filterOnly(version)` to the index's `attributesForFaceting`, keeping any
14
- * the site declared itself, so the dialog's locale and version filters match.
15
+ * the site declared itself, so the dialog's locale and version filters match,
16
+ * and, once a page is split, `url` as the index's `attributeForDistinct`
17
+ * unless the site set its own.
15
18
  */
16
19
  export declare const syncAlgolia: (records: SearchRecord[], config: AlgoliaSyncConfig) => Promise<void>;
@@ -9,6 +9,8 @@ export interface SyncReporter {
9
9
  * After a build, upload the per-page records to the configured hosted adapter.
10
10
  * Reads secret admin keys from the environment; if a key (or option) is
11
11
  * missing the sync is skipped with a warning rather than failing the build —
12
- * CI may sync in a separate step.
12
+ * a local build has no secrets, and CI may sync in a separate step. Once the
13
+ * sync is set up, a failure fails the build (`BLUME_SEARCH_SYNC_FAILED`):
14
+ * the site would otherwise deploy against an index this build didn't update.
13
15
  */
14
16
  export declare const syncSearchProvider: (project: BlumeProject, reporter: SyncReporter) => Promise<void>;