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
@@ -33,5 +33,8 @@ export declare const snapshotCache: (cacheDir: string) => SnapshotCache;
33
33
  * snapshot exists, serve it without fetching (cache-first dev). On fetch failure,
34
34
  * serve the last-known-good snapshot with a warning so a CMS/network outage
35
35
  * doesn't fail the build; if there is no snapshot either, surface a hard error.
36
+ * A `BlumeError` from the source (a missing SDK or token, checked before any
37
+ * request, or a misconfiguration) already names its cause, so without a
38
+ * snapshot it surfaces as itself rather than as a fetch failure.
36
39
  */
37
40
  export declare const loadWithCache: (name: string, cache: SnapshotCache, fetchEntries: () => Promise<SourceEntry[]>, refresh?: boolean) => Promise<SourceLoadResult>;
@@ -1,20 +1,29 @@
1
1
  /**
2
2
  * Contentful rich text → Markdown. Covers the block, inline, and mark types
3
3
  * the Rich Text editor emits; embedded entries fall through to a serializer
4
- * keyed by content type or are noted in a comment. Links to assets and
4
+ * keyed by content type or are noted in a comment, and a link to an entry
5
+ * points at its page when the source says it has one. Links to assets and
5
6
  * entries arrive unresolved from the Delivery API (`data.target` is a
6
7
  * `sys` link), so the source hands in resolvers over the response's
7
8
  * `includes`; a document the SDK already resolved (with `fields` inline)
8
9
  * lowers the same way.
9
10
  */
10
11
  import type { JsonObject } from "./json.ts";
11
- /** An asset's file as a Markdown image needs it. */
12
+ /** An asset's file as a Markdown image or link needs it. */
12
13
  export interface ContentfulAsset {
14
+ /** The file's MIME type; an asset that isn't an image renders as a link. */
15
+ contentType?: string;
13
16
  description?: string;
17
+ fileName?: string;
14
18
  title?: string;
15
19
  url: string;
16
20
  }
17
21
  export interface ContentfulRichTextOptions {
22
+ /**
23
+ * The route of a linked entry's page; an entry hyperlink to an entry with
24
+ * none keeps only its text.
25
+ */
26
+ entryHref?: (entry: JsonObject) => string | undefined;
18
27
  /** Resolve an asset link (`data.target.sys.id`) to its file. */
19
28
  resolveAsset?: (id: string) => ContentfulAsset | null;
20
29
  /** Resolve an entry link to the entry (`sys` plus `fields`). */
@@ -1,3 +1,4 @@
1
+ import type { ResolvedI18nConfig, ResolvedVersionsConfig } from "../schema.ts";
1
2
  import type { JsonObject } from "./json.ts";
2
3
  import type { RemoteFieldMap } from "./remote.ts";
3
4
  import type { ContentSource, SourceContext } from "./types.ts";
@@ -8,10 +9,24 @@ export interface ContentfulSourceOptions {
8
9
  space: string;
9
10
  /** Environment id; default `master`. */
10
11
  environment?: string;
12
+ /**
13
+ * Delivery API host name; default `cdn.contentful.com`. A space with EU
14
+ * data residency reads from `cdn.eu.contentful.com`.
15
+ */
16
+ host?: string;
17
+ /**
18
+ * Preview API host name for `--preview`; default `preview.contentful.com`
19
+ * (`preview.eu.contentful.com` for EU data residency).
20
+ */
21
+ previewHost?: string;
11
22
  /** The content type id whose entries become pages. */
12
23
  contentType: string;
13
24
  /** Locale code to fetch; omit for the space's default locale. */
14
25
  locale?: string;
26
+ /** The project's i18n config, which places an entry's route by its slug. */
27
+ i18n?: ResolvedI18nConfig;
28
+ /** The project's versions config, which places an entry's route by its slug. */
29
+ versions?: ResolvedVersionsConfig;
15
30
  /**
16
31
  * Field ids mapping an entry onto Blume meta + body. Paths resolve against
17
32
  * the entry's `fields`, with `sys` reachable as `sys.<key>`. Defaults:
@@ -35,6 +50,7 @@ export interface ContentfulSourceOptions {
35
50
  * Contentful content source. Pages through the Delivery API (the Preview API
36
51
  * under `--preview`), maps each entry's fields to frontmatter, and lowers its
37
52
  * rich text body to Markdown with the page's `includes` resolving asset and
38
- * entry links.
53
+ * entry links. An entry hyperlink to another of the source's entries links
54
+ * to that entry's page.
39
55
  */
40
56
  export declare const contentfulSource: (options: ContentfulSourceOptions, ctx?: SourceContext) => ContentSource;
@@ -9,6 +9,11 @@ import type { JsonObject } from "./json.ts";
9
9
  export interface LexicalOptions {
10
10
  /** The CMS origin a relative upload URL (`/media/x.png`) resolves against. */
11
11
  baseUrl?: string;
12
+ /**
13
+ * Called with the label of each node left out as a comment (a block with
14
+ * no serializer, a node type with no Markdown), so the source can warn.
15
+ */
16
+ onUnsupported?: (what: string) => void;
12
17
  /** Serializers for `block`/`inlineBlock` nodes, keyed by `fields.blockType`. */
13
18
  serializers?: Record<string, (fields: JsonObject) => string>;
14
19
  }
@@ -45,6 +45,13 @@ export declare const codeSpan: (code: string) => string;
45
45
  export declare const guardBlockStart: (text: string) => string;
46
46
  /** A block's inline content as Markdown. */
47
47
  export declare const renderInline: (parts: InlinePart[]) => string;
48
+ /**
49
+ * A block's inline content as MDX source, for a source whose site author
50
+ * opted in to reading its text that way: marks still become delimiters and
51
+ * code stays a code span, but the text goes in as typed, so a component, an
52
+ * expression, or Markdown written in the CMS renders.
53
+ */
54
+ export declare const renderInlineMdx: (parts: InlinePart[]) => string;
48
55
  /** A link or image destination as Markdown carries it verbatim. */
49
56
  export declare const destination: (url: string) => string;
50
57
  /**
@@ -54,9 +61,10 @@ export declare const destination: (url: string) => string;
54
61
  * `data:`) never becomes a clickable link on the docs site (see
55
62
  * `safe-links.ts`). The parts stay parts then, so their runs merge with their
56
63
  * neighbors'. A label escapes a bare URL too: GFM autolinks nothing inside a
57
- * link, so its specials would read as syntax.
64
+ * link, so its specials would read as syntax — unless `mdx` reads the label
65
+ * as MDX source, like {@link renderInlineMdx}.
58
66
  */
59
- export declare const linkParts: (parts: InlinePart[], href?: string) => InlinePart[];
67
+ export declare const linkParts: (parts: InlinePart[], href?: string, mdx?: boolean) => InlinePart[];
60
68
  /** The ATX prefix for a heading level, clamped to Markdown's six. */
61
69
  export declare const headingPrefix: (level: number) => string;
62
70
  /** Quote every line of a block. */
@@ -1,5 +1,6 @@
1
+ import type { YAMLException } from "js-yaml";
1
2
  import type { ResolvedI18nConfig } from "../schema.ts";
2
- import type { Diagnostic, Heading, PageLink, PageRecord } from "../types.ts";
3
+ import type { Diagnostic, ExampleUse, Heading, PageLink, PageRecord } from "../types.ts";
3
4
  import type { NormalizeContext, SourceEntry } from "./types.ts";
4
5
  /**
5
6
  * Slugify a content/route slug (Sanity, Notion, frontmatter `slug`). Heading
@@ -30,6 +31,16 @@ export declare const slugifyPath: (text: string) => string;
30
31
  * reports this instead of publishing a route that can never render.
31
32
  */
32
33
  export declare const unloadablePathDiagnostic: (path: string, file: string) => Diagnostic | undefined;
34
+ /**
35
+ * The error for a content file whose front matter isn't valid YAML — most
36
+ * often an unquoted value holding `: `, which YAML reads as a nested mapping.
37
+ * Thrown out of a source's scan, it would fail every command with
38
+ * BLUME_INTERNAL; a source leaves the file out and reports this instead, like
39
+ * a page whose front matter fails the schema. js-yaml counts lines from the
40
+ * text after the opening `---`, which starts with the rest of that fence
41
+ * line, so its 0-based line is already the file's line minus one.
42
+ */
43
+ export declare const frontmatterYamlDiagnostic: (error: YAMLException, file: string) => Diagnostic;
33
44
  export declare const HTML_COMMENT: RegExp;
34
45
  export declare const INLINE_CODE: RegExp;
35
46
  /** A heading whose trailing `{#id}` marker is unescaped — see `BARE_CURLY_MARKER`. */
@@ -37,6 +48,8 @@ export interface CurlyMarker {
37
48
  id: string;
38
49
  /** 1-based line of the heading (a setext heading's first text line) in the body. */
39
50
  line: number;
51
+ /** The braces as written (`{#id}`, `{ #id }`, `{: #id }`). */
52
+ marker: string;
40
53
  }
41
54
  /** Where a heading's text ends in the scanned text, for appending a marker. */
42
55
  export interface HeadingSite {
@@ -74,6 +87,12 @@ export declare const MD_IMAGE: RegExp;
74
87
  /** Column (0-based, within `matched`) where a link/image match's target starts. */
75
88
  export declare const targetOffsetIn: (matched: string, target: string, title: string | undefined) => number;
76
89
  export declare const extractLinks: (body: string, lineOffset?: number) => PageLink[];
90
+ /**
91
+ * Every `<Component path>` in an `.mdx` body, with the 1-based position of its
92
+ * value; lines are shifted by `lineOffset`, as {@link extractLinks} does. Code
93
+ * blocks and inline code are skipped.
94
+ */
95
+ export declare const extractExampleUses: (body: string, lineOffset?: number) => ExampleUse[];
77
96
  export declare const extractComponentTags: (body: string) => string[];
78
97
  /**
79
98
  * Height of the frontmatter block stripped from `raw` to produce `body` (0
@@ -115,6 +115,14 @@ export interface NotionSourceOptions {
115
115
  * Status/select property are always imported as published.
116
116
  */
117
117
  publishedValue?: string;
118
+ /**
119
+ * Read the text of text blocks (paragraphs, headings, list items, quotes,
120
+ * callouts) as MDX source, so a component, expression, or Markdown typed in
121
+ * Notion renders instead of showing as written. MDX runs code at build
122
+ * time, so this hands everyone who can edit the database the site's build:
123
+ * set it only when you trust them with that. Default false.
124
+ */
125
+ mdx?: boolean;
118
126
  /** Opt-in dev polling interval (seconds); omit to freeze for the session. */
119
127
  pollInterval?: number;
120
128
  /** Injected for tests; otherwise built from `@notionhq/client`. */
@@ -1,3 +1,5 @@
1
+ import { BlumeError } from "../diagnostics.ts";
2
+ import type { Diagnostic } from "../types.ts";
1
3
  import type { JsonObject, JsonValue } from "./json.ts";
2
4
  import type { ContentSource, SourceContext, SourceEntry } from "./types.ts";
3
5
  /** What every REST-backed CMS source needs to be a staged, cached source. */
@@ -9,8 +11,13 @@ export interface RemoteSourceOptions {
9
11
  * offline warning.
10
12
  */
11
13
  assertConfigured?: () => void;
12
- /** Pull every entry from the API; called on refresh and on each poll. */
13
- fetchEntries: () => Promise<SourceEntry[]>;
14
+ /**
15
+ * Pull every entry from the API; called on refresh and on each poll.
16
+ * `warn` reports a problem with the content itself (an embed the API
17
+ * couldn't resolve, a node with no Markdown), which the load returns
18
+ * beside the entries; a load served from the snapshot repeats none.
19
+ */
20
+ fetchEntries: (warn: (diagnostic: Diagnostic) => void) => Promise<SourceEntry[]>;
14
21
  name: string;
15
22
  /** Opt-in dev polling interval (seconds); omit to freeze for the session. */
16
23
  pollInterval?: number;
@@ -29,6 +36,9 @@ export declare const remoteSource: (options: RemoteSourceOptions, ctx?: SourceCo
29
36
  export interface RemoteFrontmatter {
30
37
  description?: string;
31
38
  draft?: boolean;
39
+ sidebar?: {
40
+ order: number;
41
+ };
32
42
  title?: string;
33
43
  }
34
44
  /**
@@ -37,6 +47,13 @@ export interface RemoteFrontmatter {
37
47
  * `writesMdx`).
38
48
  */
39
49
  export declare const stagedEntry: (slug: string, data: RemoteFrontmatter, markdown: string, lastModified: string | undefined, format?: "md" | "mdx") => SourceEntry;
50
+ /**
51
+ * The error a source throws before its first request when the token its API
52
+ * always requires is unset (Notion, Contentful's Delivery API). Sent without
53
+ * one, the request could only fail, and the build would report the API's
54
+ * wording as a fetch failure instead of the variable to set.
55
+ */
56
+ export declare const missingSecretError: (name: string, env: string) => BlumeError;
40
57
  /** How a source calls its CMS: the API's auth headers and an injectable fetch. */
41
58
  export interface RestClient {
42
59
  /** Injected for tests; defaults to the global `fetch`. */
@@ -67,18 +84,28 @@ export interface RemoteFieldMap {
67
84
  description?: string;
68
85
  /** Field holding the last-modified ISO date. */
69
86
  lastModified?: string;
87
+ /** Field holding the sidebar order (a number); no default. */
88
+ order?: string;
70
89
  /** Field holding the route slug. */
71
90
  slug?: string;
72
91
  /** Field holding the page title. */
73
92
  title?: string;
74
93
  }
94
+ /** A field map with its defaults filled in; `order` is read only when set. */
95
+ export type RemoteFields = Required<Omit<RemoteFieldMap, "order">> & Pick<RemoteFieldMap, "order">;
96
+ /**
97
+ * The slug a document's staged entry is named by. It falls back to the
98
+ * document's id when the slug field is missing or slugifies to nothing (pure
99
+ * punctuation), so distinct documents never collapse onto one
100
+ * `untitled.md`; a slashed slug keeps its segments.
101
+ */
102
+ export declare const documentSlug: (doc: JsonObject, slugField: string, id: string) => string;
75
103
  /**
76
- * Map a document to a staged entry. The slug falls back to the document's id
77
- * when the slug field is missing or slugifies to nothing (pure punctuation),
78
- * so distinct documents never collapse onto one `untitled.md`; a slashed
79
- * slug keeps its segments. A string body is Markdown and passes through as
80
- * `.md`, its unsafe links reduced to their labels; any other shape goes to
81
- * the CMS's lowerer, and is written as `.mdx`
82
- * when `lowersToMdx` (the source has serializers, see `writesMdx`).
104
+ * Map a document to a staged entry named by its {@link documentSlug}. A
105
+ * number in the `order` field, when one is mapped, becomes the page's
106
+ * sidebar order. A string body is Markdown and passes through as `.md`, its
107
+ * unsafe links reduced to their labels; any other shape goes to the CMS's
108
+ * lowerer, and is written as `.mdx` when `lowersToMdx` (the source has
109
+ * serializers, see `writesMdx`).
83
110
  */
84
- export declare const documentEntry: (doc: JsonObject, fields: Required<RemoteFieldMap>, id: string, lower: (body: JsonValue) => string, draft?: boolean, lowersToMdx?: boolean) => SourceEntry;
111
+ export declare const documentEntry: (doc: JsonObject, fields: RemoteFields, id: string, lower: (body: JsonValue) => string, draft?: boolean, lowersToMdx?: boolean) => SourceEntry;
@@ -12,7 +12,7 @@ export interface SanityFieldMap {
12
12
  description?: string;
13
13
  /** Route slug (dot path); default `slug.current`. */
14
14
  slug?: string;
15
- /** Portable Text body field; default `body`. */
15
+ /** Body field, Portable Text or a Markdown string; default `body`. */
16
16
  body?: string;
17
17
  /** Last-modified ISO date; default `_updatedAt`. */
18
18
  lastModified?: string;
@@ -51,6 +51,10 @@ export interface PageLink {
51
51
  * only those go through the image pipeline; a plain link to the same path
52
52
  * resolves as a site route. */
53
53
  image?: boolean;
54
+ /** Set when the target is a lowercase `<a href>`, which ships as written:
55
+ * the Markdown pipeline neither resolves its relative path file-style nor
56
+ * mounts the base path on it, so it's checked the way a browser reads it. */
57
+ raw?: boolean;
54
58
  /** 1-based line number in the source file. */
55
59
  line: number;
56
60
  /** 1-based column of the target within the line. */
@@ -60,6 +64,17 @@ export interface PageLink {
60
64
  * here so authors fix the partial, not the page that spliced it. */
61
65
  file?: string;
62
66
  }
67
+ /** A `<Component path="…">` in a page, located like a {@link PageLink}. */
68
+ export interface ExampleUse {
69
+ /** The example's key as written: its path under `examples/`, sans extension. */
70
+ path: string;
71
+ /** 1-based line number in the source file. */
72
+ line: number;
73
+ /** 1-based column of the `path` value within the line. */
74
+ column: number;
75
+ /** Absolute path of the included partial it was written in, if not the page. */
76
+ file?: string;
77
+ }
63
78
  /**
64
79
  * Resolved project paths. Computed once per CLI invocation and threaded
65
80
  * through the core pipeline.
@@ -185,6 +200,8 @@ export interface PageRecord {
185
200
  links: PageLink[];
186
201
  /** Capitalized JSX component tags used in the body (`.mdx` only). */
187
202
  componentsUsed?: string[];
203
+ /** The string `path` of each `<Component>` example in the body (`.mdx` only). */
204
+ examplesUsed?: ExampleUse[];
188
205
  /** Resolved "last updated" ISO date, when the feature is enabled. */
189
206
  lastModified?: string;
190
207
  /** Absolute paths of files this page `<include>`s, transitively. Drives the
@@ -13,7 +13,8 @@ export declare const deployOutputDir: (config: ResolvedConfig, context: ProjectC
13
13
  * served. A static build serves `dist/` wherever it lands; a server build
14
14
  * serves what its platform declares — the Build Output tree's `static/` half
15
15
  * on Vercel, Astro's `build.client` dir (`dist/client/`) on Node and
16
- * Cloudflare, `dist/` on Netlify.
16
+ * Cloudflare, `dist/` on Netlify. On Vercel and Cloudflare that's its
17
+ * `<base>/` directory under `deployment.base`, where the files land.
17
18
  */
18
19
  export declare const deployStaticDir: (config: ResolvedConfig, context: ProjectContext) => string;
19
20
  /**
@@ -31,10 +31,12 @@ export declare const cloudflareAdapterSchema: import("zod").ZodObject<{
31
31
  runtimeDeps: import("zod").ZodArray<import("zod").ZodString>;
32
32
  }, import("zod/v4/core").$strict>;
33
33
  /**
34
- * Cloudflare Workers and Pages. A server build emits a Worker into
35
- * `dist/server` (with a generated wrapper that answers `Accept:
36
- * text/markdown`) and serves `dist/client` through the ASSETS binding.
37
- * `@astrojs/cloudflare` is an optional peer: install it in the project
38
- * (`npm install @astrojs/cloudflare`).
34
+ * Cloudflare. A server build targets Workers only (`@astrojs/cloudflare`
35
+ * dropped Pages in v13): it emits a Worker into `dist/server` (with a
36
+ * generated wrapper that answers `Accept: text/markdown`) and serves
37
+ * `dist/client` through the ASSETS binding. A static build
38
+ * (`output: "static"`) never loads the adapter, and its `dist/` deploys to
39
+ * Pages or to Workers static assets. `@astrojs/cloudflare` is an optional
40
+ * peer: install it in the project (`npm install @astrojs/cloudflare`).
39
41
  */
40
42
  export declare const cloudflare: (options?: CloudflareOptions) => CloudflareAdapter;
@@ -1,37 +1,72 @@
1
+ import { z } from "zod";
1
2
  import type { DeployAdapter, DeployOptions } from "./types.ts";
2
3
  /** The Astro adapter package a Node server build imports. */
3
4
  export declare const NODE_ADAPTER_PACKAGE = "@astrojs/node";
4
5
  /**
5
- * Options for {@link node}: `output`, `site`, and `base`, plus any option of
6
- * `@astrojs/node` forwarded verbatim (`mode`, `staticHeaders`, …). Blume
7
- * defaults `mode` to `"standalone"`; an option you pass wins. `host` and
8
- * `port` are forwarded too, but `@astrojs/node` replaces both with Astro's
9
- * own server settings, so the standalone server listens on `localhost:4321`
10
- * unless the `HOST` and `PORT` environment variables are set when it starts.
6
+ * A host the server trusts forwarded headers for, in Astro's
7
+ * `security.allowedDomains` shape: each field set must match.
11
8
  */
12
- export type NodeOptions = DeployOptions;
13
- export type NodeAdapter = DeployAdapter<"node">;
14
- export declare const nodeOptionsSchema: import("zod").ZodObject<{
15
- base: import("zod").ZodOptional<import("zod").ZodString>;
16
- output: import("zod").ZodOptional<import("zod").ZodEnum<{
9
+ export type NodeAllowedDomain = {
10
+ /** The host, like `docs.example.com`; `*.example.com` matches subdomains. */
11
+ hostname?: string;
12
+ /** The port, as a string. */
13
+ port?: string;
14
+ /** The scheme, like `https`. */
15
+ protocol?: string;
16
+ };
17
+ /**
18
+ * Options for {@link node}: `output`, `site`, `base`, and `allowedDomains`,
19
+ * plus any option of `@astrojs/node` forwarded verbatim (`mode`,
20
+ * `staticHeaders`, …). Blume defaults `mode` to `"standalone"`; an option you
21
+ * pass wins. `host` and `port` are forwarded too, but `@astrojs/node`
22
+ * replaces both with Astro's own server settings, so the standalone server
23
+ * listens on `localhost:4321` unless the `HOST` and `PORT` environment
24
+ * variables are set when it starts.
25
+ */
26
+ export type NodeOptions = DeployOptions & {
27
+ /**
28
+ * The hosts a reverse proxy in front of the server answers for, set as
29
+ * Astro's `security.allowedDomains`. A request whose `Host` (or
30
+ * `X-Forwarded-Host`) matches one is trusted to name the reader in
31
+ * `X-Forwarded-For`, which the rate limit counts by; otherwise every
32
+ * reader counts as the proxy's address. Only list them when a proxy sets
33
+ * that header on every request, since a reader could otherwise send their
34
+ * own.
35
+ */
36
+ allowedDomains?: NodeAllowedDomain[];
37
+ };
38
+ export type NodeAdapter = DeployAdapter<"node", NodeOptions>;
39
+ export declare const nodeOptionsSchema: z.ZodObject<{
40
+ base: z.ZodOptional<z.ZodString>;
41
+ output: z.ZodOptional<z.ZodEnum<{
17
42
  static: "static";
18
43
  server: "server";
19
44
  }>>;
20
- site: import("zod").ZodOptional<import("zod").ZodURL>;
21
- }, import("zod/v4/core").$catchall<import("zod").ZodJSONSchema>>;
22
- export declare const nodeAdapterSchema: import("zod").ZodObject<{
23
- kind: import("zod").ZodLiteral<"node">;
24
- options: import("zod").ZodObject<{
25
- base: import("zod").ZodOptional<import("zod").ZodString>;
26
- output: import("zod").ZodOptional<import("zod").ZodEnum<{
45
+ site: z.ZodOptional<z.ZodURL>;
46
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ hostname: z.ZodOptional<z.ZodString>;
48
+ port: z.ZodOptional<z.ZodString>;
49
+ protocol: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strict>>>;
51
+ }, z.core.$catchall<z.ZodJSONSchema>>;
52
+ export declare const nodeAdapterSchema: z.ZodObject<{
53
+ kind: z.ZodLiteral<"node">;
54
+ options: z.ZodObject<{
55
+ base: z.ZodOptional<z.ZodString>;
56
+ output: z.ZodOptional<z.ZodEnum<{
27
57
  static: "static";
28
58
  server: "server";
29
59
  }>>;
30
- site: import("zod").ZodOptional<import("zod").ZodURL>;
31
- }, import("zod/v4/core").$catchall<import("zod").ZodJSONSchema>>;
32
- requiredSecrets: import("zod").ZodArray<import("zod").ZodString>;
33
- runtimeDeps: import("zod").ZodArray<import("zod").ZodString>;
34
- }, import("zod/v4/core").$strict>;
60
+ site: z.ZodOptional<z.ZodURL>;
61
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
+ hostname: z.ZodOptional<z.ZodString>;
63
+ port: z.ZodOptional<z.ZodString>;
64
+ protocol: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strict>>>;
66
+ }, z.core.$catchall<z.ZodJSONSchema>>;
67
+ requiredSecrets: z.ZodArray<z.ZodString>;
68
+ runtimeDeps: z.ZodArray<z.ZodString>;
69
+ }, z.core.$strict>;
35
70
  /**
36
71
  * A self-hosted Node server (containers, VMs). The standalone server in
37
72
  * `dist/server/entry.mjs` serves `dist/client` itself. `@astrojs/node` is one
@@ -67,6 +67,11 @@ export declare const resolvedDeploymentSchema: z.ZodPipe<z.ZodDiscriminatedUnion
67
67
  server: "server";
68
68
  }>>;
69
69
  site: z.ZodOptional<z.ZodURL>;
70
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
+ hostname: z.ZodOptional<z.ZodString>;
72
+ port: z.ZodOptional<z.ZodString>;
73
+ protocol: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strict>>>;
70
75
  }, z.core.$catchall<z.ZodJSONSchema>>;
71
76
  requiredSecrets: z.ZodArray<z.ZodString>;
72
77
  runtimeDeps: z.ZodArray<z.ZodString>;
@@ -113,6 +118,11 @@ export declare const resolvedDeploymentSchema: z.ZodPipe<z.ZodDiscriminatedUnion
113
118
  base?: string | undefined;
114
119
  output?: "static" | "server" | undefined;
115
120
  site?: string | undefined;
121
+ allowedDomains?: {
122
+ hostname?: string | undefined;
123
+ port?: string | undefined;
124
+ protocol?: string | undefined;
125
+ }[] | undefined;
116
126
  };
117
127
  requiredSecrets: string[];
118
128
  runtimeDeps: string[];
@@ -67,9 +67,10 @@ export declare const deployOptionsSchema: z.ZodObject<{
67
67
  }, z.core.$catchall<z.ZodJSONSchema>>;
68
68
  /**
69
69
  * The options Blume does not name — what reaches the `@astrojs/*` adapter's
70
- * constructor verbatim.
70
+ * constructor verbatim. `configOptions` are the ones a host adapter names
71
+ * itself, for the Astro config rather than the constructor.
71
72
  */
72
- export declare const deployPassthrough: (options: DeployOptions) => Record<string, JsonValue>;
73
+ export declare const deployPassthrough: (options: DeployOptions, configOptions?: readonly string[]) => Record<string, JsonValue>;
73
74
  /**
74
75
  * The runtime dependency a host adapter declares: its `@astrojs/*` package,
75
76
  * which the generated `astro.config.mjs` imports for a server build and
@@ -40,8 +40,9 @@
40
40
  * Cloudflare does not apply `_headers` to worker-first routes, so the wrapper
41
41
  * also re-stamps what the static layer would otherwise add on the routes it
42
42
  * takes over: the homepage agent-discovery `Link` header, the Markdown
43
- * `charset=utf-8`, and the sandbox on the SVGs a content source downloaded
44
- * (see `deploy/headers.ts`). The raw `.md`/`.mdx` URLs are
43
+ * `charset=utf-8`, the sandbox on the SVGs a content source downloaded (see
44
+ * `deploy/headers.ts`), and `X-Powered-By` unless `poweredBy` is `false`. The
45
+ * raw `.md`/`.mdx` URLs are
45
46
  * exempted from worker-first routing with negative rules, keeping their
46
47
  * `_headers` treatment and their zero-Worker serving path.
47
48
  *
@@ -133,6 +134,8 @@ export interface NegotiationWorkerOptions {
133
134
  base?: string;
134
135
  /** Homepage agent-discovery `Link` header (see `ai/link-headers.ts`). */
135
136
  homeLinkHeader?: string | null;
137
+ /** Whether responses identify Blume with `X-Powered-By`. Defaults to `true`. */
138
+ poweredBy?: boolean;
136
139
  /** Estimated token count of the homepage Markdown mirror. */
137
140
  homeTokens?: number;
138
141
  /** Configured redirects the wrapper answers with their exact status. */
@@ -54,6 +54,8 @@ export declare const nodePatternRedirects: (project: BlumeProject) => CompiledRe
54
54
  export interface NodeEntryOptions {
55
55
  /** `deployment.base`, normalized (`""` at the root). */
56
56
  base?: string;
57
+ /** Whether responses identify Blume with `X-Powered-By`. Defaults to `true`. */
58
+ poweredBy?: boolean;
57
59
  /** The configured redirects, from {@link nodeRedirects}. */
58
60
  redirects?: NodeRedirects;
59
61
  /** The configured pattern redirects, from {@link nodePatternRedirects}. */
@@ -63,7 +65,12 @@ export interface NodeEntryOptions {
63
65
  * The entry that replaces Astro's: it answers a configured redirect with its
64
66
  * exact status, and otherwise stamps the rules' headers on the response and
65
67
  * hands the request to Astro's handler. `send` leaves a Content-Type that is
66
- * already set alone, so the registered media type wins.
68
+ * already set alone, so the registered media type wins. Unless `poweredBy` is
69
+ * `false`, every answer also names Blume in `X-Powered-By` — the redirects,
70
+ * and the prerendered pages and files the static handler serves, which
71
+ * Blume's runtime middleware never sees. A middleware-mode entry leaves that
72
+ * header to the middleware: Astro hands a request it has no route for back to
73
+ * the host app through `next()`, and that response is the host's own.
67
74
  *
68
75
  * A rule matches the file the static handler will serve, not the raw URL:
69
76
  * Astro strips the base when it leads the path and serves the rest from the
@@ -81,8 +88,9 @@ export interface NodeEntryOptions {
81
88
  */
82
89
  export declare const nodeEntryWrapper: (rules: readonly NodeHeaderRule[], options?: NodeEntryOptions) => string;
83
90
  /**
84
- * Put the wrapper in front of a Node server build's entry. A build with no
85
- * rule (no API catalog, AI catalog, MCP server, signatures directory, or
86
- * downloaded content assets) and no redirect leaves Astro's entry alone.
91
+ * Put the wrapper in front of a Node server build's entry. A build with
92
+ * `poweredBy` off, no rule (no API catalog, AI catalog, MCP server,
93
+ * signatures directory, or downloaded content assets), and no redirect leaves
94
+ * Astro's entry alone.
87
95
  */
88
96
  export declare const wrapNodeEntry: (project: BlumeProject, log: BuildLog) => Promise<void>;
@@ -34,12 +34,15 @@ export declare const nameCloudflareWorker: (project: BlumeProject, log: BuildLog
34
34
  */
35
35
  export declare const bindCloudflareRateLimit: (project: BlumeProject, log: BuildLog) => Promise<void>;
36
36
  /**
37
- * Cloudflare Workers and Pages. A server build emits the Worker into
38
- * `dist/server` and serves `dist/client` through the ASSETS binding, which
39
- * honors `_headers` from that directory exactly as Pages does — so the file
40
- * applies to both output modes here. Without a configured driver the adapter
41
- * force-enables KV-backed sessions and declares a `SESSION` binding that
42
- * `wrangler deploy` then demands a namespace for, even though Blume never
43
- * reads `Astro.session`; `session: false` opts the project out.
37
+ * Cloudflare. A server build targets Workers only (`@astrojs/cloudflare`
38
+ * dropped Pages in v13): it emits the Worker into `dist/server` and serves
39
+ * `dist/client` through the ASSETS binding, which honors `_headers` from that
40
+ * directory exactly as Pages does — so the file applies to both output modes
41
+ * here. A static build never loads the adapter; its `dist/` deploys to Pages,
42
+ * whose build environment `env` detects, or to Workers static assets (Workers
43
+ * Builds exposes no site URL to detect). Without a configured driver the
44
+ * adapter force-enables KV-backed sessions and declares a `SESSION` binding
45
+ * that `wrangler deploy` then demands a namespace for, even though Blume
46
+ * never reads `Astro.session`; `session: false` opts the project out.
44
47
  */
45
48
  export declare const cloudflarePlatform: DeployPlatform;
@@ -7,6 +7,8 @@ import type { DeployPlatform } from "./types.ts";
7
7
  * discovery files and downloaded SVGs need instead, and answers the
8
8
  * configured redirects with their exact status, which Astro's own handler
9
9
  * would default to 301 or 308. No platform env to detect: the site URL has to
10
- * be configured.
10
+ * be configured. `allowedDomains` becomes Astro's `security.allowedDomains`,
11
+ * which a server behind a reverse proxy needs before Astro reads the reader's
12
+ * address from `X-Forwarded-For`.
11
13
  */
12
14
  export declare const nodePlatform: DeployPlatform;
@@ -2,7 +2,7 @@ import type { JsonValue } from "../../core/adapter.ts";
2
2
  import type { BlumeProject } from "../../core/project-graph.ts";
3
3
  import type { ResolvedConfig } from "../../core/schema.ts";
4
4
  import type { ProjectContext } from "../../core/types.ts";
5
- import type { DeployAdapterKind } from "../adapters/registry.ts";
5
+ import type { DeployAdapterKind, ResolvedDeployOptions } from "../adapters/registry.ts";
6
6
  import type { DeployOutput } from "../adapters/types.ts";
7
7
  /**
8
8
  * Everything Blume does differently per deployment target, keyed by the
@@ -13,8 +13,16 @@ import type { DeployOutput } from "../adapters/types.ts";
13
13
  */
14
14
  /** How the generated `astro.config.mjs` constructs the `@astrojs/*` adapter. */
15
15
  export interface AstroAdapterSpec {
16
- /** Top-level `defineConfig` entries the adapter needs beside itself. */
17
- config: Record<string, JsonValue>;
16
+ /**
17
+ * Top-level `defineConfig` entries the adapter needs beside itself, some
18
+ * of them set from the deployment's own options.
19
+ */
20
+ config: (options: ResolvedDeployOptions) => Record<string, JsonValue>;
21
+ /**
22
+ * The deployment options `config` reads, which therefore stay out of the
23
+ * passthrough to the `@astrojs/*` constructor.
24
+ */
25
+ configOptions: string[];
18
26
  /** Blume's own constructor options; the user's passthrough is spread over them. */
19
27
  options: (context: ProjectContext) => Record<string, JsonValue>;
20
28
  /** The package the config imports the adapter from. */
@@ -106,14 +114,17 @@ export interface DeployPlatform {
106
114
  /**
107
115
  * Whether the adapter moves a server build's client output under
108
116
  * `deployment.base` (`dist/client/<base>/`, the directory Astro then hands
109
- * `astro:build:done`) while the platform keeps serving `serverStaticDir`
110
- * as the assets root. The files the platform reads there, like `_headers`,
117
+ * `astro:build:done`) while the platform keeps serving `dist/client` as
118
+ * the assets root. The files the platform reads there, like `_headers`,
111
119
  * belong above the directory Astro reports.
112
120
  */
113
121
  serverClientUnderBase: boolean;
114
122
  /** Where a server build's deploy bundle lands. */
115
123
  serverOutputDir: (context: ProjectContext) => string;
116
- /** The directory a server build serves as static files. */
117
- serverStaticDir: (context: ProjectContext) => string;
124
+ /**
125
+ * The directory a server build serves as static files, given the normalized
126
+ * `deployment.base` for a platform that serves them from `<dir>/<base>/`.
127
+ */
128
+ serverStaticDir: (context: ProjectContext, base: string) => string;
118
129
  }
119
130
  export {};