blume 2.0.0 → 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/AGENTS.md +1 -1
- package/CHANGELOG.md +110 -0
- package/README.md +2 -2
- package/dist/cli/{chunk-f2972sbt.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-pat2zzwc.js → chunk-3yce002v.js} +21 -8
- package/dist/cli/{chunk-pat2zzwc.js.map → chunk-3yce002v.js.map} +4 -4
- package/dist/cli/{chunk-d1tadaw7.js → chunk-4e9b9ra6.js} +17 -7
- package/dist/cli/chunk-4e9b9ra6.js.map +10 -0
- package/dist/cli/{chunk-zg2gtj10.js → chunk-5r8g91qn.js} +352 -676
- package/dist/cli/chunk-5r8g91qn.js.map +34 -0
- package/dist/cli/{chunk-11j0384y.js → chunk-6dtt0zfn.js} +14 -14
- package/dist/cli/{chunk-11j0384y.js.map → chunk-6dtt0zfn.js.map} +3 -3
- package/dist/cli/{chunk-bw22s759.js → chunk-6k4ftwze.js} +38 -19
- package/dist/cli/{chunk-bw22s759.js.map → chunk-6k4ftwze.js.map} +4 -4
- package/dist/cli/{chunk-sqn5t4q0.js → chunk-7mbqtmgb.js} +16 -7
- package/dist/cli/chunk-7mbqtmgb.js.map +10 -0
- package/dist/cli/{chunk-79njf86q.js → chunk-7vtckvaw.js} +21 -19
- package/dist/cli/chunk-7vtckvaw.js.map +11 -0
- package/dist/cli/{chunk-fh5hj5jt.js → chunk-8g8ytmgx.js} +17 -18
- package/dist/cli/{chunk-fh5hj5jt.js.map → chunk-8g8ytmgx.js.map} +2 -2
- package/dist/cli/{chunk-1w8dp3qb.js → chunk-91ws1n6j.js} +18 -15
- package/dist/cli/chunk-91ws1n6j.js.map +10 -0
- package/dist/cli/{chunk-7ez8ny0t.js → chunk-bbnwccaz.js} +2 -2
- package/dist/cli/{chunk-5a2z0198.js → chunk-bfwp9vp6.js} +18 -10
- package/dist/cli/chunk-bfwp9vp6.js.map +10 -0
- package/dist/cli/{chunk-ernrthtr.js → chunk-d1v5rhy0.js} +14 -15
- package/dist/cli/{chunk-ernrthtr.js.map → chunk-d1v5rhy0.js.map} +2 -2
- package/dist/cli/{chunk-a9kptbw5.js → chunk-ddndchfr.js} +21 -6
- package/dist/cli/chunk-ddndchfr.js.map +14 -0
- package/dist/cli/{chunk-zxccj738.js → chunk-esh98wmb.js} +1 -1
- package/dist/cli/{chunk-88cpgt6h.js → chunk-fsmrqk8a.js} +1 -1
- package/dist/cli/{chunk-b5aj94ah.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-41za066z.js → chunk-h2ez8dzb.js} +4 -4
- package/dist/cli/{chunk-by2290sx.js → chunk-h7k3nq3v.js} +2 -2
- package/dist/cli/{chunk-j8mw0za6.js → chunk-hqp2ajnh.js} +252 -123
- package/dist/cli/chunk-hqp2ajnh.js.map +35 -0
- package/dist/cli/{chunk-mnqj32sj.js → chunk-hr8ne106.js} +119 -50
- package/dist/cli/chunk-hr8ne106.js.map +13 -0
- package/dist/cli/{chunk-mwt1k8n7.js → chunk-j85scx15.js} +74 -30
- package/dist/cli/chunk-j85scx15.js.map +10 -0
- package/dist/cli/{chunk-z01ze5c1.js → chunk-k7pj68a8.js} +63 -22
- package/dist/cli/chunk-k7pj68a8.js.map +11 -0
- package/dist/cli/{chunk-2q1dwty4.js → chunk-mqc662a6.js} +8 -8
- package/dist/cli/{chunk-2q1dwty4.js.map → chunk-mqc662a6.js.map} +4 -4
- package/dist/cli/{chunk-y3e45rc8.js → chunk-n1yg3tj3.js} +4 -4
- package/dist/cli/{chunk-bctazmbk.js → chunk-nfcyttvj.js} +17 -6
- package/dist/cli/chunk-nfcyttvj.js.map +10 -0
- package/dist/cli/{chunk-6k8vp3ta.js → chunk-pbg5a4s3.js} +60 -28
- package/dist/cli/chunk-pbg5a4s3.js.map +19 -0
- package/dist/cli/{chunk-d80hr03s.js → chunk-ppzjqwx2.js} +24 -17
- package/dist/cli/{chunk-d80hr03s.js.map → chunk-ppzjqwx2.js.map} +4 -4
- package/dist/cli/{chunk-beat36xx.js → chunk-qkb5a8sa.js} +25 -10
- package/dist/cli/chunk-qkb5a8sa.js.map +10 -0
- package/dist/cli/{chunk-bnbmcwfb.js → chunk-sqw4ekg1.js} +5 -5
- package/dist/cli/{chunk-bnbmcwfb.js.map → chunk-sqw4ekg1.js.map} +3 -3
- package/dist/cli/{chunk-xaz13gwg.js → chunk-v6ya5kcb.js} +3268 -1150
- package/dist/cli/chunk-v6ya5kcb.js.map +189 -0
- package/dist/cli/{chunk-tzne8qfq.js → chunk-w4bxdvsa.js} +18 -15
- package/dist/cli/chunk-w4bxdvsa.js.map +10 -0
- package/dist/cli/{chunk-f7t03s3g.js → chunk-wdrt2k2v.js} +2 -2
- package/dist/cli/{chunk-z1f5arsg.js → chunk-xh43dwgw.js} +170 -55
- package/dist/cli/chunk-xh43dwgw.js.map +36 -0
- package/dist/cli/{chunk-pnnvybbk.js → chunk-zp79m0ts.js} +5 -5
- package/dist/cli/{chunk-pnnvybbk.js.map → chunk-zp79m0ts.js.map} +2 -2
- package/dist/cli/index.js +160 -35
- package/dist/cli/index.js.map +4 -4
- package/dist/types/ai/agent-readability.d.ts +1 -1
- package/dist/types/ai/agent-surface.d.ts +32 -0
- package/dist/types/ai/api/paths.d.ts +1 -1
- package/dist/types/ai/api-catalog.d.ts +7 -1
- package/dist/types/ai/ask-context.d.ts +14 -7
- package/dist/types/ai/ask.d.ts +43 -43
- package/dist/types/ai/component-markdown.d.ts +4 -4
- package/dist/types/ai/index.d.ts +3 -3
- package/dist/types/ai/openapi-components.d.ts +1 -1
- package/dist/types/ai/relative-links.d.ts +9 -4
- package/dist/types/ai/serializers.d.ts +1 -1
- package/dist/types/ai/static-expression.d.ts +28 -0
- package/dist/types/ai/visibility.d.ts +1 -1
- 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 +21 -21
- package/dist/types/core/config.d.ts +5 -5
- package/dist/types/core/data.d.ts +3 -3
- package/dist/types/core/graph.d.ts +2 -0
- package/dist/types/core/i18n-ui.d.ts +37 -8
- 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 +57 -18
- 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/core/unrecognized-keys.d.ts +1 -1
- 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/documents.d.ts +1 -1
- package/dist/types/search/orama-index.d.ts +1 -1
- package/dist/types/search/sync/algolia.d.ts +3 -1
- package/docs/01-quickstart.mdx +3 -2
- package/docs/02-deployment.mdx +21 -12
- package/docs/03-upgrading.mdx +22 -9
- package/docs/04-migrating.mdx +4 -4
- package/docs/08-faq.mdx +12 -5
- package/docs/advanced/changelog.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +5 -3
- package/docs/advanced/skills.mdx +1 -1
- package/docs/cli/audit.mdx +5 -5
- package/docs/cli/doctor.mdx +4 -4
- package/docs/cli/evals.mdx +9 -9
- package/docs/cli/index.mdx +6 -3
- package/docs/cli/translate.mdx +8 -8
- package/docs/configuration/analytics.mdx +23 -2
- package/docs/configuration/{ask-ai.mdx → assistant.mdx} +20 -20
- package/docs/configuration/customization.mdx +5 -4
- package/docs/configuration/index.mdx +7 -5
- package/docs/configuration/meta.ts +1 -1
- package/docs/configuration/search.mdx +2 -2
- package/docs/content/components.mdx +1 -1
- package/docs/content/frontmatter.mdx +5 -1
- package/docs/content/i18n.mdx +3 -3
- package/docs/content/index.mdx +4 -2
- package/docs/content/islands.mdx +1 -1
- 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 +22 -8
- package/docs/discoverability/index.mdx +3 -3
- 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/index.mdx +2 -2
- 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/SKILL.md +5 -5
- 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-readability.ts +4 -4
- package/src/ai/agent-surface.ts +56 -0
- package/src/ai/api/paths.ts +1 -1
- package/src/ai/api/spec.ts +15 -2
- package/src/ai/api-catalog.ts +7 -1
- package/src/ai/ask-context.ts +21 -9
- package/src/ai/ask-data.ts +28 -14
- package/src/ai/ask.ts +84 -71
- package/src/ai/component-markdown.ts +43 -37
- package/src/ai/cors.ts +3 -3
- package/src/ai/index.ts +16 -16
- 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/openapi-components.ts +1 -1
- package/src/ai/relative-links.ts +78 -10
- package/src/ai/serializers.ts +1 -1
- package/src/ai/static-expression.ts +416 -0
- package/src/ai/visibility.ts +46 -15
- 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 +90 -45
- package/src/astro/module-types.ts +1 -1
- package/src/astro/runtime-deps.ts +6 -6
- package/src/astro/templates.ts +87 -49
- 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/blume-modules.d.ts +2 -2
- package/src/cli/build-failure.ts +50 -0
- package/src/cli/commands/audit.ts +8 -1
- package/src/cli/commands/build.ts +19 -5
- package/src/cli/commands/check.ts +2 -0
- package/src/cli/commands/doctor.ts +7 -5
- package/src/cli/commands/eval.ts +4 -10
- package/src/cli/commands/init.ts +15 -5
- package/src/cli/commands/migrate.ts +2 -2
- package/src/cli/commands/preview.ts +15 -0
- package/src/cli/commands/sync.ts +2 -0
- package/src/cli/commands/translate.ts +12 -9
- package/src/cli/commands/upgrade.ts +13 -2
- package/src/cli/eject-scripts.ts +32 -7
- package/src/cli/env.ts +12 -1
- package/src/cli/init/scaffold.ts +117 -11
- package/src/cli/init/starter-spec.ts +235 -0
- package/src/cli/required-secrets.ts +3 -3
- 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 +36 -9
- package/src/components/islands/{AskAI.astro → Assistant.astro} +10 -10
- package/src/components/islands/{ask-ai.tsx → assistant.tsx} +39 -25
- package/src/components/islands/hooks.ts +21 -14
- package/src/components/islands/webmcp.ts +12 -8
- package/src/components/layout/Banner.astro +23 -4
- package/src/components/layout/Header.astro +32 -19
- 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 +28 -14
- package/src/components/layout/Pagination.astro +7 -7
- package/src/components/layout/ReferenceLayout.astro +5 -2
- package/src/components/layout/RootLayout.astro +27 -14
- package/src/components/layout/Search.astro +18 -14
- package/src/components/layout/analytics-client.ts +3 -1
- package/src/components/layout/drawer-inert.ts +1 -1
- 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/description.ts +2 -2
- 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/code-fences.ts +1 -1
- package/src/core/config-input.ts +23 -23
- package/src/core/config.ts +21 -7
- package/src/core/data.ts +3 -3
- package/src/core/diagnostics.ts +217 -30
- package/src/core/graph.ts +120 -11
- package/src/core/i18n-ui.ts +74 -11
- 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/request-body.ts +1 -1
- package/src/core/safe-href.ts +53 -1
- package/src/core/safe-links.ts +11 -2
- package/src/core/schema.ts +95 -34
- package/src/core/server-features.ts +2 -2
- 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 +17 -5
- package/src/core/ui-packs/bg.ts +17 -5
- package/src/core/ui-packs/bn.ts +17 -5
- package/src/core/ui-packs/ca.ts +17 -5
- package/src/core/ui-packs/cs.ts +17 -5
- package/src/core/ui-packs/da.ts +17 -5
- package/src/core/ui-packs/de.ts +17 -5
- package/src/core/ui-packs/el.ts +17 -5
- package/src/core/ui-packs/es.ts +17 -5
- package/src/core/ui-packs/fa.ts +17 -5
- package/src/core/ui-packs/fi.ts +17 -5
- package/src/core/ui-packs/fr.ts +17 -5
- package/src/core/ui-packs/he.ts +17 -5
- package/src/core/ui-packs/hi.ts +17 -5
- package/src/core/ui-packs/hr.ts +17 -5
- package/src/core/ui-packs/hu.ts +17 -5
- package/src/core/ui-packs/id.ts +17 -5
- package/src/core/ui-packs/it.ts +17 -5
- package/src/core/ui-packs/ja.ts +17 -5
- package/src/core/ui-packs/ko.ts +17 -5
- package/src/core/ui-packs/nl.ts +17 -5
- package/src/core/ui-packs/no.ts +17 -5
- package/src/core/ui-packs/pl.ts +17 -5
- package/src/core/ui-packs/pt-br.ts +17 -5
- package/src/core/ui-packs/pt.ts +17 -5
- package/src/core/ui-packs/ro.ts +17 -5
- package/src/core/ui-packs/ru.ts +17 -5
- package/src/core/ui-packs/sk.ts +17 -5
- package/src/core/ui-packs/sr.ts +17 -5
- package/src/core/ui-packs/sv.ts +17 -5
- package/src/core/ui-packs/th.ts +17 -5
- package/src/core/ui-packs/tr.ts +17 -5
- package/src/core/ui-packs/uk.ts +17 -5
- package/src/core/ui-packs/vi.ts +17 -5
- package/src/core/ui-packs/zh-tw.ts +17 -5
- package/src/core/ui-packs/zh.ts +17 -5
- package/src/core/unrecognized-keys.ts +1 -1
- 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 +135 -37
- package/src/search/documents.ts +24 -3
- package/src/search/orama-index.ts +1 -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/report.ts +1 -1
- 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 +37 -5
- package/dist/cli/chunk-1w8dp3qb.js.map +0 -10
- package/dist/cli/chunk-5a2z0198.js.map +0 -10
- package/dist/cli/chunk-6k8vp3ta.js.map +0 -19
- package/dist/cli/chunk-79njf86q.js.map +0 -11
- package/dist/cli/chunk-a9kptbw5.js.map +0 -14
- package/dist/cli/chunk-abh8yjkn.js +0 -31
- package/dist/cli/chunk-abh8yjkn.js.map +0 -10
- package/dist/cli/chunk-bctazmbk.js.map +0 -10
- package/dist/cli/chunk-beat36xx.js.map +0 -10
- package/dist/cli/chunk-d1tadaw7.js.map +0 -10
- package/dist/cli/chunk-fa25z98p.js.map +0 -11
- package/dist/cli/chunk-j8mw0za6.js.map +0 -35
- package/dist/cli/chunk-mnqj32sj.js.map +0 -12
- package/dist/cli/chunk-mwt1k8n7.js.map +0 -10
- package/dist/cli/chunk-nk3ts2xk.js +0 -51
- package/dist/cli/chunk-nk3ts2xk.js.map +0 -10
- package/dist/cli/chunk-sqn5t4q0.js.map +0 -10
- package/dist/cli/chunk-tzne8qfq.js.map +0 -10
- package/dist/cli/chunk-xaz13gwg.js.map +0 -182
- package/dist/cli/chunk-z01ze5c1.js.map +0 -10
- package/dist/cli/chunk-z1f5arsg.js.map +0 -36
- package/dist/cli/chunk-zg2gtj10.js.map +0 -35
- /package/dist/cli/{chunk-f2972sbt.js.map → chunk-00gs3wqs.js.map} +0 -0
- /package/dist/cli/{chunk-7ez8ny0t.js.map → chunk-bbnwccaz.js.map} +0 -0
- /package/dist/cli/{chunk-zxccj738.js.map → chunk-esh98wmb.js.map} +0 -0
- /package/dist/cli/{chunk-88cpgt6h.js.map → chunk-fsmrqk8a.js.map} +0 -0
- /package/dist/cli/{chunk-b5aj94ah.js.map → chunk-g698a744.js.map} +0 -0
- /package/dist/cli/{chunk-41za066z.js.map → chunk-h2ez8dzb.js.map} +0 -0
- /package/dist/cli/{chunk-by2290sx.js.map → chunk-h7k3nq3v.js.map} +0 -0
- /package/dist/cli/{chunk-y3e45rc8.js.map → chunk-n1yg3tj3.js.map} +0 -0
- /package/dist/cli/{chunk-f7t03s3g.js.map → chunk-wdrt2k2v.js.map} +0 -0
|
@@ -11,6 +11,7 @@ import { formatCatalog, formatReport, reportJson } from "../../audit/report.ts";
|
|
|
11
11
|
import { NoBuildError, runAudit } from "../../audit/run.ts";
|
|
12
12
|
import type { AuditResult } from "../../audit/run.ts";
|
|
13
13
|
import { checkTerms, unknownCheckTerms } from "../../audit/terms.ts";
|
|
14
|
+
import { isHttpUrl } from "../../audit/url.ts";
|
|
14
15
|
import { BlumeError } from "../../core/diagnostics.ts";
|
|
15
16
|
import { scanProject } from "../../core/project-graph.ts";
|
|
16
17
|
import type { DiagnosticSeverity } from "../../core/types.ts";
|
|
@@ -154,7 +155,7 @@ export const auditCommand = defineCommand({
|
|
|
154
155
|
(kind) => args[kind]
|
|
155
156
|
);
|
|
156
157
|
if (agents.length > 1) {
|
|
157
|
-
logger.error("Pass at most one of --
|
|
158
|
+
logger.error("Pass at most one of --codex or --claude.");
|
|
158
159
|
process.exit(1);
|
|
159
160
|
}
|
|
160
161
|
const [agent] = agents;
|
|
@@ -162,6 +163,12 @@ export const auditCommand = defineCommand({
|
|
|
162
163
|
logger.error(`--json and --${agent} are mutually exclusive.`);
|
|
163
164
|
process.exit(1);
|
|
164
165
|
}
|
|
166
|
+
if (args.url !== undefined && !isHttpUrl(args.url)) {
|
|
167
|
+
logger.error(
|
|
168
|
+
`Invalid --url "${args.url}": pass the deployment's full URL, scheme included (e.g. https://${args.url}).`
|
|
169
|
+
);
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
165
172
|
const only = splitTerms(args.only);
|
|
166
173
|
const skip = splitTerms(args.skip);
|
|
167
174
|
rejectUnknownTerms([...only, ...skip]);
|
|
@@ -6,6 +6,7 @@ import { defineCommand } from "citty";
|
|
|
6
6
|
import { join } from "pathe";
|
|
7
7
|
|
|
8
8
|
import { publishBuildProject } from "../../astro/integration.ts";
|
|
9
|
+
import { BlumeError } from "../../core/diagnostics.ts";
|
|
9
10
|
import { ensureGitignore } from "../../core/gitignore.ts";
|
|
10
11
|
import type { BlumeProject } from "../../core/project-graph.ts";
|
|
11
12
|
import { serverFeatures } from "../../core/server-features.ts";
|
|
@@ -21,10 +22,11 @@ import {
|
|
|
21
22
|
removedBuildFlags,
|
|
22
23
|
removedBuildFlagsAdvice,
|
|
23
24
|
} from "../../upgrade/upgrade.ts";
|
|
25
|
+
import { astroBuildDiagnostics } from "../build-failure.ts";
|
|
24
26
|
import { commandMeta } from "../command-meta.ts";
|
|
25
27
|
import { refuseIfDevRunning } from "../dev-lock.ts";
|
|
26
28
|
import { refuseIfEjected } from "../eject-scripts.ts";
|
|
27
|
-
import { logger } from "../log.ts";
|
|
29
|
+
import { logger, reportDiagnostics } from "../log.ts";
|
|
28
30
|
import { prepareProject } from "../prepare.ts";
|
|
29
31
|
|
|
30
32
|
const BUDGET_JS = "budget-js";
|
|
@@ -333,10 +335,22 @@ export const buildCommand = defineCommand({
|
|
|
333
335
|
publishBuildProject(project);
|
|
334
336
|
}
|
|
335
337
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
try {
|
|
339
|
+
await build({
|
|
340
|
+
logLevel: "info",
|
|
341
|
+
root: project.context.outDir,
|
|
342
|
+
});
|
|
343
|
+
} catch (error) {
|
|
344
|
+
// Astro rejects when the site fails to compile or render (MDX that
|
|
345
|
+
// doesn't parse, a component that throws): report that as a build error
|
|
346
|
+
// at the file it names, not as an internal error blaming Blume. A
|
|
347
|
+
// BlumeError keeps its own diagnostic.
|
|
348
|
+
if (error instanceof BlumeError || !(error instanceof Error)) {
|
|
349
|
+
throw error;
|
|
350
|
+
}
|
|
351
|
+
reportDiagnostics(astroBuildDiagnostics(error), root);
|
|
352
|
+
process.exit(1);
|
|
353
|
+
}
|
|
340
354
|
|
|
341
355
|
// A real build also prunes the cache; an isolated verify must not evict
|
|
342
356
|
// cards a live dev server is still serving.
|
|
@@ -8,6 +8,7 @@ import { join } from "pathe";
|
|
|
8
8
|
import { ensureGitignore } from "../../core/gitignore.ts";
|
|
9
9
|
import { commandMeta } from "../command-meta.ts";
|
|
10
10
|
import { refuseIfDevRunning } from "../dev-lock.ts";
|
|
11
|
+
import { refuseIfEjected } from "../eject-scripts.ts";
|
|
11
12
|
import { logger } from "../log.ts";
|
|
12
13
|
import { prepareProject } from "../prepare.ts";
|
|
13
14
|
|
|
@@ -30,6 +31,7 @@ export const checkCommand = defineCommand({
|
|
|
30
31
|
meta: commandMeta.check,
|
|
31
32
|
async run({ args }) {
|
|
32
33
|
const root = process.cwd();
|
|
34
|
+
await refuseIfEjected(root, "check");
|
|
33
35
|
|
|
34
36
|
// `blume check` regenerates `.blume` just like `build`, so it must refuse a
|
|
35
37
|
// live dev server unless isolated. `--isolated` (or BLUME_RUNTIME_DIR)
|
|
@@ -153,12 +153,14 @@ export const doctorCommand = defineCommand({
|
|
|
153
153
|
logger.info(
|
|
154
154
|
`Sources: ${config.content.sources.map((source) => source.kind).join(", ")}`
|
|
155
155
|
);
|
|
156
|
-
const {
|
|
157
|
-
let
|
|
158
|
-
if (
|
|
159
|
-
|
|
156
|
+
const { assistant } = config.ai;
|
|
157
|
+
let assistantSummary = "off";
|
|
158
|
+
if (assistant?.enabled) {
|
|
159
|
+
assistantSummary = assistant.endpoint
|
|
160
|
+
? "external endpoint"
|
|
161
|
+
: assistant.provider.kind;
|
|
160
162
|
}
|
|
161
|
-
logger.info(`
|
|
163
|
+
logger.info(`Assistant: ${assistantSummary}`);
|
|
162
164
|
}
|
|
163
165
|
} catch (error) {
|
|
164
166
|
if (error instanceof BlumeError) {
|
package/src/cli/commands/eval.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
warningLines,
|
|
20
20
|
writeEvalReport,
|
|
21
21
|
} from "../../eval/report.ts";
|
|
22
|
-
import { runEval } from "../../eval/run.ts";
|
|
22
|
+
import { passFraction, runEval } from "../../eval/run.ts";
|
|
23
23
|
import type { EvalResult } from "../../eval/run.ts";
|
|
24
24
|
import { EvalsFileError, loadEvalsFile } from "../../eval/schema.ts";
|
|
25
25
|
import { commandMeta } from "../command-meta.ts";
|
|
@@ -63,12 +63,6 @@ const launchAgentCode = async (
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
/** The fraction of run (non-skipped) questions that passed. */
|
|
67
|
-
export const passFraction = (result: EvalResult): number => {
|
|
68
|
-
const ran = result.results.length - result.counts.skip;
|
|
69
|
-
return ran === 0 ? 1 : result.counts.pass / ran;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
66
|
interface EvalFlags {
|
|
73
67
|
action?: string;
|
|
74
68
|
agent: string;
|
|
@@ -82,7 +76,7 @@ interface EvalFlags {
|
|
|
82
76
|
/** Validate the flag surface, exiting with a message on the first offense. */
|
|
83
77
|
const parseFlags = (args: EvalFlags) => {
|
|
84
78
|
if (!isAgentKind(args.agent)) {
|
|
85
|
-
logger.error(`Invalid --agent "${args.agent}" (use
|
|
79
|
+
logger.error(`Invalid --agent "${args.agent}" (use codex | claude).`);
|
|
86
80
|
process.exit(1);
|
|
87
81
|
}
|
|
88
82
|
if (args.action !== undefined && args.action !== "init") {
|
|
@@ -152,8 +146,8 @@ export const evalCommand = defineCommand({
|
|
|
152
146
|
type: "positional",
|
|
153
147
|
},
|
|
154
148
|
agent: {
|
|
155
|
-
default: "
|
|
156
|
-
description: "Agent CLI that reads and grades the docs:
|
|
149
|
+
default: "codex",
|
|
150
|
+
description: "Agent CLI that reads and grades the docs: codex | claude.",
|
|
157
151
|
type: "string",
|
|
158
152
|
},
|
|
159
153
|
file: {
|
package/src/cli/commands/init.ts
CHANGED
|
@@ -11,9 +11,11 @@ import { collectAnswers } from "../init/questions.ts";
|
|
|
11
11
|
import {
|
|
12
12
|
applyPlan,
|
|
13
13
|
buildPlan,
|
|
14
|
+
cdCommand,
|
|
14
15
|
commandsFor,
|
|
15
16
|
detectPackageManager,
|
|
16
17
|
nextSteps,
|
|
18
|
+
outsidePnpmWorkspace,
|
|
17
19
|
PACKAGE_MANAGERS,
|
|
18
20
|
readExistingPackage,
|
|
19
21
|
TEMPLATES,
|
|
@@ -25,7 +27,7 @@ import { logger } from "../log.ts";
|
|
|
25
27
|
|
|
26
28
|
/** The `cd` line that opens every next-steps hint, when one is needed. */
|
|
27
29
|
const cdStep = (answers: InitAnswers): string[] =>
|
|
28
|
-
answers.directory === "." ? [] : [
|
|
30
|
+
answers.directory === "." ? [] : [cdCommand(answers.directory)];
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Install the scaffolded project's dependencies. Interactive runs hide the
|
|
@@ -99,8 +101,13 @@ const ejectScaffold = async (
|
|
|
99
101
|
} catch (error) {
|
|
100
102
|
// SAFETY: eject and the script rewrite throw Error instances; only the
|
|
101
103
|
// message is surfaced in the fallback hint.
|
|
104
|
+
const { message } = error as Error;
|
|
105
|
+
// Only a skipped install explains the failure; after an install that ran,
|
|
106
|
+
// the error itself is the reason.
|
|
102
107
|
logger.warn(
|
|
103
|
-
|
|
108
|
+
needsInstall
|
|
109
|
+
? `Scaffolded, but eject needs the project's dependencies installed to load blume.config.ts: ${message}`
|
|
110
|
+
: `Scaffolded, but eject failed: ${message}`
|
|
104
111
|
);
|
|
105
112
|
const steps = [...cd, ...install, `${commands.exec} blume eject --yes`];
|
|
106
113
|
logger.box(`Next steps:\n\n ${steps.join("\n ")}`);
|
|
@@ -229,7 +236,7 @@ export const initCommand = defineCommand({
|
|
|
229
236
|
{ cwd, userAgent: process.env.npm_config_user_agent }
|
|
230
237
|
);
|
|
231
238
|
if (collected === null) {
|
|
232
|
-
clack.cancel("
|
|
239
|
+
clack.cancel("Canceled — nothing was written.");
|
|
233
240
|
process.exit(0);
|
|
234
241
|
}
|
|
235
242
|
answers = collected;
|
|
@@ -279,8 +286,11 @@ export const initCommand = defineCommand({
|
|
|
279
286
|
}
|
|
280
287
|
|
|
281
288
|
// A newly written package.json is the only one `init` knows lists blume;
|
|
282
|
-
// an existing one is left alone, and so are its dependencies.
|
|
283
|
-
|
|
289
|
+
// an existing one is left alone, and so are its dependencies. In a pnpm
|
|
290
|
+
// workspace that doesn't list the folder, an install would exit 0 without
|
|
291
|
+
// installing it, so that one waits until the note's change is made.
|
|
292
|
+
const shouldInstall =
|
|
293
|
+
createdPackage && args.install && !outsidePnpmWorkspace(root, answers);
|
|
284
294
|
if (note) {
|
|
285
295
|
(interactive ? clack.log : logger).warn(note);
|
|
286
296
|
}
|
|
@@ -53,7 +53,7 @@ export const migrateCommand = defineCommand({
|
|
|
53
53
|
(kind) => args[kind]
|
|
54
54
|
);
|
|
55
55
|
if (agents.length > 1) {
|
|
56
|
-
logger.error("Pass at most one of --
|
|
56
|
+
logger.error("Pass at most one of --codex or --claude.");
|
|
57
57
|
process.exit(1);
|
|
58
58
|
}
|
|
59
59
|
const [agent] = agents;
|
|
@@ -88,7 +88,7 @@ export const migrateCommand = defineCommand({
|
|
|
88
88
|
// plus the install line that puts the skill where agents look for it.
|
|
89
89
|
if (!agent) {
|
|
90
90
|
process.stderr.write(
|
|
91
|
-
` blume migrate runs the migration with a coding agent: rerun with --
|
|
91
|
+
` blume migrate runs the migration with a coding agent: rerun with --codex or --claude.\n Using another agent? Point it at ${join(skillDir, "SKILL.md")},\n or install the skill where your agent looks for skills: npx skills add haydenbleasel/blume --skill blume-migrate\n`
|
|
92
92
|
);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -7,8 +7,10 @@ import { join } from "pathe";
|
|
|
7
7
|
import { loadConfig } from "../../core/config.ts";
|
|
8
8
|
import { resolveProjectContext } from "../../core/project.ts";
|
|
9
9
|
import { deployOutputDir } from "../../deploy/adapter-output.ts";
|
|
10
|
+
import { deployPlatform } from "../../deploy/platforms/index.ts";
|
|
10
11
|
import { parsePort } from "../args.ts";
|
|
11
12
|
import { commandMeta } from "../command-meta.ts";
|
|
13
|
+
import { refuseIfEjected } from "../eject-scripts.ts";
|
|
12
14
|
import { normalizeHost } from "../host-args.ts";
|
|
13
15
|
import { logger } from "../log.ts";
|
|
14
16
|
|
|
@@ -20,9 +22,22 @@ export const previewCommand = defineCommand({
|
|
|
20
22
|
meta: commandMeta.preview,
|
|
21
23
|
async run({ args }) {
|
|
22
24
|
const root = process.cwd();
|
|
25
|
+
await refuseIfEjected(root, "preview");
|
|
23
26
|
const { config } = await loadConfig(root);
|
|
24
27
|
const context = resolveProjectContext(root, config);
|
|
25
28
|
|
|
29
|
+
// Astro previews a server build through its adapter's preview entrypoint,
|
|
30
|
+
// and the Vercel and Netlify adapters declare none, so Astro would throw
|
|
31
|
+
// mid-command. Say so up front, with what to run instead.
|
|
32
|
+
const { deployment } = config;
|
|
33
|
+
const platform = deployPlatform(deployment);
|
|
34
|
+
if (deployment.options.output === "server" && platform.previewDeploy) {
|
|
35
|
+
logger.error(
|
|
36
|
+
`\`blume preview\` can't serve a ${deployment.kind}() server build: ${platform.astro?.package} has no local preview server. Run \`blume dev\` to try the site locally, or deploy a preview with \`${platform.previewDeploy}\`.`
|
|
37
|
+
);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
26
41
|
// `blume dev` writes `.blume/astro.config.mjs` too, so the runtime alone
|
|
27
42
|
// doesn't mean there's anything to serve: the build output must exist.
|
|
28
43
|
if (
|
package/src/cli/commands/sync.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "../../core/project.ts";
|
|
11
11
|
import { commandMeta } from "../command-meta.ts";
|
|
12
12
|
import { readDevLock } from "../dev-lock.ts";
|
|
13
|
+
import { refuseIfEjected } from "../eject-scripts.ts";
|
|
13
14
|
import { logger } from "../log.ts";
|
|
14
15
|
import { prepareProject } from "../prepare.ts";
|
|
15
16
|
|
|
@@ -28,6 +29,7 @@ export const syncCommand = defineCommand({
|
|
|
28
29
|
meta: commandMeta.sync,
|
|
29
30
|
async run({ args }) {
|
|
30
31
|
const root = process.cwd();
|
|
32
|
+
await refuseIfEjected(root, "sync");
|
|
31
33
|
|
|
32
34
|
// `--force` drops the snapshots so a stale or corrupt cache can't be served;
|
|
33
35
|
// scoped to `.blume/cache`, so a running dev server's runtime is untouched.
|
|
@@ -4,7 +4,6 @@ import { AGENTS } from "../../audit/agent.ts";
|
|
|
4
4
|
import type { AgentKind } from "../../audit/agent.ts";
|
|
5
5
|
import { BlumeError } from "../../core/diagnostics.ts";
|
|
6
6
|
import { i18nEnabled, localeCodes } from "../../core/i18n.ts";
|
|
7
|
-
import { scanProject } from "../../core/project-graph.ts";
|
|
8
7
|
import type { ResolvedI18nConfig } from "../../core/schema.ts";
|
|
9
8
|
import { DEFAULT_TRANSLATE_TIMEOUT_MS } from "../../translate/agents.ts";
|
|
10
9
|
import {
|
|
@@ -25,7 +24,10 @@ import {
|
|
|
25
24
|
translateSummaryLine,
|
|
26
25
|
} from "../../translate/report.ts";
|
|
27
26
|
import { runTranslate } from "../../translate/run.ts";
|
|
28
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
computeWorkList,
|
|
29
|
+
scanForTranslation,
|
|
30
|
+
} from "../../translate/work-list.ts";
|
|
29
31
|
import { commandMeta } from "../command-meta.ts";
|
|
30
32
|
import { reportInternalError } from "../internal-error.ts";
|
|
31
33
|
import { flushStdout, logger, reportDiagnostics } from "../log.ts";
|
|
@@ -63,18 +65,18 @@ const parseFlags = (args: TranslateFlags): ParsedTranslateFlags => {
|
|
|
63
65
|
(kind) => args[kind]
|
|
64
66
|
);
|
|
65
67
|
if (agents.length > 1) {
|
|
66
|
-
logger.error("Pass exactly one of --
|
|
68
|
+
logger.error("Pass exactly one of --codex or --claude.");
|
|
67
69
|
process.exit(1);
|
|
68
70
|
}
|
|
69
71
|
if (args.check && agents.length > 0) {
|
|
70
72
|
logger.error(
|
|
71
|
-
"--check is read-only and never runs an agent; drop --claude
|
|
73
|
+
"--check is read-only and never runs an agent; drop --codex/--claude."
|
|
72
74
|
);
|
|
73
75
|
process.exit(1);
|
|
74
76
|
}
|
|
75
77
|
if (!args.check && agents.length === 0) {
|
|
76
78
|
logger.error(
|
|
77
|
-
"Pass --
|
|
79
|
+
"Pass --codex or --claude to choose the agent CLI that translates."
|
|
78
80
|
);
|
|
79
81
|
process.exit(1);
|
|
80
82
|
}
|
|
@@ -188,10 +190,11 @@ export const translateCommand = defineCommand({
|
|
|
188
190
|
const { agent, concurrency, timeoutS } = parseFlags(args);
|
|
189
191
|
|
|
190
192
|
try {
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
|
|
193
|
+
// A scan, not `prepareProject`: translation reads the content tree and
|
|
194
|
+
// writes source files, never `.blume/`, so it doesn't contend with a
|
|
195
|
+
// running dev server. Same reasoning as `blume audit`/`eval`. Drafts
|
|
196
|
+
// are included (see `scanForTranslation`).
|
|
197
|
+
const project = await scanForTranslation(root);
|
|
195
198
|
if (!i18nEnabled(project.config)) {
|
|
196
199
|
logger.error(
|
|
197
200
|
"i18n is not configured — add `i18n.locales` to blume.config to use `blume translate`."
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
bumpBlumeDependency,
|
|
13
13
|
collectUpgradeFindings,
|
|
14
14
|
isOutsideBlumeProject,
|
|
15
|
+
manualBumpAdvice,
|
|
15
16
|
upgradePrompt,
|
|
16
17
|
} from "../../upgrade/upgrade.ts";
|
|
17
18
|
import { commandMeta } from "../command-meta.ts";
|
|
@@ -56,7 +57,7 @@ export const upgradeCommand = defineCommand({
|
|
|
56
57
|
(kind) => args[kind]
|
|
57
58
|
);
|
|
58
59
|
if (agents.length > 1) {
|
|
59
|
-
logger.error("Pass at most one of --
|
|
60
|
+
logger.error("Pass at most one of --codex or --claude.");
|
|
60
61
|
process.exit(1);
|
|
61
62
|
}
|
|
62
63
|
const [agent] = agents;
|
|
@@ -94,10 +95,20 @@ export const upgradeCommand = defineCommand({
|
|
|
94
95
|
logger.warn(
|
|
95
96
|
`No \`blume\` dependency in ./package.json; add blume@^${version} to the package that uses it.`
|
|
96
97
|
);
|
|
98
|
+
} else if (bump.status === "manual") {
|
|
99
|
+
logger.warn(manualBumpAdvice(bump.range, version));
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
const findings = await collectUpgradeFindings(root);
|
|
100
103
|
if (findings.length === 0) {
|
|
104
|
+
// Until the range the bump couldn't rewrite moves, the project still
|
|
105
|
+
// installs the old Blume, so it isn't ready yet.
|
|
106
|
+
if (bump.status === "manual") {
|
|
107
|
+
process.stderr.write(
|
|
108
|
+
` The config, components.ts, and pages check out for Blume ${version}. Update blume's version as above, reinstall, then run \`${runner} blume build\` to confirm.\n`
|
|
109
|
+
);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
101
112
|
process.stderr.write(
|
|
102
113
|
` Ready for Blume ${version}: the config, components.ts, and pages check out. Run \`${runner} blume build\` to confirm.\n`
|
|
103
114
|
);
|
|
@@ -109,7 +120,7 @@ export const upgradeCommand = defineCommand({
|
|
|
109
120
|
|
|
110
121
|
if (!agent) {
|
|
111
122
|
process.stderr.write(
|
|
112
|
-
` Each change is covered in the upgrade guide: ${UPGRADE_GUIDE_URL}\n Rerun with --
|
|
123
|
+
` Each change is covered in the upgrade guide: ${UPGRADE_GUIDE_URL}\n Rerun with --codex or --claude to hand them to a coding agent.\n`
|
|
113
124
|
);
|
|
114
125
|
process.exit(1);
|
|
115
126
|
}
|
package/src/cli/eject-scripts.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { join } from "pathe";
|
|
|
6
6
|
import { EJECTED_CONFIG_HEADER } from "../astro/templates.ts";
|
|
7
7
|
import { packageRoot } from "../core/package-root.ts";
|
|
8
8
|
import { commandsFor, detectProjectPackageManager } from "./init/scaffold.ts";
|
|
9
|
+
import type { PackageManager } from "./init/scaffold.ts";
|
|
9
10
|
import { logger } from "./log.ts";
|
|
10
11
|
|
|
11
12
|
/** A JSON value, as `JSON.parse` of a manifest can return. */
|
|
@@ -136,22 +137,46 @@ export const isEjectedProject = (root: string): boolean => {
|
|
|
136
137
|
);
|
|
137
138
|
};
|
|
138
139
|
|
|
140
|
+
/** The Blume commands that run the hidden `.blume/` copy of the site. */
|
|
141
|
+
export type RuntimeCommand = "build" | "check" | "dev" | "preview" | "sync";
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* What an ejected app runs in place of each {@link RuntimeCommand}: its own
|
|
145
|
+
* `dev`/`build`/`preview` scripts (eject writes them), or Astro's CLI for the
|
|
146
|
+
* check and the content sync.
|
|
147
|
+
*/
|
|
148
|
+
const ejectedEquivalent = (
|
|
149
|
+
pm: PackageManager,
|
|
150
|
+
command: RuntimeCommand
|
|
151
|
+
): string => {
|
|
152
|
+
const { build, dev, exec } = commandsFor(pm);
|
|
153
|
+
return {
|
|
154
|
+
build,
|
|
155
|
+
check: `${exec} astro check`,
|
|
156
|
+
dev,
|
|
157
|
+
// Spelled like `dev`: npm runs a custom script only through `run`.
|
|
158
|
+
preview: pm === "npm" ? "npm run preview" : `${pm} preview`,
|
|
159
|
+
sync: `${exec} astro sync`,
|
|
160
|
+
}[command];
|
|
161
|
+
};
|
|
162
|
+
|
|
139
163
|
/**
|
|
140
|
-
* Stop
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
164
|
+
* Stop a command that works on the hidden runtime in an ejected app. `dev`,
|
|
165
|
+
* `build`, `check`, and `sync` would regenerate `.blume/` from
|
|
166
|
+
* `blume.config.ts` and run that hidden copy, ignoring every edit made to the
|
|
167
|
+
* app since eject, and `preview` would look for that copy's build; point at
|
|
168
|
+
* the app's own command under the project's package manager instead.
|
|
144
169
|
*/
|
|
145
170
|
export const refuseIfEjected = async (
|
|
146
171
|
root: string,
|
|
147
|
-
|
|
172
|
+
command: RuntimeCommand
|
|
148
173
|
): Promise<void> => {
|
|
149
174
|
if (!isEjectedProject(root)) {
|
|
150
175
|
return;
|
|
151
176
|
}
|
|
152
|
-
const
|
|
177
|
+
const pm = await detectProjectPackageManager(root);
|
|
153
178
|
logger.error(
|
|
154
|
-
`This project was ejected to a standalone Astro app, so \`blume ${
|
|
179
|
+
`This project was ejected to a standalone Astro app, so \`blume ${command}\` would run a regenerated copy of the site instead of it. Run \`${ejectedEquivalent(pm, command)}\` instead.`
|
|
155
180
|
);
|
|
156
181
|
process.exit(1);
|
|
157
182
|
};
|
package/src/cli/env.ts
CHANGED
|
@@ -19,6 +19,11 @@ import { dirname, join, resolve } from "pathe";
|
|
|
19
19
|
* these files at build time, so a value means the same thing to the pre-boot
|
|
20
20
|
* content scan and the built site — including multi-line double-quoted values
|
|
21
21
|
* (PEM keys), which a line-based parser silently truncates.
|
|
22
|
+
*
|
|
23
|
+
* `NODE_ENV` is never taken from these files: it picks the mode Vite and Astro
|
|
24
|
+
* run in, so a monorepo root `.env` that sets it for another app would turn
|
|
25
|
+
* every `blume build` into a development build (or `blume dev` into a
|
|
26
|
+
* production one).
|
|
22
27
|
*/
|
|
23
28
|
export const loadEnvFiles = (startDir: string): void => {
|
|
24
29
|
const paths: string[] = [];
|
|
@@ -31,5 +36,11 @@ export const loadEnvFiles = (startDir: string): void => {
|
|
|
31
36
|
done = existsSync(join(dir, ".git")) || parent === dir;
|
|
32
37
|
dir = parent;
|
|
33
38
|
}
|
|
34
|
-
|
|
39
|
+
const loaded: Record<string, string> = {};
|
|
40
|
+
config({ path: paths, processEnv: loaded, quiet: true });
|
|
41
|
+
for (const [key, value] of Object.entries(loaded)) {
|
|
42
|
+
if (key !== "NODE_ENV" && process.env[key] === undefined) {
|
|
43
|
+
process.env[key] = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
35
46
|
};
|