blume 2.0.1 → 2.0.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.
- package/CHANGELOG.md +82 -0
- package/dist/cli/{chunk-vtk4a6dg.js → chunk-00gs3wqs.js} +1 -1
- package/dist/cli/{chunk-fa25z98p.js → chunk-273ygyr4.js} +4 -3
- package/dist/cli/chunk-273ygyr4.js.map +11 -0
- package/dist/cli/{chunk-yw7dm696.js → chunk-3yce002v.js} +21 -8
- package/dist/cli/{chunk-yw7dm696.js.map → chunk-3yce002v.js.map} +3 -3
- package/dist/cli/{chunk-yt5n7ppj.js → chunk-4e9b9ra6.js} +17 -7
- package/dist/cli/chunk-4e9b9ra6.js.map +10 -0
- package/dist/cli/{chunk-fs23ddbb.js → chunk-5r8g91qn.js} +352 -676
- package/dist/cli/chunk-5r8g91qn.js.map +34 -0
- package/dist/cli/{chunk-6vm74dry.js → chunk-6dtt0zfn.js} +8 -8
- package/dist/cli/{chunk-qwsrynx5.js → chunk-6k4ftwze.js} +38 -19
- package/dist/cli/{chunk-qwsrynx5.js.map → chunk-6k4ftwze.js.map} +4 -4
- package/dist/cli/{chunk-qs4q5p4e.js → chunk-7mbqtmgb.js} +16 -7
- package/dist/cli/chunk-7mbqtmgb.js.map +10 -0
- package/dist/cli/{chunk-q5163e60.js → chunk-7vtckvaw.js} +21 -19
- package/dist/cli/chunk-7vtckvaw.js.map +11 -0
- package/dist/cli/{chunk-kdp5q7ke.js → chunk-8g8ytmgx.js} +17 -18
- package/dist/cli/{chunk-kdp5q7ke.js.map → chunk-8g8ytmgx.js.map} +2 -2
- package/dist/cli/{chunk-epjnccmv.js → chunk-91ws1n6j.js} +18 -15
- package/dist/cli/chunk-91ws1n6j.js.map +10 -0
- package/dist/cli/{chunk-fxypxtvm.js → chunk-bbnwccaz.js} +2 -2
- package/dist/cli/{chunk-m3vmjgmq.js → chunk-bfwp9vp6.js} +16 -8
- package/dist/cli/chunk-bfwp9vp6.js.map +10 -0
- package/dist/cli/{chunk-f2z5v128.js → chunk-d1v5rhy0.js} +14 -15
- package/dist/cli/{chunk-f2z5v128.js.map → chunk-d1v5rhy0.js.map} +2 -2
- package/dist/cli/{chunk-6crbhc3x.js → chunk-ddndchfr.js} +21 -6
- package/dist/cli/chunk-ddndchfr.js.map +14 -0
- package/dist/cli/{chunk-ce574jw2.js → chunk-esh98wmb.js} +1 -1
- package/dist/cli/{chunk-zxcczpyx.js → chunk-fsmrqk8a.js} +1 -1
- package/dist/cli/{chunk-hdpx1tax.js → chunk-g698a744.js} +5 -5
- package/dist/cli/{chunk-jts8mvcz.js → chunk-gs7r695n.js} +9 -3
- package/dist/cli/{chunk-jts8mvcz.js.map → chunk-gs7r695n.js.map} +3 -3
- package/dist/cli/{chunk-zxh4d9vy.js → chunk-h2ez8dzb.js} +4 -4
- package/dist/cli/{chunk-5shv93fd.js → chunk-h7k3nq3v.js} +2 -2
- package/dist/cli/{chunk-79jhk4py.js → chunk-hqp2ajnh.js} +251 -122
- package/dist/cli/chunk-hqp2ajnh.js.map +35 -0
- package/dist/cli/{chunk-2hn4b8z7.js → chunk-hr8ne106.js} +109 -40
- package/dist/cli/chunk-hr8ne106.js.map +13 -0
- package/dist/cli/{chunk-6hsn950k.js → chunk-j85scx15.js} +62 -18
- package/dist/cli/chunk-j85scx15.js.map +10 -0
- package/dist/cli/{chunk-s1p84fyh.js → chunk-k7pj68a8.js} +63 -22
- package/dist/cli/chunk-k7pj68a8.js.map +11 -0
- package/dist/cli/{chunk-ah61y8py.js → chunk-mqc662a6.js} +2 -2
- package/dist/cli/{chunk-ch6g3ar0.js → chunk-n1yg3tj3.js} +4 -4
- package/dist/cli/{chunk-mb2919y2.js → chunk-nfcyttvj.js} +17 -6
- package/dist/cli/chunk-nfcyttvj.js.map +10 -0
- package/dist/cli/{chunk-kpf8rrjc.js → chunk-pbg5a4s3.js} +56 -24
- package/dist/cli/chunk-pbg5a4s3.js.map +19 -0
- package/dist/cli/{chunk-jwyddg7y.js → chunk-ppzjqwx2.js} +21 -14
- package/dist/cli/{chunk-jwyddg7y.js.map → chunk-ppzjqwx2.js.map} +4 -4
- package/dist/cli/{chunk-dh8cwk36.js → chunk-qkb5a8sa.js} +24 -9
- package/dist/cli/chunk-qkb5a8sa.js.map +10 -0
- package/dist/cli/{chunk-wm7js3j9.js → chunk-sqw4ekg1.js} +2 -2
- package/dist/cli/{chunk-qkqwkpte.js → chunk-v6ya5kcb.js} +3083 -953
- package/dist/cli/chunk-v6ya5kcb.js.map +189 -0
- package/dist/cli/{chunk-fz5wtpmh.js → chunk-w4bxdvsa.js} +18 -15
- package/dist/cli/chunk-w4bxdvsa.js.map +10 -0
- package/dist/cli/{chunk-27g6wdth.js → chunk-wdrt2k2v.js} +2 -2
- package/dist/cli/{chunk-wgm7m9qk.js → chunk-xh43dwgw.js} +158 -43
- package/dist/cli/chunk-xh43dwgw.js.map +36 -0
- package/dist/cli/{chunk-s6jhgk0q.js → chunk-zp79m0ts.js} +2 -2
- package/dist/cli/index.js +160 -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/relative-links.d.ts +9 -4
- package/dist/types/ai/static-expression.d.ts +28 -0
- package/dist/types/analytics/databuddy.d.ts +43 -0
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/schema.d.ts +14 -0
- 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 +9 -0
- package/dist/types/core/config-input.d.ts +4 -4
- package/dist/types/core/config.d.ts +2 -2
- package/dist/types/core/graph.d.ts +2 -0
- package/dist/types/core/i18n-ui.d.ts +31 -0
- package/dist/types/core/i18n.d.ts +7 -1
- 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 +5 -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 +52 -13
- package/dist/types/core/sources/github-releases.d.ts +5 -0
- package/dist/types/core/sources/lower.d.ts +14 -2
- package/dist/types/core/sources/normalize.d.ts +10 -1
- 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/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/cloudflare-negotiation.d.ts +3 -2
- package/dist/types/deploy/headers.d.ts +31 -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 +7 -0
- package/dist/types/deploy/platforms/vercel.d.ts +3 -2
- package/dist/types/deploy/redirects.d.ts +7 -2
- package/dist/types/deploy/vercel-negotiation.d.ts +3 -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 +17 -8
- package/docs/08-faq.mdx +9 -2
- package/docs/advanced/changelog.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +4 -2
- package/docs/cli/audit.mdx +2 -2
- package/docs/cli/doctor.mdx +2 -2
- package/docs/cli/evals.mdx +2 -2
- package/docs/cli/index.mdx +4 -1
- package/docs/cli/translate.mdx +1 -1
- package/docs/configuration/analytics.mdx +23 -2
- package/docs/configuration/assistant.mdx +1 -1
- package/docs/configuration/customization.mdx +4 -3
- package/docs/configuration/index.mdx +5 -3
- package/docs/configuration/search.mdx +1 -1
- package/docs/content/components.mdx +1 -1
- package/docs/content/frontmatter.mdx +5 -1
- package/docs/content/i18n.mdx +1 -1
- package/docs/content/index.mdx +4 -2
- package/docs/content/meta.mdx +5 -3
- package/docs/content/navigation.mdx +29 -4
- package/docs/content/sources.mdx +18 -12
- package/docs/content/versioning.mdx +1 -0
- package/docs/discoverability/agent-discovery.mdx +21 -7
- package/docs/discoverability/index.mdx +2 -2
- package/docs/discoverability/llms-txt.mdx +2 -5
- package/docs/discoverability/markdown.mdx +5 -3
- package/docs/discoverability/mcp.mdx +4 -0
- package/docs/discoverability/metadata.mdx +3 -2
- package/docs/discoverability/open-graph.mdx +6 -4
- package/docs/discoverability/rss.mdx +3 -1
- package/docs/references/asyncapi.mdx +1 -1
- package/docs/references/graphql.mdx +2 -2
- package/docs/references/openapi.mdx +3 -3
- 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/mintlify.md +3 -3
- package/skills/blume-migrate/references/monorepo.md +1 -1
- package/skills/blume-migrate/references/nextra.md +1 -1
- package/skills/blume-migrate/references/starlight.md +5 -5
- package/skills/blume-migrate/scripts/mintlify-codemod.mjs +2 -2
- package/skills/blume-update-docs/references/audit-checklist.md +1 -1
- package/src/ai/agent-surface.ts +56 -0
- package/src/ai/api/spec.ts +15 -2
- package/src/ai/api-catalog.ts +7 -1
- package/src/ai/ask-context.ts +14 -2
- package/src/ai/ask-data.ts +26 -12
- package/src/ai/component-markdown.ts +43 -37
- package/src/ai/link-headers.ts +8 -3
- package/src/ai/llms.ts +4 -3
- package/src/ai/markdown.ts +23 -11
- package/src/ai/mcp/server.ts +78 -7
- package/src/ai/relative-links.ts +78 -10
- package/src/ai/static-expression.ts +416 -0
- package/src/ai/visibility.ts +45 -14
- package/src/analytics/databuddy.ts +67 -0
- package/src/analytics/head.ts +4 -0
- package/src/analytics/index.ts +2 -0
- package/src/analytics/posthog.ts +21 -3
- package/src/analytics/schema.ts +2 -0
- package/src/astro/generate.ts +71 -27
- package/src/astro/templates.ts +61 -23
- 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 +14 -0
- 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/report.ts +54 -17
- package/src/audit/run.ts +1 -0
- package/src/audit/types.ts +18 -0
- package/src/audit/url.ts +37 -6
- package/src/cli/build-failure.ts +50 -0
- package/src/cli/commands/audit.ts +7 -0
- package/src/cli/commands/build.ts +19 -5
- package/src/cli/commands/check.ts +2 -0
- package/src/cli/commands/eval.ts +1 -7
- 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 +9 -6
- package/src/cli/commands/upgrade.ts +11 -0
- 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/components/content/AccordionItem.astro +26 -22
- package/src/components/content/Badge.astro +2 -9
- package/src/components/content/Card.astro +2 -2
- package/src/components/content/Component.astro +9 -3
- 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/Tabs.astro +54 -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 +17 -0
- package/src/components/content/base-href.ts +18 -3
- package/src/components/content/inline-markdown.ts +27 -7
- package/src/components/copy-feedback.ts +35 -8
- package/src/components/islands/assistant.tsx +16 -2
- package/src/components/islands/hooks.ts +7 -2
- package/src/components/islands/webmcp.ts +12 -8
- package/src/components/layout/Banner.astro +23 -4
- package/src/components/layout/Header.astro +22 -9
- package/src/components/layout/Logo.astro +5 -0
- package/src/components/layout/NavSelector.astro +6 -1
- package/src/components/layout/NavTabMenu.astro +133 -0
- package/src/components/layout/NavTree.astro +15 -6
- package/src/components/layout/NavTreeCache.astro +5 -2
- package/src/components/layout/NavTreeScript.astro +45 -5
- package/src/components/layout/PageLayout.astro +22 -8
- package/src/components/layout/ReferenceLayout.astro +4 -1
- package/src/components/layout/RootLayout.astro +21 -8
- package/src/components/layout/Search.astro +5 -1
- package/src/components/layout/analytics-client.ts +2 -0
- package/src/components/openapi/GraphqlType.astro +11 -3
- package/src/components/openapi/MessageComposer.astro +1 -1
- package/src/components/openapi/Operation.astro +21 -5
- package/src/components/openapi/PanelTabs.astro +4 -1
- package/src/components/openapi/Playground.astro +8 -2
- package/src/components/openapi/RequestPanel.astro +9 -5
- package/src/components/openapi/SchemaProperty.astro +11 -33
- package/src/components/openapi/SchemaTable.astro +27 -52
- package/src/components/openapi/helpers.ts +90 -12
- package/src/components/openapi/message-composer.ts +8 -0
- package/src/components/openapi/message-model.ts +12 -2
- package/src/components/openapi/message.ts +4 -1
- package/src/components/openapi/operation-model.ts +40 -8
- package/src/components/openapi/panel.ts +29 -5
- package/src/components/openapi/playground-client.ts +37 -7
- package/src/components/openapi/playground-schema.ts +25 -6
- package/src/components/openapi/request.ts +2 -0
- package/src/components/openapi/schema-tree.ts +203 -0
- package/src/components/openapi/snippets.ts +30 -15
- package/src/components/openapi/validate-json.ts +1 -1
- package/src/core/base-path.ts +15 -0
- package/src/core/config-input.ts +4 -4
- package/src/core/config.ts +18 -4
- package/src/core/diagnostics.ts +217 -30
- package/src/core/graph.ts +120 -11
- package/src/core/i18n-ui.ts +39 -2
- package/src/core/i18n.ts +13 -2
- package/src/core/links.ts +7 -4
- package/src/core/load-module.ts +20 -0
- package/src/core/locale-links.ts +17 -17
- package/src/core/manifest.ts +3 -2
- package/src/core/meta.ts +69 -6
- package/src/core/nav-diagnostics.ts +56 -1
- package/src/core/navigation.ts +245 -76
- package/src/core/ordering-prefix.ts +27 -0
- package/src/core/project-graph.ts +23 -1
- package/src/core/safe-href.ts +53 -1
- package/src/core/safe-links.ts +11 -2
- package/src/core/schema.ts +70 -14
- package/src/core/sources/assets.ts +83 -41
- package/src/core/sources/contentful-rich-text.ts +3 -2
- package/src/core/sources/contentful.ts +25 -12
- package/src/core/sources/filesystem.ts +5 -1
- package/src/core/sources/github-releases.ts +106 -5
- package/src/core/sources/lexical.ts +9 -4
- package/src/core/sources/lower.ts +79 -26
- package/src/core/sources/mdx-remote.ts +1 -0
- package/src/core/sources/normalize.ts +132 -30
- package/src/core/sources/notion.ts +26 -10
- package/src/core/sources/obsidian.ts +17 -3
- package/src/core/sources/payload.ts +1 -0
- package/src/core/sources/portable-text.ts +63 -44
- 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 +9 -4
- package/src/core/sources/strapi.ts +1 -0
- package/src/core/sources/types.ts +31 -0
- 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 +17 -2
- 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 +25 -5
- package/src/deploy/cloudflare-negotiation.ts +23 -4
- package/src/deploy/headers.ts +67 -51
- package/src/deploy/node-headers.ts +148 -27
- package/src/deploy/platforms/cloudflare.ts +1 -0
- package/src/deploy/platforms/netlify.ts +82 -5
- package/src/deploy/platforms/node.ts +7 -5
- package/src/deploy/platforms/static.ts +1 -0
- package/src/deploy/platforms/types.ts +7 -0
- package/src/deploy/platforms/vercel.ts +9 -3
- package/src/deploy/redirects.ts +14 -3
- 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 +55 -8
- package/src/markdown/index.ts +6 -3
- package/src/markdown/relative-links.ts +3 -23
- package/src/markdown/route-snapshot.ts +37 -0
- package/src/og/card.ts +20 -4
- package/src/og/derive.ts +145 -4
- package/src/openapi/graphql-build.ts +28 -2
- package/src/openapi/model.ts +77 -13
- package/src/openapi/render-mdx.ts +10 -1
- package/src/registry/eject.ts +119 -22
- package/src/search/documents.ts +22 -1
- package/src/search/sync/algolia.ts +36 -2
- 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 +11 -3
- package/src/translate/run.ts +11 -5
- package/src/translate/validate.ts +10 -1
- package/src/translate/work-list.ts +36 -3
- package/src/upgrade/upgrade.ts +36 -4
- 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-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-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-vtk4a6dg.js.map → chunk-00gs3wqs.js.map} +0 -0
- /package/dist/cli/{chunk-6vm74dry.js.map → chunk-6dtt0zfn.js.map} +0 -0
- /package/dist/cli/{chunk-fxypxtvm.js.map → chunk-bbnwccaz.js.map} +0 -0
- /package/dist/cli/{chunk-ce574jw2.js.map → chunk-esh98wmb.js.map} +0 -0
- /package/dist/cli/{chunk-zxcczpyx.js.map → chunk-fsmrqk8a.js.map} +0 -0
- /package/dist/cli/{chunk-hdpx1tax.js.map → chunk-g698a744.js.map} +0 -0
- /package/dist/cli/{chunk-zxh4d9vy.js.map → chunk-h2ez8dzb.js.map} +0 -0
- /package/dist/cli/{chunk-5shv93fd.js.map → chunk-h7k3nq3v.js.map} +0 -0
- /package/dist/cli/{chunk-ah61y8py.js.map → chunk-mqc662a6.js.map} +0 -0
- /package/dist/cli/{chunk-ch6g3ar0.js.map → chunk-n1yg3tj3.js.map} +0 -0
- /package/dist/cli/{chunk-wm7js3j9.js.map → chunk-sqw4ekg1.js.map} +0 -0
- /package/dist/cli/{chunk-27g6wdth.js.map → chunk-wdrt2k2v.js.map} +0 -0
- /package/dist/cli/{chunk-s6jhgk0q.js.map → chunk-zp79m0ts.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discoverIslands,
|
|
4
4
|
missingDependencyDiagnostic
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-sqw4ekg1.js";
|
|
6
6
|
import {
|
|
7
7
|
packageRoot,
|
|
8
8
|
commandMeta,
|
|
@@ -14,23 +14,23 @@ import {
|
|
|
14
14
|
reportDiagnosticsJson,
|
|
15
15
|
reportDiagnostics
|
|
16
16
|
} from "./index.js";
|
|
17
|
-
import"./chunk-
|
|
17
|
+
import"./chunk-v6ya5kcb.js";
|
|
18
18
|
import {
|
|
19
19
|
ComponentOverridesError,
|
|
20
20
|
analyzeComponentOverrides
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import"./chunk-
|
|
21
|
+
} from "./chunk-00gs3wqs.js";
|
|
22
|
+
import"./chunk-gs7r695n.js";
|
|
23
23
|
import {
|
|
24
24
|
scanProject
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5r8g91qn.js";
|
|
26
26
|
import"./chunk-jq5n4avg.js";
|
|
27
27
|
import {
|
|
28
28
|
unregisteredSnapshotDiagnostics
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7mbqtmgb.js";
|
|
30
30
|
import {
|
|
31
31
|
serverFeatures,
|
|
32
32
|
checkRequiredSecrets
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-mqc662a6.js";
|
|
34
34
|
|
|
35
35
|
// src/cli/commands/doctor.ts
|
|
36
36
|
import { readFileSync } from "node:fs";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
//# debugId=57C3E0688A0BB3FA64756E2164756E21
|
|
148
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# sourceMappingURL=chunk-6dtt0zfn.js.map
|
|
@@ -531,7 +531,7 @@ var CHECKS = [
|
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
category: "sitemap",
|
|
534
|
-
fix: "Sitemaps must be valid XML in the sitemaps.org urlset format.",
|
|
534
|
+
fix: "Sitemaps must be valid XML in the sitemaps.org urlset or sitemap index format.",
|
|
535
535
|
id: "BLUME_AUDIT_SITEMAP_INVALID",
|
|
536
536
|
severity: "error",
|
|
537
537
|
tier: "static",
|
|
@@ -627,7 +627,7 @@ var CHECKS = [
|
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
629
|
category: "ai",
|
|
630
|
-
fix: "Rebuild so llms.txt matches the site; if the page is deliberately excluded,
|
|
630
|
+
fix: "Rebuild so llms.txt matches the site; if the page is deliberately excluded, set `ai.exclude: true` in its front matter.",
|
|
631
631
|
id: "BLUME_AUDIT_LLMS_TXT_PAGE_MISSING",
|
|
632
632
|
severity: "warning",
|
|
633
633
|
tier: "static",
|
|
@@ -763,6 +763,30 @@ var TIER_FLAGS = [
|
|
|
763
763
|
{ flag: "--external", tier: "external" },
|
|
764
764
|
{ flag: "--url <origin>", tier: "network" }
|
|
765
765
|
];
|
|
766
|
+
var SEVERITY_ORDER = {
|
|
767
|
+
error: 0,
|
|
768
|
+
info: 2,
|
|
769
|
+
warning: 1
|
|
770
|
+
};
|
|
771
|
+
var worstSeverity = (findings) => {
|
|
772
|
+
let worst = "info";
|
|
773
|
+
for (const finding of findings) {
|
|
774
|
+
if (SEVERITY_ORDER[finding.severity] < SEVERITY_ORDER[worst]) {
|
|
775
|
+
worst = finding.severity;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
return worst;
|
|
779
|
+
};
|
|
780
|
+
var firstPerPage = (findings) => {
|
|
781
|
+
const seen = new Set;
|
|
782
|
+
return findings.filter((finding) => {
|
|
783
|
+
if (seen.has(finding.url)) {
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
786
|
+
seen.add(finding.url);
|
|
787
|
+
return true;
|
|
788
|
+
});
|
|
789
|
+
};
|
|
766
790
|
var rollup = (diagnostics) => {
|
|
767
791
|
const groups = new Map;
|
|
768
792
|
for (const diagnostic of diagnostics) {
|
|
@@ -773,29 +797,25 @@ var rollup = (diagnostics) => {
|
|
|
773
797
|
groups.set(diagnostic.code, [diagnostic]);
|
|
774
798
|
}
|
|
775
799
|
}
|
|
776
|
-
const order = {
|
|
777
|
-
error: 0,
|
|
778
|
-
info: 2,
|
|
779
|
-
warning: 1
|
|
780
|
-
};
|
|
781
800
|
const checks = [...groups.entries()].map(([id, findings]) => {
|
|
782
801
|
const checkId = id;
|
|
783
|
-
const { category,
|
|
802
|
+
const { category, title } = checkMeta(checkId);
|
|
784
803
|
return {
|
|
785
804
|
category,
|
|
786
805
|
count: findings.length,
|
|
787
806
|
findings,
|
|
788
807
|
id: checkId,
|
|
789
|
-
|
|
808
|
+
pages: firstPerPage(findings).length,
|
|
809
|
+
severity: worstSeverity(findings),
|
|
790
810
|
title
|
|
791
811
|
};
|
|
792
812
|
});
|
|
793
813
|
const worst = new Map;
|
|
794
814
|
for (const check of checks) {
|
|
795
|
-
const rank =
|
|
815
|
+
const rank = SEVERITY_ORDER[check.severity];
|
|
796
816
|
worst.set(check.category, Math.min(worst.get(check.category) ?? rank, rank));
|
|
797
817
|
}
|
|
798
|
-
return checks.toSorted((a, b) => (worst.get(a.category) ?? 0) - (worst.get(b.category) ?? 0) || a.category.localeCompare(b.category) ||
|
|
818
|
+
return checks.toSorted((a, b) => (worst.get(a.category) ?? 0) - (worst.get(b.category) ?? 0) || a.category.localeCompare(b.category) || SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity] || b.count - a.count);
|
|
799
819
|
};
|
|
800
820
|
var skippedTiers = (tiers) => TIER_FLAGS.filter(({ tier }) => !tiers[tier]).map(({ flag, tier }) => {
|
|
801
821
|
const label = CHECKS.filter((check) => check.tier === tier).length;
|
|
@@ -831,22 +851,21 @@ var formatReport = (result, root, options = {}) => {
|
|
|
831
851
|
lines.push(` ${colors.bold(category)}`, "");
|
|
832
852
|
}
|
|
833
853
|
const color = SEVERITY_COLOR[group.severity];
|
|
834
|
-
const pages = `${group.
|
|
854
|
+
const pages = `${group.pages} page${group.pages === 1 ? "" : "s"}`;
|
|
835
855
|
lines.push(` ${color(`${GLYPH[group.severity]} ${group.title}`)} ${colors.dim(pages)}`);
|
|
836
|
-
const shown = options.verbose ? group.findings : group.findings.slice(0, PREVIEW);
|
|
856
|
+
const shown = options.verbose ? group.findings : firstPerPage(group.findings).slice(0, PREVIEW);
|
|
837
857
|
for (const diagnostic of shown) {
|
|
838
858
|
lines.push(findingLine(diagnostic, root));
|
|
839
859
|
if (options.verbose) {
|
|
840
860
|
lines.push(` ${colors.dim(diagnostic.message)}`);
|
|
841
861
|
}
|
|
842
862
|
}
|
|
843
|
-
const hidden = group.
|
|
863
|
+
const hidden = options.verbose ? 0 : group.pages - shown.length;
|
|
844
864
|
if (hidden > 0) {
|
|
845
865
|
lines.push(` ${colors.dim(`… and ${hidden} more (--verbose)`)}`);
|
|
846
866
|
}
|
|
847
|
-
const
|
|
848
|
-
const fix
|
|
849
|
-
if (fix) {
|
|
867
|
+
const fixes = new Set(group.findings.flatMap((finding) => finding.suggestion ? [finding.suggestion] : []));
|
|
868
|
+
for (const fix of fixes) {
|
|
850
869
|
lines.push(` ${colors.cyan(`fix: ${fix}`)}`);
|
|
851
870
|
}
|
|
852
871
|
lines.push("");
|
|
@@ -958,5 +977,5 @@ var launchInstalledAgent = async (bin, prompt, platform = process.platform) => {
|
|
|
958
977
|
|
|
959
978
|
export { CHECKS, finding, formatReport, reportJson, formatCatalog, AGENTS, writeAgentReport, fixPrompt, launchAgent, launchInstalledAgent };
|
|
960
979
|
|
|
961
|
-
//# debugId=
|
|
962
|
-
//# sourceMappingURL=chunk-
|
|
980
|
+
//# debugId=E6F2D36C0552C7F664756E2164756E21
|
|
981
|
+
//# sourceMappingURL=chunk-6k4ftwze.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/audit/report.ts", "../src/audit/catalog.ts", "../src/audit/agent.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { colors } from \"consola/utils\";\nimport type { ColorFunction } from \"consola/utils\";\nimport { relative } from \"pathe\";\n\nimport { countBySeverity } from \"../core/diagnostics.ts\";\nimport type { Diagnostic, DiagnosticSeverity } from \"../core/types.ts\";\nimport { CHECKS, checkMeta } from \"./catalog.ts\";\nimport type { CheckId } from \"./catalog.ts\";\nimport type { AuditResult } from \"./run.ts\";\nimport type { AuditCategory, AuditTier } from \"./types.ts\";\n\nconst SEVERITY_COLOR = {\n error: colors.red,\n info: colors.blue,\n warning: colors.yellow,\n} satisfies Record<DiagnosticSeverity, ColorFunction>;\n\nconst GLYPH = {\n error: \"✖\",\n info: \"ℹ\",\n warning: \"⚠\",\n} satisfies Record<DiagnosticSeverity, string>;\n\n/** How many affected pages to list before collapsing the rest. */\nconst PREVIEW = 3;\n\n/** The skippable tiers, each with the flag that runs it. */\nconst TIER_FLAGS: { tier: AuditTier; flag: string }[] = [\n { flag: \"--external\", tier: \"external\" },\n { flag: \"--url <origin>\", tier: \"network\" },\n];\n\ninterface CheckRollup {\n id: CheckId;\n count: number;\n severity: DiagnosticSeverity;\n category: AuditCategory;\n title: string;\n findings: Diagnostic[];\n}\n\n/**\n * Group findings by check. This is the difference between a report people read\n * and one they close: 214 pages × 6 findings is an unreadable wall, but \"Meta\n * description missing — 12 pages\" is a to-do list.\n */\nexport const rollup = (diagnostics: Diagnostic[]): CheckRollup[] => {\n const groups = new Map<string, Diagnostic[]>();\n for (const diagnostic of diagnostics) {\n const group = groups.get(diagnostic.code);\n if (group) {\n group.push(diagnostic);\n } else {\n groups.set(diagnostic.code, [diagnostic]);\n }\n }\n\n const order = {\n error: 0,\n info: 2,\n warning: 1,\n } satisfies Record<DiagnosticSeverity, number>;\n const checks = [...groups.entries()].map(([id, findings]) => {\n // SAFETY: audit findings are only ever created through `finding()`, whose\n // codes are the check catalog's ids.\n const checkId = id as CheckId;\n const { category, severity, title } = checkMeta(checkId);\n return {\n category,\n count: findings.length,\n findings,\n id: checkId,\n severity,\n title,\n };\n });\n\n // Rank each category by the worst thing in it, so the categories that need\n // attention lead. Sorting on severity alone would interleave the categories\n // and print \"content\" three separate times.\n const worst = new Map<AuditCategory, number>();\n for (const check of checks) {\n const rank = order[check.severity];\n worst.set(\n check.category,\n Math.min(worst.get(check.category) ?? rank, rank)\n );\n }\n\n return checks.toSorted(\n (a, b) =>\n (worst.get(a.category) ?? 0) - (worst.get(b.category) ?? 0) ||\n a.category.localeCompare(b.category) ||\n order[a.severity] - order[b.severity] ||\n b.count - a.count\n );\n};\n\n/** Categories that had no findings but were never run, and the flag that runs them. */\nconst skippedTiers = (tiers: Record<AuditTier, boolean>): string[] =>\n TIER_FLAGS.filter(({ tier }) => !tiers[tier]).map(({ flag, tier }) => {\n const label = CHECKS.filter((check) => check.tier === tier).length;\n return ` ${colors.dim(`⊘ ${tier.padEnd(12)} skipped — pass ${flag} (${label} checks)`)}`;\n });\n\n/** How many checks actually ran, i.e. those whose tier was enabled. */\nconst activeChecks = (tiers: Record<AuditTier, boolean>): number =>\n CHECKS.filter((check) => tiers[check.tier]).length;\n\n/**\n * Individual checks performed: every rule that ran, against every page crawled.\n * The headline number — it's what makes \"39 warnings\" legible as a proportion\n * rather than a bare count.\n */\nexport const auditCount = (result: AuditResult): number =>\n activeChecks(result.tiers) * result.pages;\n\nconst summaryLine = (\n counts: Record<DiagnosticSeverity, number>,\n audits: number\n): string =>\n [\n `${audits.toLocaleString(\"en-US\")} audit${audits === 1 ? \"\" : \"s\"}`,\n `${counts.error} error${counts.error === 1 ? \"\" : \"s\"}`,\n `${counts.warning} warning${counts.warning === 1 ? \"\" : \"s\"}`,\n `${counts.info} note${counts.info === 1 ? \"\" : \"s\"}`,\n ].join(\" · \");\n\n/** One affected page: the URL, and the source file that fixes it. */\nconst findingLine = (diagnostic: Diagnostic, root: string): string => {\n const url = diagnostic.url ?? \"\";\n const source = diagnostic.file\n ? colors.dim(\n `${relative(root, diagnostic.file)}${\n diagnostic.line === undefined ? \"\" : `:${diagnostic.line}`\n }`\n )\n : \"\";\n // padEnd alone yields no gap once the URL reaches the column width.\n return ` ${url.padEnd(34)} ${source}`.trimEnd();\n};\n\n/**\n * Render the audit as a report grouped by check, with each check's affected\n * pages, the source file to edit, and the fix.\n */\nexport const formatReport = (\n result: AuditResult,\n root: string,\n options: { verbose?: boolean } = {}\n): string => {\n const counts = countBySeverity(result.diagnostics);\n const groups = rollup(result.diagnostics);\n const lines: string[] = [];\n\n const where = result.origin\n ? `${relative(root, result.staticDir) || \"dist\"} + ${result.origin}`\n : `${relative(root, result.staticDir) || \"dist\"} · offline`;\n lines.push(\n \"\",\n ` ${colors.bold(\"blume audit\")} ${colors.dim(`${result.pages} pages · ${where}`)}`,\n ` ${summaryLine(counts, auditCount(result))}`,\n \"\"\n );\n\n if (groups.length === 0) {\n lines.push(` ${colors.green(\"✔ No issues found.\")}`, \"\");\n }\n\n let category: AuditCategory | null = null;\n for (const group of groups) {\n const { category: next } = group;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`, \"\");\n }\n\n const color = SEVERITY_COLOR[group.severity];\n const pages = `${group.count} page${group.count === 1 ? \"\" : \"s\"}`;\n lines.push(\n ` ${color(`${GLYPH[group.severity]} ${group.title}`)} ${colors.dim(pages)}`\n );\n\n const shown = options.verbose\n ? group.findings\n : group.findings.slice(0, PREVIEW);\n for (const diagnostic of shown) {\n lines.push(findingLine(diagnostic, root));\n // The message names the specifics the rolled-up line can't — which target\n // is broken, what the duplicate is — so --verbose prints it per finding.\n if (options.verbose) {\n lines.push(` ${colors.dim(diagnostic.message)}`);\n }\n }\n const hidden = group.count - shown.length;\n if (hidden > 0) {\n lines.push(` ${colors.dim(`… and ${hidden} more (--verbose)`)}`);\n }\n\n // Every finding in a group shares the catalog's fix unless it overrode it,\n // so showing the first one's is showing the group's.\n const [first] = group.findings;\n const fix = first?.suggestion;\n if (fix) {\n lines.push(` ${colors.cyan(`fix: ${fix}`)}`);\n }\n lines.push(\"\");\n }\n\n const skipped = skippedTiers(result.tiers);\n if (skipped.length > 0) {\n lines.push(...skipped, \"\");\n }\n\n return lines.join(\"\\n\");\n};\n\n/**\n * The machine-readable report. The existing `diagnostics` + `summary` shape is\n * preserved exactly — anything already parsing `blume validate --json` keeps\n * working — with the audit-specific rollup added alongside it.\n */\nexport const reportJson = (result: AuditResult, root: string): string => {\n const diagnostics = result.diagnostics.map((diagnostic) =>\n diagnostic.file\n ? { ...diagnostic, file: relative(root, diagnostic.file) }\n : diagnostic\n );\n return `${JSON.stringify(\n {\n audit: {\n /** Checks run × pages crawled — the total number of individual audits. */\n audits: auditCount(result),\n checks: rollup(result.diagnostics).map((group) => ({\n category: group.category,\n count: group.count,\n id: group.id,\n severity: group.severity,\n })),\n origin: result.origin,\n pages: result.pages,\n staticDir: relative(root, result.staticDir),\n tiers: result.tiers,\n },\n diagnostics,\n summary: countBySeverity(result.diagnostics),\n },\n null,\n 2\n )}\\n`;\n};\n\n/** `--list-checks`: the catalog, which is also the docs' source of truth. */\nexport const formatCatalog = (): string => {\n const lines: string[] = [\"\"];\n let category: AuditCategory | null = null;\n for (const check of [...CHECKS].toSorted((a, b) =>\n a.category.localeCompare(b.category)\n )) {\n const { category: next } = check;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`);\n }\n const tier =\n check.tier === \"static\" ? \"\" : ` ${colors.dim(`[${check.tier}]`)}`;\n lines.push(\n ` ${SEVERITY_COLOR[check.severity](GLYPH[check.severity])} ${check.id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().padEnd(34)} ${colors.dim(check.title)}${tier}`\n );\n }\n lines.push(\"\", ` ${CHECKS.length} checks.`, \"\");\n return lines.join(\"\\n\");\n};\n",
|
|
6
|
-
"import type { Diagnostic } from \"../core/types.ts\";\nimport type { CheckMeta } from \"./types.ts\";\n\n/**\n * Every check `blume audit` can report.\n *\n * This is deliberately ~76 checks, not the ~173 rows an Ahrefs site audit\n * lists. Ahrefs crawls the open web, so its list is padded with rows that are\n * structurally impossible for an Astro-built Blume site, and shipping those as\n * permanent zeroes teaches people to ignore the report. What was dropped, and\n * why:\n *\n * - **Every `nofollow` check** (~6 rows, including all four \"nofollow incoming\n * internal links\" variants). `RootLayout.astro` only ever emits `<meta\n * name=\"robots\" content=\"noindex\">`; Blume has no way to emit `nofollow`, so\n * they could never fire. Hand-written `rel=\"nofollow\"` in MDX is still caught\n * by `INTERNAL_LINK_NOFOLLOW`.\n * - **The whole JavaScript + CSS section** (~11 rows: \"JS redirects\", \"CSS\n * redirects\", \"page has redirected JS/CSS\", \"HTTPS page links to HTTP\n * JS/CSS\"…). Vite emits content-hashed, existent, non-redirecting bundles.\n * Collapsed into one `SUBRESOURCE_MISSING`.\n * - **Ahrefs' indexable/non-indexable duplicates** (~20 rows). Carried instead\n * by `PageSnapshot.indexable` on a single finding.\n * - **\"Only one dofollow incoming internal link\"** and **\"page has no outgoing\n * links\"**. Blume's sidebar links every page from every page, so these fire on\n * ~100% of pages. Pure noise.\n * - **\"3XX redirect\"** and **\"302 redirect\"**: having a redirect is inventory,\n * not a finding. **\"HTTP to HTTPS redirect\"** is correct behavior.\n * - **\"Font size too small\" / \"tap targets too close\" / \"content not sized\n * correctly\"**: properties of the theme, identical on every page. A regression\n * there is a Blume bug, not a user finding.\n * - **\"Document uses plugins\"** and **\"poor FID\"** (FID is deprecated; lab\n * Lighthouse cannot measure INP, so we report TBT and say so).\n * - **\"More than three parameters in URL\"**: a static docs site emits no query\n * strings in its own links.\n * - **\"Page in multiple sitemaps\"**: Blume emits exactly one sitemap.\n * - **Core Web Vitals** (LCP/CLS/INP): these need a real browser. Rather than\n * ship a `--lighthouse` flag that silently reports nothing, they are deferred\n * until Lighthouse is actually wired in. A tier the audit cannot run is worse\n * than one it openly doesn't have.\n *\n * Severity discipline: `error` means \"this is definitely broken\". Anything\n * advisory ships as `warning`/`info`. One noisy check and the whole command gets\n * switched off.\n */\nexport const CHECKS = [\n // Content\n {\n category: \"content\",\n fix: \"Add a `title` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_TITLE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Title tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra <title> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_TITLE_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple title tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `title` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_TITLE_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Title too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Add a `description` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra description <meta> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple meta description tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `description` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_DESCRIPTION_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Give the page a `title` — Blume renders it as the page's <h1>.\",\n id: \"BLUME_AUDIT_H1_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"H1 tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Demote the extra `# Heading` in the body to `##` — Blume already renders `title` as the h1.\",\n id: \"BLUME_AUDIT_H1_MULTIPLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Multiple H1 tags\",\n },\n {\n category: \"content\",\n fix: \"Expand the page, or fold it into a larger one.\",\n id: \"BLUME_AUDIT_LOW_WORD_COUNT\",\n severity: \"info\",\n tier: \"static\",\n title: \"Low word count\",\n },\n {\n category: \"content\",\n fix: \"Adjust the heading to the next level down — skipped levels break table-of-contents nesting and screen-reader outlines.\",\n id: \"BLUME_AUDIT_HEADING_SKIP\",\n severity: \"info\",\n tier: \"static\",\n title: \"Heading levels skip (e.g. h2 to h4)\",\n },\n {\n category: \"content\",\n fix: \"Correct the `date`, or hold the page back until it is meant to be live.\",\n id: \"BLUME_AUDIT_FUTURE_DATED_PAGE\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is dated in the future\",\n },\n {\n category: \"content\",\n fix: \"Restore the viewport <meta> in your ejected layout.\",\n id: \"BLUME_AUDIT_VIEWPORT_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Viewport not set\",\n },\n\n // Duplicates\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `title` — search engines show it as the result headline.\",\n id: \"BLUME_AUDIT_DUPLICATE_TITLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate title\",\n },\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `description`.\",\n id: \"BLUME_AUDIT_DUPLICATE_DESCRIPTION\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate meta description\",\n },\n {\n category: \"duplicates\",\n fix: \"Merge the pages, or set `seo.canonical` on all but one.\",\n id: \"BLUME_AUDIT_DUPLICATE_CONTENT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate pages without canonical\",\n },\n\n // Indexability\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` in blume.config.ts to the site's public URL.\",\n id: \"BLUME_AUDIT_SITE_NOT_SET\",\n severity: \"warning\",\n tier: \"static\",\n title: \"deployment.site is not set\",\n },\n {\n category: \"indexability\",\n fix: \"Audit a production-like build (e.g. `VERCEL=1 VERCEL_PROJECT_PRODUCTION_URL=<host> blume build`) or the deployment itself with `--url <origin>`. Do not hardcode `deployment.site` — the platform sets it on every deploy.\",\n id: \"BLUME_AUDIT_SITE_INFERRED_AT_DEPLOY\",\n severity: \"info\",\n tier: \"static\",\n title: \"deployment.site is inferred at deploy time\",\n },\n {\n category: \"indexability\",\n fix: \"Drop the canonical from noindex pages — Google treats the pairing as contradictory and may ignore one of the two.\",\n id: \"BLUME_AUDIT_CANONICAL_ON_NOINDEX\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page is noindex but declares a canonical\",\n },\n {\n category: \"indexability\",\n fix: \"Rebuild without `--preview` before deploying, or remove `draft: true` if the page is ready to ship.\",\n id: \"BLUME_AUDIT_DRAFT_PAGE_PUBLISHED\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Draft page is in the build\",\n },\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` so Blume can emit absolute canonical URLs.\",\n id: \"BLUME_AUDIT_CANONICAL_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Canonical URL missing\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at this page, or remove it to use the default self-canonical.\",\n id: \"BLUME_AUDIT_CANONICAL_NOT_SELF\",\n severity: \"info\",\n tier: \"static\",\n title: \"Non-canonical page\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at a page that exists and doesn't redirect.\",\n id: \"BLUME_AUDIT_CANONICAL_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical points to a broken or redirecting page\",\n },\n {\n category: \"indexability\",\n fix: \"Use the same protocol in `seo.canonical` as in `deployment.site`.\",\n id: \"BLUME_AUDIT_CANONICAL_PROTOCOL_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical protocol does not match the site\",\n },\n {\n category: \"indexability\",\n fix: \"Remove `noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_ROBOTS_META_UNEXPECTED\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is not indexable\",\n },\n {\n category: \"indexability\",\n fix: \"Split the page — Googlebot stops reading an HTML document at 2 MB.\",\n id: \"BLUME_AUDIT_HTML_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page exceeds Googlebot's 2 MB crawl limit\",\n },\n {\n category: \"indexability\",\n fix: \"Remove the X-Robots-Tag header, or align it with the page's robots meta.\",\n id: \"BLUME_AUDIT_ROBOTS_HEADER_CONFLICT\",\n severity: \"error\",\n tier: \"network\",\n title: \"X-Robots-Tag header conflicts with the page's robots meta\",\n },\n\n // Links\n {\n category: \"links\",\n fix: \"Fix the link target, or create the page it points at.\",\n id: \"BLUME_AUDIT_LINK_TO_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page has links to a broken page\",\n },\n {\n category: \"links\",\n fix: \"Link straight to the destination instead of through the redirect.\",\n id: \"BLUME_AUDIT_LINK_TO_REDIRECT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page has links to a redirect\",\n },\n {\n category: \"links\",\n fix: \"Link to this page from the body of a related page.\",\n id: \"BLUME_AUDIT_ORPHAN_PAGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Orphan page (only reachable from navigation)\",\n },\n {\n category: \"links\",\n fix: \"Use a root-relative path (`/docs/x`) so the link survives previews and `basePath`.\",\n id: \"BLUME_AUDIT_INTERNAL_LINK_ABSOLUTE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Internal link hardcodes the site's own origin\",\n },\n {\n category: \"links\",\n fix: 'Drop `rel=\"nofollow\"` — it stops this page passing authority internally.',\n id: \"BLUME_AUDIT_INTERNAL_LINK_NOFOLLOW\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page has nofollow outgoing internal links\",\n },\n {\n category: \"links\",\n fix: \"Check `basePath` / `deployment.base` — a trailing slash there produces `//`.\",\n id: \"BLUME_AUDIT_DOUBLE_SLASH_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Double slash in URL\",\n },\n {\n category: \"links\",\n fix: \"Point the fragment at a heading that exists on the target page, or fix the heading it meant.\",\n id: \"BLUME_AUDIT_ANCHOR_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Link fragment matches no id on the target page\",\n },\n {\n category: \"links\",\n fix: \"Rename the source file to a lowercase, hyphenated slug — and add a redirect from the old URL if it was already published.\",\n id: \"BLUME_AUDIT_URL_STYLE\",\n severity: \"info\",\n tier: \"static\",\n title: \"URL contains uppercase, underscores, or spaces\",\n },\n\n // Redirects\n {\n category: \"redirects\",\n fix: \"Point the redirect at a page that exists.\",\n id: \"BLUME_AUDIT_REDIRECT_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Broken redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Break the cycle in `redirects` — it never resolves.\",\n id: \"BLUME_AUDIT_REDIRECT_LOOP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect loop\",\n },\n {\n category: \"redirects\",\n fix: \"Point every hop straight at the final destination.\",\n id: \"BLUME_AUDIT_REDIRECT_CHAIN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Redirect chain\",\n },\n {\n category: \"redirects\",\n fix: \"Use a real redirect in `blume.config.ts` instead of a meta refresh.\",\n id: \"BLUME_AUDIT_META_REFRESH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta refresh redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Remove the redirect, or delete the page it shadows — the page wins and the redirect never fires.\",\n id: \"BLUME_AUDIT_REDIRECT_SOURCE_IS_PAGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect source is also a real page\",\n },\n {\n category: \"redirects\",\n fix: \"Redirect to the HTTPS URL.\",\n id: \"BLUME_AUDIT_REDIRECT_TO_HTTP\",\n severity: \"error\",\n tier: \"network\",\n title: \"HTTPS to HTTP redirect\",\n },\n\n // Social\n {\n category: \"social\",\n fix: \"Add a `description` — Blume fills the rest of the Open Graph tags for you.\",\n id: \"BLUME_AUDIT_OG_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph tags missing or incomplete\",\n },\n {\n category: \"social\",\n fix: \"Set `deployment.site` to turn on generated OG images, or set `seo.image` on the page.\",\n id: \"BLUME_AUDIT_OG_IMAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image missing\",\n },\n {\n category: \"social\",\n fix: \"Point `seo.image` at a file that exists, or rebuild — a dead og:image renders as a blank card everywhere the page is shared.\",\n id: \"BLUME_AUDIT_OG_IMAGE_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is not in the build\",\n },\n {\n category: \"social\",\n fix: \"Use an image of at least 1200×630 — smaller ones render blurry or get cropped into small-card layouts.\",\n id: \"BLUME_AUDIT_OG_IMAGE_SMALL\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is too small for large cards\",\n },\n {\n category: \"social\",\n fix: \"Align `og:url` with the page's canonical URL.\",\n id: \"BLUME_AUDIT_OG_URL_MISMATCH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph URL not matching canonical\",\n },\n {\n category: \"social\",\n fix: \"Set `seo.x.handle` in blume.config.ts so X can attribute the card.\",\n id: \"BLUME_AUDIT_TWITTER_CARD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"X (Twitter) card missing or incomplete\",\n },\n\n // Localization\n {\n category: \"i18n\",\n fix: \"Restore the `lang` attribute on <html> in your ejected layout.\",\n id: \"BLUME_AUDIT_HTML_LANG_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute missing\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag (e.g. `en`, `en-GB`) for the locale.\",\n id: \"BLUME_AUDIT_HTML_LANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute invalid\",\n },\n {\n category: \"i18n\",\n fix: \"The page's <html lang> must match its own hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_LANG_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang and HTML lang mismatch\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag in the hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang annotation invalid\",\n },\n {\n category: \"i18n\",\n fix: \"A page's hreflang set must include a self-reference.\",\n id: \"BLUME_AUDIT_HREFLANG_SELF_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Self-reference hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Add an `x-default` alternate pointing at the default-locale page.\",\n id: \"BLUME_AUDIT_HREFLANG_XDEFAULT_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"X-default hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Every page in an hreflang group must link back to every other one.\",\n id: \"BLUME_AUDIT_HREFLANG_NO_RETURN_TAG\",\n severity: \"error\",\n tier: \"static\",\n title: \"Missing reciprocal hreflang (no return-tag)\",\n },\n {\n category: \"i18n\",\n fix: \"Point the hreflang alternate at a page that exists and is canonical.\",\n id: \"BLUME_AUDIT_HREFLANG_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang points to a broken, redirecting, or non-canonical page\",\n },\n {\n category: \"i18n\",\n fix: \"Each language in an hreflang group must name exactly one page.\",\n id: \"BLUME_AUDIT_HREFLANG_CONFLICT\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang group has a language conflict\",\n },\n\n // Assets\n {\n category: \"assets\",\n fix: 'Add descriptive `alt` text, or `alt=\"\"` if the image is decorative.',\n id: \"BLUME_AUDIT_IMAGE_ALT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Missing alt text\",\n },\n {\n category: \"assets\",\n fix: \"Fix the image path, or add the file to public/.\",\n id: \"BLUME_AUDIT_IMAGE_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Image broken\",\n },\n {\n category: \"assets\",\n fix: \"Compress the asset, or serve a modern format (WebP/AVIF).\",\n id: \"BLUME_AUDIT_ASSET_TOO_LARGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Asset file size too large\",\n },\n {\n category: \"assets\",\n fix: \"Set `width` and `height` so the browser can reserve space (avoids layout shift).\",\n id: \"BLUME_AUDIT_IMAGE_MISSING_DIMENSIONS\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Image has no width/height\",\n },\n {\n category: \"assets\",\n fix: \"Fix the reference, or restore the missing file.\",\n id: \"BLUME_AUDIT_SUBRESOURCE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Referenced script, style, or asset is missing from the build\",\n },\n {\n category: \"assets\",\n fix: \"Load the subresource over HTTPS — browsers block mixed content.\",\n id: \"BLUME_AUDIT_MIXED_CONTENT\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTTPS/HTTP mixed content\",\n },\n\n // Sitemap\n {\n category: \"sitemap\",\n fix: \"Remove `draft`/`hidden`/`noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_INDEXABLE_PAGE_NOT_IN_SITEMAP\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page not in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"A noindex page should not be advertised in the sitemap.\",\n id: \"BLUME_AUDIT_NOINDEX_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Noindex page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"List only canonical URLs in the sitemap.\",\n id: \"BLUME_AUDIT_NON_CANONICAL_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Non-canonical page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"Remove the URL from the sitemap, or build the page it names.\",\n id: \"BLUME_AUDIT_SITEMAP_BAD_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap names a page that does not exist or redirects\",\n },\n {\n category: \"sitemap\",\n fix: \"Sitemaps must be valid XML in the sitemaps.org urlset format.\",\n id: \"BLUME_AUDIT_SITEMAP_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap has a syntax error or wrong format\",\n },\n {\n category: \"sitemap\",\n fix: \"Split the sitemap — the limits are 50 MB and 50,000 URLs.\",\n id: \"BLUME_AUDIT_SITEMAP_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap exceeds 50 MB or 50,000 URLs\",\n },\n {\n category: \"sitemap\",\n fix: \"Use a real W3C date that is not in the future — search engines that catch a sitemap lying about freshness stop trusting its lastmod entirely.\",\n id: \"BLUME_AUDIT_SITEMAP_LASTMOD_INVALID\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap lastmod is invalid or in the future\",\n },\n {\n category: \"sitemap\",\n fix: \"A sitemap may only list URLs on its own origin.\",\n id: \"BLUME_AUDIT_SITEMAP_OUT_OF_SCOPE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap includes URLs out of its scope\",\n },\n {\n category: \"sitemap\",\n fix: \"Make sitemap.xml reachable at the site root.\",\n id: \"BLUME_AUDIT_SITEMAP_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"Sitemap is not accessible\",\n },\n\n // robots.txt\n {\n category: \"robots\",\n fix: \"Set `seo.robots: true` to generate robots.txt.\",\n id: \"BLUME_AUDIT_ROBOTS_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"robots.txt missing\",\n },\n {\n category: \"robots\",\n fix: \"Every robots.txt line must be a `Field: value` directive or a comment.\",\n id: \"BLUME_AUDIT_ROBOTS_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt has a syntax error\",\n },\n {\n category: \"robots\",\n fix: \"A page can't be both disallowed in robots.txt and advertised in the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_DISALLOWS_INDEXABLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt disallows a page that is in the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Set `deployment.site` so robots.txt can reference the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_SITEMAP_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"robots.txt does not reference the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Make robots.txt reachable at the site root.\",\n id: \"BLUME_AUDIT_ROBOTS_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"robots.txt is not accessible\",\n },\n\n // AI discovery. `llms.txt` is the sitemap of the AI era, and no SEO crawler\n // audits it — they audit for Google. Blume emits it, so Blume checks it.\n {\n category: \"ai\",\n fix: \"Rebuild — `agents.llmsTxt` is enabled but the build has no llms.txt. If that's intentional, set `agents.llmsTxt: false`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt missing from the build\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site — a stale entry sends an AI agent to a page that is not there.\",\n id: \"BLUME_AUDIT_LLMS_TXT_STALE_ENTRY\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt lists a page the build does not serve\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site; if the page is deliberately excluded, mark it `seo.noindex` or `sidebar.hidden`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_PAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page missing from llms.txt\",\n },\n // DNS-AID (draft-mozleywilliams-dnsop-dnsaid) lives in the DNS zone, not the\n // build, so unlike the llms.txt checks these can only observe and advise —\n // hence `info`: publishing the records is a DNS-provider action Blume can't\n // take for you, and the draft is young enough that absence is the norm.\n {\n category: \"ai\",\n fix: \"Publish a ServiceMode SVCB or HTTPS record at `_index._agents.<host>` with your DNS provider so agents can discover the site via DNS (DNS-AID).\",\n id: \"BLUME_AUDIT_DNS_AID_MISSING\",\n severity: \"info\",\n tier: \"network\",\n title: \"No DNS-AID agent-discovery records\",\n },\n {\n category: \"ai\",\n fix: \"Enable DNSSEC for the zone so validating resolvers return authenticated DNS-AID answers; if your DNS provider doesn't support DNSSEC, the records still work unsigned.\",\n id: \"BLUME_AUDIT_DNS_AID_UNSIGNED\",\n severity: \"info\",\n tier: \"network\",\n title: \"DNS-AID records are not DNSSEC-authenticated\",\n },\n\n // Structured data. Note we validate only what Blume itself emits — we do not\n // claim Google-rich-results or full schema.org validation (the former is an\n // undocumented network API, the latter a vocabulary we don't bundle).\n {\n category: \"structured-data\",\n fix: \"The JSON-LD block must be valid JSON.\",\n id: \"BLUME_AUDIT_JSONLD_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Structured data is not valid JSON\",\n },\n {\n category: \"structured-data\",\n fix: \"Every JSON-LD node needs `@context` and `@type`.\",\n id: \"BLUME_AUDIT_JSONLD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Structured data is missing required properties\",\n },\n\n // Network (`--url`)\n {\n category: \"network\",\n fix: \"The page is linked or in the sitemap but the deployment 404s it.\",\n id: \"BLUME_AUDIT_HTTP_4XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"4XX page\",\n },\n {\n category: \"network\",\n fix: \"The deployment is erroring on this page.\",\n id: \"BLUME_AUDIT_HTTP_5XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"5XX page\",\n },\n {\n category: \"network\",\n fix: \"The page did not respond in time.\",\n id: \"BLUME_AUDIT_HTTP_TIMEOUT\",\n severity: \"error\",\n tier: \"network\",\n title: \"Timed out\",\n },\n {\n category: \"network\",\n fix: \"Enable gzip or brotli on the host.\",\n id: \"BLUME_AUDIT_NOT_COMPRESSED\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Not compressed\",\n },\n {\n category: \"network\",\n fix: \"The page was slow to respond.\",\n id: \"BLUME_AUDIT_SLOW_RESPONSE\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Slow page\",\n },\n\n // External (`--external`)\n {\n category: \"network\",\n fix: \"Fix or remove the outbound link.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_BROKEN\",\n severity: \"error\",\n tier: \"external\",\n title: \"External link is broken\",\n },\n {\n category: \"network\",\n fix: \"Link straight to the destination.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_REDIRECT\",\n severity: \"info\",\n tier: \"external\",\n title: \"External link redirects\",\n },\n] as const satisfies readonly CheckMeta[];\n\nexport type CheckId = (typeof CHECKS)[number][\"id\"];\n\nconst BY_ID = new Map<string, CheckMeta>(\n CHECKS.map((check) => [check.id, check])\n);\n\nexport const checkMeta = (id: CheckId): CheckMeta => {\n const meta = BY_ID.get(id);\n if (!meta) {\n throw new Error(`Unknown audit check: ${id}`);\n }\n return meta;\n};\n\nconst DOCS_BASE = \"https://useblume.dev/docs/cli/audit\";\n\n/** `BLUME_AUDIT_TITLE_TOO_LONG` -> `…/audit#title-too-long`. */\nexport const checkDocsUrl = (id: CheckId): string =>\n `${DOCS_BASE}#${id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().replaceAll(\"_\", \"-\")}`;\n\n/** Where a finding happened: the built URL, plus the source file that fixes it. */\nexport interface FindingSite {\n url: string;\n file?: string;\n line?: number;\n column?: number;\n}\n\n/**\n * Build a diagnostic for a check. Severity, remediation, and the docs anchor all\n * come from the catalog, so a check body only supplies what's specific to the\n * occurrence: where it happened and what was actually wrong.\n */\nexport const finding = (\n id: CheckId,\n site: FindingSite,\n detail: string,\n fix?: string\n): Diagnostic => {\n const meta = checkMeta(id);\n return {\n code: id,\n column: site.column,\n docsUrl: checkDocsUrl(id),\n file: site.file,\n line: site.line,\n message: detail,\n severity: meta.severity,\n suggestion: fix ?? meta.fix,\n url: site.url,\n };\n};\n",
|
|
5
|
+
"import { colors } from \"consola/utils\";\nimport type { ColorFunction } from \"consola/utils\";\nimport { relative } from \"pathe\";\n\nimport { countBySeverity } from \"../core/diagnostics.ts\";\nimport type { Diagnostic, DiagnosticSeverity } from \"../core/types.ts\";\nimport { CHECKS, checkMeta } from \"./catalog.ts\";\nimport type { CheckId } from \"./catalog.ts\";\nimport type { AuditResult } from \"./run.ts\";\nimport type { AuditCategory, AuditTier } from \"./types.ts\";\n\nconst SEVERITY_COLOR = {\n error: colors.red,\n info: colors.blue,\n warning: colors.yellow,\n} satisfies Record<DiagnosticSeverity, ColorFunction>;\n\nconst GLYPH = {\n error: \"✖\",\n info: \"ℹ\",\n warning: \"⚠\",\n} satisfies Record<DiagnosticSeverity, string>;\n\n/** How many affected pages to list before collapsing the rest. */\nconst PREVIEW = 3;\n\n/** The skippable tiers, each with the flag that runs it. */\nconst TIER_FLAGS: { tier: AuditTier; flag: string }[] = [\n { flag: \"--external\", tier: \"external\" },\n { flag: \"--url <origin>\", tier: \"network\" },\n];\n\ninterface CheckRollup {\n id: CheckId;\n count: number;\n /** Distinct affected URLs — one page can carry several findings. */\n pages: number;\n severity: DiagnosticSeverity;\n category: AuditCategory;\n title: string;\n findings: Diagnostic[];\n}\n\nconst SEVERITY_ORDER = {\n error: 0,\n info: 2,\n warning: 1,\n} satisfies Record<DiagnosticSeverity, number>;\n\n/**\n * The group's severity: the worst of its findings'. A check can downgrade a\n * finding at runtime (an external link answering 503 is a warning, not the\n * catalog's error), and the group's glyph must agree with the summary counts.\n */\nconst worstSeverity = (findings: Diagnostic[]): DiagnosticSeverity => {\n let worst: DiagnosticSeverity = \"info\";\n for (const finding of findings) {\n if (SEVERITY_ORDER[finding.severity] < SEVERITY_ORDER[worst]) {\n worst = finding.severity;\n }\n }\n return worst;\n};\n\n/** The first finding per affected URL, in report order. */\nconst firstPerPage = (findings: Diagnostic[]): Diagnostic[] => {\n const seen = new Set<string | undefined>();\n return findings.filter((finding) => {\n if (seen.has(finding.url)) {\n return false;\n }\n seen.add(finding.url);\n return true;\n });\n};\n\n/**\n * Group findings by check. This is the difference between a report people read\n * and one they close: 214 pages × 6 findings is an unreadable wall, but \"Meta\n * description missing — 12 pages\" is a to-do list.\n */\nexport const rollup = (diagnostics: Diagnostic[]): CheckRollup[] => {\n const groups = new Map<string, Diagnostic[]>();\n for (const diagnostic of diagnostics) {\n const group = groups.get(diagnostic.code);\n if (group) {\n group.push(diagnostic);\n } else {\n groups.set(diagnostic.code, [diagnostic]);\n }\n }\n\n const checks = [...groups.entries()].map(([id, findings]) => {\n // SAFETY: audit findings are only ever created through `finding()`, whose\n // codes are the check catalog's ids.\n const checkId = id as CheckId;\n const { category, title } = checkMeta(checkId);\n return {\n category,\n count: findings.length,\n findings,\n id: checkId,\n pages: firstPerPage(findings).length,\n severity: worstSeverity(findings),\n title,\n };\n });\n\n // Rank each category by the worst thing in it, so the categories that need\n // attention lead. Sorting on severity alone would interleave the categories\n // and print \"content\" three separate times.\n const worst = new Map<AuditCategory, number>();\n for (const check of checks) {\n const rank = SEVERITY_ORDER[check.severity];\n worst.set(\n check.category,\n Math.min(worst.get(check.category) ?? rank, rank)\n );\n }\n\n return checks.toSorted(\n (a, b) =>\n (worst.get(a.category) ?? 0) - (worst.get(b.category) ?? 0) ||\n a.category.localeCompare(b.category) ||\n SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity] ||\n b.count - a.count\n );\n};\n\n/** Categories that had no findings but were never run, and the flag that runs them. */\nconst skippedTiers = (tiers: Record<AuditTier, boolean>): string[] =>\n TIER_FLAGS.filter(({ tier }) => !tiers[tier]).map(({ flag, tier }) => {\n const label = CHECKS.filter((check) => check.tier === tier).length;\n return ` ${colors.dim(`⊘ ${tier.padEnd(12)} skipped — pass ${flag} (${label} checks)`)}`;\n });\n\n/** How many checks actually ran, i.e. those whose tier was enabled. */\nconst activeChecks = (tiers: Record<AuditTier, boolean>): number =>\n CHECKS.filter((check) => tiers[check.tier]).length;\n\n/**\n * Individual checks performed: every rule that ran, against every page crawled.\n * The headline number — it's what makes \"39 warnings\" legible as a proportion\n * rather than a bare count.\n */\nexport const auditCount = (result: AuditResult): number =>\n activeChecks(result.tiers) * result.pages;\n\nconst summaryLine = (\n counts: Record<DiagnosticSeverity, number>,\n audits: number\n): string =>\n [\n `${audits.toLocaleString(\"en-US\")} audit${audits === 1 ? \"\" : \"s\"}`,\n `${counts.error} error${counts.error === 1 ? \"\" : \"s\"}`,\n `${counts.warning} warning${counts.warning === 1 ? \"\" : \"s\"}`,\n `${counts.info} note${counts.info === 1 ? \"\" : \"s\"}`,\n ].join(\" · \");\n\n/** One affected page: the URL, and the source file that fixes it. */\nconst findingLine = (diagnostic: Diagnostic, root: string): string => {\n const url = diagnostic.url ?? \"\";\n const source = diagnostic.file\n ? colors.dim(\n `${relative(root, diagnostic.file)}${\n diagnostic.line === undefined ? \"\" : `:${diagnostic.line}`\n }`\n )\n : \"\";\n // padEnd alone yields no gap once the URL reaches the column width.\n return ` ${url.padEnd(34)} ${source}`.trimEnd();\n};\n\n/**\n * Render the audit as a report grouped by check, with each check's affected\n * pages, the source file to edit, and the fix.\n */\nexport const formatReport = (\n result: AuditResult,\n root: string,\n options: { verbose?: boolean } = {}\n): string => {\n const counts = countBySeverity(result.diagnostics);\n const groups = rollup(result.diagnostics);\n const lines: string[] = [];\n\n const where = result.origin\n ? `${relative(root, result.staticDir) || \"dist\"} + ${result.origin}`\n : `${relative(root, result.staticDir) || \"dist\"} · offline`;\n lines.push(\n \"\",\n ` ${colors.bold(\"blume audit\")} ${colors.dim(`${result.pages} pages · ${where}`)}`,\n ` ${summaryLine(counts, auditCount(result))}`,\n \"\"\n );\n\n if (groups.length === 0) {\n lines.push(` ${colors.green(\"✔ No issues found.\")}`, \"\");\n }\n\n let category: AuditCategory | null = null;\n for (const group of groups) {\n const { category: next } = group;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`, \"\");\n }\n\n const color = SEVERITY_COLOR[group.severity];\n const pages = `${group.pages} page${group.pages === 1 ? \"\" : \"s\"}`;\n lines.push(\n ` ${color(`${GLYPH[group.severity]} ${group.title}`)} ${colors.dim(pages)}`\n );\n\n // The preview lists affected pages, each once; --verbose lists every\n // finding, since each one's message names a different specific.\n const shown = options.verbose\n ? group.findings\n : firstPerPage(group.findings).slice(0, PREVIEW);\n for (const diagnostic of shown) {\n lines.push(findingLine(diagnostic, root));\n // The message names the specifics the rolled-up line can't — which target\n // is broken, what the duplicate is — so --verbose prints it per finding.\n if (options.verbose) {\n lines.push(` ${colors.dim(diagnostic.message)}`);\n }\n }\n const hidden = options.verbose ? 0 : group.pages - shown.length;\n if (hidden > 0) {\n lines.push(` ${colors.dim(`… and ${hidden} more (--verbose)`)}`);\n }\n\n // Findings share the catalog's fix unless one overrode it (a navigation\n // entry, a page generated from an API spec), so each distinct fix is\n // printed once.\n const fixes = new Set(\n group.findings.flatMap((finding) =>\n finding.suggestion ? [finding.suggestion] : []\n )\n );\n for (const fix of fixes) {\n lines.push(` ${colors.cyan(`fix: ${fix}`)}`);\n }\n lines.push(\"\");\n }\n\n const skipped = skippedTiers(result.tiers);\n if (skipped.length > 0) {\n lines.push(...skipped, \"\");\n }\n\n return lines.join(\"\\n\");\n};\n\n/**\n * The machine-readable report. The existing `diagnostics` + `summary` shape is\n * preserved exactly — anything already parsing `blume validate --json` keeps\n * working — with the audit-specific rollup added alongside it.\n */\nexport const reportJson = (result: AuditResult, root: string): string => {\n const diagnostics = result.diagnostics.map((diagnostic) =>\n diagnostic.file\n ? { ...diagnostic, file: relative(root, diagnostic.file) }\n : diagnostic\n );\n return `${JSON.stringify(\n {\n audit: {\n /** Checks run × pages crawled — the total number of individual audits. */\n audits: auditCount(result),\n checks: rollup(result.diagnostics).map((group) => ({\n category: group.category,\n count: group.count,\n id: group.id,\n severity: group.severity,\n })),\n origin: result.origin,\n pages: result.pages,\n staticDir: relative(root, result.staticDir),\n tiers: result.tiers,\n },\n diagnostics,\n summary: countBySeverity(result.diagnostics),\n },\n null,\n 2\n )}\\n`;\n};\n\n/** `--list-checks`: the catalog, which is also the docs' source of truth. */\nexport const formatCatalog = (): string => {\n const lines: string[] = [\"\"];\n let category: AuditCategory | null = null;\n for (const check of [...CHECKS].toSorted((a, b) =>\n a.category.localeCompare(b.category)\n )) {\n const { category: next } = check;\n if (next !== category) {\n category = next;\n lines.push(` ${colors.bold(category)}`);\n }\n const tier =\n check.tier === \"static\" ? \"\" : ` ${colors.dim(`[${check.tier}]`)}`;\n lines.push(\n ` ${SEVERITY_COLOR[check.severity](GLYPH[check.severity])} ${check.id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().padEnd(34)} ${colors.dim(check.title)}${tier}`\n );\n }\n lines.push(\"\", ` ${CHECKS.length} checks.`, \"\");\n return lines.join(\"\\n\");\n};\n",
|
|
6
|
+
"import type { Diagnostic } from \"../core/types.ts\";\nimport type { CheckMeta } from \"./types.ts\";\n\n/**\n * Every check `blume audit` can report.\n *\n * This is deliberately ~76 checks, not the ~173 rows an Ahrefs site audit\n * lists. Ahrefs crawls the open web, so its list is padded with rows that are\n * structurally impossible for an Astro-built Blume site, and shipping those as\n * permanent zeroes teaches people to ignore the report. What was dropped, and\n * why:\n *\n * - **Every `nofollow` check** (~6 rows, including all four \"nofollow incoming\n * internal links\" variants). `RootLayout.astro` only ever emits `<meta\n * name=\"robots\" content=\"noindex\">`; Blume has no way to emit `nofollow`, so\n * they could never fire. Hand-written `rel=\"nofollow\"` in MDX is still caught\n * by `INTERNAL_LINK_NOFOLLOW`.\n * - **The whole JavaScript + CSS section** (~11 rows: \"JS redirects\", \"CSS\n * redirects\", \"page has redirected JS/CSS\", \"HTTPS page links to HTTP\n * JS/CSS\"…). Vite emits content-hashed, existent, non-redirecting bundles.\n * Collapsed into one `SUBRESOURCE_MISSING`.\n * - **Ahrefs' indexable/non-indexable duplicates** (~20 rows). Carried instead\n * by `PageSnapshot.indexable` on a single finding.\n * - **\"Only one dofollow incoming internal link\"** and **\"page has no outgoing\n * links\"**. Blume's sidebar links every page from every page, so these fire on\n * ~100% of pages. Pure noise.\n * - **\"3XX redirect\"** and **\"302 redirect\"**: having a redirect is inventory,\n * not a finding. **\"HTTP to HTTPS redirect\"** is correct behavior.\n * - **\"Font size too small\" / \"tap targets too close\" / \"content not sized\n * correctly\"**: properties of the theme, identical on every page. A regression\n * there is a Blume bug, not a user finding.\n * - **\"Document uses plugins\"** and **\"poor FID\"** (FID is deprecated; lab\n * Lighthouse cannot measure INP, so we report TBT and say so).\n * - **\"More than three parameters in URL\"**: a static docs site emits no query\n * strings in its own links.\n * - **\"Page in multiple sitemaps\"**: Blume emits exactly one sitemap.\n * - **Core Web Vitals** (LCP/CLS/INP): these need a real browser. Rather than\n * ship a `--lighthouse` flag that silently reports nothing, they are deferred\n * until Lighthouse is actually wired in. A tier the audit cannot run is worse\n * than one it openly doesn't have.\n *\n * Severity discipline: `error` means \"this is definitely broken\". Anything\n * advisory ships as `warning`/`info`. One noisy check and the whole command gets\n * switched off.\n */\nexport const CHECKS = [\n // Content\n {\n category: \"content\",\n fix: \"Add a `title` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_TITLE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Title tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra <title> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_TITLE_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple title tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `title` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_TITLE_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Title too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Add a `description` to the page's frontmatter.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Remove the extra description <meta> from the page's layout or MDX.\",\n id: \"BLUME_AUDIT_DESCRIPTION_MULTIPLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Multiple meta description tags\",\n },\n {\n category: \"content\",\n fix: \"Rewrite `description` in the frontmatter to fit the length range.\",\n id: \"BLUME_AUDIT_DESCRIPTION_LENGTH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta description too long or too short\",\n },\n {\n category: \"content\",\n fix: \"Give the page a `title` — Blume renders it as the page's <h1>.\",\n id: \"BLUME_AUDIT_H1_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"H1 tag missing or empty\",\n },\n {\n category: \"content\",\n fix: \"Demote the extra `# Heading` in the body to `##` — Blume already renders `title` as the h1.\",\n id: \"BLUME_AUDIT_H1_MULTIPLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Multiple H1 tags\",\n },\n {\n category: \"content\",\n fix: \"Expand the page, or fold it into a larger one.\",\n id: \"BLUME_AUDIT_LOW_WORD_COUNT\",\n severity: \"info\",\n tier: \"static\",\n title: \"Low word count\",\n },\n {\n category: \"content\",\n fix: \"Adjust the heading to the next level down — skipped levels break table-of-contents nesting and screen-reader outlines.\",\n id: \"BLUME_AUDIT_HEADING_SKIP\",\n severity: \"info\",\n tier: \"static\",\n title: \"Heading levels skip (e.g. h2 to h4)\",\n },\n {\n category: \"content\",\n fix: \"Correct the `date`, or hold the page back until it is meant to be live.\",\n id: \"BLUME_AUDIT_FUTURE_DATED_PAGE\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is dated in the future\",\n },\n {\n category: \"content\",\n fix: \"Restore the viewport <meta> in your ejected layout.\",\n id: \"BLUME_AUDIT_VIEWPORT_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Viewport not set\",\n },\n\n // Duplicates\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `title` — search engines show it as the result headline.\",\n id: \"BLUME_AUDIT_DUPLICATE_TITLE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate title\",\n },\n {\n category: \"duplicates\",\n fix: \"Give each page a distinct `description`.\",\n id: \"BLUME_AUDIT_DUPLICATE_DESCRIPTION\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate meta description\",\n },\n {\n category: \"duplicates\",\n fix: \"Merge the pages, or set `seo.canonical` on all but one.\",\n id: \"BLUME_AUDIT_DUPLICATE_CONTENT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Duplicate pages without canonical\",\n },\n\n // Indexability\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` in blume.config.ts to the site's public URL.\",\n id: \"BLUME_AUDIT_SITE_NOT_SET\",\n severity: \"warning\",\n tier: \"static\",\n title: \"deployment.site is not set\",\n },\n {\n category: \"indexability\",\n fix: \"Audit a production-like build (e.g. `VERCEL=1 VERCEL_PROJECT_PRODUCTION_URL=<host> blume build`) or the deployment itself with `--url <origin>`. Do not hardcode `deployment.site` — the platform sets it on every deploy.\",\n id: \"BLUME_AUDIT_SITE_INFERRED_AT_DEPLOY\",\n severity: \"info\",\n tier: \"static\",\n title: \"deployment.site is inferred at deploy time\",\n },\n {\n category: \"indexability\",\n fix: \"Drop the canonical from noindex pages — Google treats the pairing as contradictory and may ignore one of the two.\",\n id: \"BLUME_AUDIT_CANONICAL_ON_NOINDEX\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page is noindex but declares a canonical\",\n },\n {\n category: \"indexability\",\n fix: \"Rebuild without `--preview` before deploying, or remove `draft: true` if the page is ready to ship.\",\n id: \"BLUME_AUDIT_DRAFT_PAGE_PUBLISHED\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Draft page is in the build\",\n },\n {\n category: \"indexability\",\n fix: \"Set `deployment.site` so Blume can emit absolute canonical URLs.\",\n id: \"BLUME_AUDIT_CANONICAL_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Canonical URL missing\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at this page, or remove it to use the default self-canonical.\",\n id: \"BLUME_AUDIT_CANONICAL_NOT_SELF\",\n severity: \"info\",\n tier: \"static\",\n title: \"Non-canonical page\",\n },\n {\n category: \"indexability\",\n fix: \"Point `seo.canonical` at a page that exists and doesn't redirect.\",\n id: \"BLUME_AUDIT_CANONICAL_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical points to a broken or redirecting page\",\n },\n {\n category: \"indexability\",\n fix: \"Use the same protocol in `seo.canonical` as in `deployment.site`.\",\n id: \"BLUME_AUDIT_CANONICAL_PROTOCOL_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Canonical protocol does not match the site\",\n },\n {\n category: \"indexability\",\n fix: \"Remove `noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_ROBOTS_META_UNEXPECTED\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page is not indexable\",\n },\n {\n category: \"indexability\",\n fix: \"Split the page — Googlebot stops reading an HTML document at 2 MB.\",\n id: \"BLUME_AUDIT_HTML_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page exceeds Googlebot's 2 MB crawl limit\",\n },\n {\n category: \"indexability\",\n fix: \"Remove the X-Robots-Tag header, or align it with the page's robots meta.\",\n id: \"BLUME_AUDIT_ROBOTS_HEADER_CONFLICT\",\n severity: \"error\",\n tier: \"network\",\n title: \"X-Robots-Tag header conflicts with the page's robots meta\",\n },\n\n // Links\n {\n category: \"links\",\n fix: \"Fix the link target, or create the page it points at.\",\n id: \"BLUME_AUDIT_LINK_TO_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Page has links to a broken page\",\n },\n {\n category: \"links\",\n fix: \"Link straight to the destination instead of through the redirect.\",\n id: \"BLUME_AUDIT_LINK_TO_REDIRECT\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Page has links to a redirect\",\n },\n {\n category: \"links\",\n fix: \"Link to this page from the body of a related page.\",\n id: \"BLUME_AUDIT_ORPHAN_PAGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Orphan page (only reachable from navigation)\",\n },\n {\n category: \"links\",\n fix: \"Use a root-relative path (`/docs/x`) so the link survives previews and `basePath`.\",\n id: \"BLUME_AUDIT_INTERNAL_LINK_ABSOLUTE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Internal link hardcodes the site's own origin\",\n },\n {\n category: \"links\",\n fix: 'Drop `rel=\"nofollow\"` — it stops this page passing authority internally.',\n id: \"BLUME_AUDIT_INTERNAL_LINK_NOFOLLOW\",\n severity: \"info\",\n tier: \"static\",\n title: \"Page has nofollow outgoing internal links\",\n },\n {\n category: \"links\",\n fix: \"Check `basePath` / `deployment.base` — a trailing slash there produces `//`.\",\n id: \"BLUME_AUDIT_DOUBLE_SLASH_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Double slash in URL\",\n },\n {\n category: \"links\",\n fix: \"Point the fragment at a heading that exists on the target page, or fix the heading it meant.\",\n id: \"BLUME_AUDIT_ANCHOR_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Link fragment matches no id on the target page\",\n },\n {\n category: \"links\",\n fix: \"Rename the source file to a lowercase, hyphenated slug — and add a redirect from the old URL if it was already published.\",\n id: \"BLUME_AUDIT_URL_STYLE\",\n severity: \"info\",\n tier: \"static\",\n title: \"URL contains uppercase, underscores, or spaces\",\n },\n\n // Redirects\n {\n category: \"redirects\",\n fix: \"Point the redirect at a page that exists.\",\n id: \"BLUME_AUDIT_REDIRECT_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Broken redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Break the cycle in `redirects` — it never resolves.\",\n id: \"BLUME_AUDIT_REDIRECT_LOOP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect loop\",\n },\n {\n category: \"redirects\",\n fix: \"Point every hop straight at the final destination.\",\n id: \"BLUME_AUDIT_REDIRECT_CHAIN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Redirect chain\",\n },\n {\n category: \"redirects\",\n fix: \"Use a real redirect in `blume.config.ts` instead of a meta refresh.\",\n id: \"BLUME_AUDIT_META_REFRESH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Meta refresh redirect\",\n },\n {\n category: \"redirects\",\n fix: \"Remove the redirect, or delete the page it shadows — the page wins and the redirect never fires.\",\n id: \"BLUME_AUDIT_REDIRECT_SOURCE_IS_PAGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Redirect source is also a real page\",\n },\n {\n category: \"redirects\",\n fix: \"Redirect to the HTTPS URL.\",\n id: \"BLUME_AUDIT_REDIRECT_TO_HTTP\",\n severity: \"error\",\n tier: \"network\",\n title: \"HTTPS to HTTP redirect\",\n },\n\n // Social\n {\n category: \"social\",\n fix: \"Add a `description` — Blume fills the rest of the Open Graph tags for you.\",\n id: \"BLUME_AUDIT_OG_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph tags missing or incomplete\",\n },\n {\n category: \"social\",\n fix: \"Set `deployment.site` to turn on generated OG images, or set `seo.image` on the page.\",\n id: \"BLUME_AUDIT_OG_IMAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image missing\",\n },\n {\n category: \"social\",\n fix: \"Point `seo.image` at a file that exists, or rebuild — a dead og:image renders as a blank card everywhere the page is shared.\",\n id: \"BLUME_AUDIT_OG_IMAGE_BROKEN\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is not in the build\",\n },\n {\n category: \"social\",\n fix: \"Use an image of at least 1200×630 — smaller ones render blurry or get cropped into small-card layouts.\",\n id: \"BLUME_AUDIT_OG_IMAGE_SMALL\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph image is too small for large cards\",\n },\n {\n category: \"social\",\n fix: \"Align `og:url` with the page's canonical URL.\",\n id: \"BLUME_AUDIT_OG_URL_MISMATCH\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Open Graph URL not matching canonical\",\n },\n {\n category: \"social\",\n fix: \"Set `seo.x.handle` in blume.config.ts so X can attribute the card.\",\n id: \"BLUME_AUDIT_TWITTER_CARD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"X (Twitter) card missing or incomplete\",\n },\n\n // Localization\n {\n category: \"i18n\",\n fix: \"Restore the `lang` attribute on <html> in your ejected layout.\",\n id: \"BLUME_AUDIT_HTML_LANG_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute missing\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag (e.g. `en`, `en-GB`) for the locale.\",\n id: \"BLUME_AUDIT_HTML_LANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTML lang attribute invalid\",\n },\n {\n category: \"i18n\",\n fix: \"The page's <html lang> must match its own hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_LANG_MISMATCH\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang and HTML lang mismatch\",\n },\n {\n category: \"i18n\",\n fix: \"Use a valid BCP 47 tag in the hreflang annotation.\",\n id: \"BLUME_AUDIT_HREFLANG_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang annotation invalid\",\n },\n {\n category: \"i18n\",\n fix: \"A page's hreflang set must include a self-reference.\",\n id: \"BLUME_AUDIT_HREFLANG_SELF_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Self-reference hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Add an `x-default` alternate pointing at the default-locale page.\",\n id: \"BLUME_AUDIT_HREFLANG_XDEFAULT_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"X-default hreflang annotation missing\",\n },\n {\n category: \"i18n\",\n fix: \"Every page in an hreflang group must link back to every other one.\",\n id: \"BLUME_AUDIT_HREFLANG_NO_RETURN_TAG\",\n severity: \"error\",\n tier: \"static\",\n title: \"Missing reciprocal hreflang (no return-tag)\",\n },\n {\n category: \"i18n\",\n fix: \"Point the hreflang alternate at a page that exists and is canonical.\",\n id: \"BLUME_AUDIT_HREFLANG_BAD_TARGET\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang points to a broken, redirecting, or non-canonical page\",\n },\n {\n category: \"i18n\",\n fix: \"Each language in an hreflang group must name exactly one page.\",\n id: \"BLUME_AUDIT_HREFLANG_CONFLICT\",\n severity: \"error\",\n tier: \"static\",\n title: \"Hreflang group has a language conflict\",\n },\n\n // Assets\n {\n category: \"assets\",\n fix: 'Add descriptive `alt` text, or `alt=\"\"` if the image is decorative.',\n id: \"BLUME_AUDIT_IMAGE_ALT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Missing alt text\",\n },\n {\n category: \"assets\",\n fix: \"Fix the image path, or add the file to public/.\",\n id: \"BLUME_AUDIT_IMAGE_BROKEN\",\n severity: \"error\",\n tier: \"static\",\n title: \"Image broken\",\n },\n {\n category: \"assets\",\n fix: \"Compress the asset, or serve a modern format (WebP/AVIF).\",\n id: \"BLUME_AUDIT_ASSET_TOO_LARGE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Asset file size too large\",\n },\n {\n category: \"assets\",\n fix: \"Set `width` and `height` so the browser can reserve space (avoids layout shift).\",\n id: \"BLUME_AUDIT_IMAGE_MISSING_DIMENSIONS\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Image has no width/height\",\n },\n {\n category: \"assets\",\n fix: \"Fix the reference, or restore the missing file.\",\n id: \"BLUME_AUDIT_SUBRESOURCE_MISSING\",\n severity: \"error\",\n tier: \"static\",\n title: \"Referenced script, style, or asset is missing from the build\",\n },\n {\n category: \"assets\",\n fix: \"Load the subresource over HTTPS — browsers block mixed content.\",\n id: \"BLUME_AUDIT_MIXED_CONTENT\",\n severity: \"error\",\n tier: \"static\",\n title: \"HTTPS/HTTP mixed content\",\n },\n\n // Sitemap\n {\n category: \"sitemap\",\n fix: \"Remove `draft`/`hidden`/`noindex` from the page's frontmatter if it should be indexed.\",\n id: \"BLUME_AUDIT_INDEXABLE_PAGE_NOT_IN_SITEMAP\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page not in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"A noindex page should not be advertised in the sitemap.\",\n id: \"BLUME_AUDIT_NOINDEX_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Noindex page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"List only canonical URLs in the sitemap.\",\n id: \"BLUME_AUDIT_NON_CANONICAL_IN_SITEMAP\",\n severity: \"error\",\n tier: \"static\",\n title: \"Non-canonical page in sitemap\",\n },\n {\n category: \"sitemap\",\n fix: \"Remove the URL from the sitemap, or build the page it names.\",\n id: \"BLUME_AUDIT_SITEMAP_BAD_URL\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap names a page that does not exist or redirects\",\n },\n {\n category: \"sitemap\",\n fix: \"Sitemaps must be valid XML in the sitemaps.org urlset or sitemap index format.\",\n id: \"BLUME_AUDIT_SITEMAP_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap has a syntax error or wrong format\",\n },\n {\n category: \"sitemap\",\n fix: \"Split the sitemap — the limits are 50 MB and 50,000 URLs.\",\n id: \"BLUME_AUDIT_SITEMAP_TOO_LARGE\",\n severity: \"error\",\n tier: \"static\",\n title: \"Sitemap exceeds 50 MB or 50,000 URLs\",\n },\n {\n category: \"sitemap\",\n fix: \"Use a real W3C date that is not in the future — search engines that catch a sitemap lying about freshness stop trusting its lastmod entirely.\",\n id: \"BLUME_AUDIT_SITEMAP_LASTMOD_INVALID\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap lastmod is invalid or in the future\",\n },\n {\n category: \"sitemap\",\n fix: \"A sitemap may only list URLs on its own origin.\",\n id: \"BLUME_AUDIT_SITEMAP_OUT_OF_SCOPE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Sitemap includes URLs out of its scope\",\n },\n {\n category: \"sitemap\",\n fix: \"Make sitemap.xml reachable at the site root.\",\n id: \"BLUME_AUDIT_SITEMAP_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"Sitemap is not accessible\",\n },\n\n // robots.txt\n {\n category: \"robots\",\n fix: \"Set `seo.robots: true` to generate robots.txt.\",\n id: \"BLUME_AUDIT_ROBOTS_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"robots.txt missing\",\n },\n {\n category: \"robots\",\n fix: \"Every robots.txt line must be a `Field: value` directive or a comment.\",\n id: \"BLUME_AUDIT_ROBOTS_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt has a syntax error\",\n },\n {\n category: \"robots\",\n fix: \"A page can't be both disallowed in robots.txt and advertised in the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_DISALLOWS_INDEXABLE\",\n severity: \"error\",\n tier: \"static\",\n title: \"robots.txt disallows a page that is in the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Set `deployment.site` so robots.txt can reference the sitemap.\",\n id: \"BLUME_AUDIT_ROBOTS_SITEMAP_MISSING\",\n severity: \"info\",\n tier: \"static\",\n title: \"robots.txt does not reference the sitemap\",\n },\n {\n category: \"robots\",\n fix: \"Make robots.txt reachable at the site root.\",\n id: \"BLUME_AUDIT_ROBOTS_NOT_ACCESSIBLE\",\n severity: \"error\",\n tier: \"network\",\n title: \"robots.txt is not accessible\",\n },\n\n // AI discovery. `llms.txt` is the sitemap of the AI era, and no SEO crawler\n // audits it — they audit for Google. Blume emits it, so Blume checks it.\n {\n category: \"ai\",\n fix: \"Rebuild — `agents.llmsTxt` is enabled but the build has no llms.txt. If that's intentional, set `agents.llmsTxt: false`.\",\n id: \"BLUME_AUDIT_LLMS_TXT_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt missing from the build\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site — a stale entry sends an AI agent to a page that is not there.\",\n id: \"BLUME_AUDIT_LLMS_TXT_STALE_ENTRY\",\n severity: \"warning\",\n tier: \"static\",\n title: \"llms.txt lists a page the build does not serve\",\n },\n {\n category: \"ai\",\n fix: \"Rebuild so llms.txt matches the site; if the page is deliberately excluded, set `ai.exclude: true` in its front matter.\",\n id: \"BLUME_AUDIT_LLMS_TXT_PAGE_MISSING\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Indexable page missing from llms.txt\",\n },\n // DNS-AID (draft-mozleywilliams-dnsop-dnsaid) lives in the DNS zone, not the\n // build, so unlike the llms.txt checks these can only observe and advise —\n // hence `info`: publishing the records is a DNS-provider action Blume can't\n // take for you, and the draft is young enough that absence is the norm.\n {\n category: \"ai\",\n fix: \"Publish a ServiceMode SVCB or HTTPS record at `_index._agents.<host>` with your DNS provider so agents can discover the site via DNS (DNS-AID).\",\n id: \"BLUME_AUDIT_DNS_AID_MISSING\",\n severity: \"info\",\n tier: \"network\",\n title: \"No DNS-AID agent-discovery records\",\n },\n {\n category: \"ai\",\n fix: \"Enable DNSSEC for the zone so validating resolvers return authenticated DNS-AID answers; if your DNS provider doesn't support DNSSEC, the records still work unsigned.\",\n id: \"BLUME_AUDIT_DNS_AID_UNSIGNED\",\n severity: \"info\",\n tier: \"network\",\n title: \"DNS-AID records are not DNSSEC-authenticated\",\n },\n\n // Structured data. Note we validate only what Blume itself emits — we do not\n // claim Google-rich-results or full schema.org validation (the former is an\n // undocumented network API, the latter a vocabulary we don't bundle).\n {\n category: \"structured-data\",\n fix: \"The JSON-LD block must be valid JSON.\",\n id: \"BLUME_AUDIT_JSONLD_INVALID\",\n severity: \"error\",\n tier: \"static\",\n title: \"Structured data is not valid JSON\",\n },\n {\n category: \"structured-data\",\n fix: \"Every JSON-LD node needs `@context` and `@type`.\",\n id: \"BLUME_AUDIT_JSONLD_INCOMPLETE\",\n severity: \"warning\",\n tier: \"static\",\n title: \"Structured data is missing required properties\",\n },\n\n // Network (`--url`)\n {\n category: \"network\",\n fix: \"The page is linked or in the sitemap but the deployment 404s it.\",\n id: \"BLUME_AUDIT_HTTP_4XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"4XX page\",\n },\n {\n category: \"network\",\n fix: \"The deployment is erroring on this page.\",\n id: \"BLUME_AUDIT_HTTP_5XX\",\n severity: \"error\",\n tier: \"network\",\n title: \"5XX page\",\n },\n {\n category: \"network\",\n fix: \"The page did not respond in time.\",\n id: \"BLUME_AUDIT_HTTP_TIMEOUT\",\n severity: \"error\",\n tier: \"network\",\n title: \"Timed out\",\n },\n {\n category: \"network\",\n fix: \"Enable gzip or brotli on the host.\",\n id: \"BLUME_AUDIT_NOT_COMPRESSED\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Not compressed\",\n },\n {\n category: \"network\",\n fix: \"The page was slow to respond.\",\n id: \"BLUME_AUDIT_SLOW_RESPONSE\",\n severity: \"warning\",\n tier: \"network\",\n title: \"Slow page\",\n },\n\n // External (`--external`)\n {\n category: \"network\",\n fix: \"Fix or remove the outbound link.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_BROKEN\",\n severity: \"error\",\n tier: \"external\",\n title: \"External link is broken\",\n },\n {\n category: \"network\",\n fix: \"Link straight to the destination.\",\n id: \"BLUME_AUDIT_EXTERNAL_LINK_REDIRECT\",\n severity: \"info\",\n tier: \"external\",\n title: \"External link redirects\",\n },\n] as const satisfies readonly CheckMeta[];\n\nexport type CheckId = (typeof CHECKS)[number][\"id\"];\n\nconst BY_ID = new Map<string, CheckMeta>(\n CHECKS.map((check) => [check.id, check])\n);\n\nexport const checkMeta = (id: CheckId): CheckMeta => {\n const meta = BY_ID.get(id);\n if (!meta) {\n throw new Error(`Unknown audit check: ${id}`);\n }\n return meta;\n};\n\nconst DOCS_BASE = \"https://useblume.dev/docs/cli/audit\";\n\n/** `BLUME_AUDIT_TITLE_TOO_LONG` -> `…/audit#title-too-long`. */\nexport const checkDocsUrl = (id: CheckId): string =>\n `${DOCS_BASE}#${id.replace(\"BLUME_AUDIT_\", \"\").toLowerCase().replaceAll(\"_\", \"-\")}`;\n\n/** Where a finding happened: the built URL, plus the source file that fixes it. */\nexport interface FindingSite {\n url: string;\n file?: string;\n line?: number;\n column?: number;\n}\n\n/**\n * Build a diagnostic for a check. Severity, remediation, and the docs anchor all\n * come from the catalog, so a check body only supplies what's specific to the\n * occurrence: where it happened and what was actually wrong.\n */\nexport const finding = (\n id: CheckId,\n site: FindingSite,\n detail: string,\n fix?: string\n): Diagnostic => {\n const meta = checkMeta(id);\n return {\n code: id,\n column: site.column,\n docsUrl: checkDocsUrl(id),\n file: site.file,\n line: site.line,\n message: detail,\n severity: meta.severity,\n suggestion: fix ?? meta.fix,\n url: site.url,\n };\n};\n",
|
|
7
7
|
"import { mkdtemp, writeFile } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\n\nimport spawn from \"cross-spawn\";\nimport { join } from \"pathe\";\n\nimport { reportJson } from \"./report.ts\";\nimport type { AuditResult } from \"./run.ts\";\n\n/** A coding agent CLI the audit can hand its findings to (`--claude`, `--codex`). */\nexport interface AgentCli {\n /** The executable to look up on PATH. */\n bin: string;\n /** How to install it, shown when the executable is missing. */\n install: string;\n /** Display name for messages. */\n name: string;\n}\n\nexport type AgentKind = \"claude\" | \"codex\";\n\nexport const AGENTS = {\n claude: {\n bin: \"claude\",\n install: \"npm install -g @anthropic-ai/claude-code\",\n name: \"Claude Code\",\n },\n codex: {\n bin: \"codex\",\n install: \"npm install -g @openai/codex\",\n name: \"Codex\",\n },\n} satisfies Record<AgentKind, AgentCli>;\n\n/**\n * Write the full JSON report where the agent can read it. A file rather than\n * inline prompt text: a large site's report can exceed the platform's argv\n * limit, and the JSON already carries every finding untruncated — the terminal\n * report previews three pages per check, the file never does.\n */\nexport const writeAgentReport = async (\n result: AuditResult,\n root: string\n): Promise<string> => {\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const path = join(dir, \"report.json\");\n await writeFile(path, reportJson(result, root));\n return path;\n};\n\n/** The handoff prompt: where the report is, how to read it, and the ground rules. */\nexport const fixPrompt = (reportPath: string): string =>\n `Fix the issues found by \\`blume audit\\` in this project.\n\nThe full audit report is at ${reportPath}. It is JSON: each entry in \\`diagnostics\\` is one finding, with the check \\`code\\`, a \\`message\\` explaining what is wrong, the affected page \\`url\\`, the source \\`file\\` to edit (relative to the current directory, with a \\`line\\` when the finding points at a specific front matter key), and a \\`suggestion\\` describing the fix.\n\nWork through every finding:\n1. Read the report and group the findings by \\`file\\`.\n2. Apply each finding's \\`suggestion\\` by editing the named source file — most fixes are front matter edits at the cited line.\n3. Never fix a finding by deleting a page, removing content, or hiding it from the audit; if a finding genuinely needs a human decision, leave it and say so in your summary.\n\nWhen you are done, run \\`blume build\\` and then \\`blume audit\\` to verify, and repeat until the audit reports no issues.`;\n\nconst spawnAgent = (bin: string, args: string[]): Promise<number> =>\n // oxlint-disable-next-line promise/avoid-new -- adapt spawn's event callbacks\n new Promise((resolve, reject) => {\n const child = spawn(bin, args, { stdio: \"inherit\" });\n child.once(\"error\", reject);\n child.once(\"close\", (code) => resolve(code ?? 1));\n });\n\n/**\n * Run the agent CLI interactively with the handoff prompt, inheriting the\n * terminal so the user watches and steers the fixes rather than granting a\n * headless process blanket write access. Resolves with the agent's exit code;\n * rejects when the executable isn't on PATH — on every platform, since\n * cross-spawn resolves npm's `.cmd` shims itself and escapes their arguments\n * (the old `shell: true` launch left quoting to a hand-built command line and\n * reported a missing executable as cmd.exe's exit code 9009).\n *\n * cmd.exe still cannot carry the multi-line prompt as an argument (a newline\n * ends the command), so on Windows the prompt is written to a file next to\n * the report and handed over via a one-line pointer.\n */\nexport const launchAgent = async (\n bin: string,\n prompt: string,\n platform: NodeJS.Platform = process.platform\n): Promise<number> => {\n if (platform !== \"win32\") {\n return await spawnAgent(bin, [prompt]);\n }\n const dir = await mkdtemp(join(tmpdir(), \"blume-audit-\"));\n const promptPath = join(dir, \"prompt.md\");\n await writeFile(promptPath, prompt);\n return await spawnAgent(bin, [\n `Read ${promptPath} and follow its instructions exactly.`,\n ]);\n};\n\n/**\n * {@link launchAgent}, but resolving `null` instead of rejecting when the\n * executable isn't on PATH, so each command can print its own install hint.\n * Only `ENOENT` means \"not installed\" — any other spawn failure (`EACCES`,\n * `EMFILE`, …) must surface as itself, not be masked by an irrelevant hint.\n */\nexport const launchInstalledAgent = async (\n bin: string,\n prompt: string,\n platform: NodeJS.Platform = process.platform\n): Promise<number | null> => {\n try {\n return await launchAgent(bin, prompt, platform);\n } catch (error) {\n // SAFETY: only the `code` tag is inspected; a spawn failure throws an\n // ErrnoException, and any other thrown value fails the comparison and\n // rethrows unchanged.\n if ((error as NodeJS.ErrnoException)?.code !== \"ENOENT\") {\n throw error;\n }\n return null;\n }\n};\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;;;AAAA;AAEA;;;AC2CO,IAAM,SAAS;AAAA,EAEpB;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;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AA;AAAA;AAS9B,IAAM,aAAa,CAAC,KAAa,SAE/B,IAAI,QAAQ,CAAC,SAAS,WAAW;AAAA,EAC/B,MAAM,QAAQ,MAAM,KAAK,MAAM,EAAE,OAAO,UAAU,CAAC;AAAA,EACnD,MAAM,KAAK,SAAS,MAAM;AAAA,EAC1B,MAAM,KAAK,SAAS,CAAC,SAAS,QAAQ,QAAQ,CAAC,CAAC;AAAA,CACjD;AAeI,IAAM,cAAc,OACzB,KACA,QACA,WAA4B,QAAQ,aAChB;AAAA,EACpB,IAAI,aAAa,SAAS;AAAA,IACxB,OAAO,MAAM,WAAW,KAAK,CAAC,MAAM,CAAC;AAAA,EACvC;AAAA,EACA,MAAM,MAAM,MAAM,QAAQ,KAAK,OAAO,GAAG,cAAc,CAAC;AAAA,EACxD,MAAM,aAAa,KAAK,KAAK,WAAW;AAAA,EACxC,MAAM,UAAU,YAAY,MAAM;AAAA,EAClC,OAAO,MAAM,WAAW,KAAK;AAAA,IAC3B,QAAQ;AAAA,EACV,CAAC;AAAA;AASI,IAAM,uBAAuB,OAClC,KACA,QACA,WAA4B,QAAQ,aACT;AAAA,EAC3B,IAAI;AAAA,IACF,OAAO,MAAM,YAAY,KAAK,QAAQ,QAAQ;AAAA,IAC9C,OAAO,OAAO;AAAA,IAId,IAAK,OAAiC,SAAS,UAAU;AAAA,MACvD,MAAM;AAAA,IACR;AAAA,IACA,OAAO;AAAA;AAAA;",
|
|
10
|
+
"debugId": "E6F2D36C0552C7F664756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
VERSION_ID,
|
|
9
9
|
VERSION_LIKE,
|
|
10
10
|
versionizeRoute
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-v6ya5kcb.js";
|
|
12
12
|
import {
|
|
13
13
|
stripBasePath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-gs7r695n.js";
|
|
15
15
|
import {
|
|
16
16
|
isWithin,
|
|
17
17
|
scanProject
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5r8g91qn.js";
|
|
19
19
|
|
|
20
20
|
// src/core/version-cut.ts
|
|
21
21
|
import { existsSync } from "node:fs";
|
|
@@ -33,13 +33,22 @@ var buildRouteRewrites = (project, id) => {
|
|
|
33
33
|
const { basePath, i18n } = project.config;
|
|
34
34
|
const { contentRoot } = project.context;
|
|
35
35
|
const rewrites = new Map;
|
|
36
|
+
const logical = new Map;
|
|
36
37
|
for (const page of project.graph.pages) {
|
|
37
38
|
const { sourcePath } = page;
|
|
38
39
|
if (page.version !== "" || page.collection === "staged" || !sourcePath || relative(contentRoot, sourcePath).startsWith("..")) {
|
|
39
40
|
continue;
|
|
40
41
|
}
|
|
41
|
-
const
|
|
42
|
-
rewrites.set(stripBasePath(basePath, page.route), i18n ? localizeRoute(
|
|
42
|
+
const snapshot = versionizeRoute(page.versionKey, id);
|
|
43
|
+
rewrites.set(stripBasePath(basePath, page.route), i18n ? localizeRoute(snapshot, page.locale, i18n) : snapshot);
|
|
44
|
+
if (i18n) {
|
|
45
|
+
logical.set(page.versionKey, snapshot);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
for (const [route, snapshot] of logical) {
|
|
49
|
+
if (!rewrites.has(route)) {
|
|
50
|
+
rewrites.set(route, snapshot);
|
|
51
|
+
}
|
|
43
52
|
}
|
|
44
53
|
return rewrites;
|
|
45
54
|
};
|
|
@@ -261,5 +270,5 @@ var cutVersion = async (root, id, options = {}) => {
|
|
|
261
270
|
|
|
262
271
|
export { CutError, unregisteredSnapshotDiagnostics, cutVersion };
|
|
263
272
|
|
|
264
|
-
//# debugId=
|
|
265
|
-
//# sourceMappingURL=chunk-
|
|
273
|
+
//# debugId=FF6060263B0E256E64756E2164756E21
|
|
274
|
+
//# sourceMappingURL=chunk-7mbqtmgb.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/core/version-cut.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { existsSync } from \"node:fs\";\nimport { cp, readdir, readFile, rm } from \"node:fs/promises\";\n\nimport { join, relative } from \"pathe\";\n\nimport { stripBasePath } from \"./base-path.ts\";\nimport { nextFenceState } from \"./code-fences.ts\";\nimport type { FenceState } from \"./code-fences.ts\";\nimport { writeTextAtomic } from \"./fs-atomic.ts\";\nimport { localizeRoute } from \"./i18n.ts\";\nimport type { BlumeProject } from \"./project-graph.ts\";\nimport { isWithin, scanProject } from \"./project-graph.ts\";\nimport { VERSION_ID } from \"./schema.ts\";\nimport type { Diagnostic } from \"./types.ts\";\nimport { VERSION_LIKE, versionizeRoute } from \"./versions.ts\";\n\n/** What `cutVersion` did, for the CLI to report. */\nexport interface CutResult {\n /** Files copied into the snapshot. */\n copied: number;\n /** Markdown pages whose root-absolute links were rewritten, with counts. */\n rewritten: { file: string; count: number }[];\n /** Whether `blume.config.ts` was updated in place. */\n configUpdated: boolean;\n /**\n * Whether that update added the whole `versions` block — the first cut of a\n * project that had no versioning — rather than one `archived` entry.\n */\n versionsAdded: boolean;\n /** Ready-to-paste config snippet when in-place update was not possible. */\n configSnippet: string | null;\n /** Absolute path of the created snapshot directory. */\n dir: string;\n}\n\n/** A `cutVersion` failure the CLI reports as a user error, not a crash. */\nexport class CutError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"CutError\";\n }\n}\n\n// Inline code spans are syntax being *shown*, not links — blank them before\n// matching so replacements can splice into the real line by index (the mask\n// preserves length). Mirrors the content-assets rewriter.\nconst INLINE_CODE = /`[^`]*`/gu;\n// A markdown link/image target or an HTML href/src attribute whose value is\n// root-absolute. Named groups carry the prefix (kept) and target (rewritten).\nconst ROOT_LINK = /(?<prefix>\\]\\(|href=\"|src=\")(?<target>\\/[^\\s\"')]*)/gu;\n\n/**\n * Build the link-rewrite table: every current-version route (basePath\n * stripped, since authors write root-absolute links as if mounted at root)\n * mapped to the same page's route inside the new snapshot. Only pages the\n * snapshot actually contains qualify — filesystem pages under the content\n * root. Spec-rendered references (`/api`, `/events`) and remote sources\n * aren't copied, so links to them keep pointing at the live pages instead of\n * a 404 inside the snapshot.\n */\nconst buildRouteRewrites = (\n project: BlumeProject,\n id: string\n): Map<string, string> => {\n const { basePath, i18n } = project.config;\n const { contentRoot } = project.context;\n const rewrites = new Map<string, string>();\n // Under i18n, authors write links in the unprefixed form (`/guides/setup`)\n // and rendering moves them into the reader's locale — a form no page is\n // routed at when the default locale keeps its prefix\n // (`hideDefaultLocalePrefix: false`). So it is mapped too, to the\n // unprefixed snapshot route, which rendering localizes the same way. Page\n // routes win where the two forms coincide.\n const logical = new Map<string, string>();\n for (const page of project.graph.pages) {\n // `sourcePath` marks a page backed by a local file, which excludes\n // generated and remote pages; the content-root check below excludes local\n // files that live outside the tree a version snapshot copies. A staged\n // page (an Obsidian note) is served from its source, not from the copied\n // tree, so it keeps publishing as current even when its file sits under\n // the content root.\n const { sourcePath } = page;\n if (\n page.version !== \"\" ||\n page.collection === \"staged\" ||\n !sourcePath ||\n relative(contentRoot, sourcePath).startsWith(\"..\")\n ) {\n continue;\n }\n const snapshot = versionizeRoute(page.versionKey, id);\n rewrites.set(\n stripBasePath(basePath, page.route),\n i18n ? localizeRoute(snapshot, page.locale, i18n) : snapshot\n );\n if (i18n) {\n logical.set(page.versionKey, snapshot);\n }\n }\n for (const [route, snapshot] of logical) {\n if (!rewrites.has(route)) {\n rewrites.set(route, snapshot);\n }\n }\n return rewrites;\n};\n\n/** Rewrite one line's root-absolute internal links via the rewrite table. */\nconst rewriteLine = (line: string, rewrites: Map<string, string>): string => {\n const masked = line.replaceAll(INLINE_CODE, (span) =>\n \" \".repeat(span.length)\n );\n let out = \"\";\n let cursor = 0;\n let count = 0;\n for (const match of masked.matchAll(ROOT_LINK)) {\n const target = match.groups?.target ?? \"\";\n // An anchor or query stays attached to the rewritten path.\n const hash = target.search(/[#?]/u);\n const path = hash === -1 ? target : target.slice(0, hash);\n const suffix = hash === -1 ? \"\" : target.slice(hash);\n const bare = path !== \"/\" && path.endsWith(\"/\") ? path.slice(0, -1) : path;\n const replacement = rewrites.get(bare);\n if (replacement === undefined) {\n continue;\n }\n const offset = (match.index ?? 0) + (match.groups?.prefix?.length ?? 0);\n out += line.slice(cursor, offset) + replacement + suffix;\n cursor = offset + target.length;\n count += 1;\n }\n return count === 0 ? line : out + line.slice(cursor);\n};\n\n/** A page's link-rewritten text and how many of its lines changed. */\nexport interface SnapshotRewrite {\n text: string;\n count: number;\n}\n\n/**\n * Rewrite a copied page's root-absolute internal links to their snapshot\n * equivalents, skipping fenced and inline code. Relative links need no\n * rewriting — the whole tree copies together, so they stay self-contained.\n */\nexport const rewriteSnapshotLinks = (\n source: string,\n rewrites: Map<string, string>\n): SnapshotRewrite => {\n let fence: FenceState = null;\n let count = 0;\n const lines = source.split(\"\\n\").map((line) => {\n const next = nextFenceState(line, fence);\n const inFence = fence !== null || next !== null;\n fence = next;\n if (inFence) {\n return line;\n }\n const rewrittenLine = rewriteLine(line, rewrites);\n if (rewrittenLine !== line) {\n count += 1;\n }\n return rewrittenLine;\n });\n return { count, text: lines.join(\"\\n\") };\n};\n\n/**\n * The switcher label a first cut gives the live docs. `versions.current.label`\n * is required, and \"Latest\" reads right until the author names the release.\n */\nconst CURRENT_LABEL = \"Latest\";\n\n/** The config entry to add, as a paste-ready snippet for the fallback path. */\nconst snippetFor = (id: string, hasVersions: boolean): string =>\n hasVersions\n ? `Add to versions.archived in blume.config.ts (newest first):\\n\\n { id: \"${id}\" },\\n`\n : `Add to blume.config.ts:\\n\\n versions: {\\n archived: [{ id: \"${id}\" }],\\n current: { label: \"${CURRENT_LABEL}\" },\\n },\\n`;\n\n/**\n * Best-effort in-place config update: insert the new id at the head of an\n * existing \\`archived: [\\` array literal, preserving indentation. Anything\n * fancier (computed arrays, config spread across files) falls back to a\n * printed snippet — the config is user-authored TypeScript, and string-level\n * surgery beyond this simple shape risks corrupting it.\n */\nexport const insertArchivedVersion = async (\n configPath: string,\n id: string\n): Promise<boolean> => {\n let text: string;\n try {\n text = await readFile(configPath, \"utf-8\");\n } catch {\n return false;\n }\n const match = text.match(/(?<lead>archived:\\s*\\[)/u);\n if (!match || match.index === undefined) {\n return false;\n }\n const insertAt = match.index + (match.groups?.lead?.length ?? 0);\n // Indentation: one level deeper than the line holding `archived:`.\n const lineStart = text.lastIndexOf(\"\\n\", match.index) + 1;\n const indent = text.slice(lineStart).match(/^\\s*/u)?.[0] ?? \"\";\n const rest = text.slice(insertAt);\n // Match the array's authored shape: empty stays bare, an inline array gets\n // an inline entry, a multiline array gets its own indented line — on the\n // file's own line ending, so a CRLF config doesn't gain a lone LF.\n const eol = /^\\r?\\n/u.exec(rest)?.[0];\n let entry: string;\n if (rest.trimStart().startsWith(\"]\")) {\n entry = `{ id: \"${id}\" }`;\n } else if (eol) {\n entry = `${eol}${indent} { id: \"${id}\" },`;\n } else {\n entry = `{ id: \"${id}\" }, `;\n }\n await writeTextAtomic(configPath, text.slice(0, insertAt) + entry + rest);\n return true;\n};\n\n/** The opening brace of the config object: `defineConfig({` or `export default {`. */\nconst CONFIG_OBJECT = /(?:defineConfig\\(\\s*|export\\s+default\\s+)\\{/gu;\n\n/**\n * Best-effort in-place registration of a first version: add a `versions` block\n * (the id archived, the live docs labeled {@link CURRENT_LABEL}) as the first\n * property of the config object. Only the plain shape is edited — exactly one\n * `defineConfig({` or `export default {` and no `versions` key yet — so a\n * config built any other way falls back to the printed snippet rather than\n * risk corrupting it.\n */\nexport const insertVersionsBlock = async (\n configPath: string,\n id: string\n): Promise<boolean> => {\n let text: string;\n try {\n text = await readFile(configPath, \"utf-8\");\n } catch {\n return false;\n }\n const matches = [...text.matchAll(CONFIG_OBJECT)];\n const [match] = matches;\n if (matches.length !== 1 || !match || /\\bversions\\s*:/u.test(text)) {\n return false;\n }\n const insertAt = match.index + match[0].length;\n const rest = text.slice(insertAt);\n const eol = text.includes(\"\\r\\n\") ? \"\\r\\n\" : \"\\n\";\n const lineStart = text.lastIndexOf(\"\\n\", match.index) + 1;\n const outer = /^[ \\t]*/u.exec(text.slice(lineStart))?.[0] ?? \"\";\n // Match the indentation of the property on the next line, when there is one.\n const indent =\n /^[ \\t]*\\r?\\n(?<indent>[ \\t]*)\\S/u.exec(rest)?.groups?.indent ??\n `${outer} `;\n const block = [\n \"versions: {\",\n ` archived: [{ id: \"${id}\" }],`,\n ` current: { label: \"${CURRENT_LABEL}\" },`,\n \"},\",\n ]\n .map((line) => `${indent}${line}`)\n .join(eol);\n const body = rest.trimStart();\n let tail: string;\n if (body.startsWith(\"}\")) {\n // An empty object: close it on its own line.\n tail = `${eol}${outer}${body}`;\n } else if (/^[ \\t]*\\r?\\n/u.test(rest)) {\n tail = rest;\n } else {\n // An inline object: move its first property onto the next line.\n tail = `${eol}${indent}${body}`;\n }\n await writeTextAtomic(\n configPath,\n `${text.slice(0, insertAt)}${eol}${block}${tail}`\n );\n return true;\n};\n\n/**\n * Version-shaped folders (`v1.0/`) at the top of the content root of a project\n * with no `versions` config — usually a snapshot `blume version` cut but\n * couldn't register — which build as ordinary content at `/v1.0/…`, so every\n * page ships twice. With versioning configured, the scan's own\n * `BLUME_VERSIONS_UNCONFIGURED_VERSION` covers a folder it doesn't list; this\n * check is `blume doctor`'s alone, since an unversioned site can have a real\n * `v1/` section that a warning on every build would only nag about.\n */\nexport const unregisteredSnapshotDiagnostics = (\n project: BlumeProject\n): Diagnostic[] => {\n if (project.config.versions) {\n return [];\n }\n const { contentRoot } = project.context;\n const folders = new Set<string>();\n for (const page of project.graph.pages) {\n const [first, ...rest] = page.sourcePath\n ? relative(contentRoot, page.sourcePath).split(\"/\")\n : [];\n if (first && rest.length > 0 && VERSION_LIKE.test(first)) {\n folders.add(first);\n }\n }\n return [...folders].toSorted().map((folder) => ({\n code: \"BLUME_VERSIONS_UNCONFIGURED_VERSION\",\n file: join(contentRoot, folder),\n message: `Folder \"${folder}/\" looks like a version snapshot, but versioning isn't configured, so its pages build as ordinary content at /${folder}/….`,\n severity: \"warning\",\n suggestion: `If it's a snapshot, register it with \\`versions: { archived: [{ id: \"${folder}\" }], current: { label: \"${CURRENT_LABEL}\" } }\\` in blume.config.ts; if it's an ordinary section, ignore this.`,\n }));\n};\n\n/**\n * Freeze the current docs as an archived version: copy the content tree into\n * `<contentRoot>/<id>/` (excluding existing snapshots), rewrite root-absolute\n * internal links so the copy is self-contained, and register the id in\n * `blume.config.ts` (or print the snippet to paste).\n */\nexport const cutVersion = async (\n root: string,\n id: string,\n options: { force?: boolean } = {}\n): Promise<CutResult> => {\n if (!VERSION_ID.test(id)) {\n throw new CutError(\n `Version ids must start with a letter (e.g. \"v1.0\") and contain only letters, digits, dots, hyphens, and underscores — got \"${id}\".`\n );\n }\n\n const project = await scanProject(root);\n const errors = project.diagnostics.filter(\n (diagnostic) => diagnostic.severity === \"error\"\n );\n if (errors.length > 0) {\n throw new CutError(\n `The project has ${errors.length} error diagnostic(s) — fix them before cutting a version (run \\`blume validate\\`).`\n );\n }\n // A missing content root already fails inside `scanProject` (the filesystem\n // source's own validation), so only the version-level checks remain here.\n const { contentRoot } = project.context;\n if (project.config.versions?.archived.some((version) => version.id === id)) {\n throw new CutError(\n `Version \"${id}\" is already registered in versions.archived.`\n );\n }\n\n const dir = join(contentRoot, id);\n if (existsSync(dir)) {\n if (!options.force) {\n throw new CutError(\n `${dir} already exists — pass --force to overwrite the snapshot.`\n );\n }\n await rm(dir, { force: true, recursive: true });\n }\n\n // Existing snapshots must not nest inside the new one: configured ids, plus\n // any version-shaped directory (`v1.0/`) that never made it into the config —\n // e.g. a prior cut whose config update fell back to a printed snippet. A\n // genuine content folder that merely looks like a version already draws the\n // rename-or-register diagnostic, so skipping it here is consistent.\n const excluded = new Set([\n id,\n \"node_modules\",\n ...(project.config.versions?.archived.map((version) => version.id) ?? []),\n ]);\n // Another local source's tree under the content root — an Obsidian vault the\n // filesystem source excludes — is that source's to publish. Copying it would\n // republish its raw notes (wikilinks and `%%comments%%` intact) as\n // filesystem pages of the snapshot, while the source itself keeps serving\n // them as current.\n const foreignRoots = project.sources\n .flatMap((source) =>\n source.staged && source.contentRoot ? [source.contentRoot] : []\n )\n .filter((tree) => isWithin(contentRoot, tree));\n const isForeign = (path: string): boolean =>\n foreignRoots.some((tree) => isWithin(tree, path));\n const entries = await readdir(contentRoot, { withFileTypes: true });\n let copied = 0;\n await Promise.all(\n entries.map(async (entry) => {\n if (\n excluded.has(entry.name) ||\n entry.name.startsWith(\".\") ||\n (entry.isDirectory() && VERSION_LIKE.test(entry.name))\n ) {\n return;\n }\n await cp(join(contentRoot, entry.name), join(dir, entry.name), {\n filter: (source) => !isForeign(source),\n recursive: true,\n });\n })\n );\n\n // Rewrite root-absolute internal links in every copied markdown page.\n const rewrites = buildRouteRewrites(project, id);\n const rewritten: { file: string; count: number }[] = [];\n const walk = async (current: string): Promise<void> => {\n const children = await readdir(current, { withFileTypes: true });\n await Promise.all(\n children.map(async (child) => {\n const abs = join(current, child.name);\n if (child.isDirectory()) {\n await walk(abs);\n return;\n }\n copied += 1;\n if (!/\\.mdx?$/u.test(child.name)) {\n return;\n }\n const source = await readFile(abs, \"utf-8\");\n const { text, count } = rewriteSnapshotLinks(source, rewrites);\n if (count > 0) {\n await writeTextAtomic(abs, text);\n rewritten.push({ count, file: relative(dir, abs) });\n }\n })\n );\n };\n await walk(dir);\n\n const configPath =\n project.context.configFile ?? join(root, \"blume.config.ts\");\n const firstVersion = project.config.versions === undefined;\n const configUpdated = firstVersion\n ? await insertVersionsBlock(configPath, id)\n : await insertArchivedVersion(configPath, id);\n\n return {\n configSnippet: configUpdated ? null : snippetFor(id, !firstVersion),\n configUpdated,\n copied,\n dir,\n rewritten,\n versionsAdded: configUpdated && firstVersion,\n };\n};\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAiCO,MAAM,iBAAiB,MAAM;AAAA,EAClC,WAAW,CA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