blume 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +147 -0
- package/dist/cli/{chunk-qwsrynx5.js → chunk-1d7ve1dm.js} +38 -19
- package/dist/cli/{chunk-qwsrynx5.js.map → chunk-1d7ve1dm.js.map} +4 -4
- package/dist/cli/{chunk-s6jhgk0q.js → chunk-2eytanqx.js} +2 -2
- package/dist/cli/{chunk-kdp5q7ke.js → chunk-2hsdwb9n.js} +18 -19
- package/dist/cli/{chunk-kdp5q7ke.js.map → chunk-2hsdwb9n.js.map} +2 -2
- package/dist/cli/{chunk-hdpx1tax.js → chunk-2z928egk.js} +5 -5
- package/dist/cli/{chunk-jwyddg7y.js → chunk-35d4wj9f.js} +30 -24
- package/dist/cli/chunk-35d4wj9f.js.map +15 -0
- package/dist/cli/{chunk-ah61y8py.js → chunk-364znk6q.js} +2 -2
- package/dist/cli/{chunk-jts8mvcz.js → chunk-3em5wd2y.js} +25 -6
- package/dist/cli/{chunk-jts8mvcz.js.map → chunk-3em5wd2y.js.map} +3 -3
- package/dist/cli/{chunk-s1p84fyh.js → chunk-5f86nr5m.js} +63 -22
- package/dist/cli/chunk-5f86nr5m.js.map +11 -0
- package/dist/cli/{chunk-2hn4b8z7.js → chunk-5m5nmvyq.js} +170 -76
- package/dist/cli/chunk-5m5nmvyq.js.map +13 -0
- package/dist/cli/{chunk-epjnccmv.js → chunk-5xvm6tfj.js} +18 -15
- package/dist/cli/chunk-5xvm6tfj.js.map +10 -0
- package/dist/cli/{chunk-fz5wtpmh.js → chunk-6dsbexzp.js} +18 -15
- package/dist/cli/chunk-6dsbexzp.js.map +10 -0
- package/dist/cli/{chunk-vtk4a6dg.js → chunk-8ktnccpt.js} +1 -1
- package/dist/cli/{chunk-6hsn950k.js → chunk-9t7a85s3.js} +178 -48
- package/dist/cli/chunk-9t7a85s3.js.map +10 -0
- package/dist/cli/{chunk-fxypxtvm.js → chunk-a58773jm.js} +2 -2
- package/dist/cli/{chunk-mb2919y2.js → chunk-acanzt5p.js} +17 -6
- package/dist/cli/chunk-acanzt5p.js.map +10 -0
- package/dist/cli/{chunk-27g6wdth.js → chunk-akbpwfxc.js} +90 -26
- package/dist/cli/chunk-akbpwfxc.js.map +10 -0
- package/dist/cli/{chunk-wm7js3j9.js → chunk-b07cmahc.js} +2 -2
- package/dist/cli/{chunk-wgm7m9qk.js → chunk-c8chx29p.js} +179 -51
- package/dist/cli/chunk-c8chx29p.js.map +36 -0
- package/dist/cli/{chunk-qs4q5p4e.js → chunk-crgn1q09.js} +32 -14
- package/dist/cli/chunk-crgn1q09.js.map +10 -0
- package/dist/cli/chunk-e04dxsz1.js +39 -0
- package/dist/cli/chunk-e04dxsz1.js.map +10 -0
- package/dist/cli/{chunk-yt5n7ppj.js → chunk-ey84smr6.js} +17 -7
- package/dist/cli/chunk-ey84smr6.js.map +10 -0
- package/dist/cli/{chunk-f2z5v128.js → chunk-g4hq16wv.js} +14 -15
- package/dist/cli/{chunk-f2z5v128.js.map → chunk-g4hq16wv.js.map} +2 -2
- package/dist/cli/{chunk-fa25z98p.js → chunk-ga0pf4aj.js} +9 -8
- package/dist/cli/chunk-ga0pf4aj.js.map +11 -0
- package/dist/cli/{chunk-kpf8rrjc.js → chunk-hm3vjy5s.js} +109 -58
- package/dist/cli/chunk-hm3vjy5s.js.map +19 -0
- package/dist/cli/{chunk-fs23ddbb.js → chunk-j85vccga.js} +625 -750
- package/dist/cli/chunk-j85vccga.js.map +36 -0
- package/dist/cli/{chunk-ch6g3ar0.js → chunk-p3v96n38.js} +6 -6
- package/dist/cli/{chunk-ch6g3ar0.js.map → chunk-p3v96n38.js.map} +3 -3
- package/dist/cli/{chunk-q5163e60.js → chunk-p73c0m7w.js} +21 -19
- package/dist/cli/chunk-p73c0m7w.js.map +11 -0
- package/dist/cli/{chunk-dh8cwk36.js → chunk-pehfxfta.js} +24 -9
- package/dist/cli/chunk-pehfxfta.js.map +10 -0
- package/dist/cli/{chunk-qkqwkpte.js → chunk-pv29h0wf.js} +3688 -1313
- package/dist/cli/chunk-pv29h0wf.js.map +190 -0
- package/dist/cli/{chunk-6vm74dry.js → chunk-q58y5e6a.js} +10 -10
- package/dist/cli/{chunk-6vm74dry.js.map → chunk-q58y5e6a.js.map} +3 -3
- package/dist/cli/{chunk-zxcczpyx.js → chunk-r20tn01b.js} +1 -1
- package/dist/cli/{chunk-m3vmjgmq.js → chunk-r9rcc4w7.js} +16 -8
- package/dist/cli/chunk-r9rcc4w7.js.map +10 -0
- package/dist/cli/{chunk-5shv93fd.js → chunk-tkacnehg.js} +2 -2
- package/dist/cli/{chunk-zxh4d9vy.js → chunk-tzmab476.js} +4 -4
- package/dist/cli/{chunk-yw7dm696.js → chunk-vg9r4eb9.js} +24 -11
- package/dist/cli/chunk-vg9r4eb9.js.map +14 -0
- package/dist/cli/{chunk-79jhk4py.js → chunk-wrr3j9w9.js} +260 -132
- package/dist/cli/chunk-wrr3j9w9.js.map +35 -0
- package/dist/cli/{chunk-6crbhc3x.js → chunk-yfyb25rh.js} +54 -27
- package/dist/cli/chunk-yfyb25rh.js.map +14 -0
- package/dist/cli/index.js +162 -35
- package/dist/cli/index.js.map +4 -4
- package/dist/types/ai/agent-surface.d.ts +32 -0
- package/dist/types/ai/api-catalog.d.ts +7 -1
- package/dist/types/ai/ask-context.d.ts +7 -0
- package/dist/types/ai/component-markdown.d.ts +4 -4
- package/dist/types/ai/link-headers.d.ts +8 -1
- package/dist/types/ai/openapi-components.d.ts +5 -2
- package/dist/types/ai/relative-links.d.ts +11 -4
- package/dist/types/ai/skills.d.ts +4 -1
- package/dist/types/ai/static-expression.d.ts +28 -0
- package/dist/types/ai/tar.d.ts +1 -3
- package/dist/types/analytics/databuddy.d.ts +43 -0
- package/dist/types/analytics/index.d.ts +4 -0
- package/dist/types/analytics/one-dollar-stats.d.ts +48 -0
- package/dist/types/analytics/schema.d.ts +28 -0
- package/dist/types/astro/integration.d.ts +3 -2
- package/dist/types/cli/env.d.ts +5 -0
- package/dist/types/cli/init/scaffold.d.ts +19 -3
- package/dist/types/cli/init/starter-spec.d.ts +11 -0
- package/dist/types/core/base-path.d.ts +24 -1
- package/dist/types/core/config-input.d.ts +13 -11
- package/dist/types/core/config.d.ts +2 -2
- package/dist/types/core/directive-diagnostics.d.ts +12 -0
- package/dist/types/core/graph.d.ts +2 -0
- package/dist/types/core/heading-markers.d.ts +5 -7
- package/dist/types/core/i18n-ui.d.ts +31 -0
- package/dist/types/core/i18n.d.ts +9 -1
- package/dist/types/core/last-modified.d.ts +10 -0
- package/dist/types/core/links.d.ts +3 -1
- package/dist/types/core/load-module.d.ts +10 -0
- package/dist/types/core/locale-links.d.ts +12 -2
- package/dist/types/core/meta.d.ts +13 -1
- package/dist/types/core/nav-diagnostics.d.ts +10 -0
- package/dist/types/core/navigation.d.ts +38 -0
- package/dist/types/core/ordering-prefix.d.ts +4 -0
- package/dist/types/core/safe-links.d.ts +3 -1
- package/dist/types/core/schema.d.ts +59 -13
- package/dist/types/core/sources/github-releases.d.ts +5 -0
- package/dist/types/core/sources/lower.d.ts +38 -13
- package/dist/types/core/sources/normalize.d.ts +23 -2
- package/dist/types/core/sources/remote.d.ts +11 -1
- package/dist/types/core/sources/resolve.d.ts +12 -0
- package/dist/types/core/sources/types.d.ts +31 -0
- package/dist/types/core/sources/watch.d.ts +12 -5
- package/dist/types/core/standard-schema.d.ts +5 -0
- package/dist/types/core/types.d.ts +9 -0
- package/dist/types/deploy/adapters/node.d.ts +5 -2
- package/dist/types/deploy/adapters/types.d.ts +7 -0
- package/dist/types/deploy/artifacts.d.ts +6 -4
- package/dist/types/deploy/cloudflare-negotiation.d.ts +3 -2
- package/dist/types/deploy/headers.d.ts +36 -7
- package/dist/types/deploy/node-headers.d.ts +43 -8
- package/dist/types/deploy/platforms/netlify.d.ts +27 -2
- package/dist/types/deploy/platforms/node.d.ts +6 -5
- package/dist/types/deploy/platforms/types.d.ts +15 -0
- package/dist/types/deploy/platforms/vercel.d.ts +3 -2
- package/dist/types/deploy/redirects.d.ts +31 -15
- package/dist/types/deploy/vercel-negotiation.d.ts +3 -2
- package/dist/types/markdown/directives.d.ts +62 -0
- package/dist/types/markdown/features.d.ts +21 -0
- package/dist/types/markdown/mdast.d.ts +63 -0
- package/dist/types/openapi/asyncapi.d.ts +4 -2
- package/dist/types/openapi/model.d.ts +20 -6
- package/dist/types/search/sync/algolia.d.ts +3 -1
- package/docs/01-quickstart.mdx +3 -2
- package/docs/02-deployment.mdx +20 -9
- package/docs/08-faq.mdx +10 -3
- package/docs/advanced/changelog.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +7 -5
- package/docs/cli/audit.mdx +19 -3
- package/docs/cli/doctor.mdx +2 -2
- package/docs/cli/evals.mdx +4 -4
- package/docs/cli/index.mdx +4 -1
- package/docs/cli/translate.mdx +4 -4
- package/docs/cli/version.mdx +1 -1
- package/docs/configuration/analytics.mdx +42 -2
- package/docs/configuration/assistant.mdx +1 -1
- package/docs/configuration/customization.mdx +6 -3
- package/docs/configuration/index.mdx +5 -3
- package/docs/configuration/search.mdx +2 -2
- package/docs/content/components.mdx +2 -2
- package/docs/content/frontmatter.mdx +5 -1
- package/docs/content/i18n.mdx +3 -1
- package/docs/content/index.mdx +8 -4
- package/docs/content/islands.mdx +1 -1
- package/docs/content/meta.mdx +7 -3
- package/docs/content/navigation.mdx +29 -4
- package/docs/content/sources.mdx +18 -16
- package/docs/content/syntax.mdx +14 -0
- package/docs/content/versioning.mdx +2 -1
- package/docs/discoverability/agent-discovery.mdx +22 -8
- package/docs/discoverability/index.mdx +4 -3
- package/docs/discoverability/llms-txt.mdx +2 -5
- package/docs/discoverability/markdown.mdx +6 -4
- package/docs/discoverability/mcp.mdx +4 -0
- package/docs/discoverability/metadata.mdx +3 -2
- package/docs/discoverability/open-graph.mdx +8 -4
- package/docs/discoverability/rss.mdx +4 -2
- package/docs/references/asyncapi.mdx +2 -2
- package/docs/references/graphql.mdx +2 -2
- package/docs/references/openapi.mdx +6 -4
- package/package.json +1 -1
- package/skills/blume-migrate/SKILL.md +6 -6
- package/skills/blume-migrate/references/docusaurus.md +6 -6
- package/skills/blume-migrate/references/fumadocs.md +1 -1
- package/skills/blume-migrate/references/mintlify.md +3 -3
- package/skills/blume-migrate/references/monorepo.md +1 -1
- package/skills/blume-migrate/references/nextra.md +2 -2
- package/skills/blume-migrate/references/starlight.md +5 -5
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +9 -4
- package/skills/blume-update-docs/references/audit-checklist.md +1 -1
- package/src/ai/agent-readability.ts +2 -2
- package/src/ai/agent-surface.ts +56 -0
- package/src/ai/ai-catalog.ts +6 -2
- package/src/ai/api/handlers.ts +2 -2
- package/src/ai/api/spec.ts +17 -4
- package/src/ai/api-catalog.ts +13 -3
- package/src/ai/ask-context.ts +14 -2
- package/src/ai/ask-data.ts +26 -12
- package/src/ai/changelog-markdown.ts +2 -2
- package/src/ai/component-markdown.ts +43 -37
- package/src/ai/link-headers.ts +22 -8
- package/src/ai/llms.ts +22 -10
- package/src/ai/markdown.ts +23 -11
- package/src/ai/mcp/discovery.ts +2 -2
- package/src/ai/mcp/query.ts +2 -2
- package/src/ai/mcp/server.ts +80 -9
- package/src/ai/openapi-components.ts +22 -6
- package/src/ai/relative-links.ts +99 -15
- package/src/ai/serializers.ts +2 -1
- package/src/ai/skills.ts +14 -1
- package/src/ai/static-expression.ts +416 -0
- package/src/ai/tar.ts +139 -12
- package/src/ai/visibility.ts +45 -14
- package/src/analytics/databuddy.ts +67 -0
- package/src/analytics/head.ts +8 -0
- package/src/analytics/index.ts +7 -0
- package/src/analytics/one-dollar-stats.ts +86 -0
- package/src/analytics/posthog.ts +21 -3
- package/src/analytics/schema.ts +4 -0
- package/src/astro/generate.ts +72 -28
- package/src/astro/include-hmr.ts +31 -12
- package/src/astro/include-refresh.ts +19 -8
- package/src/astro/integration.ts +108 -14
- package/src/astro/runtime-modules.ts +28 -13
- package/src/astro/templates.ts +139 -57
- package/src/audit/catalog.ts +2 -2
- package/src/audit/checks/assets.ts +25 -5
- package/src/audit/checks/content.ts +20 -2
- package/src/audit/checks/i18n.ts +46 -8
- package/src/audit/checks/indexability.ts +39 -19
- package/src/audit/checks/links.ts +22 -1
- package/src/audit/checks/llms.ts +6 -3
- package/src/audit/checks/network.ts +3 -1
- package/src/audit/checks/og-image.ts +10 -0
- package/src/audit/checks/robots.ts +6 -1
- package/src/audit/checks/sitemap.ts +56 -31
- package/src/audit/checks/social.ts +21 -2
- package/src/audit/crawl.ts +88 -15
- package/src/audit/graph.ts +3 -1
- package/src/audit/report.ts +54 -17
- package/src/audit/run.ts +13 -9
- package/src/audit/snapshot.ts +5 -0
- package/src/audit/types.ts +18 -0
- package/src/audit/url.ts +37 -6
- package/src/cli/args.ts +32 -0
- package/src/cli/build-failure.ts +50 -0
- package/src/cli/commands/audit.ts +11 -1
- package/src/cli/commands/build.ts +19 -5
- package/src/cli/commands/check.ts +2 -0
- package/src/cli/commands/doctor.ts +3 -1
- package/src/cli/commands/eval.ts +20 -18
- package/src/cli/commands/init.ts +15 -5
- package/src/cli/commands/preview.ts +15 -0
- package/src/cli/commands/sync.ts +2 -0
- package/src/cli/commands/translate.ts +18 -18
- package/src/cli/commands/upgrade.ts +11 -0
- package/src/cli/commands/validate.ts +3 -1
- package/src/cli/dev-lock.ts +157 -37
- package/src/cli/eject-scripts.ts +32 -7
- package/src/cli/env.ts +12 -1
- package/src/cli/init/scaffold.ts +117 -11
- package/src/cli/init/starter-spec.ts +235 -0
- package/src/cli/report-format.ts +11 -6
- package/src/components/colors.ts +19 -0
- package/src/components/content/AccordionItem.astro +26 -22
- package/src/components/content/Badge.astro +7 -12
- package/src/components/content/Card.astro +2 -2
- package/src/components/content/Component.astro +11 -5
- package/src/components/content/Expandable.astro +5 -1
- package/src/components/content/Frame.astro +2 -7
- package/src/components/content/GithubInfo.astro +12 -2
- package/src/components/content/Prompt.astro +2 -7
- package/src/components/content/Tab.astro +0 -1
- package/src/components/content/Tabs.astro +58 -5
- package/src/components/content/Tile.astro +1 -1
- package/src/components/content/Tooltip.astro +69 -7
- package/src/components/content/Tree.astro +7 -2
- package/src/components/content/TypeTable.astro +10 -5
- package/src/components/content/Update.astro +8 -2
- package/src/components/content/auto-type-table.ts +4 -1
- package/src/components/content/badge-color.ts +20 -0
- package/src/components/content/base-href.ts +14 -22
- package/src/components/content/inline-markdown.ts +27 -7
- package/src/components/copy-feedback.ts +35 -8
- package/src/components/islands/assistant.tsx +37 -6
- package/src/components/islands/base-path.ts +47 -10
- package/src/components/islands/hooks.ts +42 -21
- package/src/components/islands/webmcp.ts +16 -10
- package/src/components/layout/Banner.astro +23 -4
- package/src/components/layout/Breadcrumbs.astro +5 -2
- package/src/components/layout/DiscoveryLinks.astro +9 -5
- package/src/components/layout/Header.astro +23 -10
- package/src/components/layout/LanguageSwitcher.astro +2 -2
- package/src/components/layout/Logo.astro +5 -0
- package/src/components/layout/NavSelector.astro +8 -3
- package/src/components/layout/NavTabMenu.astro +133 -0
- package/src/components/layout/NavTree.astro +31 -12
- package/src/components/layout/NavTreeCache.astro +5 -2
- package/src/components/layout/NavTreeScript.astro +45 -5
- package/src/components/layout/PageActions.astro +4 -3
- package/src/components/layout/PageLayout.astro +28 -13
- package/src/components/layout/Pagination.astro +3 -3
- package/src/components/layout/ReferenceLayout.astro +4 -1
- package/src/components/layout/RootLayout.astro +25 -12
- package/src/components/layout/Search.astro +38 -14
- package/src/components/layout/VersionBanner.astro +2 -2
- package/src/components/layout/analytics-client.ts +14 -0
- package/src/components/layout/toc-active.ts +41 -0
- package/src/components/layout/toc-element.ts +8 -14
- package/src/components/openapi/ApiTagOperations.astro +2 -2
- package/src/components/openapi/AsyncApiOperation.astro +7 -4
- package/src/components/openapi/GraphqlChip.astro +2 -2
- package/src/components/openapi/GraphqlType.astro +11 -3
- package/src/components/openapi/MessageComposer.astro +1 -1
- package/src/components/openapi/Operation.astro +23 -5
- package/src/components/openapi/PanelTabs.astro +4 -1
- package/src/components/openapi/Playground.astro +8 -2
- package/src/components/openapi/RequestPanel.astro +13 -6
- package/src/components/openapi/SchemaProperty.astro +11 -33
- package/src/components/openapi/SchemaTable.astro +34 -52
- package/src/components/openapi/async.ts +38 -6
- package/src/components/openapi/helpers.ts +100 -12
- package/src/components/openapi/message-composer.ts +14 -1
- package/src/components/openapi/message-model.ts +12 -2
- package/src/components/openapi/message.ts +21 -3
- package/src/components/openapi/operation-model.ts +119 -17
- package/src/components/openapi/panel.ts +31 -5
- package/src/components/openapi/param-style.ts +181 -0
- package/src/components/openapi/playground-client.ts +110 -23
- package/src/components/openapi/playground-schema.ts +25 -6
- package/src/components/openapi/request.ts +192 -26
- package/src/components/openapi/schema-tree.ts +209 -0
- package/src/components/openapi/snippets.ts +113 -19
- package/src/components/openapi/validate-json.ts +1 -1
- package/src/components/openapi/ws-client.ts +18 -2
- package/src/core/base-path.ts +69 -8
- package/src/core/config-input.ts +13 -11
- package/src/core/config.ts +18 -4
- package/src/core/diagnostics.ts +219 -30
- package/src/core/directive-diagnostics.ts +99 -0
- package/src/core/frontmatter.ts +21 -18
- package/src/core/graph.ts +120 -11
- package/src/core/heading-markers.ts +5 -18
- package/src/core/i18n-ui.ts +39 -2
- package/src/core/i18n.ts +44 -5
- package/src/core/last-modified.ts +25 -3
- package/src/core/links.ts +7 -4
- package/src/core/load-module.ts +20 -0
- package/src/core/locale-links.ts +22 -18
- package/src/core/manifest.ts +3 -2
- package/src/core/meta.ts +89 -12
- package/src/core/nav-diagnostics.ts +56 -1
- package/src/core/navigation.ts +272 -83
- package/src/core/ordering-prefix.ts +27 -0
- package/src/core/project-graph.ts +50 -6
- package/src/core/safe-href.ts +53 -1
- package/src/core/safe-links.ts +11 -2
- package/src/core/schema.ts +94 -18
- package/src/core/sources/assets.ts +83 -41
- package/src/core/sources/contentful-rich-text.ts +28 -20
- package/src/core/sources/contentful.ts +25 -12
- package/src/core/sources/filesystem.ts +25 -3
- package/src/core/sources/github-releases.ts +131 -11
- package/src/core/sources/lexical.ts +30 -20
- package/src/core/sources/lower.ts +276 -56
- package/src/core/sources/mdx-remote.ts +52 -16
- package/src/core/sources/normalize.ts +456 -119
- package/src/core/sources/notion.ts +77 -34
- package/src/core/sources/obsidian.ts +40 -9
- package/src/core/sources/payload.ts +1 -0
- package/src/core/sources/portable-text.ts +85 -49
- package/src/core/sources/remote.ts +18 -2
- package/src/core/sources/resolve.ts +52 -33
- package/src/core/sources/sanity.ts +1 -0
- package/src/core/sources/strapi-blocks.ts +28 -19
- package/src/core/sources/strapi.ts +1 -0
- package/src/core/sources/types.ts +31 -0
- package/src/core/sources/watch.ts +20 -7
- package/src/core/standard-schema.ts +10 -6
- package/src/core/types.ts +9 -0
- package/src/core/ui-packs/ar.ts +13 -0
- package/src/core/ui-packs/bg.ts +13 -0
- package/src/core/ui-packs/bn.ts +13 -0
- package/src/core/ui-packs/ca.ts +13 -0
- package/src/core/ui-packs/cs.ts +13 -0
- package/src/core/ui-packs/da.ts +13 -0
- package/src/core/ui-packs/de.ts +13 -0
- package/src/core/ui-packs/el.ts +13 -0
- package/src/core/ui-packs/es.ts +13 -0
- package/src/core/ui-packs/fa.ts +13 -0
- package/src/core/ui-packs/fi.ts +13 -0
- package/src/core/ui-packs/fr.ts +13 -0
- package/src/core/ui-packs/he.ts +13 -0
- package/src/core/ui-packs/hi.ts +13 -0
- package/src/core/ui-packs/hr.ts +13 -0
- package/src/core/ui-packs/hu.ts +13 -0
- package/src/core/ui-packs/id.ts +13 -0
- package/src/core/ui-packs/it.ts +13 -0
- package/src/core/ui-packs/ja.ts +13 -0
- package/src/core/ui-packs/ko.ts +13 -0
- package/src/core/ui-packs/nl.ts +13 -0
- package/src/core/ui-packs/no.ts +13 -0
- package/src/core/ui-packs/pl.ts +13 -0
- package/src/core/ui-packs/pt-br.ts +13 -0
- package/src/core/ui-packs/pt.ts +13 -0
- package/src/core/ui-packs/ro.ts +13 -0
- package/src/core/ui-packs/ru.ts +13 -0
- package/src/core/ui-packs/sk.ts +13 -0
- package/src/core/ui-packs/sr.ts +13 -0
- package/src/core/ui-packs/sv.ts +13 -0
- package/src/core/ui-packs/th.ts +13 -0
- package/src/core/ui-packs/tr.ts +13 -0
- package/src/core/ui-packs/uk.ts +13 -0
- package/src/core/ui-packs/vi.ts +13 -0
- package/src/core/ui-packs/zh-tw.ts +13 -0
- package/src/core/ui-packs/zh.ts +13 -0
- package/src/core/version-cut.ts +69 -17
- package/src/core/versions.ts +4 -1
- package/src/deploy/adapters/node.ts +5 -2
- package/src/deploy/adapters/registry.ts +2 -1
- package/src/deploy/adapters/types.ts +13 -1
- package/src/deploy/artifacts.ts +52 -11
- package/src/deploy/cloudflare-negotiation.ts +27 -16
- package/src/deploy/headers.ts +75 -55
- package/src/deploy/node-headers.ts +148 -27
- package/src/deploy/platforms/cloudflare.ts +13 -3
- package/src/deploy/platforms/netlify.ts +83 -5
- package/src/deploy/platforms/node.ts +8 -5
- package/src/deploy/platforms/static.ts +2 -0
- package/src/deploy/platforms/types.ts +15 -0
- package/src/deploy/platforms/vercel.ts +10 -3
- package/src/deploy/redirects.ts +68 -21
- package/src/deploy/robots.ts +2 -2
- package/src/deploy/rss.ts +4 -3
- package/src/deploy/sitemap.ts +7 -5
- package/src/deploy/vercel-negotiation.ts +35 -3
- package/src/eval/agents.ts +10 -2
- package/src/eval/run.ts +25 -0
- package/src/markdown/base-links.ts +74 -29
- package/src/markdown/directives.ts +242 -36
- package/src/markdown/features.ts +17 -0
- package/src/markdown/index.ts +13 -9
- package/src/markdown/mdast.ts +5 -2
- package/src/markdown/relative-links.ts +15 -27
- package/src/markdown/route-snapshot.ts +37 -0
- package/src/og/card.ts +149 -9
- package/src/og/derive.ts +156 -5
- package/src/og/index.ts +1 -0
- package/src/openapi/asyncapi.ts +4 -2
- package/src/openapi/graphql-build.ts +28 -2
- package/src/openapi/model.ts +99 -27
- package/src/openapi/proxy.ts +63 -10
- package/src/openapi/render-mdx.ts +51 -3
- package/src/registry/eject.ts +297 -43
- package/src/search/adapters/version-scope.ts +30 -0
- package/src/search/documents.ts +89 -27
- package/src/search/popular.ts +2 -1
- package/src/search/sync/algolia.ts +36 -2
- package/src/seo/jsonld.ts +7 -3
- package/src/sources/registry.ts +5 -0
- package/src/theme/entry.ts +11 -4
- package/src/translate/agents.ts +6 -1
- package/src/translate/ledger.ts +26 -3
- package/src/translate/meta.ts +76 -24
- package/src/translate/run.ts +14 -8
- package/src/translate/validate.ts +14 -2
- package/src/translate/work-list.ts +91 -19
- package/src/upgrade/upgrade.ts +36 -4
- package/dist/cli/chunk-27g6wdth.js.map +0 -10
- package/dist/cli/chunk-2hn4b8z7.js.map +0 -12
- package/dist/cli/chunk-6crbhc3x.js.map +0 -14
- package/dist/cli/chunk-6hsn950k.js.map +0 -10
- package/dist/cli/chunk-79jhk4py.js.map +0 -35
- package/dist/cli/chunk-82bbrxdn.js +0 -51
- package/dist/cli/chunk-82bbrxdn.js.map +0 -10
- package/dist/cli/chunk-abh8yjkn.js +0 -31
- package/dist/cli/chunk-abh8yjkn.js.map +0 -10
- package/dist/cli/chunk-ce574jw2.js +0 -23
- package/dist/cli/chunk-ce574jw2.js.map +0 -10
- package/dist/cli/chunk-dh8cwk36.js.map +0 -10
- package/dist/cli/chunk-epjnccmv.js.map +0 -10
- package/dist/cli/chunk-fa25z98p.js.map +0 -11
- package/dist/cli/chunk-fs23ddbb.js.map +0 -35
- package/dist/cli/chunk-fz5wtpmh.js.map +0 -10
- package/dist/cli/chunk-jwyddg7y.js.map +0 -15
- package/dist/cli/chunk-kpf8rrjc.js.map +0 -19
- package/dist/cli/chunk-m3vmjgmq.js.map +0 -10
- package/dist/cli/chunk-mb2919y2.js.map +0 -10
- package/dist/cli/chunk-q5163e60.js.map +0 -11
- package/dist/cli/chunk-qkqwkpte.js.map +0 -182
- package/dist/cli/chunk-qs4q5p4e.js.map +0 -10
- package/dist/cli/chunk-s1p84fyh.js.map +0 -10
- package/dist/cli/chunk-wgm7m9qk.js.map +0 -36
- package/dist/cli/chunk-yt5n7ppj.js.map +0 -10
- package/dist/cli/chunk-yw7dm696.js.map +0 -14
- /package/dist/cli/{chunk-s6jhgk0q.js.map → chunk-2eytanqx.js.map} +0 -0
- /package/dist/cli/{chunk-hdpx1tax.js.map → chunk-2z928egk.js.map} +0 -0
- /package/dist/cli/{chunk-ah61y8py.js.map → chunk-364znk6q.js.map} +0 -0
- /package/dist/cli/{chunk-vtk4a6dg.js.map → chunk-8ktnccpt.js.map} +0 -0
- /package/dist/cli/{chunk-fxypxtvm.js.map → chunk-a58773jm.js.map} +0 -0
- /package/dist/cli/{chunk-wm7js3j9.js.map → chunk-b07cmahc.js.map} +0 -0
- /package/dist/cli/{chunk-zxcczpyx.js.map → chunk-r20tn01b.js.map} +0 -0
- /package/dist/cli/{chunk-5shv93fd.js.map → chunk-tkacnehg.js.map} +0 -0
- /package/dist/cli/{chunk-zxh4d9vy.js.map → chunk-tzmab476.js.map} +0 -0
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* blocks) renders inline runs, wraps them in block syntax, and joins blocks
|
|
5
5
|
* with blank lines; these helpers keep that Markdown identical across them.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* CMS text as Markdown that renders as written, wherever it lands — a link
|
|
9
|
+
* label included, where GFM autolinks nothing, so every special is escaped.
|
|
10
|
+
*/
|
|
7
11
|
export declare const escapeMarkdownText: (text: string) => string;
|
|
8
12
|
/** The marks a lowerer can put on an inline run. */
|
|
9
13
|
export interface InlineMarks {
|
|
@@ -12,6 +16,17 @@ export interface InlineMarks {
|
|
|
12
16
|
italic?: boolean;
|
|
13
17
|
strike?: boolean;
|
|
14
18
|
}
|
|
19
|
+
/** A run of CMS text and the marks on it. */
|
|
20
|
+
export interface InlineRun {
|
|
21
|
+
marks: InlineMarks;
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
/** Inline Markdown a lowerer rendered itself: a link, an embed, a break. */
|
|
25
|
+
export interface InlineMarkdown {
|
|
26
|
+
markdown: string;
|
|
27
|
+
}
|
|
28
|
+
/** One piece of a block's inline content, in order. */
|
|
29
|
+
export type InlinePart = InlineMarkdown | InlineRun;
|
|
15
30
|
/**
|
|
16
31
|
* A code span whose delimiter outruns any backtick run inside it, padded with
|
|
17
32
|
* a space on each side when the code starts or ends with a backtick (the
|
|
@@ -19,22 +34,29 @@ export interface InlineMarks {
|
|
|
19
34
|
*/
|
|
20
35
|
export declare const codeSpan: (code: string) => string;
|
|
21
36
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
37
|
+
* A block's inline text, guarded where only the whole block can tell. Runs
|
|
38
|
+
* are escaped one at a time, but "import" ending one run and a space or code
|
|
39
|
+
* span opening the next form an MDX `import` statement only once they are
|
|
40
|
+
* joined, whitespace the first runs put in front of a block turns it into
|
|
41
|
+
* an indented code block, two struck runs fuse into literal tildes, and a
|
|
42
|
+
* trailing ` #` is a heading's closing sequence. Apply it to the joined text
|
|
43
|
+
* of a paragraph, heading, quote, or list item — never to code.
|
|
27
44
|
*/
|
|
28
|
-
export declare const
|
|
29
|
-
/** A
|
|
45
|
+
export declare const guardBlockStart: (text: string) => string;
|
|
46
|
+
/** A block's inline content as Markdown. */
|
|
47
|
+
export declare const renderInline: (parts: InlinePart[]) => string;
|
|
48
|
+
/** A link or image destination as Markdown carries it verbatim. */
|
|
30
49
|
export declare const destination: (url: string) => string;
|
|
31
50
|
/**
|
|
32
|
-
* A Markdown link, or the
|
|
33
|
-
* CMS content is the editor's, not the site author's, so
|
|
34
|
-
* isn't a web, mail, or relative address (`javascript:`,
|
|
35
|
-
* becomes a clickable link on the docs site (see
|
|
51
|
+
* A Markdown link over inline parts, or the parts alone when the target is
|
|
52
|
+
* missing — or unsafe: CMS content is the editor's, not the site author's, so
|
|
53
|
+
* a destination that isn't a web, mail, or relative address (`javascript:`,
|
|
54
|
+
* `data:`) never becomes a clickable link on the docs site (see
|
|
55
|
+
* `safe-links.ts`). The parts stay parts then, so their runs merge with their
|
|
56
|
+
* neighbors'. A label escapes a bare URL too: GFM autolinks nothing inside a
|
|
57
|
+
* link, so its specials would read as syntax.
|
|
36
58
|
*/
|
|
37
|
-
export declare const
|
|
59
|
+
export declare const linkParts: (parts: InlinePart[], href?: string) => InlinePart[];
|
|
38
60
|
/** The ATX prefix for a heading level, clamped to Markdown's six. */
|
|
39
61
|
export declare const headingPrefix: (level: number) => string;
|
|
40
62
|
/** Quote every line of a block. */
|
|
@@ -46,7 +68,10 @@ export declare const blockquote: (text: string) => string;
|
|
|
46
68
|
export declare const listItem: (marker: string, body: string) => string;
|
|
47
69
|
/** Indent every non-empty line, for a nested list hanging off an item. */
|
|
48
70
|
export declare const indent: (text: string, width: number) => string;
|
|
49
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* A fenced code block whose fence outruns any backtick run in the code,
|
|
73
|
+
* labeled with its language when that is one word a fence can carry.
|
|
74
|
+
*/
|
|
50
75
|
export declare const codeFence: (code: string, language?: string) => string;
|
|
51
76
|
/** A Markdown image; the alt is escaped so a `]` in a caption can't close it. */
|
|
52
77
|
export declare const image: (alt: string, url: string) => string;
|
|
@@ -21,6 +21,15 @@ export declare const slugify: (text: string) => string;
|
|
|
21
21
|
* document. Each segment is slugged on its own and the separators kept.
|
|
22
22
|
*/
|
|
23
23
|
export declare const slugifyPath: (text: string) => string;
|
|
24
|
+
/**
|
|
25
|
+
* The error for a content file Astro's content loader can't read, or
|
|
26
|
+
* undefined when it can. A `#` or `?` anywhere in the path the loader is
|
|
27
|
+
* handed (`sdks/c#.md`, `faq/why?.md`) truncates the file URL it reads
|
|
28
|
+
* through, so the read fails with ENOENT and the page renders "Page not
|
|
29
|
+
* found" at its route. A source leaves such a file out of its scan and
|
|
30
|
+
* reports this instead of publishing a route that can never render.
|
|
31
|
+
*/
|
|
32
|
+
export declare const unloadablePathDiagnostic: (path: string, file: string) => Diagnostic | undefined;
|
|
24
33
|
export declare const HTML_COMMENT: RegExp;
|
|
25
34
|
export declare const INLINE_CODE: RegExp;
|
|
26
35
|
/** A heading whose trailing `{#id}` marker is unescaped — see `BARE_CURLY_MARKER`. */
|
|
@@ -54,7 +63,10 @@ export interface BodyScan {
|
|
|
54
63
|
/**
|
|
55
64
|
* Scan a body for its headings, explicit HTML anchors, and unescaped `{#id}`
|
|
56
65
|
* markers in one fence-aware walk (the same walk `extractHeadings` exposes for
|
|
57
|
-
* headings alone).
|
|
66
|
+
* headings alone). The body is the page's content with its front matter
|
|
67
|
+
* already stripped — the renderers read front matter off the page and never
|
|
68
|
+
* again from its body — so a leading `---` block is a thematic break and
|
|
69
|
+
* content, in `.md` and `.mdx` alike.
|
|
58
70
|
*/
|
|
59
71
|
export declare const scanBody: (body: string) => BodyScan;
|
|
60
72
|
export declare const extractHeadings: (body: string) => Heading[];
|
|
@@ -74,6 +86,13 @@ export declare const strippedLineOffset: (raw: string | undefined, body: string)
|
|
|
74
86
|
export declare const isStringValue: (value: SourceEntry["data"][string]) => value is string;
|
|
75
87
|
/** What a route resolution needs from the owning source and the config. */
|
|
76
88
|
export type RouteContext = Pick<NormalizeContext, "i18n" | "versions"> & {
|
|
89
|
+
/**
|
|
90
|
+
* Whether the entry's ref is a path of file and folder names whose ordering
|
|
91
|
+
* prefixes (`01-intro`) sort the sidebar and drop from the route: true for
|
|
92
|
+
* filesystem sources. A staged source's ref is a slug, a release tag, or a
|
|
93
|
+
* note name, and keeps its leading numbers.
|
|
94
|
+
*/
|
|
95
|
+
orderingPrefixes?: boolean;
|
|
77
96
|
/** The source's route prefix (`NormalizeContext["source"]["prefix"]`). */
|
|
78
97
|
prefix?: string;
|
|
79
98
|
};
|
|
@@ -123,7 +142,9 @@ export interface EntryRoute extends Pick<EntryPlacement, "locales" | "version">
|
|
|
123
142
|
* A frontmatter `slug` wins, then the adapter-supplied `entry.slug` (the typed
|
|
124
143
|
* SPI's "logical route input; defaults to ref if omitted"), then the ref. The
|
|
125
144
|
* extension is re-appended so `mapRoute`'s extname strip can't eat a dotted
|
|
126
|
-
* slug segment (`v1.2`). A slug that trims to nothing falls back.
|
|
145
|
+
* slug segment (`v1.2`). A slug that trims to nothing falls back. Only a
|
|
146
|
+
* filesystem ref (`ctx.orderingPrefixes`) loses its ordering prefixes; a slug
|
|
147
|
+
* is a route spelled out, so `2024-year-in-review` stays whole. The version
|
|
127
148
|
* prefixes the mapped route *after* `mapRoute` runs: the mapped route is the
|
|
128
149
|
* version-agnostic key, the config id is prepended verbatim (never
|
|
129
150
|
* numeric-prefix-stripped), a frontmatter `slug` gets versionized so snapshots
|
|
@@ -2,12 +2,21 @@ import type { JsonObject, JsonValue } from "./json.ts";
|
|
|
2
2
|
import type { ContentSource, SourceContext, SourceEntry } from "./types.ts";
|
|
3
3
|
/** What every REST-backed CMS source needs to be a staged, cached source. */
|
|
4
4
|
export interface RemoteSourceOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Throw a `BlumeError` when the source cannot load as configured. Runs
|
|
7
|
+
* before the cache is consulted: thrown from `fetchEntries` instead, a
|
|
8
|
+
* misconfiguration would be served over by a stale snapshot with only an
|
|
9
|
+
* offline warning.
|
|
10
|
+
*/
|
|
11
|
+
assertConfigured?: () => void;
|
|
5
12
|
/** Pull every entry from the API; called on refresh and on each poll. */
|
|
6
13
|
fetchEntries: () => Promise<SourceEntry[]>;
|
|
7
14
|
name: string;
|
|
8
15
|
/** Opt-in dev polling interval (seconds); omit to freeze for the session. */
|
|
9
16
|
pollInterval?: number;
|
|
10
17
|
prefix?: string;
|
|
18
|
+
/** The adapter rebuilt on another context (`ContentSource.withContext`). */
|
|
19
|
+
withContext?: (ctx: SourceContext) => ContentSource;
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* The staged-source scaffolding a CMS adapter shares: a snapshot cache under
|
|
@@ -68,7 +77,8 @@ export interface RemoteFieldMap {
|
|
|
68
77
|
* when the slug field is missing or slugifies to nothing (pure punctuation),
|
|
69
78
|
* so distinct documents never collapse onto one `untitled.md`; a slashed
|
|
70
79
|
* slug keeps its segments. A string body is Markdown and passes through as
|
|
71
|
-
* `.md
|
|
80
|
+
* `.md`, its unsafe links reduced to their labels; any other shape goes to
|
|
81
|
+
* the CMS's lowerer, and is written as `.mdx`
|
|
72
82
|
* when `lowersToMdx` (the source has serializers, see `writesMdx`).
|
|
73
83
|
*/
|
|
74
84
|
export declare const documentEntry: (doc: JsonObject, fields: Required<RemoteFieldMap>, id: string, lower: (body: JsonValue) => string, draft?: boolean, lowersToMdx?: boolean) => SourceEntry;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ContentSourceAdapter } from "../../sources/registry.ts";
|
|
1
2
|
import type { ResolvedConfig } from "../schema.ts";
|
|
2
3
|
import type { ProjectContext } from "../types.ts";
|
|
3
4
|
import type { ContentSource } from "./types.ts";
|
|
@@ -9,6 +10,17 @@ export interface SourceRuntime {
|
|
|
9
10
|
preview?: boolean;
|
|
10
11
|
refresh?: boolean;
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The directory under `.blume/cache/<source>/` a source keeps its snapshot in:
|
|
15
|
+
* one per preview mode and set of adapter options. A preview snapshot holds
|
|
16
|
+
* drafts, so a published load must never read it, neither as dev's cache-first
|
|
17
|
+
* snapshot nor as a build's offline fallback; and a snapshot fetched with
|
|
18
|
+
* another `query` or `fields` is another result, not a cached copy of this
|
|
19
|
+
* one. `pollInterval` only paces dev re-fetches, so it is left out. A
|
|
20
|
+
* `custom()` source is a live instance rather than options, so its snapshot
|
|
21
|
+
* is keyed by preview mode alone.
|
|
22
|
+
*/
|
|
23
|
+
export declare const snapshotKey: (adapter: ContentSourceAdapter, runtime: SourceRuntime) => string;
|
|
12
24
|
/**
|
|
13
25
|
* Build the ordered list of content sources for a project. The config schema
|
|
14
26
|
* already desugared the zero-config shorthand into a single `filesystem()`
|
|
@@ -35,6 +35,13 @@ export interface SourceEntry {
|
|
|
35
35
|
* the owning source to expose a `contentRoot` to bound the log's pathspec.
|
|
36
36
|
*/
|
|
37
37
|
sourcePath?: string;
|
|
38
|
+
/**
|
|
39
|
+
* How many lines of the file at `sourcePath` sit above `body.text`, when
|
|
40
|
+
* `raw` is not that file's text: a source that rewrites a local file's
|
|
41
|
+
* front matter (an Obsidian note) sets it, so a diagnostic points at the
|
|
42
|
+
* line the author wrote. Otherwise the height of `raw`'s front matter.
|
|
43
|
+
*/
|
|
44
|
+
bodyLineOffset?: number;
|
|
38
45
|
/** Optional provenance for "edit this page". */
|
|
39
46
|
editUrl?: string;
|
|
40
47
|
/** Optional last-modified ISO date supplied by the adapter (non-filesystem). */
|
|
@@ -119,6 +126,14 @@ export interface ContentSource {
|
|
|
119
126
|
* switcher, since every other locale would only repeat the same text.
|
|
120
127
|
*/
|
|
121
128
|
readonly monolingual?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* True for a staged source whose entry refs are file and folder names (an
|
|
131
|
+
* Obsidian vault), so their ordering prefixes (`01 Intro`) sort the sidebar
|
|
132
|
+
* and drop from the route the way a filesystem source's do. Filesystem
|
|
133
|
+
* sources always do; other staged refs are slugs and release tags, kept
|
|
134
|
+
* whole.
|
|
135
|
+
*/
|
|
136
|
+
readonly orderedNames?: boolean;
|
|
122
137
|
/**
|
|
123
138
|
* Resolved on-disk root, set by sources whose entries live on disk. For
|
|
124
139
|
* filesystem sources it drives folder-meta discovery (scan under this root)
|
|
@@ -128,6 +143,13 @@ export interface ContentSource {
|
|
|
128
143
|
* no local tree.
|
|
129
144
|
*/
|
|
130
145
|
readonly contentRoot?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The globs a filesystem source reads under `contentRoot`, and the ones it
|
|
148
|
+
* skips. Folder-meta discovery honors them, so a `meta.ts` outside the
|
|
149
|
+
* content the source reads is never imported.
|
|
150
|
+
*/
|
|
151
|
+
readonly include?: readonly string[];
|
|
152
|
+
readonly exclude?: readonly string[];
|
|
131
153
|
/** Pull every entry. Called once per scan. */
|
|
132
154
|
load: () => Promise<SourceLoadResult>;
|
|
133
155
|
/** Validate the source is usable; throws a BlumeError when not. */
|
|
@@ -139,12 +161,21 @@ export interface ContentSource {
|
|
|
139
161
|
* remote/static sources omit it (content is frozen for the session).
|
|
140
162
|
*/
|
|
141
163
|
watch?: (onChange: () => void) => () => void;
|
|
164
|
+
/**
|
|
165
|
+
* This source rebuilt on another runtime context. A source passed to
|
|
166
|
+
* `custom()` is constructed before Blume knows the scan's preview flag,
|
|
167
|
+
* refresh policy, or runtime directory; Blume rebuilds it on them through
|
|
168
|
+
* this, so it previews and caches the way the built-in adapter does. The
|
|
169
|
+
* engine factories (`sanitySource`, `contentfulSource`, …) all set it.
|
|
170
|
+
*/
|
|
171
|
+
withContext?: (ctx: SourceContext) => ContentSource;
|
|
142
172
|
}
|
|
143
173
|
/** Context passed to `normalizeEntry`, describing the owning source. */
|
|
144
174
|
export interface NormalizeContext {
|
|
145
175
|
source: {
|
|
146
176
|
monolingual?: boolean;
|
|
147
177
|
name: string;
|
|
178
|
+
orderedNames?: boolean;
|
|
148
179
|
prefix?: string;
|
|
149
180
|
staged: boolean;
|
|
150
181
|
};
|
|
@@ -32,14 +32,21 @@ export declare const baselineScanIgnore: () => string[];
|
|
|
32
32
|
* the scan share the same never-content directory set.
|
|
33
33
|
*/
|
|
34
34
|
export declare const BLUME_WATCH_IGNORE_DIRS: string[];
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Extract root-anchored ignore dirs (`/foo`) from `foo/**`-style excludes. The
|
|
37
|
+
* scan's glob `foo/**` matches `foo` at the source root only, so the watcher
|
|
38
|
+
* skips that one directory: a nested `guides/foo/` is still content, and an
|
|
39
|
+
* edit there must still reload.
|
|
40
|
+
*/
|
|
36
41
|
export declare const excludeDirSegments: (patterns: readonly string[]) => string[];
|
|
37
42
|
/**
|
|
38
43
|
* Build a recursive-watch listener that fires `onChange` for content changes but
|
|
39
|
-
* ignores events whose path crosses an ignored directory segment
|
|
40
|
-
* `ignoreDirs
|
|
41
|
-
* a shape (every dot-name) rather than a list.
|
|
42
|
-
*
|
|
44
|
+
* ignores events whose path crosses an ignored directory — a segment named in
|
|
45
|
+
* `ignoreDirs` at any depth, or one `ignoreSegment` rejects, for a scan whose
|
|
46
|
+
* skip rule is a shape (every dot-name) rather than a list. An entry written
|
|
47
|
+
* with a leading slash (`/drafts`, see {@link excludeDirSegments}) names a
|
|
48
|
+
* directory at the watched root only. A missing `filename` — rare; the
|
|
49
|
+
* platform couldn't name the changed path — falls through to `onChange`
|
|
43
50
|
* rather than silently dropping a real edit. Exported for testing.
|
|
44
51
|
*/
|
|
45
52
|
export declare const ignoringWatchListener: (onChange: () => void, ignoreDirs?: Iterable<string>, ignoreSegment?: (segment: string) => boolean) => WatchListener<string>;
|
|
@@ -41,5 +41,10 @@ export interface StandardSchema<Input = unknown, Output = Input> {
|
|
|
41
41
|
* Whether a config-supplied value implements the `~standard` contract. Generic
|
|
42
42
|
* so it can decode any input at the config boundary (`z.custom` hands it the
|
|
43
43
|
* raw config value) while narrowing whatever type the caller holds.
|
|
44
|
+
*
|
|
45
|
+
* The contract is the `~standard` property, whatever carries it: Zod and
|
|
46
|
+
* Valibot schemas are objects, but an ArkType type is a callable function. The
|
|
47
|
+
* optional-chained probe reads the property off either, and off `null`,
|
|
48
|
+
* `undefined`, or a primitive it finds nothing.
|
|
44
49
|
*/
|
|
45
50
|
export declare const isStandardSchema: <T>(value: T) => value is T & StandardSchema;
|
|
@@ -306,6 +306,13 @@ export interface Navigation {
|
|
|
306
306
|
* locale trees.
|
|
307
307
|
*/
|
|
308
308
|
brandHref?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Where the banner's link points in this locale: `banner.link.href`
|
|
311
|
+
* localized like a featured link, then mounted under `basePath` (a route
|
|
312
|
+
* served outside the content tree keeps its own path). Set when the banner
|
|
313
|
+
* has a link.
|
|
314
|
+
*/
|
|
315
|
+
bannerHref?: string;
|
|
309
316
|
}
|
|
310
317
|
/** The full content graph: the source of truth for generated modules. */
|
|
311
318
|
export interface ContentGraph {
|
|
@@ -392,6 +399,8 @@ export interface RouteManifestEntry {
|
|
|
392
399
|
fallback?: boolean;
|
|
393
400
|
/** True when the page's source publishes one language only (no switcher). */
|
|
394
401
|
monolingual?: boolean;
|
|
402
|
+
/** True when front matter `ai.exclude` keeps the page out of llms.txt. */
|
|
403
|
+
aiExclude?: boolean;
|
|
395
404
|
/** Resolved "last updated" ISO date, when the feature is enabled. */
|
|
396
405
|
lastModified?: string;
|
|
397
406
|
}
|
|
@@ -3,8 +3,11 @@ import type { DeployAdapter, DeployOptions } from "./types.ts";
|
|
|
3
3
|
export declare const NODE_ADAPTER_PACKAGE = "@astrojs/node";
|
|
4
4
|
/**
|
|
5
5
|
* Options for {@link node}: `output`, `site`, and `base`, plus any option of
|
|
6
|
-
* `@astrojs/node` forwarded verbatim (`mode`, `
|
|
7
|
-
* defaults `mode` to `"standalone"`; an option you pass wins.
|
|
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.
|
|
8
11
|
*/
|
|
9
12
|
export type NodeOptions = DeployOptions;
|
|
10
13
|
export type NodeAdapter = DeployAdapter<"node">;
|
|
@@ -49,6 +49,13 @@ export interface StaticDeployment {
|
|
|
49
49
|
*/
|
|
50
50
|
site?: string;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* `deployment.site`: an absolute http(s) URL, which always has a host. A bare
|
|
54
|
+
* `z.url()` takes any scheme, so `localhost:4321` (scheme `localhost:`),
|
|
55
|
+
* `mailto:`, and `javascript:` all passed and became the prefix of every
|
|
56
|
+
* sitemap entry and canonical link.
|
|
57
|
+
*/
|
|
58
|
+
export declare const siteUrlSchema: z.ZodURL;
|
|
52
59
|
/** The named options' schema; every host adapter extends it with `z.json()` passthrough. */
|
|
53
60
|
export declare const deployOptionsSchema: z.ZodObject<{
|
|
54
61
|
base: z.ZodOptional<z.ZodString>;
|
|
@@ -8,10 +8,12 @@ import type { BlumeProject } from "../core/project-graph.ts";
|
|
|
8
8
|
* Written from the integration's `astro:build:done` hook — Astro's channel
|
|
9
9
|
* for exactly this kind of post-build work — into the directory Astro
|
|
10
10
|
* reports as the client output (`dist/`, or `dist/client` for a server
|
|
11
|
-
* build
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* build, or `dist/client/<base>/` on Cloudflare, whose `_headers` goes to
|
|
12
|
+
* the root the platform serves above it). The Vercel adapter copies that
|
|
13
|
+
* directory into its Build Output static tree in a later hook, so the
|
|
14
|
+
* artifacts ride along; every other adapter serves it directly. Running
|
|
15
|
+
* inside the hook rather than after `astro build` returns means an ejected
|
|
16
|
+
* project keeps producing them.
|
|
15
17
|
*
|
|
16
18
|
* Every file yields to one the user ships in `public/` (Astro copied it into
|
|
17
19
|
* the output before this runs).
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
*
|
|
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
|
-
* takes over: the homepage agent-discovery `Link` header
|
|
43
|
-
* `charset=utf-8
|
|
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
|
|
44
45
|
* exempted from worker-first routing with negative rules, keeping their
|
|
45
46
|
* `_headers` treatment and their zero-Worker serving path.
|
|
46
47
|
*
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { ResolvedConfig } from "../core/schema.ts";
|
|
2
|
+
/** Where the generated endpoint serves content-source images from. */
|
|
3
|
+
export declare const CONTENT_ASSETS_ROOT = "/blume-assets";
|
|
2
4
|
/**
|
|
3
5
|
* The policy a content-source SVG is served with: an opaque origin with
|
|
4
6
|
* scripts off, so an uploaded SVG that carries a `<script>` stays inert when
|
|
5
|
-
* opened directly.
|
|
6
|
-
* {@link headerRules} carries it to static hosts.
|
|
7
|
+
* opened directly.
|
|
7
8
|
*/
|
|
8
9
|
export declare const SVG_ASSET_POLICY = "sandbox";
|
|
10
|
+
/**
|
|
11
|
+
* The headers a content-source SVG is served with: the sandbox policy, and no
|
|
12
|
+
* MIME sniffing. The endpoint sends them from the dev runtime; every host
|
|
13
|
+
* gets them for the built files — static hosts through {@link headerRules},
|
|
14
|
+
* server builds through each platform's own mechanism (`deploy/platforms`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const SVG_ASSET_HEADERS: {
|
|
17
|
+
"Content-Security-Policy": string;
|
|
18
|
+
"X-Content-Type-Options": string;
|
|
19
|
+
};
|
|
20
|
+
/** The served glob of content-source SVGs, under the deployment base. */
|
|
21
|
+
export declare const svgAssetPath: (config: ResolvedConfig) => string;
|
|
9
22
|
/**
|
|
10
23
|
* One static-host header rule: a served path (a `*` glob spanning path
|
|
11
24
|
* segments, or an exact path) and the header it sets there.
|
|
@@ -17,11 +30,9 @@ export interface HeaderRule {
|
|
|
17
30
|
}
|
|
18
31
|
/**
|
|
19
32
|
* The header rules every static host should apply, in `_headers` glob syntax.
|
|
20
|
-
* The glob carries the
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* wildcard spans path segments, so a nested route like `/docs/ja/intro.md`
|
|
24
|
-
* matches too.
|
|
33
|
+
* The glob carries the deployment base so the rules still match once the site
|
|
34
|
+
* is mounted under a subpath (`/docs/*.md`); the wildcard spans path
|
|
35
|
+
* segments, so a nested route like `/docs/ja/intro.md` matches too.
|
|
25
36
|
*
|
|
26
37
|
* When a homepage `Link` header is provided (see `ai/link-headers.ts`), an
|
|
27
38
|
* exact-path rule for the root page advertises the agent-discovery resources —
|
|
@@ -33,6 +44,19 @@ export declare const headerRules: (config: ResolvedConfig, homeLinkHeader?: stri
|
|
|
33
44
|
* indented header line, in the two-space format Netlify and Cloudflare read.
|
|
34
45
|
*/
|
|
35
46
|
export declare const buildNetlifyHeaders: (config: ResolvedConfig, homeLinkHeader?: string | null) => string;
|
|
47
|
+
/** One entry of Netlify's Frameworks API config `headers` array. */
|
|
48
|
+
export interface NetlifyConfigHeaders {
|
|
49
|
+
for: string;
|
|
50
|
+
values: Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The {@link headerRules} as Netlify Frameworks API `headers` entries
|
|
54
|
+
* (`.netlify/v1/config.json`), one per path with every header it sets. A
|
|
55
|
+
* `netlify()` server build reads no `_headers` file, so it carries the same
|
|
56
|
+
* rules here, in the `for`/`values` form that follows `netlify.toml`'s
|
|
57
|
+
* `[[headers]]` and the same path syntax as `_headers`.
|
|
58
|
+
*/
|
|
59
|
+
export declare const buildNetlifyConfigHeaders: (config: ResolvedConfig, homeLinkHeader?: string | null) => NetlifyConfigHeaders[];
|
|
36
60
|
/** One entry of `vercel.json`'s `headers` array. */
|
|
37
61
|
export interface VercelHeader {
|
|
38
62
|
headers: {
|
|
@@ -41,6 +65,11 @@ export interface VercelHeader {
|
|
|
41
65
|
}[];
|
|
42
66
|
source: string;
|
|
43
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A literal path as `path-to-regexp` source text — what a `vercel.json`
|
|
70
|
+
* `source` is — with each syntax character escaped, so it matches only itself.
|
|
71
|
+
*/
|
|
72
|
+
export declare const escapeVercelSource: (path: string) => string;
|
|
44
73
|
/**
|
|
45
74
|
* The {@link headerRules} as `vercel.json` `headers` entries. Vercel reads no
|
|
46
75
|
* `_headers` file, so a static deploy of `dist/` carries the same rules here —
|
|
@@ -10,6 +10,12 @@ import type { BuildLog } from "./platforms/types.ts";
|
|
|
10
10
|
* (`deploy/headers.ts`) that a Node server has no file to read from. The Markdown
|
|
11
11
|
* and text charsets need no rule here: `send` already adds `charset=UTF-8` to
|
|
12
12
|
* `text/*` types.
|
|
13
|
+
*
|
|
14
|
+
* The same wrapper answers the configured redirects. Astro's own handler
|
|
15
|
+
* honors a redirect's configured status only when its destination resolves
|
|
16
|
+
* to a discrete route, and Blume serves every page from `[...slug]`, so a
|
|
17
|
+
* `302` or `307` would go out as a `301` or `308` — permanent redirects that
|
|
18
|
+
* browsers cache.
|
|
13
19
|
*/
|
|
14
20
|
/** The headers one exact served path (deployment base included) gets. */
|
|
15
21
|
export interface NodeHeaderRule {
|
|
@@ -23,20 +29,49 @@ export declare const NODE_ASTRO_ENTRY_FILE = "astro-entry.mjs";
|
|
|
23
29
|
/** The header rules for this config, merged per path. */
|
|
24
30
|
export declare const nodeHeaderRules: (config: ResolvedConfig) => NodeHeaderRule[];
|
|
25
31
|
/**
|
|
26
|
-
* The
|
|
27
|
-
*
|
|
28
|
-
|
|
32
|
+
* The configured redirects the wrapper answers, keyed by served path (the
|
|
33
|
+
* trailing slash trimmed), each to its `Location` and exact status.
|
|
34
|
+
*/
|
|
35
|
+
export type NodeRedirects = Record<string, [string, number]>;
|
|
36
|
+
/**
|
|
37
|
+
* The configured redirects, based the way the host matches them (see
|
|
38
|
+
* `platformRedirects`) and keyed for the wrapper's lookup, the `Location`
|
|
39
|
+
* percent-encoded as Astro sends it. A redirect at a content route's own path
|
|
40
|
+
* is left out: the prerendered page owns that URL, and the static handler
|
|
41
|
+
* serves it before Astro's redirect ever could.
|
|
42
|
+
*/
|
|
43
|
+
export declare const nodeRedirects: (project: BlumeProject) => NodeRedirects;
|
|
44
|
+
/** What the wrapper needs beyond the header rules. */
|
|
45
|
+
export interface NodeEntryOptions {
|
|
46
|
+
/** `deployment.base`, normalized (`""` at the root). */
|
|
47
|
+
base?: string;
|
|
48
|
+
/** The configured redirects, from {@link nodeRedirects}. */
|
|
49
|
+
redirects?: NodeRedirects;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The entry that replaces Astro's: it answers a configured redirect with its
|
|
53
|
+
* exact status, and otherwise stamps the rules' headers on the response and
|
|
54
|
+
* hands the request to Astro's handler. `send` leaves a Content-Type that is
|
|
55
|
+
* already set alone, so the registered media type wins.
|
|
56
|
+
*
|
|
57
|
+
* A rule matches the file the static handler will serve, not the raw URL:
|
|
58
|
+
* Astro strips the base when it leads the path and serves the rest from the
|
|
59
|
+
* client directory either way, and `send` decodes and normalizes the path —
|
|
60
|
+
* so `/docs/blume-assets/a.sv%67`, `/blume-assets/a.svg`, and
|
|
61
|
+
* `/docs//x/../blume-assets/a.svg` are all the same SVG. The comparison
|
|
62
|
+
* ignores case, as a case-insensitive disk and `send`'s MIME lookup do.
|
|
29
63
|
*
|
|
30
64
|
* It keeps Astro's contract — the `handler`, `options`, and `startServer`
|
|
31
65
|
* exports `astro preview` and a middleware-mode host import — and its
|
|
32
66
|
* autostart: Astro's entry is imported with autostart off (the env var is read
|
|
33
67
|
* when that module evaluates, so the import has to be dynamic), and the
|
|
34
|
-
* wrapper starts the server itself
|
|
68
|
+
* wrapper starts the server itself, taking over its request listener so a
|
|
69
|
+
* redirect is answered before Astro sees the request.
|
|
35
70
|
*/
|
|
36
|
-
export declare const nodeEntryWrapper: (rules: readonly NodeHeaderRule[]) => string;
|
|
71
|
+
export declare const nodeEntryWrapper: (rules: readonly NodeHeaderRule[], options?: NodeEntryOptions) => string;
|
|
37
72
|
/**
|
|
38
|
-
* Put the
|
|
39
|
-
*
|
|
40
|
-
*
|
|
73
|
+
* Put the wrapper in front of a Node server build's entry. A build with no
|
|
74
|
+
* rule (no API catalog, AI catalog, MCP server, signatures directory, or
|
|
75
|
+
* downloaded content assets) and no redirect leaves Astro's entry alone.
|
|
41
76
|
*/
|
|
42
77
|
export declare const wrapNodeEntry: (project: BlumeProject, log: BuildLog) => Promise<void>;
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { BlumeProject } from "../../core/project-graph.ts";
|
|
2
|
+
import type { BuildLog, DeployPlatform, RedirectFile } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* `_redirects`, the format Netlify and Cloudflare Pages/Workers read, in the
|
|
5
|
+
* form both accept: a static build for Cloudflare, or for no named host.
|
|
6
|
+
*/
|
|
3
7
|
export declare const REDIRECTS_FILE: RedirectFile;
|
|
8
|
+
/**
|
|
9
|
+
* `_redirects` for a `netlify()` static build, every rule forced (`301!`).
|
|
10
|
+
* Astro writes a redirect page at each `from` (`dist/old/index.html`), and
|
|
11
|
+
* Netlify serves a file that exists ahead of an unforced rule, so without the
|
|
12
|
+
* flag that page would answer with a 200 instead of the redirect.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NETLIFY_REDIRECTS_FILE: RedirectFile;
|
|
15
|
+
/** The Frameworks API config, once the build surfaced it to the project root. */
|
|
16
|
+
export declare const NETLIFY_CONFIG_FILE: string;
|
|
17
|
+
/**
|
|
18
|
+
* Carry the static header rules into a server build. A static `netlify()`
|
|
19
|
+
* build gets them from `_headers` (see `deploy/artifacts.ts`), but a server
|
|
20
|
+
* build's header rules go in the Frameworks API config the adapter writes
|
|
21
|
+
* (`.netlify/v1/config.json`, beside its own `Cache-Control` rule for
|
|
22
|
+
* `/_astro/*`), which follows the same rules as `netlify.toml`'s
|
|
23
|
+
* `[[headers]]`: the charset on the raw Markdown and text files, the homepage
|
|
24
|
+
* `Link` header, the discovery files' media types and CORS header, and the
|
|
25
|
+
* sandbox on downloaded SVGs, which Netlify serves from the publish directory
|
|
26
|
+
* as static files, so the prerendered endpoint's own headers never ship.
|
|
27
|
+
*/
|
|
28
|
+
export declare const emitNetlifyHeaders: (project: BlumeProject, log: BuildLog) => Promise<void>;
|
|
4
29
|
/**
|
|
5
30
|
* Netlify. A server build runs on Netlify Functions from the Frameworks API
|
|
6
31
|
* tree the adapter writes to `.netlify/v1`, relative to the Astro root —
|
|
@@ -2,10 +2,11 @@ import type { DeployPlatform } from "./types.ts";
|
|
|
2
2
|
/**
|
|
3
3
|
* A self-hosted Node server. The standalone server in `dist/server` serves
|
|
4
4
|
* `dist/client` through its own static handler, which has no `_headers` or
|
|
5
|
-
* `_redirects` support
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* `_redirects` support, so a file written there would be inert. A wrapper
|
|
6
|
+
* around the server entry (`deploy/node-headers.ts`) sets the headers the
|
|
7
|
+
* discovery files and downloaded SVGs need instead, and answers the
|
|
8
|
+
* configured redirects with their exact status, which Astro's own handler
|
|
9
|
+
* would default to 301 or 308. No platform env to detect: the site URL has to
|
|
10
|
+
* be configured.
|
|
10
11
|
*/
|
|
11
12
|
export declare const nodePlatform: DeployPlatform;
|
|
@@ -89,6 +89,13 @@ export interface DeployPlatform {
|
|
|
89
89
|
kind: DeployAdapterKind;
|
|
90
90
|
/** Whether a server build honors `Accept: text/markdown` at the content URLs. */
|
|
91
91
|
negotiatesMarkdown: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The host CLI command that deploys a preview, for a platform whose
|
|
94
|
+
* `@astrojs/*` adapter has no local preview server: Astro's `preview`
|
|
95
|
+
* throws for its server build, so `blume preview` points here instead. Null
|
|
96
|
+
* when the adapter can preview a server build locally, or there is none.
|
|
97
|
+
*/
|
|
98
|
+
previewDeploy: string | null;
|
|
92
99
|
/**
|
|
93
100
|
* Whether the platform applies a `_headers` file to the static assets it
|
|
94
101
|
* serves, per output mode.
|
|
@@ -96,6 +103,14 @@ export interface DeployPlatform {
|
|
|
96
103
|
readsHeaderFiles: Record<DeployOutput, boolean>;
|
|
97
104
|
/** The redirect files a static build writes, beside the manifest. */
|
|
98
105
|
redirectFiles: RedirectFile[];
|
|
106
|
+
/**
|
|
107
|
+
* Whether the adapter moves a server build's client output under
|
|
108
|
+
* `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`,
|
|
111
|
+
* belong above the directory Astro reports.
|
|
112
|
+
*/
|
|
113
|
+
serverClientUnderBase: boolean;
|
|
99
114
|
/** Where a server build's deploy bundle lands. */
|
|
100
115
|
serverOutputDir: (context: ProjectContext) => string;
|
|
101
116
|
/** The directory a server build serves as static files. */
|
|
@@ -26,7 +26,8 @@ export declare const emitVercelNegotiation: (project: BlumeProject, log: BuildLo
|
|
|
26
26
|
* `@vercel/nft` dependency trace is rooted there too, and tracing from the
|
|
27
27
|
* hidden runtime silently drops the function's chunks and `node_modules`.
|
|
28
28
|
* Static assets are served from the tree's `static/` half, so the deploy
|
|
29
|
-
* artifacts are written there; headers
|
|
30
|
-
*
|
|
29
|
+
* artifacts are written there; headers (the discovery files', the sandbox on
|
|
30
|
+
* downloaded SVGs) arrive through the routing config rather than a
|
|
31
|
+
* `_headers` file, which Vercel never reads.
|
|
31
32
|
*/
|
|
32
33
|
export declare const vercelPlatform: DeployPlatform;
|