blume 2.1.0 → 2.1.1

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 (397) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/dist/cli/{chunk-5cg2rzgf.js → chunk-073rdvgb.js} +19 -48
  3. package/dist/cli/{chunk-5cg2rzgf.js.map → chunk-073rdvgb.js.map} +4 -5
  4. package/dist/cli/{chunk-ga0pf4aj.js → chunk-0n9xkp3d.js} +12 -3
  5. package/dist/cli/{chunk-ga0pf4aj.js.map → chunk-0n9xkp3d.js.map} +3 -3
  6. package/dist/cli/chunk-150jk7km.js +52 -0
  7. package/dist/cli/chunk-150jk7km.js.map +10 -0
  8. package/dist/cli/{chunk-rekqz4qg.js → chunk-313vnn40.js} +16 -15
  9. package/dist/cli/chunk-313vnn40.js.map +10 -0
  10. package/dist/cli/{chunk-gp84za0h.js → chunk-3v3ffbrj.js} +2 -2
  11. package/dist/cli/{chunk-9xr4dgee.js → chunk-3x6x3pph.js} +29 -16
  12. package/dist/cli/chunk-3x6x3pph.js.map +10 -0
  13. package/dist/cli/{chunk-0gz36akr.js → chunk-42t4jxdx.js} +21 -5
  14. package/dist/cli/chunk-42t4jxdx.js.map +12 -0
  15. package/dist/cli/{chunk-ta27feev.js → chunk-54ztw1nj.js} +21 -2
  16. package/dist/cli/chunk-54ztw1nj.js.map +10 -0
  17. package/dist/cli/{chunk-jnwj5kjj.js → chunk-5vjtgs6e.js} +20 -7
  18. package/dist/cli/{chunk-jnwj5kjj.js.map → chunk-5vjtgs6e.js.map} +3 -3
  19. package/dist/cli/chunk-66w9j7p6.js +322 -0
  20. package/dist/cli/chunk-66w9j7p6.js.map +14 -0
  21. package/dist/cli/{chunk-nd1821sk.js → chunk-7ppf1rva.js} +32 -18
  22. package/dist/cli/chunk-7ppf1rva.js.map +10 -0
  23. package/dist/cli/{chunk-p804f3pe.js → chunk-8y2kmjv8.js} +6 -6
  24. package/dist/cli/{chunk-2f7n4qzt.js → chunk-c1y538kd.js} +1 -1
  25. package/dist/cli/{chunk-1n228xqb.js → chunk-c887fj0s.js} +2 -2
  26. package/dist/cli/{chunk-y5h4r2y0.js → chunk-cfyg47zg.js} +15 -5
  27. package/dist/cli/chunk-cfyg47zg.js.map +10 -0
  28. package/dist/cli/{chunk-cmtcnh9f.js → chunk-dzwehpy7.js} +2 -2
  29. package/dist/cli/{chunk-h2a48yhd.js → chunk-e6atmn4h.js} +119 -15
  30. package/dist/cli/{chunk-h2a48yhd.js.map → chunk-e6atmn4h.js.map} +10 -10
  31. package/dist/cli/{chunk-5ffywsmb.js → chunk-e8xw9qkh.js} +8 -6
  32. package/dist/cli/{chunk-5ffywsmb.js.map → chunk-e8xw9qkh.js.map} +3 -3
  33. package/dist/cli/{chunk-ntv4qrt7.js → chunk-e9q7a2ak.js} +14 -14
  34. package/dist/cli/{chunk-xkz5xbtv.js → chunk-ehweg4fr.js} +2366 -1114
  35. package/dist/cli/chunk-ehweg4fr.js.map +218 -0
  36. package/dist/cli/{chunk-zf748avv.js → chunk-ep6nd0rn.js} +176 -281
  37. package/dist/cli/{chunk-zf748avv.js.map → chunk-ep6nd0rn.js.map} +11 -12
  38. package/dist/cli/{chunk-yxmk4pec.js → chunk-fdrkhpjy.js} +16 -15
  39. package/dist/cli/{chunk-yxmk4pec.js.map → chunk-fdrkhpjy.js.map} +3 -3
  40. package/dist/cli/{chunk-5wj2qwn2.js → chunk-ft9vfys6.js} +4 -4
  41. package/dist/cli/{chunk-4h8z9vv5.js → chunk-gb420vvz.js} +89 -46
  42. package/dist/cli/chunk-gb420vvz.js.map +17 -0
  43. package/dist/cli/{chunk-713mngdq.js → chunk-hebn0tpx.js} +76 -10
  44. package/dist/cli/chunk-hebn0tpx.js.map +14 -0
  45. package/dist/cli/{chunk-2n4ps1b3.js → chunk-htrwgabr.js} +40 -22
  46. package/dist/cli/chunk-htrwgabr.js.map +15 -0
  47. package/dist/cli/{chunk-zhvd6adm.js → chunk-hx3xqnk9.js} +13 -13
  48. package/dist/cli/chunk-j134vrp2.js +65 -0
  49. package/dist/cli/chunk-j134vrp2.js.map +10 -0
  50. package/dist/cli/{chunk-y4ykbark.js → chunk-kma9f6sf.js} +2 -2
  51. package/dist/cli/{chunk-py62fewh.js → chunk-mrcccgnh.js} +3 -3
  52. package/dist/cli/{chunk-2f3ndkpw.js → chunk-n0v7m8ry.js} +3 -3
  53. package/dist/cli/{chunk-43zcf4gz.js → chunk-ncj7w596.js} +522 -353
  54. package/dist/cli/chunk-ncj7w596.js.map +35 -0
  55. package/dist/cli/{chunk-9geymqns.js → chunk-nq1d20w2.js} +14 -14
  56. package/dist/cli/{chunk-g2z9x01v.js → chunk-nrns10mj.js} +3 -3
  57. package/dist/cli/{chunk-e7vvk5ya.js → chunk-sds923fa.js} +3 -3
  58. package/dist/cli/{chunk-cy5bm0j0.js → chunk-t2m5j4pr.js} +2 -2
  59. package/dist/cli/{chunk-cy5bm0j0.js.map → chunk-t2m5j4pr.js.map} +1 -1
  60. package/dist/cli/{chunk-yj17vs39.js → chunk-tdqhyxfz.js} +5 -5
  61. package/dist/cli/{chunk-q3wxxq39.js → chunk-tphac74f.js} +5 -5
  62. package/dist/cli/{chunk-6bm0xpgd.js → chunk-w1r4vase.js} +2 -2
  63. package/dist/cli/index.js +24 -19
  64. package/dist/cli/index.js.map +3 -3
  65. package/dist/types/ai/ask-context.d.ts +6 -2
  66. package/dist/types/ai/component-markdown.d.ts +2 -0
  67. package/dist/types/ai/openapi-components.d.ts +4 -1
  68. package/dist/types/astro/integration.d.ts +5 -4
  69. package/dist/types/astro/markdown-negotiation.d.ts +3 -0
  70. package/dist/types/astro/pages.d.ts +10 -0
  71. package/dist/types/cli/init/scaffold.d.ts +1 -1
  72. package/dist/types/components/content/api-field.d.ts +4 -1
  73. package/dist/types/components/content/api-page.d.ts +6 -1
  74. package/dist/types/components/openapi/code-samples.d.ts +29 -0
  75. package/dist/types/components/openapi/helpers.d.ts +22 -1
  76. package/dist/types/components/openapi/security.d.ts +10 -0
  77. package/dist/types/components/openapi/snippets.d.ts +60 -0
  78. package/dist/types/core/changelog-index.d.ts +8 -0
  79. package/dist/types/core/config-input.d.ts +30 -3
  80. package/dist/types/core/data.d.ts +4 -0
  81. package/dist/types/core/i18n-ui.d.ts +2 -0
  82. package/dist/types/core/links.d.ts +8 -0
  83. package/dist/types/core/probe.d.ts +2 -0
  84. package/dist/types/core/project-graph.d.ts +6 -0
  85. package/dist/types/core/redirect-patterns.d.ts +11 -3
  86. package/dist/types/core/schema.d.ts +119 -0
  87. package/dist/types/core/sources/cache.d.ts +3 -0
  88. package/dist/types/core/sources/contentful-rich-text.d.ts +11 -2
  89. package/dist/types/core/sources/contentful.d.ts +17 -1
  90. package/dist/types/core/sources/lexical.d.ts +5 -0
  91. package/dist/types/core/sources/normalize.d.ts +20 -1
  92. package/dist/types/core/sources/remote.d.ts +37 -10
  93. package/dist/types/core/sources/sanity.d.ts +1 -1
  94. package/dist/types/core/types.d.ts +17 -0
  95. package/dist/types/deploy/adapter-output.d.ts +2 -1
  96. package/dist/types/deploy/adapters/cloudflare.d.ts +7 -5
  97. package/dist/types/deploy/adapters/node.d.ts +58 -23
  98. package/dist/types/deploy/adapters/registry.d.ts +10 -0
  99. package/dist/types/deploy/adapters/types.d.ts +3 -2
  100. package/dist/types/deploy/platforms/cloudflare.d.ts +10 -7
  101. package/dist/types/deploy/platforms/node.d.ts +3 -1
  102. package/dist/types/deploy/platforms/types.d.ts +18 -7
  103. package/dist/types/deploy/platforms/vercel.d.ts +20 -1
  104. package/dist/types/deploy/redirects.d.ts +17 -1
  105. package/dist/types/deploy/sitemap.d.ts +2 -1
  106. package/dist/types/deploy/vercel-negotiation.d.ts +42 -21
  107. package/dist/types/openapi/checks.d.ts +27 -0
  108. package/dist/types/openapi/graphql.d.ts +6 -0
  109. package/dist/types/openapi/model.d.ts +15 -4
  110. package/dist/types/openapi/parse.d.ts +3 -0
  111. package/dist/types/openapi/references.d.ts +16 -0
  112. package/dist/types/ratelimit/index.d.ts +1 -1
  113. package/dist/types/ratelimit/schema.d.ts +8 -0
  114. package/dist/types/ratelimit/upstash.d.ts +39 -14
  115. package/dist/types/reference/graphql.d.ts +76 -1
  116. package/dist/types/reference/index.d.ts +1 -1
  117. package/dist/types/reference/openapi.d.ts +2 -2
  118. package/dist/types/reference/options.d.ts +37 -1
  119. package/dist/types/reference/schema.d.ts +84 -0
  120. package/dist/types/search/adapters/registry.d.ts +3 -0
  121. package/dist/types/search/adapters/typesense.d.ts +14 -4
  122. package/dist/types/search/build.d.ts +3 -1
  123. package/dist/types/search/orama-index.d.ts +9 -9
  124. package/dist/types/search/sync/algolia.d.ts +5 -2
  125. package/dist/types/search/sync/index.d.ts +3 -1
  126. package/dist/types/search/sync/typesense.d.ts +11 -7
  127. package/dist/types/sources/contentful.d.ts +16 -0
  128. package/dist/types/sources/github-releases.d.ts +8 -1
  129. package/dist/types/sources/payload.d.ts +2 -0
  130. package/dist/types/sources/registry.d.ts +54 -0
  131. package/dist/types/sources/shared.d.ts +3 -0
  132. package/dist/types/sources/strapi.d.ts +2 -0
  133. package/docs/01-quickstart.mdx +4 -2
  134. package/docs/02-deployment.mdx +31 -13
  135. package/docs/advanced/changelog.mdx +11 -0
  136. package/docs/advanced/skills.mdx +1 -1
  137. package/docs/cli/audit.mdx +30 -7
  138. package/docs/cli/doctor.mdx +5 -1
  139. package/docs/cli/evals.mdx +4 -4
  140. package/docs/cli/translate.mdx +1 -0
  141. package/docs/cli/validate.mdx +4 -3
  142. package/docs/configuration/analytics.mdx +1 -1
  143. package/docs/configuration/assistant.mdx +6 -2
  144. package/docs/configuration/customization.mdx +4 -2
  145. package/docs/configuration/export.mdx +5 -3
  146. package/docs/configuration/index.mdx +3 -2
  147. package/docs/configuration/rate-limiting.mdx +23 -2
  148. package/docs/configuration/search.mdx +37 -14
  149. package/docs/content/components.mdx +2 -2
  150. package/docs/content/frontmatter.mdx +5 -3
  151. package/docs/content/i18n.mdx +2 -2
  152. package/docs/content/includes.mdx +1 -1
  153. package/docs/content/navigation.mdx +4 -4
  154. package/docs/content/sources/contentful.mdx +7 -4
  155. package/docs/content/sources/custom.mdx +7 -3
  156. package/docs/content/sources/github-releases.mdx +10 -2
  157. package/docs/content/sources/index.mdx +3 -3
  158. package/docs/content/sources/notion.mdx +1 -1
  159. package/docs/content/sources/obsidian.mdx +1 -1
  160. package/docs/content/sources/payload.mdx +3 -2
  161. package/docs/content/sources/remote-mdx.mdx +4 -0
  162. package/docs/content/sources/sanity.mdx +2 -2
  163. package/docs/content/sources/strapi.mdx +3 -2
  164. package/docs/content/syntax.mdx +2 -2
  165. package/docs/discoverability/agent-discovery.mdx +1 -1
  166. package/docs/discoverability/index.mdx +1 -1
  167. package/docs/discoverability/json-api.mdx +2 -0
  168. package/docs/discoverability/llms-txt.mdx +1 -1
  169. package/docs/discoverability/markdown.mdx +3 -1
  170. package/docs/discoverability/mcp.mdx +4 -0
  171. package/docs/discoverability/sitemap-and-robots.mdx +1 -1
  172. package/docs/references/api-pages.mdx +1 -1
  173. package/docs/references/asyncapi.mdx +3 -1
  174. package/docs/references/graphql.mdx +13 -1
  175. package/docs/references/openapi.mdx +50 -8
  176. package/package.json +9 -9
  177. package/skills/blume-migrate/SKILL.md +1 -1
  178. package/skills/blume-migrate/references/docusaurus.md +4 -4
  179. package/skills/blume-migrate/references/fumadocs.md +17 -13
  180. package/skills/blume-migrate/references/nextra.md +8 -5
  181. package/skills/blume-migrate/references/starlight.md +9 -7
  182. package/src/ai/ask-context.ts +33 -3
  183. package/src/ai/ask-limits.ts +13 -0
  184. package/src/ai/changelog-markdown.ts +11 -6
  185. package/src/ai/component-markdown.ts +1 -1
  186. package/src/ai/cors.ts +12 -3
  187. package/src/ai/mcp/query.ts +14 -6
  188. package/src/ai/openapi-components.ts +28 -4
  189. package/src/ai/relative-links.ts +4 -38
  190. package/src/astro/generate.ts +78 -48
  191. package/src/astro/integration.ts +16 -13
  192. package/src/astro/markdown-negotiation.ts +3 -0
  193. package/src/astro/module-types.ts +3 -1
  194. package/src/astro/pages.ts +23 -0
  195. package/src/astro/templates.ts +125 -80
  196. package/src/audit/catalog.ts +19 -3
  197. package/src/audit/checks/links.ts +14 -1
  198. package/src/audit/checks/network.ts +110 -6
  199. package/src/audit/checks/redirects.ts +6 -4
  200. package/src/audit/checks/robots.ts +58 -2
  201. package/src/audit/run.ts +3 -0
  202. package/src/audit/types.ts +2 -0
  203. package/src/audit/url.ts +14 -5
  204. package/src/blume-modules.d.ts +5 -1
  205. package/src/cli/args.ts +51 -0
  206. package/src/cli/build-failure.ts +23 -0
  207. package/src/cli/commands/audit.ts +10 -1
  208. package/src/cli/commands/dev.ts +18 -2
  209. package/src/cli/commands/doctor.ts +45 -12
  210. package/src/cli/commands/eval.ts +36 -4
  211. package/src/cli/commands/init.ts +6 -4
  212. package/src/cli/commands/validate.ts +10 -1
  213. package/src/cli/init/scaffold.ts +3 -3
  214. package/src/cli/prepare.ts +6 -3
  215. package/src/cli/required-secrets.ts +1 -1
  216. package/src/components/content/ApiPlayground.astro +6 -2
  217. package/src/components/content/api-field.ts +4 -1
  218. package/src/components/content/api-page.ts +31 -7
  219. package/src/components/content/mermaid-element.ts +15 -1
  220. package/src/components/islands/hooks.ts +27 -1
  221. package/src/components/layout/PageActions.astro +139 -24
  222. package/src/components/layout/RootLayout.astro +10 -2
  223. package/src/components/layout/Search.astro +17 -3
  224. package/src/components/layout/TableOfContents.astro +24 -17
  225. package/src/components/layout/head-scripts.ts +6 -1
  226. package/src/components/layout/search/algolia.ts +10 -1
  227. package/src/components/layout/search/analytics.ts +42 -14
  228. package/src/components/layout/search/endpoint.ts +48 -5
  229. package/src/components/layout/search/pagefind.ts +114 -5
  230. package/src/components/layout/search/types.ts +12 -0
  231. package/src/components/layout/search/typesense.ts +18 -6
  232. package/src/components/openapi/AsyncApiOperation.astro +14 -7
  233. package/src/components/openapi/Authorization.astro +10 -0
  234. package/src/components/openapi/GraphqlOperation.astro +5 -0
  235. package/src/components/openapi/Operation.astro +24 -1
  236. package/src/components/openapi/ParametersTable.astro +8 -4
  237. package/src/components/openapi/Playground.astro +7 -1
  238. package/src/components/openapi/RequestBody.astro +19 -2
  239. package/src/components/openapi/Responses.astro +1 -0
  240. package/src/components/openapi/SchemaTable.astro +15 -3
  241. package/src/components/openapi/async-snippets.ts +61 -5
  242. package/src/components/openapi/async.ts +123 -29
  243. package/src/components/openapi/graphql-helpers.ts +35 -12
  244. package/src/components/openapi/helpers.ts +36 -2
  245. package/src/components/openapi/message-model.ts +54 -11
  246. package/src/components/openapi/message.ts +14 -4
  247. package/src/components/openapi/operation-model.ts +16 -7
  248. package/src/components/openapi/playground-client.ts +24 -5
  249. package/src/components/openapi/playground-schema.ts +1 -1
  250. package/src/components/openapi/schema-tree.ts +44 -14
  251. package/src/components/openapi/security.ts +10 -0
  252. package/src/components/openapi/snippets.ts +5 -3
  253. package/src/components/openapi/validate-json.ts +4 -3
  254. package/src/core/changelog-index.ts +31 -1
  255. package/src/core/component-diagnostics.ts +53 -0
  256. package/src/core/component-overrides.ts +32 -0
  257. package/src/core/config-input.ts +31 -3
  258. package/src/core/data.ts +2 -0
  259. package/src/core/diagnostics.ts +5 -0
  260. package/src/core/i18n-ui.ts +2 -0
  261. package/src/core/includes.ts +1 -1
  262. package/src/core/links.ts +47 -17
  263. package/src/core/probe.ts +26 -6
  264. package/src/core/project-graph.ts +59 -18
  265. package/src/core/redirect-patterns.ts +36 -7
  266. package/src/core/schema.ts +21 -2
  267. package/src/core/sources/cache.ts +6 -0
  268. package/src/core/sources/contentful-rich-text.ts +29 -6
  269. package/src/core/sources/contentful.ts +135 -25
  270. package/src/core/sources/filesystem.ts +26 -4
  271. package/src/core/sources/github-releases.ts +12 -1
  272. package/src/core/sources/lexical.ts +15 -10
  273. package/src/core/sources/mdx-remote.ts +62 -10
  274. package/src/core/sources/normalize.ts +227 -41
  275. package/src/core/sources/notion.ts +7 -1
  276. package/src/core/sources/obsidian.ts +16 -3
  277. package/src/core/sources/payload.ts +38 -15
  278. package/src/core/sources/remote.ts +72 -15
  279. package/src/core/sources/resolve.ts +11 -1
  280. package/src/core/sources/sanity.ts +43 -25
  281. package/src/core/sources/strapi.ts +2 -2
  282. package/src/core/types.ts +18 -0
  283. package/src/core/ui-packs/ar.ts +1 -0
  284. package/src/core/ui-packs/bg.ts +1 -0
  285. package/src/core/ui-packs/bn.ts +1 -0
  286. package/src/core/ui-packs/ca.ts +1 -0
  287. package/src/core/ui-packs/cs.ts +1 -0
  288. package/src/core/ui-packs/da.ts +1 -0
  289. package/src/core/ui-packs/de.ts +1 -0
  290. package/src/core/ui-packs/el.ts +1 -0
  291. package/src/core/ui-packs/es.ts +1 -0
  292. package/src/core/ui-packs/fa.ts +1 -0
  293. package/src/core/ui-packs/fi.ts +1 -0
  294. package/src/core/ui-packs/fr.ts +1 -0
  295. package/src/core/ui-packs/he.ts +1 -0
  296. package/src/core/ui-packs/hi.ts +1 -0
  297. package/src/core/ui-packs/hr.ts +1 -0
  298. package/src/core/ui-packs/hu.ts +1 -0
  299. package/src/core/ui-packs/id.ts +1 -0
  300. package/src/core/ui-packs/it.ts +1 -0
  301. package/src/core/ui-packs/ja.ts +1 -0
  302. package/src/core/ui-packs/ko.ts +1 -0
  303. package/src/core/ui-packs/nl.ts +1 -0
  304. package/src/core/ui-packs/no.ts +1 -0
  305. package/src/core/ui-packs/pl.ts +1 -0
  306. package/src/core/ui-packs/pt-br.ts +1 -0
  307. package/src/core/ui-packs/pt.ts +1 -0
  308. package/src/core/ui-packs/ro.ts +1 -0
  309. package/src/core/ui-packs/ru.ts +1 -0
  310. package/src/core/ui-packs/sk.ts +1 -0
  311. package/src/core/ui-packs/sr.ts +1 -0
  312. package/src/core/ui-packs/sv.ts +1 -0
  313. package/src/core/ui-packs/th.ts +1 -0
  314. package/src/core/ui-packs/tr.ts +1 -0
  315. package/src/core/ui-packs/uk.ts +1 -0
  316. package/src/core/ui-packs/vi.ts +1 -0
  317. package/src/core/ui-packs/zh-tw.ts +1 -0
  318. package/src/core/ui-packs/zh.ts +1 -0
  319. package/src/deploy/adapter-output.ts +7 -2
  320. package/src/deploy/adapters/cloudflare.ts +7 -5
  321. package/src/deploy/adapters/node.ts +47 -9
  322. package/src/deploy/adapters/types.ts +7 -3
  323. package/src/deploy/artifacts.ts +2 -1
  324. package/src/deploy/platforms/cloudflare.ts +13 -9
  325. package/src/deploy/platforms/netlify.ts +2 -1
  326. package/src/deploy/platforms/node.ts +12 -2
  327. package/src/deploy/platforms/types.ts +21 -7
  328. package/src/deploy/platforms/vercel.ts +113 -16
  329. package/src/deploy/redirects.ts +66 -6
  330. package/src/deploy/rss.ts +3 -1
  331. package/src/deploy/sitemap.ts +39 -5
  332. package/src/deploy/vercel-negotiation.ts +290 -102
  333. package/src/eval/agents.ts +18 -1
  334. package/src/eval/prompts.ts +6 -3
  335. package/src/eval/report.ts +34 -13
  336. package/src/eval/run.ts +5 -0
  337. package/src/markdown/relative-links.ts +3 -2
  338. package/src/openapi/checks.ts +273 -0
  339. package/src/openapi/graphql-build.ts +21 -0
  340. package/src/openapi/graphql.ts +11 -0
  341. package/src/openapi/model.ts +15 -3
  342. package/src/openapi/parse.ts +127 -2
  343. package/src/openapi/references.ts +43 -3
  344. package/src/openapi/source.ts +39 -14
  345. package/src/ratelimit/index.ts +1 -1
  346. package/src/ratelimit/runtime.ts +37 -19
  347. package/src/ratelimit/upstash.ts +40 -10
  348. package/src/reference/graphql.ts +15 -1
  349. package/src/reference/index.ts +1 -0
  350. package/src/reference/openapi.ts +2 -2
  351. package/src/reference/options.ts +29 -1
  352. package/src/registry/eject.ts +3 -1
  353. package/src/search/adapters/locale-scope.ts +30 -0
  354. package/src/search/adapters/typesense.ts +14 -4
  355. package/src/search/build.ts +21 -3
  356. package/src/search/orama-index.ts +163 -31
  357. package/src/search/source-pages.ts +29 -0
  358. package/src/search/sync/algolia.ts +99 -9
  359. package/src/search/sync/index.ts +52 -13
  360. package/src/search/sync/typesense.ts +72 -27
  361. package/src/sources/contentful.ts +12 -0
  362. package/src/sources/github-releases.ts +7 -1
  363. package/src/sources/shared.ts +3 -0
  364. package/src/theme/entry.ts +29 -3
  365. package/src/translate/validate.ts +23 -1
  366. package/dist/cli/chunk-0gz36akr.js.map +0 -12
  367. package/dist/cli/chunk-2n4ps1b3.js.map +0 -15
  368. package/dist/cli/chunk-43zcf4gz.js.map +0 -36
  369. package/dist/cli/chunk-4ejxbzee.js +0 -39
  370. package/dist/cli/chunk-4ejxbzee.js.map +0 -10
  371. package/dist/cli/chunk-4h8z9vv5.js.map +0 -16
  372. package/dist/cli/chunk-713mngdq.js.map +0 -14
  373. package/dist/cli/chunk-9xr4dgee.js.map +0 -10
  374. package/dist/cli/chunk-amrb6hgh.js +0 -145
  375. package/dist/cli/chunk-amrb6hgh.js.map +0 -11
  376. package/dist/cli/chunk-nd1821sk.js.map +0 -10
  377. package/dist/cli/chunk-rekqz4qg.js.map +0 -10
  378. package/dist/cli/chunk-ta27feev.js.map +0 -10
  379. package/dist/cli/chunk-xkz5xbtv.js.map +0 -213
  380. package/dist/cli/chunk-y5h4r2y0.js.map +0 -10
  381. /package/dist/cli/{chunk-gp84za0h.js.map → chunk-3v3ffbrj.js.map} +0 -0
  382. /package/dist/cli/{chunk-p804f3pe.js.map → chunk-8y2kmjv8.js.map} +0 -0
  383. /package/dist/cli/{chunk-2f7n4qzt.js.map → chunk-c1y538kd.js.map} +0 -0
  384. /package/dist/cli/{chunk-1n228xqb.js.map → chunk-c887fj0s.js.map} +0 -0
  385. /package/dist/cli/{chunk-cmtcnh9f.js.map → chunk-dzwehpy7.js.map} +0 -0
  386. /package/dist/cli/{chunk-ntv4qrt7.js.map → chunk-e9q7a2ak.js.map} +0 -0
  387. /package/dist/cli/{chunk-5wj2qwn2.js.map → chunk-ft9vfys6.js.map} +0 -0
  388. /package/dist/cli/{chunk-zhvd6adm.js.map → chunk-hx3xqnk9.js.map} +0 -0
  389. /package/dist/cli/{chunk-y4ykbark.js.map → chunk-kma9f6sf.js.map} +0 -0
  390. /package/dist/cli/{chunk-py62fewh.js.map → chunk-mrcccgnh.js.map} +0 -0
  391. /package/dist/cli/{chunk-2f3ndkpw.js.map → chunk-n0v7m8ry.js.map} +0 -0
  392. /package/dist/cli/{chunk-9geymqns.js.map → chunk-nq1d20w2.js.map} +0 -0
  393. /package/dist/cli/{chunk-g2z9x01v.js.map → chunk-nrns10mj.js.map} +0 -0
  394. /package/dist/cli/{chunk-e7vvk5ya.js.map → chunk-sds923fa.js.map} +0 -0
  395. /package/dist/cli/{chunk-yj17vs39.js.map → chunk-tdqhyxfz.js.map} +0 -0
  396. /package/dist/cli/{chunk-q3wxxq39.js.map → chunk-tphac74f.js.map} +0 -0
  397. /package/dist/cli/{chunk-6bm0xpgd.js.map → chunk-w1r4vase.js.map} +0 -0
@@ -1,4 +1,5 @@
1
- import type { Document, OperationObject } from "@scalar/openapi-types/3.1";
1
+ import type { Document, OperationObject } from "@scalar/openapi-types/3.2";
2
+ import type { GraphqlAuthOptions } from "../reference/options.ts";
2
3
  import type { AsyncApiAction, AsyncApiDocument, AsyncApiSpecValue } from "./asyncapi.ts";
3
4
  import type { GraphqlDocument, GraphqlMember } from "./graphql.ts";
4
5
  import type { ReferenceKind } from "./references.ts";
@@ -12,10 +13,18 @@ export { slugify } from "./references.ts";
12
13
  * Each operation is flattened into an {@link ApiOperationRef} with a real,
13
14
  * per-operation route so it becomes a first-class Blume page.
14
15
  */
15
- /** A normalized OpenAPI 3.1 document, internal `$ref`s intact. */
16
+ /**
17
+ * A normalized OpenAPI document, internal `$ref`s intact. Typed as 3.2, which
18
+ * is backward compatible with 3.1, so one type covers both the upgraded 3.1
19
+ * documents and the 3.2 ones read as written.
20
+ */
16
21
  export type ApiDocument = Document;
17
- /** The HTTP methods an OpenAPI path item may declare, in spec order. */
18
- export declare const HTTP_METHODS: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
22
+ /**
23
+ * The HTTP methods an OpenAPI path item may declare, in spec order. `query`
24
+ * is OpenAPI 3.2's (the QUERY method: a safe request that carries a body); a
25
+ * 3.1 path item can't declare it, so listing it changes nothing there.
26
+ */
27
+ export declare const HTTP_METHODS: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace", "query"];
19
28
  export type HttpMethod = (typeof HTTP_METHODS)[number];
20
29
  /** A stable, URL-safe key for an operation: its `operationId`, else method+path. */
21
30
  export declare const operationKey: (method: string, path: string, operationId?: string) => string;
@@ -79,6 +88,8 @@ export interface ApiSpecData {
79
88
  * (GraphQL only; OpenAPI documents carry their servers in the document).
80
89
  */
81
90
  endpoint?: string;
91
+ /** How the GraphQL endpoint authenticates (GraphQL only). */
92
+ auth?: GraphqlAuthOptions;
82
93
  /** Operations keyed by {@link ApiOperationRef.key}. */
83
94
  operations: Record<string, ApiOperationRef>;
84
95
  tags: ApiTagRef[];
@@ -1,8 +1,11 @@
1
1
  import type { AsyncApiDocument } from "./asyncapi.ts";
2
+ import type { SpecIssue } from "./checks.ts";
2
3
  import type { GraphqlDocument } from "./graphql.ts";
3
4
  import type { ApiDocument } from "./model.ts";
4
5
  export interface ParsedSpec {
5
6
  document: ApiDocument;
7
+ /** `x-codeSamples` entries whose `$ref` couldn't be inlined. */
8
+ issues: SpecIssue[];
6
9
  warnings: string[];
7
10
  }
8
11
  /**
@@ -1,4 +1,5 @@
1
1
  import type { ResolvedConfig } from "../core/schema.ts";
2
+ import type { GraphqlAuthOptions } from "../reference/options.ts";
2
3
  import type { ScalarOptions } from "../reference/scalar.ts";
3
4
  import type { ResolvedReferenceAdapter } from "../reference/schema.ts";
4
5
  export { normalizeRoute } from "../core/base-path.ts";
@@ -47,6 +48,12 @@ export interface ReferenceSource {
47
48
  */
48
49
  basePath: string;
49
50
  label: string;
51
+ /**
52
+ * The source's own `label`, when it sets one: it names the sidebar group
53
+ * of the source's route. An unlabeled source's group keeps the name its
54
+ * route gives it.
55
+ */
56
+ groupLabel?: string;
50
57
  /** Whether generated pages are included in llms.txt/llms-full.txt. */
51
58
  includeInLlms: boolean;
52
59
  /** Whether generated pages are included in site search. */
@@ -70,6 +77,8 @@ export interface ReferenceSource {
70
77
  * (GraphQL only — a schema, unlike an OpenAPI document, names no server).
71
78
  */
72
79
  endpoint?: string;
80
+ /** How the GraphQL endpoint authenticates (GraphQL only). */
81
+ auth?: GraphqlAuthOptions;
73
82
  /**
74
83
  * The `scalar()` adapter's own options (`scalar` kind only): `theme` plus
75
84
  * any Scalar config forwarded verbatim to `<ScalarComponent>`, which takes
@@ -112,6 +121,13 @@ export declare const resolveReferences: (config: ResolvedConfig) => ReferenceSou
112
121
  export declare const referenceRoutes: (config: ResolvedConfig) => string[];
113
122
  /** Blume-rendered references (every kind but Scalar), deduped by route (first wins). */
114
123
  export declare const blumeReferences: (config: ResolvedConfig) => BlumeReferenceSource[];
124
+ /**
125
+ * The local files every reference reads, as absolute paths: each spec and
126
+ * overlay that isn't an `http(s)` URL, resolved from the project root the way
127
+ * the parser resolves them. `blume dev` watches these, so an edit to a spec
128
+ * regenerates its reference like an edit to a page does.
129
+ */
130
+ export declare const referenceSpecFiles: (config: ResolvedConfig, root: string) => string[];
115
131
  /** Whether any reference is Scalar-rendered (gates the Scalar pages). */
116
132
  export declare const hasScalarReferences: (config: ResolvedConfig) => boolean;
117
133
  /**
@@ -24,4 +24,4 @@ export { memory } from "./memory.ts";
24
24
  export type { MemoryAdapter, RateLimitOptions } from "./memory.ts";
25
25
  export type { RateLimitAdapter } from "./schema.ts";
26
26
  export { upstash } from "./upstash.ts";
27
- export type { UpstashAdapter } from "./upstash.ts";
27
+ export type { UpstashAdapter, UpstashOptions } from "./upstash.ts";
@@ -22,6 +22,8 @@ export declare const rateLimitAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
22
22
  options: z.ZodObject<{
23
23
  requests: z.ZodOptional<z.ZodNumber>;
24
24
  window: z.ZodOptional<z.ZodNumber>;
25
+ tokenEnv: z.ZodOptional<z.ZodString>;
26
+ urlEnv: z.ZodOptional<z.ZodString>;
25
27
  }, z.core.$strict>;
26
28
  requiredSecrets: z.ZodArray<z.ZodString>;
27
29
  runtimeDeps: z.ZodArray<z.ZodString>;
@@ -55,6 +57,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
55
57
  options: z.ZodObject<{
56
58
  requests: z.ZodOptional<z.ZodNumber>;
57
59
  window: z.ZodOptional<z.ZodNumber>;
60
+ tokenEnv: z.ZodOptional<z.ZodString>;
61
+ urlEnv: z.ZodOptional<z.ZodString>;
58
62
  }, z.core.$strict>;
59
63
  requiredSecrets: z.ZodArray<z.ZodString>;
60
64
  runtimeDeps: z.ZodArray<z.ZodString>;
@@ -80,6 +84,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
80
84
  options: {
81
85
  requests?: number | undefined;
82
86
  window?: number | undefined;
87
+ tokenEnv?: string | undefined;
88
+ urlEnv?: string | undefined;
83
89
  };
84
90
  requiredSecrets: string[];
85
91
  runtimeDeps: string[];
@@ -105,6 +111,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
105
111
  options: {
106
112
  requests?: number | undefined;
107
113
  window?: number | undefined;
114
+ tokenEnv?: string | undefined;
115
+ urlEnv?: string | undefined;
108
116
  };
109
117
  requiredSecrets: string[];
110
118
  runtimeDeps: string[];
@@ -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
  };