blume 1.7.2 → 2.0.0
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 +19 -0
- package/CHANGELOG.md +227 -0
- package/README.md +34 -21
- package/dist/cli/chunk-11j0384y.js +148 -0
- package/dist/cli/chunk-11j0384y.js.map +10 -0
- package/dist/cli/{chunk-xhtpx3ff.js → chunk-1w8dp3qb.js} +17 -16
- package/dist/cli/{chunk-xhtpx3ff.js.map → chunk-1w8dp3qb.js.map} +3 -3
- package/dist/cli/chunk-2q1dwty4.js +75 -0
- package/dist/cli/chunk-2q1dwty4.js.map +11 -0
- package/dist/cli/chunk-41za066z.js +122 -0
- package/dist/cli/chunk-41za066z.js.map +11 -0
- package/dist/cli/chunk-5a2z0198.js +133 -0
- package/dist/cli/chunk-5a2z0198.js.map +10 -0
- package/dist/cli/{chunk-9he6crym.js → chunk-6k8vp3ta.js} +25 -13
- package/dist/cli/{chunk-9he6crym.js.map → chunk-6k8vp3ta.js.map} +4 -4
- package/dist/cli/{chunk-mt76t7dj.js → chunk-79njf86q.js} +133 -54
- package/dist/cli/chunk-79njf86q.js.map +11 -0
- package/dist/cli/{chunk-3w7b2vcx.js → chunk-7ez8ny0t.js} +2 -2
- package/dist/cli/{chunk-688e0dde.js → chunk-88cpgt6h.js} +1 -1
- package/dist/cli/chunk-a9kptbw5.js +361 -0
- package/dist/cli/chunk-a9kptbw5.js.map +14 -0
- package/dist/cli/chunk-abh8yjkn.js +31 -0
- package/dist/cli/chunk-abh8yjkn.js.map +10 -0
- package/dist/cli/chunk-b5aj94ah.js +91 -0
- package/dist/cli/chunk-b5aj94ah.js.map +10 -0
- package/dist/cli/{chunk-hs3gbh8p.js → chunk-bctazmbk.js} +9 -5
- package/dist/cli/chunk-bctazmbk.js.map +10 -0
- package/dist/cli/chunk-beat36xx.js +279 -0
- package/dist/cli/chunk-beat36xx.js.map +10 -0
- package/dist/cli/chunk-bnbmcwfb.js +145 -0
- package/dist/cli/chunk-bnbmcwfb.js.map +11 -0
- package/dist/cli/{chunk-9bkjd11x.js → chunk-bw22s759.js} +15 -5
- package/dist/cli/{chunk-9bkjd11x.js.map → chunk-bw22s759.js.map} +4 -4
- package/dist/cli/chunk-by2290sx.js +39 -0
- package/dist/cli/chunk-by2290sx.js.map +10 -0
- package/dist/cli/chunk-d1tadaw7.js +79 -0
- package/dist/cli/chunk-d1tadaw7.js.map +10 -0
- package/dist/cli/{chunk-t3tj0dgr.js → chunk-d80hr03s.js} +24 -19
- package/dist/cli/chunk-d80hr03s.js.map +15 -0
- package/dist/cli/chunk-ernrthtr.js +97 -0
- package/dist/cli/chunk-ernrthtr.js.map +10 -0
- package/dist/cli/chunk-f2972sbt.js +374 -0
- package/dist/cli/chunk-f2972sbt.js.map +10 -0
- package/dist/cli/{chunk-exeeb35e.js → chunk-f7t03s3g.js} +2 -2
- package/dist/cli/{chunk-2z47ypj8.js → chunk-fa25z98p.js} +16 -3
- package/dist/cli/chunk-fa25z98p.js.map +11 -0
- package/dist/cli/{chunk-12dxjqk7.js → chunk-fh5hj5jt.js} +44 -21
- package/dist/cli/chunk-fh5hj5jt.js.map +10 -0
- package/dist/cli/{chunk-8cd8tj54.js → chunk-j8mw0za6.js} +86 -57
- package/dist/cli/chunk-j8mw0za6.js.map +35 -0
- package/dist/cli/chunk-jts8mvcz.js +106 -0
- package/dist/cli/{chunk-2mzebbbz.js.map → chunk-jts8mvcz.js.map} +6 -4
- package/dist/cli/{chunk-ejjx8znq.js → chunk-mnqj32sj.js} +505 -536
- package/dist/cli/chunk-mnqj32sj.js.map +12 -0
- package/dist/cli/{chunk-196vjxp9.js → chunk-mwt1k8n7.js} +100 -372
- package/dist/cli/chunk-mwt1k8n7.js.map +10 -0
- package/dist/cli/chunk-nk3ts2xk.js +51 -0
- package/dist/cli/chunk-nk3ts2xk.js.map +10 -0
- package/dist/cli/{chunk-n9sra6sy.js → chunk-pat2zzwc.js} +10 -14
- package/dist/cli/{chunk-n9sra6sy.js.map → chunk-pat2zzwc.js.map} +2 -2
- package/dist/cli/chunk-pnnvybbk.js +176 -0
- package/dist/cli/chunk-pnnvybbk.js.map +11 -0
- package/dist/cli/{chunk-cvky9gb2.js → chunk-sqn5t4q0.js} +81 -87
- package/dist/cli/chunk-sqn5t4q0.js.map +10 -0
- package/dist/cli/{chunk-eevwt1sc.js → chunk-tzne8qfq.js} +15 -15
- package/dist/cli/{chunk-eevwt1sc.js.map → chunk-tzne8qfq.js.map} +1 -1
- package/dist/cli/chunk-xaz13gwg.js +12449 -0
- package/dist/cli/chunk-xaz13gwg.js.map +182 -0
- package/dist/cli/chunk-y3e45rc8.js +102 -0
- package/dist/cli/chunk-y3e45rc8.js.map +10 -0
- package/dist/cli/chunk-z01ze5c1.js +261 -0
- package/dist/cli/chunk-z01ze5c1.js.map +10 -0
- package/dist/cli/{chunk-5n7t497w.js → chunk-z1f5arsg.js} +247 -755
- package/dist/cli/chunk-z1f5arsg.js.map +36 -0
- package/dist/cli/{chunk-hdm2dkd2.js → chunk-zg2gtj10.js} +1086 -2596
- package/dist/cli/chunk-zg2gtj10.js.map +35 -0
- package/dist/cli/{chunk-ppfvdcd4.js → chunk-zxccj738.js} +1 -1
- package/dist/cli/index.js +214 -57
- package/dist/cli/index.js.map +8 -7
- package/dist/types/ai/agent-readability.d.ts +52 -0
- package/dist/types/ai/ai-catalog.d.ts +42 -0
- package/dist/types/ai/api/paths.d.ts +17 -0
- package/dist/types/ai/api-catalog.d.ts +18 -0
- package/dist/types/ai/ask.d.ts +368 -0
- package/dist/types/ai/changelog-markdown.d.ts +2 -0
- package/dist/types/ai/component-markdown.d.ts +2 -2
- package/dist/types/ai/index.d.ts +24 -0
- package/dist/types/ai/link-headers.d.ts +24 -0
- package/dist/types/ai/llms.d.ts +25 -0
- package/dist/types/ai/markdown.d.ts +45 -0
- package/dist/types/ai/mcp/discovery.d.ts +68 -0
- package/dist/types/ai/mcp/tools.d.ts +16 -0
- package/dist/types/ai/openapi-components.d.ts +43 -0
- package/dist/types/ai/relative-links.d.ts +26 -0
- package/dist/types/ai/serializers.d.ts +15 -0
- package/dist/types/ai/skills.d.ts +42 -0
- package/dist/types/ai/tar.d.ts +25 -0
- package/dist/types/ai/visibility.d.ts +17 -0
- package/dist/types/ai/web-bot-auth.d.ts +16 -0
- package/dist/types/analytics/adobe.d.ts +35 -0
- package/dist/types/analytics/amplitude.d.ts +50 -0
- package/dist/types/analytics/clarity.d.ts +31 -0
- package/dist/types/analytics/clearbit.d.ts +29 -0
- package/dist/types/analytics/cloudflare.d.ts +41 -0
- package/dist/types/analytics/fathom.d.ts +41 -0
- package/dist/types/analytics/google-analytics.d.ts +44 -0
- package/dist/types/analytics/google-tag-manager.d.ts +40 -0
- package/dist/types/analytics/head.d.ts +30 -0
- package/dist/types/analytics/heap.d.ts +40 -0
- package/dist/types/analytics/hightouch.d.ts +44 -0
- package/dist/types/analytics/hotjar.d.ts +33 -0
- package/dist/types/analytics/index.d.ts +61 -0
- package/dist/types/analytics/inline.d.ts +17 -0
- package/dist/types/analytics/logrocket.d.ts +44 -0
- package/dist/types/analytics/mixpanel.d.ts +67 -0
- package/dist/types/analytics/pirsch.d.ts +42 -0
- package/dist/types/analytics/plausible.d.ts +56 -0
- package/dist/types/analytics/posthog.d.ts +45 -0
- package/dist/types/analytics/schema.d.ts +320 -0
- package/dist/types/analytics/script.d.ts +46 -0
- package/dist/types/analytics/segment.d.ts +50 -0
- package/dist/types/analytics/vercel.d.ts +48 -0
- package/dist/types/astro/integration.d.ts +76 -0
- package/dist/types/astro/markdown-negotiation.d.ts +23 -0
- package/dist/types/astro/module-types.d.ts +14 -0
- package/dist/types/astro/pages.d.ts +44 -0
- package/dist/types/cli/env.d.ts +12 -0
- package/dist/types/cli/init/scaffold.d.ts +154 -0
- package/dist/types/components/layout/nav-utils.d.ts +11 -0
- package/dist/types/core/adapter.d.ts +47 -0
- package/dist/types/core/api-name.d.ts +7 -0
- package/dist/types/core/changelog-index.d.ts +13 -0
- package/dist/types/core/config-input.d.ts +209 -505
- package/dist/types/core/config.d.ts +60 -34
- package/dist/types/core/content-assets.d.ts +76 -0
- package/dist/types/core/custom-pages.d.ts +33 -0
- package/dist/types/core/data.d.ts +28 -11
- package/dist/types/core/define-components.d.ts +12 -9
- package/dist/types/core/deployment-env.d.ts +6 -11
- package/dist/types/core/frontmatter.d.ts +10 -0
- package/dist/types/core/graph.d.ts +18 -0
- package/dist/types/core/heading-markers.d.ts +54 -0
- package/dist/types/core/i18n-ui.d.ts +6 -2
- package/dist/types/core/i18n.d.ts +87 -0
- package/dist/types/core/includes.d.ts +138 -0
- package/dist/types/core/last-modified.d.ts +47 -0
- package/dist/types/core/links.d.ts +95 -0
- package/dist/types/core/locale-links.d.ts +60 -0
- package/dist/types/core/manifest.d.ts +17 -0
- package/dist/types/core/meta.d.ts +38 -0
- package/dist/types/core/nav-diagnostics.d.ts +26 -0
- package/dist/types/core/navigation.d.ts +6 -0
- package/dist/types/core/node-require.d.ts +19 -0
- package/dist/types/core/package-json.d.ts +13 -0
- package/dist/types/core/probe.d.ts +42 -0
- package/dist/types/core/project-graph.d.ts +51 -0
- package/dist/types/core/project.d.ts +2 -0
- package/dist/types/core/safe-href.d.ts +2 -0
- package/dist/types/core/safe-links.d.ts +26 -0
- package/dist/types/core/schema.d.ts +2291 -441
- package/dist/types/core/site-url.d.ts +16 -0
- package/dist/types/core/sources/assets.d.ts +36 -0
- package/dist/types/core/sources/cache.d.ts +37 -0
- package/dist/types/core/sources/collection.d.ts +28 -0
- package/dist/types/core/sources/contentful-rich-text.d.ts +31 -0
- package/dist/types/core/sources/contentful.d.ts +40 -0
- package/dist/types/core/sources/filesystem.d.ts +24 -0
- package/dist/types/core/sources/github-releases.d.ts +31 -0
- package/dist/types/core/sources/json.d.ts +30 -0
- package/dist/types/core/sources/lexical.d.ts +19 -0
- package/dist/types/core/sources/lower.d.ts +75 -0
- package/dist/types/core/sources/mdx-remote.d.ts +28 -0
- package/dist/types/core/sources/normalize.d.ts +147 -0
- package/dist/types/core/sources/notion.d.ts +131 -0
- package/dist/types/core/sources/obsidian.d.ts +46 -0
- package/dist/types/core/sources/payload.d.ts +39 -0
- package/dist/types/core/sources/portable-text.d.ts +42 -0
- package/dist/types/core/sources/read.d.ts +23 -0
- package/dist/types/core/sources/remote.d.ts +74 -0
- package/dist/types/core/sources/resolve.d.ts +19 -0
- package/dist/types/core/sources/sanity.d.ts +43 -0
- package/dist/types/core/sources/strapi-blocks.d.ts +12 -0
- package/dist/types/core/sources/strapi.d.ts +33 -0
- package/dist/types/core/sources/types.d.ts +7 -0
- package/dist/types/core/sources/watch.d.ts +45 -0
- package/dist/types/core/text-width.d.ts +11 -0
- package/dist/types/core/types.d.ts +20 -1
- package/dist/types/core/unrecognized-keys.d.ts +7 -0
- package/dist/types/core/versions.d.ts +72 -0
- package/dist/types/core/yaml.d.ts +9 -0
- package/dist/types/deploy/adapter-output.d.ts +45 -0
- package/dist/types/deploy/adapters/cloudflare.d.ts +40 -0
- package/dist/types/deploy/adapters/index.d.ts +29 -0
- package/dist/types/deploy/adapters/netlify.d.ts +37 -0
- package/dist/types/deploy/adapters/node.d.ts +37 -0
- package/dist/types/deploy/adapters/registry.d.ts +133 -0
- package/dist/types/deploy/adapters/types.d.ts +71 -0
- package/dist/types/deploy/adapters/vercel.d.ts +38 -0
- package/dist/types/deploy/artifacts.d.ts +65 -0
- package/dist/types/deploy/cloudflare-negotiation.d.ts +196 -0
- package/dist/types/deploy/function-bundle.d.ts +80 -0
- package/dist/types/deploy/headers.d.ts +50 -0
- package/dist/types/deploy/node-headers.d.ts +42 -0
- package/dist/types/deploy/platforms/cloudflare.d.ts +40 -0
- package/dist/types/deploy/platforms/index.d.ts +18 -0
- package/dist/types/deploy/platforms/netlify.d.ts +13 -0
- package/dist/types/deploy/platforms/node.d.ts +11 -0
- package/dist/types/deploy/platforms/paths.d.ts +27 -0
- package/dist/types/deploy/platforms/static.d.ts +10 -0
- package/dist/types/deploy/platforms/types.d.ts +104 -0
- package/dist/types/deploy/platforms/vercel.d.ts +32 -0
- package/dist/types/deploy/redirects.d.ts +53 -0
- package/dist/types/deploy/robots.d.ts +8 -0
- package/dist/types/deploy/rss.d.ts +31 -0
- package/dist/types/deploy/sitemap.d.ts +21 -0
- package/dist/types/deploy/vercel-negotiation.d.ts +109 -0
- package/dist/types/markdown/code-title.d.ts +32 -0
- package/dist/types/markdown/fence-meta.d.ts +23 -0
- package/dist/types/markdown/themes.d.ts +3 -3
- package/dist/types/openapi/asyncapi.d.ts +129 -0
- package/dist/types/openapi/graphql-build.d.ts +8 -0
- package/dist/types/openapi/graphql.d.ts +122 -0
- package/dist/types/openapi/model.d.ts +158 -0
- package/dist/types/openapi/parse.d.ts +57 -0
- package/dist/types/openapi/references.d.ts +37 -25
- package/dist/types/openapi/render-mdx.d.ts +33 -0
- package/dist/types/openapi/sentence.d.ts +7 -0
- package/dist/types/openapi/signature.d.ts +10 -0
- package/dist/types/openapi/source.d.ts +22 -0
- package/dist/types/openapi/spec-dependency-error.d.ts +10 -0
- package/dist/types/reference/asyncapi.d.ts +166 -0
- package/dist/types/reference/graphql.d.ts +181 -0
- package/dist/types/reference/index.d.ts +32 -0
- package/dist/types/reference/openapi.d.ts +165 -0
- package/dist/types/reference/options.d.ts +157 -0
- package/dist/types/reference/scalar.d.ts +136 -0
- package/dist/types/reference/schema.d.ts +630 -0
- package/dist/types/search/adapters/algolia.d.ts +32 -0
- package/dist/types/search/adapters/flexsearch.d.ts +12 -0
- package/dist/types/search/adapters/index.d.ts +31 -0
- package/dist/types/search/adapters/mixedbread.d.ts +22 -0
- package/dist/types/search/adapters/orama-cloud.d.ts +33 -0
- package/dist/types/search/adapters/orama.d.ts +13 -0
- package/dist/types/search/adapters/pagefind.d.ts +12 -0
- package/dist/types/search/adapters/registry.d.ts +228 -0
- package/dist/types/search/adapters/types.d.ts +34 -0
- package/dist/types/search/adapters/typesense.d.ts +42 -0
- package/dist/types/search/build.d.ts +23 -0
- package/dist/types/search/documents.d.ts +90 -0
- package/dist/types/search/facets.d.ts +3 -0
- package/dist/types/search/sync/algolia.d.ts +14 -0
- package/dist/types/search/sync/index.d.ts +14 -0
- package/dist/types/search/sync/orama-cloud.d.ts +10 -0
- package/dist/types/search/sync/typesense.d.ts +14 -0
- package/dist/types/sources/contentful.d.ts +68 -0
- package/dist/types/sources/custom.d.ts +20 -0
- package/dist/types/sources/filesystem.d.ts +42 -0
- package/dist/types/sources/github-releases.d.ts +46 -0
- package/dist/types/sources/index.d.ts +48 -0
- package/dist/types/sources/mdx-remote.d.ts +63 -0
- package/dist/types/sources/notion.d.ts +65 -0
- package/dist/types/sources/obsidian.d.ts +34 -0
- package/dist/types/sources/payload.d.ts +68 -0
- package/dist/types/sources/registry.d.ts +1414 -0
- package/dist/types/sources/sanity.d.ts +69 -0
- package/dist/types/sources/shared.d.ts +46 -0
- package/dist/types/sources/strapi.d.ts +66 -0
- package/dist/types/theme/icon-kind.d.ts +11 -0
- package/dist/types/theme/icons.d.ts +20 -0
- package/docs/01-quickstart.mdx +18 -18
- package/docs/02-deployment.mdx +50 -26
- package/docs/03-upgrading.mdx +351 -0
- package/docs/04-migrating.mdx +58 -0
- package/docs/08-faq.mdx +3 -3
- package/docs/advanced/blog.mdx +13 -6
- package/docs/advanced/changelog.mdx +23 -35
- package/docs/advanced/custom-pages.mdx +20 -8
- package/docs/advanced/meta.ts +1 -8
- package/docs/advanced/skills.mdx +8 -0
- package/docs/cli/audit.mdx +646 -0
- package/docs/cli/doctor.mdx +29 -0
- package/docs/{reference/eval.mdx → cli/evals.mdx} +9 -8
- package/docs/cli/index.mdx +105 -0
- package/docs/cli/meta.ts +7 -0
- package/docs/{reference → cli}/translate.mdx +1 -1
- package/docs/cli/validate.mdx +41 -0
- package/docs/cli/version.mdx +40 -0
- package/docs/configuration/analytics.mdx +350 -59
- package/docs/configuration/ask-ai.mdx +176 -61
- package/docs/configuration/customization.mdx +15 -9
- package/docs/configuration/index.mdx +52 -31
- package/docs/configuration/search.mdx +75 -54
- package/docs/configuration/theming.mdx +24 -15
- package/docs/content/components.mdx +21 -5
- package/docs/{reference → content}/frontmatter.mdx +37 -1
- package/docs/content/i18n.mdx +8 -6
- package/docs/content/includes.mdx +2 -4
- package/docs/content/index.mdx +1 -1
- package/docs/content/islands.mdx +10 -5
- package/docs/content/meta.mdx +1 -1
- package/docs/content/meta.ts +1 -0
- package/docs/content/navigation.mdx +12 -7
- package/docs/content/sources.mdx +145 -50
- package/docs/content/syntax.mdx +26 -12
- package/docs/content/versioning.mdx +3 -3
- package/docs/discoverability/agent-discovery.mdx +91 -10
- package/docs/discoverability/index.mdx +5 -5
- package/docs/discoverability/json-api.mdx +4 -4
- package/docs/discoverability/llms-txt.mdx +6 -6
- package/docs/discoverability/markdown.mdx +4 -4
- package/docs/discoverability/mcp.mdx +11 -11
- package/docs/discoverability/sitemap-and-robots.mdx +3 -3
- package/docs/index.mdx +2 -2
- package/docs/references/asyncapi.mdx +59 -0
- package/docs/{advanced → references}/graphql.mdx +45 -32
- package/docs/{reference → references}/meta.ts +2 -2
- package/docs/references/openapi.mdx +171 -0
- package/docs/references/scalar.mdx +64 -0
- package/package.json +42 -8
- package/skills/blume/SKILL.md +21 -8
- package/skills/blume-migrate/SKILL.md +22 -21
- package/skills/blume-migrate/assets/oxfmt@0.67.0.patch +49 -0
- package/skills/blume-migrate/references/docusaurus.md +5 -4
- package/skills/blume-migrate/references/fumadocs.md +4 -4
- package/skills/blume-migrate/references/mintlify.md +23 -8
- package/skills/blume-migrate/references/monorepo.md +6 -6
- package/skills/blume-migrate/references/starlight.md +4 -4
- package/src/ai/agent-readability.ts +26 -22
- package/src/ai/ai-catalog.ts +259 -0
- package/src/ai/api/handlers.ts +46 -11
- package/src/ai/api-catalog.ts +8 -8
- package/src/ai/ask-data.ts +1 -1
- package/src/ai/ask.ts +624 -100
- package/src/ai/changelog-markdown.ts +91 -0
- package/src/ai/component-markdown.ts +328 -12
- package/src/ai/index.ts +45 -0
- package/src/ai/link-headers.ts +19 -6
- package/src/ai/llms.ts +26 -15
- package/src/ai/markdown.ts +35 -5
- package/src/ai/mcp/data.ts +9 -5
- package/src/ai/mcp/discovery.ts +1 -1
- package/src/ai/openapi-components.ts +4 -1
- package/src/ai/relative-links.ts +170 -0
- package/src/ai/serializers.ts +2 -2
- package/src/ai/skills.ts +1 -1
- package/src/ai/web-bot-auth.ts +2 -2
- package/src/analytics/adobe.ts +46 -0
- package/src/analytics/amplitude.ts +79 -0
- package/src/analytics/clarity.ts +46 -0
- package/src/analytics/clearbit.ts +47 -0
- package/src/analytics/cloudflare.ts +67 -0
- package/src/analytics/fathom.ts +64 -0
- package/src/analytics/google-analytics.ts +84 -0
- package/src/analytics/google-tag-manager.ts +61 -0
- package/src/analytics/head.ts +130 -0
- package/src/analytics/heap.ts +65 -0
- package/src/analytics/hightouch.ts +77 -0
- package/src/analytics/hotjar.ts +47 -0
- package/src/analytics/index.ts +71 -0
- package/src/analytics/inline.ts +21 -0
- package/src/analytics/logrocket.ts +71 -0
- package/src/analytics/mixpanel.ts +92 -0
- package/src/analytics/pirsch.ts +66 -0
- package/src/analytics/plausible.ts +83 -0
- package/src/analytics/posthog.ts +78 -0
- package/src/analytics/schema.ts +60 -0
- package/src/analytics/script.ts +60 -0
- package/src/analytics/segment.ts +85 -0
- package/src/analytics/vercel.ts +50 -0
- package/src/astro/adapter-root.ts +7 -9
- package/src/astro/component-slots.ts +131 -91
- package/src/astro/generate.ts +114 -345
- package/src/astro/integration.ts +2 -6
- package/src/astro/pages.ts +13 -101
- package/src/astro/render-deps.ts +379 -0
- package/src/astro/runtime-deps.ts +201 -0
- package/src/astro/templates.ts +554 -541
- package/src/audit/agent.ts +24 -0
- package/src/audit/catalog.ts +2 -2
- package/src/audit/checks/assets.ts +2 -2
- package/src/audit/checks/dns-aid.ts +1 -1
- package/src/audit/checks/duplicates.ts +3 -1
- package/src/audit/checks/i18n.ts +1 -1
- package/src/audit/checks/indexability.ts +7 -7
- package/src/audit/checks/links.ts +2 -2
- package/src/audit/checks/llms.ts +6 -6
- package/src/audit/checks/network.ts +3 -3
- package/src/audit/checks/og-image.ts +2 -2
- package/src/audit/checks/robots.ts +1 -1
- package/src/audit/checks/sitemap.ts +2 -2
- package/src/audit/checks/social.ts +1 -1
- package/src/audit/run.ts +4 -3
- package/src/audit/terms.ts +31 -0
- package/src/audit/url.ts +13 -13
- package/src/cli/command-meta.ts +10 -0
- package/src/cli/commands/audit.ts +39 -20
- package/src/cli/commands/build.ts +71 -314
- package/src/cli/commands/check.ts +1 -0
- package/src/cli/commands/dev.ts +40 -1
- package/src/cli/commands/doctor.ts +90 -14
- package/src/cli/commands/eject.ts +44 -7
- package/src/cli/commands/eval.ts +2 -2
- package/src/cli/commands/init.ts +161 -41
- package/src/cli/commands/migrate.ts +121 -0
- package/src/cli/commands/preview.ts +7 -1
- package/src/cli/commands/translate.ts +2 -2
- package/src/cli/commands/upgrade.ts +141 -0
- package/src/cli/commands/version.ts +57 -44
- package/src/cli/eject-scripts.ts +121 -6
- package/src/cli/index.ts +11 -1
- package/src/cli/init/install.ts +70 -0
- package/src/cli/init/questions.ts +7 -0
- package/src/cli/init/scaffold.ts +459 -75
- package/src/cli/lazy-command.ts +37 -1
- package/src/cli/prepare.ts +40 -6
- package/src/cli/required-secrets.ts +38 -11
- package/src/cli/unknown-flags.ts +266 -0
- package/src/cli/yarn-pnp.ts +52 -0
- package/src/components/content/AccordionItem.astro +7 -1
- package/src/components/content/Card.astro +4 -3
- package/src/components/content/ColorItem.astro +22 -4
- package/src/components/content/GithubInfo.astro +2 -2
- package/src/components/content/Prompt.astro +25 -25
- package/src/components/content/Tabs.astro +3 -1
- package/src/components/content/Tile.astro +2 -3
- package/src/components/content/Tooltip.astro +57 -9
- package/src/components/content/content-strings.ts +34 -0
- package/src/components/content/diff.ts +1 -1
- package/src/components/content/mermaid-element.ts +13 -2
- package/src/components/content/prompt-markdown.ts +292 -0
- package/src/components/content/tooltip-id.ts +41 -0
- package/src/components/islands/hooks.ts +75 -3
- package/src/components/layout/Analytics.astro +21 -79
- package/src/components/layout/Banner.astro +3 -1
- package/src/components/layout/DiscoveryLinks.astro +69 -0
- package/src/components/layout/Header.astro +83 -20
- package/src/components/layout/LanguageSwitcher.astro +4 -1
- package/src/components/layout/Logo.astro +23 -2
- package/src/components/layout/NavSelector.astro +13 -2
- package/src/components/layout/NavTree.astro +12 -3
- package/src/components/layout/NavTreeScript.astro +17 -3
- package/src/components/layout/PageActions.astro +3 -3
- package/src/components/layout/PageFeedback.astro +11 -1
- package/src/components/layout/PageLayout.astro +52 -5
- package/src/components/layout/ReferenceLayout.astro +21 -12
- package/src/components/layout/RootLayout.astro +69 -43
- package/src/components/layout/Search.astro +30 -6
- package/src/components/layout/WebMcp.astro +1 -1
- package/src/components/layout/analytics-client.ts +101 -15
- package/src/components/layout/drawer-inert.ts +113 -15
- package/src/components/layout/dropdown-clamp.ts +105 -0
- package/src/components/layout/head-scripts.ts +15 -6
- package/src/components/layout/nav-utils.ts +17 -0
- package/src/components/layout/search/algolia.ts +8 -8
- package/src/components/layout/search/orama-cloud.ts +9 -7
- package/src/components/layout/search/typesense.ts +11 -17
- package/src/components/openapi/MessageComposer.astro +2 -2
- package/src/components/openapi/Playground.astro +2 -2
- package/src/components/openapi/playground-client.ts +79 -10
- package/src/core/changelog-index.ts +24 -0
- package/src/core/component-overrides.ts +399 -154
- package/src/core/config-input.ts +212 -543
- package/src/core/config.ts +130 -41
- package/src/core/custom-pages.ts +105 -0
- package/src/core/data.ts +32 -11
- package/src/core/define-components.ts +12 -9
- package/src/core/deployment-env.ts +18 -74
- package/src/core/diagnostics.ts +14 -7
- package/src/core/graph.ts +69 -25
- package/src/core/i18n-ui.ts +6 -2
- package/src/core/i18n.ts +17 -0
- package/src/core/includes.ts +156 -38
- package/src/core/last-modified.ts +6 -11
- package/src/core/links.ts +166 -2
- package/src/core/manifest.ts +10 -3
- package/src/core/navigation.ts +137 -19
- package/src/core/new-tab.ts +35 -0
- package/src/core/node-require.ts +21 -0
- package/src/core/project-graph.ts +42 -26
- package/src/core/project.ts +9 -4
- package/src/core/request-body.ts +61 -0
- package/src/core/safe-href.ts +28 -0
- package/src/core/safe-links.ts +68 -0
- package/src/core/schema.ts +531 -721
- package/src/core/server-features.ts +8 -9
- package/src/core/sources/assets.ts +47 -11
- package/src/core/sources/collection.ts +67 -0
- package/src/core/sources/contentful-rich-text.ts +285 -0
- package/src/core/sources/contentful.ts +173 -0
- package/src/core/sources/github-releases.ts +51 -1
- package/src/core/sources/json.ts +71 -0
- package/src/core/sources/lexical.ts +195 -0
- package/src/core/sources/lower.ts +226 -0
- package/src/core/sources/normalize.ts +52 -2
- package/src/core/sources/notion.ts +39 -28
- package/src/core/sources/payload.ts +135 -0
- package/src/core/sources/portable-text.ts +11 -16
- package/src/core/sources/remote.ts +226 -0
- package/src/core/sources/resolve.ts +104 -166
- package/src/core/sources/sanity.ts +16 -49
- package/src/core/sources/strapi-blocks.ts +124 -0
- package/src/core/sources/strapi.ts +191 -0
- package/src/core/sources/types.ts +12 -1
- package/src/core/types.ts +20 -1
- package/src/core/ui-packs/ar.ts +6 -2
- package/src/core/ui-packs/bg.ts +6 -2
- package/src/core/ui-packs/bn.ts +6 -2
- package/src/core/ui-packs/ca.ts +3 -1
- package/src/core/ui-packs/cs.ts +6 -2
- package/src/core/ui-packs/da.ts +6 -2
- package/src/core/ui-packs/de.ts +6 -2
- package/src/core/ui-packs/el.ts +3 -1
- package/src/core/ui-packs/es.ts +3 -1
- package/src/core/ui-packs/fa.ts +6 -2
- package/src/core/ui-packs/fi.ts +6 -2
- package/src/core/ui-packs/fr.ts +3 -1
- package/src/core/ui-packs/he.ts +6 -2
- package/src/core/ui-packs/hi.ts +6 -2
- package/src/core/ui-packs/hr.ts +6 -2
- package/src/core/ui-packs/hu.ts +6 -2
- package/src/core/ui-packs/id.ts +6 -2
- package/src/core/ui-packs/it.ts +3 -1
- package/src/core/ui-packs/ja.ts +3 -1
- package/src/core/ui-packs/ko.ts +3 -1
- package/src/core/ui-packs/nl.ts +6 -2
- package/src/core/ui-packs/no.ts +6 -2
- package/src/core/ui-packs/pl.ts +6 -2
- package/src/core/ui-packs/pt-br.ts +3 -1
- package/src/core/ui-packs/pt.ts +3 -1
- package/src/core/ui-packs/ro.ts +6 -2
- package/src/core/ui-packs/ru.ts +6 -2
- package/src/core/ui-packs/sk.ts +6 -2
- package/src/core/ui-packs/sr.ts +6 -2
- package/src/core/ui-packs/sv.ts +6 -2
- package/src/core/ui-packs/th.ts +3 -1
- package/src/core/ui-packs/tr.ts +6 -2
- package/src/core/ui-packs/uk.ts +6 -2
- package/src/core/ui-packs/vi.ts +3 -1
- package/src/core/ui-packs/zh-tw.ts +3 -1
- package/src/core/ui-packs/zh.ts +3 -1
- package/src/core/unrecognized-keys.ts +10 -0
- package/src/core/version-cut.ts +116 -8
- package/src/deploy/adapter-output.ts +57 -97
- package/src/deploy/adapters/cloudflare.ts +39 -0
- package/src/deploy/adapters/index.ts +41 -0
- package/src/deploy/adapters/netlify.ts +34 -0
- package/src/deploy/adapters/node.ts +34 -0
- package/src/deploy/adapters/registry.ts +127 -0
- package/src/deploy/adapters/types.ts +92 -0
- package/src/deploy/adapters/vercel.ts +35 -0
- package/src/deploy/artifacts.ts +67 -28
- package/src/deploy/cloudflare-negotiation.ts +179 -100
- package/src/deploy/function-bundle.ts +18 -3
- package/src/deploy/headers.ts +129 -22
- package/src/deploy/node-headers.ts +198 -0
- package/src/deploy/platforms/cloudflare.ts +312 -0
- package/src/deploy/platforms/index.ts +67 -0
- package/src/deploy/platforms/netlify.ts +52 -0
- package/src/deploy/platforms/node.ts +40 -0
- package/src/deploy/platforms/paths.ts +42 -0
- package/src/deploy/platforms/static.ts +29 -0
- package/src/deploy/platforms/types.ts +112 -0
- package/src/deploy/platforms/vercel.ts +193 -0
- package/src/deploy/redirects.ts +30 -18
- package/src/deploy/robots.ts +3 -3
- package/src/deploy/rss.ts +2 -2
- package/src/deploy/sitemap.ts +2 -2
- package/src/deploy/vercel-negotiation.ts +27 -4
- package/src/eval/agents.ts +32 -1
- package/src/eval/findings.ts +19 -11
- package/src/eval/report.ts +10 -2
- package/src/markdown/external-links.ts +65 -0
- package/src/markdown/include.ts +45 -27
- package/src/markdown/index.ts +34 -9
- package/src/markdown/inline-code.ts +12 -6
- package/src/markdown/relative-links.ts +324 -0
- package/src/markdown/themes.ts +3 -3
- package/src/migrate/migrate.ts +149 -0
- package/src/openapi/parse.ts +64 -16
- package/src/openapi/proxy.ts +62 -10
- package/src/openapi/references.ts +147 -147
- package/src/openapi/render-mdx.ts +32 -10
- package/src/openapi/scalar.ts +15 -13
- package/src/openapi/sentence.ts +14 -0
- package/src/openapi/source.ts +37 -21
- package/src/openapi/spec-dependency-error.ts +15 -0
- package/src/reference/asyncapi.ts +83 -0
- package/src/reference/graphql.ts +89 -0
- package/src/reference/index.ts +40 -0
- package/src/reference/openapi.ts +83 -0
- package/src/reference/options.ts +201 -0
- package/src/reference/scalar.ts +136 -0
- package/src/reference/schema.ts +88 -0
- package/src/registry/eject.ts +97 -42
- package/src/search/adapters/algolia.ts +46 -0
- package/src/search/adapters/flexsearch.ts +29 -0
- package/src/search/adapters/index.ts +39 -0
- package/src/search/adapters/mixedbread.ts +39 -0
- package/src/search/adapters/orama-cloud.ts +51 -0
- package/src/search/adapters/orama.ts +24 -0
- package/src/search/adapters/pagefind.ts +27 -0
- package/src/search/adapters/registry.ts +131 -0
- package/src/search/adapters/types.ts +46 -0
- package/src/search/adapters/typesense.ts +57 -0
- package/src/search/build.ts +33 -7
- package/src/search/documents.ts +6 -0
- package/src/search/sync/algolia.ts +12 -11
- package/src/search/sync/index.ts +35 -20
- package/src/search/sync/orama-cloud.ts +12 -9
- package/src/search/sync/typesense.ts +15 -13
- package/src/sources/contentful.ts +63 -0
- package/src/sources/custom.ts +38 -0
- package/src/sources/filesystem.ts +51 -0
- package/src/sources/github-releases.ts +52 -0
- package/src/sources/index.ts +60 -0
- package/src/sources/mdx-remote.ts +76 -0
- package/src/sources/notion.ts +63 -0
- package/src/sources/obsidian.ts +38 -0
- package/src/sources/payload.ts +60 -0
- package/src/sources/registry.ts +182 -0
- package/src/sources/sanity.ts +66 -0
- package/src/sources/shared.ts +52 -0
- package/src/sources/strapi.ts +58 -0
- package/src/theme/entry.ts +47 -2
- package/src/translate/report.ts +40 -7
- package/src/upgrade/upgrade.ts +499 -0
- package/dist/cli/chunk-12dxjqk7.js.map +0 -10
- package/dist/cli/chunk-196vjxp9.js.map +0 -13
- package/dist/cli/chunk-2mzebbbz.js +0 -69
- package/dist/cli/chunk-2z47ypj8.js.map +0 -11
- package/dist/cli/chunk-30e87n55.js +0 -108
- package/dist/cli/chunk-30e87n55.js.map +0 -10
- package/dist/cli/chunk-450a7rcr.js +0 -185
- package/dist/cli/chunk-450a7rcr.js.map +0 -11
- package/dist/cli/chunk-5n7t497w.js.map +0 -40
- package/dist/cli/chunk-61j18dwk.js +0 -5342
- package/dist/cli/chunk-61j18dwk.js.map +0 -58
- package/dist/cli/chunk-88by27n5.js +0 -17
- package/dist/cli/chunk-88by27n5.js.map +0 -10
- package/dist/cli/chunk-8cd8tj54.js.map +0 -34
- package/dist/cli/chunk-aztttvb3.js +0 -381
- package/dist/cli/chunk-aztttvb3.js.map +0 -12
- package/dist/cli/chunk-cvky9gb2.js.map +0 -11
- package/dist/cli/chunk-ejjx8znq.js.map +0 -15
- package/dist/cli/chunk-fmceyezb.js +0 -1007
- package/dist/cli/chunk-fmceyezb.js.map +0 -13
- package/dist/cli/chunk-hdm2dkd2.js.map +0 -48
- package/dist/cli/chunk-hs3gbh8p.js.map +0 -10
- package/dist/cli/chunk-jbj4qhfw.js +0 -30
- package/dist/cli/chunk-jbj4qhfw.js.map +0 -10
- package/dist/cli/chunk-mqb2ka8m.js +0 -68
- package/dist/cli/chunk-mqb2ka8m.js.map +0 -10
- package/dist/cli/chunk-mt76t7dj.js.map +0 -11
- package/dist/cli/chunk-q4rae3bg.js +0 -60
- package/dist/cli/chunk-q4rae3bg.js.map +0 -10
- package/dist/cli/chunk-ra1v2nc2.js +0 -35
- package/dist/cli/chunk-ra1v2nc2.js.map +0 -10
- package/dist/cli/chunk-t3tj0dgr.js.map +0 -15
- package/dist/cli/chunk-tqa1s0k8.js +0 -69
- package/dist/cli/chunk-tqa1s0k8.js.map +0 -11
- package/dist/cli/chunk-vh9w1sgp.js +0 -73
- package/dist/cli/chunk-vh9w1sgp.js.map +0 -10
- package/dist/cli/chunk-vkrsvbr5.js +0 -107
- package/dist/cli/chunk-vkrsvbr5.js.map +0 -11
- package/dist/cli/chunk-vrfp10qk.js +0 -81
- package/dist/cli/chunk-vrfp10qk.js.map +0 -10
- package/dist/cli/chunk-wjt80jps.js +0 -1049
- package/dist/cli/chunk-wjt80jps.js.map +0 -24
- package/docs/advanced/api-reference.mdx +0 -240
- package/docs/reference/cli.mdx +0 -197
- package/skills/blume-migrate/assets/oxfmt@0.55.0.patch +0 -20
- package/src/components/content/changelog-element.ts +0 -69
- package/src/search/providers.ts +0 -91
- /package/dist/cli/{chunk-3w7b2vcx.js.map → chunk-7ez8ny0t.js.map} +0 -0
- /package/dist/cli/{chunk-688e0dde.js.map → chunk-88cpgt6h.js.map} +0 -0
- /package/dist/cli/{chunk-exeeb35e.js.map → chunk-f7t03s3g.js.map} +0 -0
- /package/dist/cli/{chunk-ppfvdcd4.js.map → chunk-zxccj738.js.map} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/core/probe.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import pMap from \"p-map\";\n\nimport type { DiagnosticSeverity } from \"./types.ts\";\n\nexport const PROBE_CONCURRENCY = 8;\nexport const PROBE_TIMEOUT_MS = 10_000;\n\nconst STATUS_NOT_FOUND = 404;\nconst STATUS_GONE = 410;\nconst STATUS_METHOD_NOT_ALLOWED = 405;\nconst STATUS_NOT_IMPLEMENTED = 501;\n\n/** The outcome of a single HTTP probe, with failures normalized rather than thrown. */\nexport interface ProbeResult {\n ok: boolean;\n status?: number;\n timedOut?: boolean;\n error?: string;\n /** Whether the request was redirected before landing on `status`. */\n redirected?: boolean;\n /** The URL finally landed on, after following redirects. */\n finalUrl?: string;\n /** `Content-Encoding` of the response, when the server set one. */\n encoding?: string | null;\n /** Wall-clock milliseconds for the request. */\n ms?: number;\n /** `X-Robots-Tag` of the response, when the server set one. */\n robotsTag?: string | null;\n}\n\n/** Probe a URL with the given method, normalizing failures to a result. */\nconst request = async (\n url: string,\n method: \"GET\" | \"HEAD\",\n timeoutMs: number\n): Promise<ProbeResult> => {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n const started = performance.now();\n try {\n const response = await fetch(url, {\n method,\n redirect: \"follow\",\n signal: controller.signal,\n });\n return {\n encoding: response.headers.get(\"content-encoding\"),\n finalUrl: response.url,\n ms: Math.round(performance.now() - started),\n ok: response.ok,\n redirected: response.redirected,\n robotsTag: response.headers.get(\"x-robots-tag\"),\n status: response.status,\n };\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n return { ok: false, timedOut: true };\n }\n return {\n error: error instanceof Error ? error.message : String(error),\n ok: false,\n };\n } finally {\n clearTimeout(timer);\n }\n};\n\n/**\n * Probe a single URL: HEAD first, falling back to GET.\n *\n * Plenty of servers reject HEAD outright (405/501) or drop the connection, so a\n * HEAD-only probe would report healthy pages as dead.\n */\nexport const probe = async (\n url: string,\n options: { timeoutMs?: number } = {}\n): Promise<ProbeResult> => {\n const timeoutMs = options.timeoutMs ?? PROBE_TIMEOUT_MS;\n const head = await request(url, \"HEAD\", timeoutMs);\n const unreachable = !head.ok && head.status === undefined && !head.timedOut;\n const retry =\n head.status === STATUS_METHOD_NOT_ALLOWED ||\n head.status === STATUS_NOT_IMPLEMENTED ||\n unreachable;\n return retry ? await request(url, \"GET\", timeoutMs) : head;\n};\n\n/** Grade a probe result into a severity + detail, or null when the URL is fine. */\nexport const gradeExternal = (\n result: ProbeResult\n): { severity: DiagnosticSeverity; detail: string } | null => {\n if (result.ok) {\n return null;\n }\n if (result.timedOut) {\n return { detail: \"request timed out\", severity: \"warning\" };\n }\n if (result.status === undefined) {\n return { detail: result.error ?? \"unreachable\", severity: \"error\" };\n }\n // A 404/410 is definitively dead. A 403/429/5xx may well be rate limiting or a\n // transient blip, which is not the author's bug to fix.\n if (result.status === STATUS_NOT_FOUND || result.status === STATUS_GONE) {\n return { detail: `HTTP ${result.status}`, severity: \"error\" };\n }\n return { detail: `HTTP ${result.status}`, severity: \"warning\" };\n};\n\n/**\n * Probe many URLs with bounded concurrency, deduplicating first. Returns a map\n * from URL to its result — the caller decides what each one means.\n */\nexport const probeAll = async (\n urls: readonly string[],\n options: { concurrency?: number; timeoutMs?: number } = {}\n): Promise<Map<string, ProbeResult>> => {\n const unique = [...new Set(urls)];\n const entries = await pMap(\n unique,\n async (url) => [url, await probe(url, options)] as const,\n { concurrency: Math.max(1, options.concurrency ?? PROBE_CONCURRENCY) }\n );\n return new Map(entries);\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;AAAA;AAIO,IAAM,oBAAoB;AAC1B,IAAM,mBAAmB;AAEhC,IAAM,mBAAmB;AACzB,IAAM,cAAc;AACpB,IAAM,4BAA4B;AAClC,IAAM,yBAAyB;AAqB/B,IAAM,UAAU,OACd,KACA,QACA,cACyB;AAAA,EACzB,MAAM,aAAa,IAAI;AAAA,EACvB,MAAM,QAAQ,WAAW,MAAM,WAAW,MAAM,GAAG,SAAS;AAAA,EAC5D,MAAM,UAAU,YAAY,IAAI;AAAA,EAChC,IAAI;AAAA,IACF,MAAM,WAAW,MAAM,MAAM,KAAK;AAAA,MAChC;AAAA,MACA,UAAU;AAAA,MACV,QAAQ,WAAW;AAAA,IACrB,CAAC;AAAA,IACD,OAAO;AAAA,MACL,UAAU,SAAS,QAAQ,IAAI,kBAAkB;AAAA,MACjD,UAAU,SAAS;AAAA,MACnB,IAAI,KA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,OAAO,EAAE,QAAQ,QAAQ,OAAO,UAAU,UAAU,UAAU;AAAA;AAOzD,IAAM,WAAW,OACtB,MACA,UAAwD,CAAC,MACnB;AAAA,EACtC,MAAM,SAAS,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC;AAAA,EAChC,MAAM,UAAU,MAAM,KACpB,QACA,OAAO,QAAQ,CAAC,KAAK,MAAM,MAAM,KAAK,OAAO,CAAC,GAC9C,EAAE,aAAa,KAAK,IAAI,GAAG,QAAQ,eAAe,iBAAiB,EAAE,CACvE;AAAA,EACA,OAAO,IAAI,IAAI,OAAO;AAAA;",
|
|
8
|
-
"debugId": "A29226CDC8AC5EB464756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
generateRuntime
|
|
4
|
-
} from "./chunk-5n7t497w.js";
|
|
5
|
-
import {
|
|
6
|
-
scanProject
|
|
7
|
-
} from "./chunk-hdm2dkd2.js";
|
|
8
|
-
import {
|
|
9
|
-
loadEnvFiles,
|
|
10
|
-
reportInternalError,
|
|
11
|
-
BlumeError,
|
|
12
|
-
hasErrors,
|
|
13
|
-
logger,
|
|
14
|
-
reportDiagnostics
|
|
15
|
-
} from "./index.js";
|
|
16
|
-
import {
|
|
17
|
-
resolveAskBackend
|
|
18
|
-
} from "./chunk-ejjx8znq.js";
|
|
19
|
-
import {
|
|
20
|
-
serverFeatures
|
|
21
|
-
} from "./chunk-jbj4qhfw.js";
|
|
22
|
-
|
|
23
|
-
// src/cli/required-secrets.ts
|
|
24
|
-
var checkRequiredSecrets = (config) => {
|
|
25
|
-
const diagnostics = [];
|
|
26
|
-
const requireSecret = (feature, env, note) => {
|
|
27
|
-
if (process.env[env]) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const noteSuffix = note ? ` (${note})` : "";
|
|
31
|
-
diagnostics.push({
|
|
32
|
-
code: "BLUME_MISSING_SECRET",
|
|
33
|
-
message: `${feature} is enabled but ${env} is not set${noteSuffix}.`,
|
|
34
|
-
severity: "warning",
|
|
35
|
-
suggestion: `Set ${env} in .env.local for local dev, or in your host's environment for production.`
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
if (config.ai.ask?.enabled && !config.ai.ask.endpoint) {
|
|
39
|
-
const backend = resolveAskBackend(config.ai.ask);
|
|
40
|
-
if (backend.kind === "gateway") {
|
|
41
|
-
requireSecret("Ask AI (AI Gateway)", "AI_GATEWAY_API_KEY", "on Vercel the gateway can also authenticate via OIDC");
|
|
42
|
-
} else {
|
|
43
|
-
requireSecret("Ask AI", backend.apiKeyEnv);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (config.search.provider === "mixedbread") {
|
|
47
|
-
requireSecret("Mixedbread search", "MIXEDBREAD_API_KEY");
|
|
48
|
-
}
|
|
49
|
-
return diagnostics;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// src/cli/prepare.ts
|
|
53
|
-
var prepareProject = async (options) => {
|
|
54
|
-
loadEnvFiles(options.root);
|
|
55
|
-
let project;
|
|
56
|
-
try {
|
|
57
|
-
project = await scanProject(options.root, {
|
|
58
|
-
devServerUrl: options.devServerUrl,
|
|
59
|
-
mode: options.mode,
|
|
60
|
-
overrides: options.overrides,
|
|
61
|
-
preview: options.preview,
|
|
62
|
-
refresh: options.refresh,
|
|
63
|
-
runtimeDir: options.runtimeDir
|
|
64
|
-
});
|
|
65
|
-
} catch (error) {
|
|
66
|
-
if (error instanceof BlumeError) {
|
|
67
|
-
reportDiagnostics([error.diagnostic], options.root);
|
|
68
|
-
} else {
|
|
69
|
-
reportInternalError(error);
|
|
70
|
-
}
|
|
71
|
-
process.exit(1);
|
|
72
|
-
}
|
|
73
|
-
if (options.mode === "build" && project.config.deployment.output === "static") {
|
|
74
|
-
const features = serverFeatures(project.config);
|
|
75
|
-
if (features.length > 0) {
|
|
76
|
-
reportDiagnostics([
|
|
77
|
-
{
|
|
78
|
-
code: "BLUME_SERVER_FEATURE_REQUIRED",
|
|
79
|
-
message: `${features.join(", ")} require server output, but deployment.output is "static".`,
|
|
80
|
-
severity: "error",
|
|
81
|
-
suggestion: 'Set deployment: { output: "server", adapter: "vercel" } in blume.config.ts.'
|
|
82
|
-
}
|
|
83
|
-
], options.root);
|
|
84
|
-
process.exit(1);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const hadErrors = reportDiagnostics(project.diagnostics, options.root);
|
|
88
|
-
const dropped = project.droppedPages > 0 ? `${project.droppedPages} page(s) failed frontmatter validation and were dropped from the site. ` : "";
|
|
89
|
-
if (hadErrors && options.strict) {
|
|
90
|
-
logger.error(`Aborting due to errors. ${dropped}Fix the diagnostics above, or pass --no-strict to continue despite them.`);
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
93
|
-
if (hasErrors(project.diagnostics) && !options.strict) {
|
|
94
|
-
logger.warn(`Continuing despite errors. ${dropped}Use --strict to fail instead.`);
|
|
95
|
-
}
|
|
96
|
-
const { warnings } = await generateRuntime(project);
|
|
97
|
-
for (const warning of warnings) {
|
|
98
|
-
logger.warn(warning);
|
|
99
|
-
}
|
|
100
|
-
reportDiagnostics(checkRequiredSecrets(project.config), options.root);
|
|
101
|
-
return project;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export { prepareProject };
|
|
105
|
-
|
|
106
|
-
//# debugId=67E9473EC6A8F63864756E2164756E21
|
|
107
|
-
//# sourceMappingURL=chunk-vkrsvbr5.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/cli/required-secrets.ts", "../src/cli/prepare.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { resolveAskBackend } from \"../ai/ask.ts\";\nimport type { ResolvedConfig } from \"../core/schema.ts\";\nimport type { Diagnostic } from \"../core/types.ts\";\n\n/**\n * Warn early when an enabled feature needs a secret env var that isn't set, so\n * the failure surfaces at `blume dev`/`build` instead of at the first request in\n * production. These are runtime secrets (the endpoint reads them on the server),\n * so this warns rather than hard-fails — the value may live only in the deploy\n * environment. Build-time secrets (search-index sync) already warn during sync.\n */\nexport const checkRequiredSecrets = (config: ResolvedConfig): Diagnostic[] => {\n const diagnostics: Diagnostic[] = [];\n const requireSecret = (feature: string, env: string, note?: string): void => {\n if (process.env[env]) {\n return;\n }\n const noteSuffix = note ? ` (${note})` : \"\";\n diagnostics.push({\n code: \"BLUME_MISSING_SECRET\",\n message: `${feature} is enabled but ${env} is not set${noteSuffix}.`,\n severity: \"warning\",\n suggestion: `Set ${env} in .env.local for local dev, or in your host's environment for production.`,\n });\n };\n\n if (config.ai.ask?.enabled && !config.ai.ask.endpoint) {\n const backend = resolveAskBackend(config.ai.ask);\n if (backend.kind === \"gateway\") {\n requireSecret(\n \"Ask AI (AI Gateway)\",\n \"AI_GATEWAY_API_KEY\",\n \"on Vercel the gateway can also authenticate via OIDC\"\n );\n } else {\n requireSecret(\"Ask AI\", backend.apiKeyEnv);\n }\n }\n\n if (config.search.provider === \"mixedbread\") {\n requireSecret(\"Mixedbread search\", \"MIXEDBREAD_API_KEY\");\n }\n\n return diagnostics;\n};\n",
|
|
6
|
-
"import { generateRuntime } from \"../astro/generate.ts\";\nimport { BlumeError, hasErrors } from \"../core/diagnostics.ts\";\nimport { scanProject } from \"../core/project-graph.ts\";\nimport type {\n BlumeProject,\n BuildMode,\n ConfigOverrides,\n} from \"../core/project-graph.ts\";\nimport { serverFeatures } from \"../core/server-features.ts\";\nimport { loadEnvFiles } from \"./env.ts\";\nimport { reportInternalError } from \"./internal-error.ts\";\nimport { logger, reportDiagnostics } from \"./log.ts\";\nimport { checkRequiredSecrets } from \"./required-secrets.ts\";\n\nexport interface PrepareOptions {\n root: string;\n mode?: BuildMode;\n strict?: boolean;\n /** Local dev server URL, used as the `deployment.site` fallback (dev only). */\n devServerUrl?: string;\n /** Render drafts and fetch unpublished CMS content. */\n preview?: boolean;\n /** Force remote sources to re-fetch instead of serving the cached snapshot. */\n refresh?: boolean;\n /** CLI config overrides (e.g. `--output`, `--content-dir`). */\n overrides?: ConfigOverrides;\n /** Relocate the generated runtime (e.g. `.blume-verify` for `--isolated`). */\n runtimeDir?: string;\n}\n\n/**\n * Scan the project, surface diagnostics, and (re)generate the `.blume` runtime.\n * In strict mode, any error aborts. Returns the resolved project.\n */\nexport const prepareProject = async (\n options: PrepareOptions\n): Promise<BlumeProject> => {\n // Load `.env` files from the project root before the scan: remote sources\n // read their tokens from `process.env` during `scanProject`, and\n // `loadEnvFiles` never overrides variables that are already set.\n loadEnvFiles(options.root);\n\n let project: BlumeProject;\n try {\n project = await scanProject(options.root, {\n devServerUrl: options.devServerUrl,\n mode: options.mode,\n overrides: options.overrides,\n preview: options.preview,\n refresh: options.refresh,\n runtimeDir: options.runtimeDir,\n });\n } catch (error) {\n if (error instanceof BlumeError) {\n reportDiagnostics([error.diagnostic], options.root);\n } else {\n reportInternalError(error);\n }\n process.exit(1);\n }\n\n // Hard gate: server-only features cannot ship in a static build.\n if (\n options.mode === \"build\" &&\n project.config.deployment.output === \"static\"\n ) {\n const features = serverFeatures(project.config);\n if (features.length > 0) {\n reportDiagnostics(\n [\n {\n code: \"BLUME_SERVER_FEATURE_REQUIRED\",\n message: `${features.join(\", \")} require server output, but deployment.output is \"static\".`,\n severity: \"error\",\n suggestion:\n 'Set deployment: { output: \"server\", adapter: \"vercel\" } in blume.config.ts.',\n },\n ],\n options.root\n );\n process.exit(1);\n }\n }\n\n const hadErrors = reportDiagnostics(project.diagnostics, options.root);\n const dropped =\n project.droppedPages > 0\n ? `${project.droppedPages} page(s) failed frontmatter validation and were dropped from the site. `\n : \"\";\n if (hadErrors && options.strict) {\n logger.error(\n `Aborting due to errors. ${dropped}Fix the diagnostics above, or pass --no-strict to continue despite them.`\n );\n process.exit(1);\n }\n if (hasErrors(project.diagnostics) && !options.strict) {\n logger.warn(\n `Continuing despite errors. ${dropped}Use --strict to fail instead.`\n );\n }\n\n const { warnings } = await generateRuntime(project);\n for (const warning of warnings) {\n logger.warn(warning);\n }\n\n // Fail-fast on missing runtime secrets: warn now, not at the first request.\n reportDiagnostics(checkRequiredSecrets(project.config), options.root);\n\n return project;\n};\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAWO,IAAM,uBAAuB,CAAC,WAAyC;AAAA,EAC5E,MAAM,cAA4B,CAAC;AAAA,EACnC,MAAM,gBAAgB,CAAC,SAAiB,KAAa,SAAwB;AAAA,IAC3E,IAAI,QAAQ,IAAI,MAAM;AAAA,MACpB;AAAA,IACF;AAAA,IACA,MAAM,aAAa,OAAO,KAAK,UAAU;AAAA,IACzC,YAAY,KAAK;AAAA,MACf,MAAM;AAAA,MACN,SAAS,GAAG,0BAA0B,iBAAiB;AAAA,MACvD,UAAU;AAAA,MACV,YAAY,OAAO;AAAA,IACrB,CAAC;AAAA;AAAA,EAGH,IAAI,OAAO,GAAG,KAAK,WAAW,CAAC,OAAO,GAAG,IAAI,UAAU;AAAA,IACrD,MAAM,UAAU,kBAAkB,OAAO,GAAG,GAAG;AAAA,IAC/C,IAAI,QAAQ,SAAS,WAAW;AAAA,MAC9B,cACE,uBACA,sBACA,sDACF;AAAA,IACF,EAAO;AAAA,MACL,cAAc,UAAU,QAAQ,SAAS;AAAA;AAAA,EAE7C;AAAA,EAEA,IAAI,OAAO,OAAO,aAAa,cAAc;AAAA,IAC3C,cAAc,qBAAqB,oBAAoB;AAAA,EACzD;AAAA,EAEA,OAAO;AAAA;;;ACTF,IAAM,iBAAiB,OAC5B,YAC0B;AAAA,EAI1B,aAAa,QAAQ,IAAI;AAAA,EAEzB,IAAI;AAAA,EACJ,IAAI;AAAA,IACF,UAAU,MAAM,YAAY,QAAQ,MAAM;AAAA,MACxC,cAAc,QAAQ;AAAA,MACtB,MAAM,QAAQ;AAAA,MACd,WAAW,QAAQ;AAAA,MACnB,SAAS,QAA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E2164756E21",
|
|
10
|
-
"names": []
|
|
11
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/astro/pages.ts
|
|
4
|
-
import { extname, relative } from "pathe";
|
|
5
|
-
import { glob, globSync } from "tinyglobby";
|
|
6
|
-
var PAGE_GLOB = ["**/*.astro"];
|
|
7
|
-
var isPrivatePage = (rel) => rel.split("/").some((segment) => segment.startsWith("_"));
|
|
8
|
-
var toPageRoutes = (pagesRoot, files) => {
|
|
9
|
-
files.sort();
|
|
10
|
-
const routes = [];
|
|
11
|
-
for (const file of files) {
|
|
12
|
-
const rel = relative(pagesRoot, file);
|
|
13
|
-
if (isPrivatePage(rel)) {
|
|
14
|
-
continue;
|
|
15
|
-
}
|
|
16
|
-
const withoutExt = rel.slice(0, rel.length - extname(rel).length);
|
|
17
|
-
const parts = withoutExt.split("/");
|
|
18
|
-
if (parts.at(-1) === "index") {
|
|
19
|
-
parts.pop();
|
|
20
|
-
}
|
|
21
|
-
const pattern = parts.length === 0 ? "/" : `/${parts.join("/")}`;
|
|
22
|
-
routes.push({ entrypoint: file, pattern });
|
|
23
|
-
}
|
|
24
|
-
return routes;
|
|
25
|
-
};
|
|
26
|
-
var discoverPages = async (pagesRoot) => toPageRoutes(pagesRoot, await glob(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true }));
|
|
27
|
-
var routeIsTaken = (pages, contentPages, route) => pages.some((page) => page.pattern === route) || contentPages.some((page) => page.route === route);
|
|
28
|
-
var PRIVATE_SEGMENT = /^[._]/u;
|
|
29
|
-
var staticSegments = (pattern) => {
|
|
30
|
-
const segments = pattern.split("/").filter(Boolean);
|
|
31
|
-
return segments.some((part) => PRIVATE_SEGMENT.test(part) || part.includes("[")) ? null : segments;
|
|
32
|
-
};
|
|
33
|
-
var customStaticRoutes = (pages) => {
|
|
34
|
-
const routes = new Set;
|
|
35
|
-
for (const { pattern } of pages) {
|
|
36
|
-
const segments = staticSegments(pattern);
|
|
37
|
-
if (segments !== null) {
|
|
38
|
-
routes.add(segments.length === 0 ? "/" : `/${segments.join("/")}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return [...routes];
|
|
42
|
-
};
|
|
43
|
-
var hasGeneratedChangelog = (project, userPages) => {
|
|
44
|
-
const hasChangelog = project.graph.pages.some((page) => page.contentType === "changelog" && !(page.meta.draft || page.meta.sidebar.hidden));
|
|
45
|
-
const hasChangelogSource = (project.config.content.sources ?? []).some((source) => source.type === "github-releases");
|
|
46
|
-
return (hasChangelog || hasChangelogSource) && !routeIsTaken(userPages, project.graph.pages, "/changelog");
|
|
47
|
-
};
|
|
48
|
-
var humanizeSegment = (segment) => segment.split(/[-_]/u).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
49
|
-
var customOgRoutes = (pages, siteTitle, titles = {}) => {
|
|
50
|
-
const overrides = new Map(Object.entries(titles).map(([route, title]) => [
|
|
51
|
-
`/${route.split("/").filter(Boolean).join("/")}`,
|
|
52
|
-
title
|
|
53
|
-
]));
|
|
54
|
-
const seen = new Set;
|
|
55
|
-
const routes = [];
|
|
56
|
-
const collectRoute = (pattern) => {
|
|
57
|
-
const segments = staticSegments(pattern);
|
|
58
|
-
if (segments === null) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const slug = segments.length === 0 ? "index" : segments.join("/");
|
|
62
|
-
if (seen.has(slug)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
seen.add(slug);
|
|
66
|
-
const last = segments.at(-1);
|
|
67
|
-
routes.push({
|
|
68
|
-
slug,
|
|
69
|
-
title: overrides.get(`/${segments.join("/")}`) ?? (last ? humanizeSegment(last) : siteTitle)
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
for (const { pattern } of pages) {
|
|
73
|
-
collectRoute(pattern);
|
|
74
|
-
}
|
|
75
|
-
return routes;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export { discoverPages, routeIsTaken, customStaticRoutes, hasGeneratedChangelog, customOgRoutes };
|
|
79
|
-
|
|
80
|
-
//# debugId=80BD00D65DB37D4C64756E2164756E21
|
|
81
|
-
//# sourceMappingURL=chunk-vrfp10qk.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/astro/pages.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { extname, relative } from \"pathe\";\nimport { glob, globSync } from \"tinyglobby\";\n\nimport type { BlumeProject } from \"../core/project-graph.ts\";\nimport type { BlumePageRoute } from \"./integration.ts\";\n\nconst PAGE_GLOB = [\"**/*.astro\"];\n\n/**\n * Astro's routing convention: a file or folder whose name starts with `_` is a\n * private partial — importable (shared layouts, home-page sections), but never\n * built into a route. Blume injects pages itself, so it must reproduce the same\n * exclusion or every `pages/_home/Hero.astro`-style component ships as an HTML\n * page.\n */\nconst isPrivatePage = (rel: string): boolean =>\n rel.split(\"/\").some((segment) => segment.startsWith(\"_\"));\n\n/** Map discovered page files to routes; shared by the async/sync discoverers. */\nconst toPageRoutes = (pagesRoot: string, files: string[]): BlumePageRoute[] => {\n files.sort();\n const routes: BlumePageRoute[] = [];\n for (const file of files) {\n const rel = relative(pagesRoot, file);\n if (isPrivatePage(rel)) {\n continue;\n }\n const withoutExt = rel.slice(0, rel.length - extname(rel).length);\n const parts = withoutExt.split(\"/\");\n // Only a trailing `index` maps to its parent dir; a folder literally named\n // `index` (e.g. `index/foo.astro`) must keep its segment.\n if (parts.at(-1) === \"index\") {\n parts.pop();\n }\n const pattern = parts.length === 0 ? \"/\" : `/${parts.join(\"/\")}`;\n routes.push({ entrypoint: file, pattern });\n }\n return routes;\n};\n\n/**\n * Discover user `.astro` pages and map them to route patterns. Files keep their\n * original location; only the route pattern is derived (index -> parent,\n * dynamic `[param]` segments preserved).\n */\nexport const discoverPages = async (\n pagesRoot: string\n): Promise<BlumePageRoute[]> =>\n toPageRoutes(\n pagesRoot,\n await glob(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true })\n );\n\n/** {@link discoverPages} for synchronous callers (e.g. the sitemap builder). */\nexport const discoverPagesSync = (pagesRoot: string): BlumePageRoute[] =>\n toPageRoutes(\n pagesRoot,\n globSync(PAGE_GLOB, { absolute: true, cwd: pagesRoot, onlyFiles: true })\n );\n\n/**\n * Whether the project already owns `route` — through a custom `.astro` page\n * (injected, so matched on `pattern`) or a content page (matched on `route`).\n * Used to skip a generated default page (e.g. `/404`, `/changelog`) so a\n * user-authored page overrides it without a route collision.\n */\nexport const routeIsTaken = (\n pages: { pattern: string }[],\n contentPages: { route: string }[],\n route: string\n): boolean =>\n pages.some((page) => page.pattern === route) ||\n contentPages.some((page) => page.route === route);\n\n/** A custom-page route that should get a generated OG card. */\nexport interface OgCustomRoute {\n /** `og/<slug>.png` path segment; `index` for the site root. */\n slug: string;\n /** Card headline. */\n title: string;\n}\n\n/** Skip private (`_partial`, `.well-known`) and Astro dynamic (`[param]`) parts. */\nconst PRIVATE_SEGMENT = /^[._]/u;\n\n/** Segments of a static, shareable page pattern; null for dynamic/private ones. */\nconst staticSegments = (pattern: string): string[] | null => {\n const segments = pattern.split(\"/\").filter(Boolean);\n return segments.some(\n (part) => PRIVATE_SEGMENT.test(part) || part.includes(\"[\")\n )\n ? null\n : segments;\n};\n\n/**\n * The static routes served by custom `.astro` pages — the same filtering as\n * {@link customOgRoutes}, but yielding the routes themselves. Feeds the route\n * sets that must know every servable page beyond the content graph (the link\n * checker, the sitemap); dynamic (`[param]`) and private segments are skipped\n * because their concrete URLs can't be enumerated statically.\n */\nexport const customStaticRoutes = (pages: { pattern: string }[]): string[] => {\n const routes = new Set<string>();\n for (const { pattern } of pages) {\n const segments = staticSegments(pattern);\n if (segments !== null) {\n routes.add(segments.length === 0 ? \"/\" : `/${segments.join(\"/\")}`);\n }\n }\n return [...routes];\n};\n\n/**\n * Whether the generated `/changelog` index route exists for this project —\n * `generate.ts` (which writes the page) and the sitemap/link validator all\n * share this check: there are visible `type: changelog` entries — or a\n * release-backed changelog source, whose route must resolve even when a fetch\n * fails — and no user content or custom page already owns `/changelog`.\n */\nexport const hasGeneratedChangelog = (\n project: BlumeProject,\n userPages: { pattern: string }[]\n): boolean => {\n const hasChangelog = project.graph.pages.some(\n (page) =>\n page.contentType === \"changelog\" &&\n !(page.meta.draft || page.meta.sidebar.hidden)\n );\n const hasChangelogSource = (project.config.content.sources ?? []).some(\n (source) => source.type === \"github-releases\"\n );\n return (\n (hasChangelog || hasChangelogSource) &&\n !routeIsTaken(userPages, project.graph.pages, \"/changelog\")\n );\n};\n\nconst humanizeSegment = (segment: string): string =>\n segment\n .split(/[-_]/u)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n\n/**\n * Pick the custom-page routes that should get a generated Open Graph card, with\n * the card's slug and text. OG is otherwise content-route only, so a custom page\n * — most importantly the landing `/`, the most-shared URL — would have no card.\n *\n * Dynamic (`[param]`) routes and private segments (`_partials`, `.well-known`)\n * are skipped: they aren't shareable pages. A `titles` entry (`seo.og.titles`,\n * keyed by route) names a card outright — the only way to say \"CLI\" when the\n * segment humanizes to \"Cli\". Otherwise the home is titled with the site title\n * and a deeper page from its last path segment. The card's brand lockup,\n * description, and footer come from the resolved config at render time.\n */\nexport const customOgRoutes = (\n pages: BlumePageRoute[],\n siteTitle: string,\n titles: Record<string, string> = {}\n): OgCustomRoute[] => {\n // Keys normalized to `/`-joined segments so `cli`, `/cli`, and `/cli/` all\n // address the page served at `/cli` (and `/` addresses the home).\n const overrides = new Map(\n Object.entries(titles).map(([route, title]) => [\n `/${route.split(\"/\").filter(Boolean).join(\"/\")}`,\n title,\n ])\n );\n const seen = new Set<string>();\n const routes: OgCustomRoute[] = [];\n // Extracted so the skip paths become early `return`s (one `continue` budget\n // per loop under the lint rule) instead of `continue` statements.\n const collectRoute = (pattern: string): void => {\n const segments = staticSegments(pattern);\n if (segments === null) {\n return;\n }\n const slug = segments.length === 0 ? \"index\" : segments.join(\"/\");\n if (seen.has(slug)) {\n return;\n }\n seen.add(slug);\n const last = segments.at(-1);\n routes.push({\n slug,\n title:\n overrides.get(`/${segments.join(\"/\")}`) ??\n (last ? humanizeSegment(last) : siteTitle),\n });\n };\n for (const { pattern } of pages) {\n collectRoute(pattern);\n }\n return routes;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;AAAA;AACA;AAKA,IAAM,YAAY,CAAC,YAAY;AAS/B,IAAM,gBAAgB,CAAC,QACrB,IAAI,MAAM,GAAG,EAAE,KAAK,CAAC,YAAY,QAAQ,WAAW,GAAG,CAAC;AAG1D,IAAM,eAAe,CAAC,WAAmB,UAAsC;AAAA,EAC7E,MAAM,KAAK;AAAA,EACX,MAAM,SAA2B,CAAC;AAAA,EAClC,WAAW,QAAQ,OAAO;AAAA,IACxB,MAAM,MAAM,SAAS,WAAW,IAAI;AAAA,IACpC,IAAI,cAAc,GAAG,GAAG;AAAA,MACtB;AAAA,IACF;AAAA,IACA,MAAM,aAAa,IAAI,MAAM,GAAG,IAAI,SAAS,QAAQ,GAAG,EAAE,MAAM;AAAA,IAChE,MAAM,QAAQ,WAAW,MAAM,GAAG;AAAA,IAGlC,IAAI,MAAM,GAAG,EAAE,MAAM,SAAS;AAAA,MAC5B,MAAM,IAAI;AAAA,IACZ;AAAA,IACA,MAAM,UAAU,MAAM,WAAW,IAAI,MAAM,IAAI,MAAM,KAAK,GAAG;AAAA,IAC7D,OAAO,KAAK,EAAE,YAAY,MAAM,QAAQ,CAAC;AAAA,EAC3C;AAAA,EACA,OAAO;AAAA;AAQF,IAAM,gBAAgB,OAC3B,cAEA,aACE,WACA,MAAM,KAAK,WAAW,EAAE,UAAU,MAAM,KAAK,WAAW,WAAW,KAAK,CAAC,CAC3E;AAeK,IAAM,eAAe,CAC1B,OACA,cACA,UAEA,MAAM,KAAK,CAAC,SAAS,KAAK,YAAY,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