blume 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/dist/cli/{chunk-5cg2rzgf.js → chunk-073rdvgb.js} +19 -48
- package/dist/cli/{chunk-5cg2rzgf.js.map → chunk-073rdvgb.js.map} +4 -5
- package/dist/cli/{chunk-ga0pf4aj.js → chunk-0n9xkp3d.js} +12 -3
- package/dist/cli/{chunk-ga0pf4aj.js.map → chunk-0n9xkp3d.js.map} +3 -3
- package/dist/cli/chunk-150jk7km.js +52 -0
- package/dist/cli/chunk-150jk7km.js.map +10 -0
- package/dist/cli/{chunk-rekqz4qg.js → chunk-313vnn40.js} +16 -15
- package/dist/cli/chunk-313vnn40.js.map +10 -0
- package/dist/cli/{chunk-gp84za0h.js → chunk-3v3ffbrj.js} +2 -2
- package/dist/cli/{chunk-9xr4dgee.js → chunk-3x6x3pph.js} +29 -16
- package/dist/cli/chunk-3x6x3pph.js.map +10 -0
- package/dist/cli/{chunk-0gz36akr.js → chunk-42t4jxdx.js} +21 -5
- package/dist/cli/chunk-42t4jxdx.js.map +12 -0
- package/dist/cli/{chunk-ta27feev.js → chunk-54ztw1nj.js} +21 -2
- package/dist/cli/chunk-54ztw1nj.js.map +10 -0
- package/dist/cli/{chunk-jnwj5kjj.js → chunk-5vjtgs6e.js} +20 -7
- package/dist/cli/{chunk-jnwj5kjj.js.map → chunk-5vjtgs6e.js.map} +3 -3
- package/dist/cli/chunk-66w9j7p6.js +322 -0
- package/dist/cli/chunk-66w9j7p6.js.map +14 -0
- package/dist/cli/{chunk-nd1821sk.js → chunk-7ppf1rva.js} +32 -18
- package/dist/cli/chunk-7ppf1rva.js.map +10 -0
- package/dist/cli/{chunk-p804f3pe.js → chunk-8y2kmjv8.js} +6 -6
- package/dist/cli/{chunk-2f7n4qzt.js → chunk-c1y538kd.js} +1 -1
- package/dist/cli/{chunk-1n228xqb.js → chunk-c887fj0s.js} +2 -2
- package/dist/cli/{chunk-y5h4r2y0.js → chunk-cfyg47zg.js} +15 -5
- package/dist/cli/chunk-cfyg47zg.js.map +10 -0
- package/dist/cli/{chunk-cmtcnh9f.js → chunk-dzwehpy7.js} +2 -2
- package/dist/cli/{chunk-h2a48yhd.js → chunk-e6atmn4h.js} +119 -15
- package/dist/cli/{chunk-h2a48yhd.js.map → chunk-e6atmn4h.js.map} +10 -10
- package/dist/cli/{chunk-5ffywsmb.js → chunk-e8xw9qkh.js} +8 -6
- package/dist/cli/{chunk-5ffywsmb.js.map → chunk-e8xw9qkh.js.map} +3 -3
- package/dist/cli/{chunk-ntv4qrt7.js → chunk-e9q7a2ak.js} +14 -14
- package/dist/cli/{chunk-xkz5xbtv.js → chunk-ehweg4fr.js} +2366 -1114
- package/dist/cli/chunk-ehweg4fr.js.map +218 -0
- package/dist/cli/{chunk-zf748avv.js → chunk-ep6nd0rn.js} +176 -281
- package/dist/cli/{chunk-zf748avv.js.map → chunk-ep6nd0rn.js.map} +11 -12
- package/dist/cli/{chunk-yxmk4pec.js → chunk-fdrkhpjy.js} +16 -15
- package/dist/cli/{chunk-yxmk4pec.js.map → chunk-fdrkhpjy.js.map} +3 -3
- package/dist/cli/{chunk-5wj2qwn2.js → chunk-ft9vfys6.js} +4 -4
- package/dist/cli/{chunk-4h8z9vv5.js → chunk-gb420vvz.js} +89 -46
- package/dist/cli/chunk-gb420vvz.js.map +17 -0
- package/dist/cli/{chunk-713mngdq.js → chunk-hebn0tpx.js} +76 -10
- package/dist/cli/chunk-hebn0tpx.js.map +14 -0
- package/dist/cli/{chunk-2n4ps1b3.js → chunk-htrwgabr.js} +40 -22
- package/dist/cli/chunk-htrwgabr.js.map +15 -0
- package/dist/cli/{chunk-zhvd6adm.js → chunk-hx3xqnk9.js} +13 -13
- package/dist/cli/chunk-j134vrp2.js +65 -0
- package/dist/cli/chunk-j134vrp2.js.map +10 -0
- package/dist/cli/{chunk-y4ykbark.js → chunk-kma9f6sf.js} +2 -2
- package/dist/cli/{chunk-py62fewh.js → chunk-mrcccgnh.js} +3 -3
- package/dist/cli/{chunk-2f3ndkpw.js → chunk-n0v7m8ry.js} +3 -3
- package/dist/cli/{chunk-43zcf4gz.js → chunk-ncj7w596.js} +522 -353
- package/dist/cli/chunk-ncj7w596.js.map +35 -0
- package/dist/cli/{chunk-9geymqns.js → chunk-nq1d20w2.js} +14 -14
- package/dist/cli/{chunk-g2z9x01v.js → chunk-nrns10mj.js} +3 -3
- package/dist/cli/{chunk-e7vvk5ya.js → chunk-sds923fa.js} +3 -3
- package/dist/cli/{chunk-cy5bm0j0.js → chunk-t2m5j4pr.js} +2 -2
- package/dist/cli/{chunk-cy5bm0j0.js.map → chunk-t2m5j4pr.js.map} +1 -1
- package/dist/cli/{chunk-yj17vs39.js → chunk-tdqhyxfz.js} +5 -5
- package/dist/cli/{chunk-q3wxxq39.js → chunk-tphac74f.js} +5 -5
- package/dist/cli/{chunk-6bm0xpgd.js → chunk-w1r4vase.js} +2 -2
- package/dist/cli/index.js +24 -19
- package/dist/cli/index.js.map +3 -3
- package/dist/types/ai/ask-context.d.ts +6 -2
- package/dist/types/ai/component-markdown.d.ts +2 -0
- package/dist/types/ai/openapi-components.d.ts +4 -1
- package/dist/types/astro/integration.d.ts +5 -4
- package/dist/types/astro/markdown-negotiation.d.ts +3 -0
- package/dist/types/astro/pages.d.ts +10 -0
- package/dist/types/cli/init/scaffold.d.ts +1 -1
- package/dist/types/components/content/api-field.d.ts +4 -1
- package/dist/types/components/content/api-page.d.ts +6 -1
- package/dist/types/components/openapi/code-samples.d.ts +29 -0
- package/dist/types/components/openapi/helpers.d.ts +22 -1
- package/dist/types/components/openapi/security.d.ts +10 -0
- package/dist/types/components/openapi/snippets.d.ts +60 -0
- package/dist/types/core/changelog-index.d.ts +8 -0
- package/dist/types/core/config-input.d.ts +30 -3
- package/dist/types/core/data.d.ts +4 -0
- package/dist/types/core/i18n-ui.d.ts +2 -0
- package/dist/types/core/links.d.ts +8 -0
- package/dist/types/core/probe.d.ts +2 -0
- package/dist/types/core/project-graph.d.ts +6 -0
- package/dist/types/core/redirect-patterns.d.ts +11 -3
- package/dist/types/core/schema.d.ts +119 -0
- package/dist/types/core/sources/cache.d.ts +3 -0
- package/dist/types/core/sources/contentful-rich-text.d.ts +11 -2
- package/dist/types/core/sources/contentful.d.ts +17 -1
- package/dist/types/core/sources/lexical.d.ts +5 -0
- package/dist/types/core/sources/normalize.d.ts +20 -1
- package/dist/types/core/sources/remote.d.ts +37 -10
- package/dist/types/core/sources/sanity.d.ts +1 -1
- package/dist/types/core/types.d.ts +17 -0
- package/dist/types/deploy/adapter-output.d.ts +2 -1
- package/dist/types/deploy/adapters/cloudflare.d.ts +7 -5
- package/dist/types/deploy/adapters/node.d.ts +58 -23
- package/dist/types/deploy/adapters/registry.d.ts +10 -0
- package/dist/types/deploy/adapters/types.d.ts +3 -2
- package/dist/types/deploy/platforms/cloudflare.d.ts +10 -7
- package/dist/types/deploy/platforms/node.d.ts +3 -1
- package/dist/types/deploy/platforms/types.d.ts +18 -7
- package/dist/types/deploy/platforms/vercel.d.ts +20 -1
- package/dist/types/deploy/redirects.d.ts +17 -1
- package/dist/types/deploy/sitemap.d.ts +2 -1
- package/dist/types/deploy/vercel-negotiation.d.ts +42 -21
- package/dist/types/openapi/checks.d.ts +27 -0
- package/dist/types/openapi/graphql.d.ts +6 -0
- package/dist/types/openapi/model.d.ts +15 -4
- package/dist/types/openapi/parse.d.ts +3 -0
- package/dist/types/openapi/references.d.ts +16 -0
- package/dist/types/ratelimit/index.d.ts +1 -1
- package/dist/types/ratelimit/schema.d.ts +8 -0
- package/dist/types/ratelimit/upstash.d.ts +39 -14
- package/dist/types/reference/graphql.d.ts +76 -1
- package/dist/types/reference/index.d.ts +1 -1
- package/dist/types/reference/openapi.d.ts +2 -2
- package/dist/types/reference/options.d.ts +37 -1
- package/dist/types/reference/schema.d.ts +84 -0
- package/dist/types/search/adapters/registry.d.ts +3 -0
- package/dist/types/search/adapters/typesense.d.ts +14 -4
- package/dist/types/search/build.d.ts +3 -1
- package/dist/types/search/orama-index.d.ts +9 -9
- package/dist/types/search/sync/algolia.d.ts +5 -2
- package/dist/types/search/sync/index.d.ts +3 -1
- package/dist/types/search/sync/typesense.d.ts +11 -7
- package/dist/types/sources/contentful.d.ts +16 -0
- package/dist/types/sources/github-releases.d.ts +8 -1
- package/dist/types/sources/payload.d.ts +2 -0
- package/dist/types/sources/registry.d.ts +54 -0
- package/dist/types/sources/shared.d.ts +3 -0
- package/dist/types/sources/strapi.d.ts +2 -0
- package/docs/01-quickstart.mdx +4 -2
- package/docs/02-deployment.mdx +31 -13
- package/docs/advanced/changelog.mdx +11 -0
- package/docs/advanced/skills.mdx +1 -1
- package/docs/cli/audit.mdx +30 -7
- package/docs/cli/doctor.mdx +5 -1
- package/docs/cli/evals.mdx +4 -4
- package/docs/cli/translate.mdx +1 -0
- package/docs/cli/validate.mdx +4 -3
- package/docs/configuration/analytics.mdx +1 -1
- package/docs/configuration/assistant.mdx +6 -2
- package/docs/configuration/customization.mdx +4 -2
- package/docs/configuration/export.mdx +5 -3
- package/docs/configuration/index.mdx +3 -2
- package/docs/configuration/rate-limiting.mdx +23 -2
- package/docs/configuration/search.mdx +37 -14
- package/docs/content/components.mdx +2 -2
- package/docs/content/frontmatter.mdx +5 -3
- package/docs/content/i18n.mdx +2 -2
- package/docs/content/includes.mdx +1 -1
- package/docs/content/navigation.mdx +4 -4
- package/docs/content/sources/contentful.mdx +7 -4
- package/docs/content/sources/custom.mdx +7 -3
- package/docs/content/sources/github-releases.mdx +10 -2
- package/docs/content/sources/index.mdx +3 -3
- package/docs/content/sources/notion.mdx +1 -1
- package/docs/content/sources/obsidian.mdx +1 -1
- package/docs/content/sources/payload.mdx +3 -2
- package/docs/content/sources/remote-mdx.mdx +4 -0
- package/docs/content/sources/sanity.mdx +2 -2
- package/docs/content/sources/strapi.mdx +3 -2
- package/docs/content/syntax.mdx +2 -2
- package/docs/discoverability/agent-discovery.mdx +1 -1
- package/docs/discoverability/index.mdx +1 -1
- package/docs/discoverability/json-api.mdx +2 -0
- package/docs/discoverability/llms-txt.mdx +1 -1
- package/docs/discoverability/markdown.mdx +3 -1
- package/docs/discoverability/mcp.mdx +4 -0
- package/docs/discoverability/sitemap-and-robots.mdx +1 -1
- package/docs/references/api-pages.mdx +1 -1
- package/docs/references/asyncapi.mdx +3 -1
- package/docs/references/graphql.mdx +13 -1
- package/docs/references/openapi.mdx +50 -8
- package/package.json +9 -9
- package/skills/blume-migrate/SKILL.md +1 -1
- package/skills/blume-migrate/references/docusaurus.md +4 -4
- package/skills/blume-migrate/references/fumadocs.md +17 -13
- package/skills/blume-migrate/references/nextra.md +8 -5
- package/skills/blume-migrate/references/starlight.md +9 -7
- package/src/ai/ask-context.ts +33 -3
- package/src/ai/ask-limits.ts +13 -0
- package/src/ai/changelog-markdown.ts +11 -6
- package/src/ai/component-markdown.ts +1 -1
- package/src/ai/cors.ts +12 -3
- package/src/ai/mcp/query.ts +14 -6
- package/src/ai/openapi-components.ts +28 -4
- package/src/ai/relative-links.ts +4 -38
- package/src/astro/generate.ts +78 -48
- package/src/astro/integration.ts +16 -13
- package/src/astro/markdown-negotiation.ts +3 -0
- package/src/astro/module-types.ts +3 -1
- package/src/astro/pages.ts +23 -0
- package/src/astro/templates.ts +125 -80
- package/src/audit/catalog.ts +19 -3
- package/src/audit/checks/links.ts +14 -1
- package/src/audit/checks/network.ts +110 -6
- package/src/audit/checks/redirects.ts +6 -4
- package/src/audit/checks/robots.ts +58 -2
- package/src/audit/run.ts +3 -0
- package/src/audit/types.ts +2 -0
- package/src/audit/url.ts +14 -5
- package/src/blume-modules.d.ts +5 -1
- package/src/cli/args.ts +51 -0
- package/src/cli/build-failure.ts +23 -0
- package/src/cli/commands/audit.ts +10 -1
- package/src/cli/commands/dev.ts +18 -2
- package/src/cli/commands/doctor.ts +45 -12
- package/src/cli/commands/eval.ts +36 -4
- package/src/cli/commands/init.ts +6 -4
- package/src/cli/commands/validate.ts +10 -1
- package/src/cli/init/scaffold.ts +3 -3
- package/src/cli/prepare.ts +6 -3
- package/src/cli/required-secrets.ts +1 -1
- package/src/components/content/ApiPlayground.astro +6 -2
- package/src/components/content/api-field.ts +4 -1
- package/src/components/content/api-page.ts +31 -7
- package/src/components/content/mermaid-element.ts +15 -1
- package/src/components/islands/hooks.ts +27 -1
- package/src/components/layout/PageActions.astro +139 -24
- package/src/components/layout/RootLayout.astro +10 -2
- package/src/components/layout/Search.astro +17 -3
- package/src/components/layout/TableOfContents.astro +24 -17
- package/src/components/layout/head-scripts.ts +6 -1
- package/src/components/layout/search/algolia.ts +10 -1
- package/src/components/layout/search/analytics.ts +42 -14
- package/src/components/layout/search/endpoint.ts +48 -5
- package/src/components/layout/search/pagefind.ts +114 -5
- package/src/components/layout/search/types.ts +12 -0
- package/src/components/layout/search/typesense.ts +18 -6
- package/src/components/openapi/AsyncApiOperation.astro +14 -7
- package/src/components/openapi/Authorization.astro +10 -0
- package/src/components/openapi/GraphqlOperation.astro +5 -0
- package/src/components/openapi/Operation.astro +24 -1
- package/src/components/openapi/ParametersTable.astro +8 -4
- package/src/components/openapi/Playground.astro +7 -1
- package/src/components/openapi/RequestBody.astro +19 -2
- package/src/components/openapi/Responses.astro +1 -0
- package/src/components/openapi/SchemaTable.astro +15 -3
- package/src/components/openapi/async-snippets.ts +61 -5
- package/src/components/openapi/async.ts +123 -29
- package/src/components/openapi/graphql-helpers.ts +35 -12
- package/src/components/openapi/helpers.ts +36 -2
- package/src/components/openapi/message-model.ts +54 -11
- package/src/components/openapi/message.ts +14 -4
- package/src/components/openapi/operation-model.ts +16 -7
- package/src/components/openapi/playground-client.ts +24 -5
- package/src/components/openapi/playground-schema.ts +1 -1
- package/src/components/openapi/schema-tree.ts +44 -14
- package/src/components/openapi/security.ts +10 -0
- package/src/components/openapi/snippets.ts +5 -3
- package/src/components/openapi/validate-json.ts +4 -3
- package/src/core/changelog-index.ts +31 -1
- package/src/core/component-diagnostics.ts +53 -0
- package/src/core/component-overrides.ts +32 -0
- package/src/core/config-input.ts +31 -3
- package/src/core/data.ts +2 -0
- package/src/core/diagnostics.ts +5 -0
- package/src/core/i18n-ui.ts +2 -0
- package/src/core/includes.ts +1 -1
- package/src/core/links.ts +47 -17
- package/src/core/probe.ts +26 -6
- package/src/core/project-graph.ts +59 -18
- package/src/core/redirect-patterns.ts +36 -7
- package/src/core/schema.ts +21 -2
- package/src/core/sources/cache.ts +6 -0
- package/src/core/sources/contentful-rich-text.ts +29 -6
- package/src/core/sources/contentful.ts +135 -25
- package/src/core/sources/filesystem.ts +26 -4
- package/src/core/sources/github-releases.ts +12 -1
- package/src/core/sources/lexical.ts +15 -10
- package/src/core/sources/mdx-remote.ts +62 -10
- package/src/core/sources/normalize.ts +227 -41
- package/src/core/sources/notion.ts +7 -1
- package/src/core/sources/obsidian.ts +16 -3
- package/src/core/sources/payload.ts +38 -15
- package/src/core/sources/remote.ts +72 -15
- package/src/core/sources/resolve.ts +11 -1
- package/src/core/sources/sanity.ts +43 -25
- package/src/core/sources/strapi.ts +2 -2
- package/src/core/types.ts +18 -0
- package/src/core/ui-packs/ar.ts +1 -0
- package/src/core/ui-packs/bg.ts +1 -0
- package/src/core/ui-packs/bn.ts +1 -0
- package/src/core/ui-packs/ca.ts +1 -0
- package/src/core/ui-packs/cs.ts +1 -0
- package/src/core/ui-packs/da.ts +1 -0
- package/src/core/ui-packs/de.ts +1 -0
- package/src/core/ui-packs/el.ts +1 -0
- package/src/core/ui-packs/es.ts +1 -0
- package/src/core/ui-packs/fa.ts +1 -0
- package/src/core/ui-packs/fi.ts +1 -0
- package/src/core/ui-packs/fr.ts +1 -0
- package/src/core/ui-packs/he.ts +1 -0
- package/src/core/ui-packs/hi.ts +1 -0
- package/src/core/ui-packs/hr.ts +1 -0
- package/src/core/ui-packs/hu.ts +1 -0
- package/src/core/ui-packs/id.ts +1 -0
- package/src/core/ui-packs/it.ts +1 -0
- package/src/core/ui-packs/ja.ts +1 -0
- package/src/core/ui-packs/ko.ts +1 -0
- package/src/core/ui-packs/nl.ts +1 -0
- package/src/core/ui-packs/no.ts +1 -0
- package/src/core/ui-packs/pl.ts +1 -0
- package/src/core/ui-packs/pt-br.ts +1 -0
- package/src/core/ui-packs/pt.ts +1 -0
- package/src/core/ui-packs/ro.ts +1 -0
- package/src/core/ui-packs/ru.ts +1 -0
- package/src/core/ui-packs/sk.ts +1 -0
- package/src/core/ui-packs/sr.ts +1 -0
- package/src/core/ui-packs/sv.ts +1 -0
- package/src/core/ui-packs/th.ts +1 -0
- package/src/core/ui-packs/tr.ts +1 -0
- package/src/core/ui-packs/uk.ts +1 -0
- package/src/core/ui-packs/vi.ts +1 -0
- package/src/core/ui-packs/zh-tw.ts +1 -0
- package/src/core/ui-packs/zh.ts +1 -0
- package/src/deploy/adapter-output.ts +7 -2
- package/src/deploy/adapters/cloudflare.ts +7 -5
- package/src/deploy/adapters/node.ts +47 -9
- package/src/deploy/adapters/types.ts +7 -3
- package/src/deploy/artifacts.ts +2 -1
- package/src/deploy/platforms/cloudflare.ts +13 -9
- package/src/deploy/platforms/netlify.ts +2 -1
- package/src/deploy/platforms/node.ts +12 -2
- package/src/deploy/platforms/types.ts +21 -7
- package/src/deploy/platforms/vercel.ts +113 -16
- package/src/deploy/redirects.ts +66 -6
- package/src/deploy/rss.ts +3 -1
- package/src/deploy/sitemap.ts +39 -5
- package/src/deploy/vercel-negotiation.ts +290 -102
- package/src/eval/agents.ts +18 -1
- package/src/eval/prompts.ts +6 -3
- package/src/eval/report.ts +34 -13
- package/src/eval/run.ts +5 -0
- package/src/markdown/relative-links.ts +3 -2
- package/src/openapi/checks.ts +273 -0
- package/src/openapi/graphql-build.ts +21 -0
- package/src/openapi/graphql.ts +11 -0
- package/src/openapi/model.ts +15 -3
- package/src/openapi/parse.ts +127 -2
- package/src/openapi/references.ts +43 -3
- package/src/openapi/source.ts +39 -14
- package/src/ratelimit/index.ts +1 -1
- package/src/ratelimit/runtime.ts +37 -19
- package/src/ratelimit/upstash.ts +40 -10
- package/src/reference/graphql.ts +15 -1
- package/src/reference/index.ts +1 -0
- package/src/reference/openapi.ts +2 -2
- package/src/reference/options.ts +29 -1
- package/src/registry/eject.ts +3 -1
- package/src/search/adapters/locale-scope.ts +30 -0
- package/src/search/adapters/typesense.ts +14 -4
- package/src/search/build.ts +21 -3
- package/src/search/orama-index.ts +163 -31
- package/src/search/source-pages.ts +29 -0
- package/src/search/sync/algolia.ts +99 -9
- package/src/search/sync/index.ts +52 -13
- package/src/search/sync/typesense.ts +72 -27
- package/src/sources/contentful.ts +12 -0
- package/src/sources/github-releases.ts +7 -1
- package/src/sources/shared.ts +3 -0
- package/src/theme/entry.ts +29 -3
- package/src/translate/validate.ts +23 -1
- package/dist/cli/chunk-0gz36akr.js.map +0 -12
- package/dist/cli/chunk-2n4ps1b3.js.map +0 -15
- package/dist/cli/chunk-43zcf4gz.js.map +0 -36
- package/dist/cli/chunk-4ejxbzee.js +0 -39
- package/dist/cli/chunk-4ejxbzee.js.map +0 -10
- package/dist/cli/chunk-4h8z9vv5.js.map +0 -16
- package/dist/cli/chunk-713mngdq.js.map +0 -14
- package/dist/cli/chunk-9xr4dgee.js.map +0 -10
- package/dist/cli/chunk-amrb6hgh.js +0 -145
- package/dist/cli/chunk-amrb6hgh.js.map +0 -11
- package/dist/cli/chunk-nd1821sk.js.map +0 -10
- package/dist/cli/chunk-rekqz4qg.js.map +0 -10
- package/dist/cli/chunk-ta27feev.js.map +0 -10
- package/dist/cli/chunk-xkz5xbtv.js.map +0 -213
- package/dist/cli/chunk-y5h4r2y0.js.map +0 -10
- /package/dist/cli/{chunk-gp84za0h.js.map → chunk-3v3ffbrj.js.map} +0 -0
- /package/dist/cli/{chunk-p804f3pe.js.map → chunk-8y2kmjv8.js.map} +0 -0
- /package/dist/cli/{chunk-2f7n4qzt.js.map → chunk-c1y538kd.js.map} +0 -0
- /package/dist/cli/{chunk-1n228xqb.js.map → chunk-c887fj0s.js.map} +0 -0
- /package/dist/cli/{chunk-cmtcnh9f.js.map → chunk-dzwehpy7.js.map} +0 -0
- /package/dist/cli/{chunk-ntv4qrt7.js.map → chunk-e9q7a2ak.js.map} +0 -0
- /package/dist/cli/{chunk-5wj2qwn2.js.map → chunk-ft9vfys6.js.map} +0 -0
- /package/dist/cli/{chunk-zhvd6adm.js.map → chunk-hx3xqnk9.js.map} +0 -0
- /package/dist/cli/{chunk-y4ykbark.js.map → chunk-kma9f6sf.js.map} +0 -0
- /package/dist/cli/{chunk-py62fewh.js.map → chunk-mrcccgnh.js.map} +0 -0
- /package/dist/cli/{chunk-2f3ndkpw.js.map → chunk-n0v7m8ry.js.map} +0 -0
- /package/dist/cli/{chunk-9geymqns.js.map → chunk-nq1d20w2.js.map} +0 -0
- /package/dist/cli/{chunk-g2z9x01v.js.map → chunk-nrns10mj.js.map} +0 -0
- /package/dist/cli/{chunk-e7vvk5ya.js.map → chunk-sds923fa.js.map} +0 -0
- /package/dist/cli/{chunk-yj17vs39.js.map → chunk-tdqhyxfz.js.map} +0 -0
- /package/dist/cli/{chunk-q3wxxq39.js.map → chunk-tphac74f.js.map} +0 -0
- /package/dist/cli/{chunk-6bm0xpgd.js.map → chunk-w1r4vase.js.map} +0 -0
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
API_SEARCH_PATH,
|
|
15
15
|
apiNamePhrase,
|
|
16
16
|
resolveReferences,
|
|
17
|
-
referenceRoutes,
|
|
18
17
|
hasScalarReferences,
|
|
19
18
|
builtinProxyReferences,
|
|
20
19
|
apiPagesUseBuiltinProxy,
|
|
@@ -23,10 +22,13 @@ import {
|
|
|
23
22
|
buildMcpServerCard,
|
|
24
23
|
hasAiCatalog,
|
|
25
24
|
buildHomeLinkHeader,
|
|
25
|
+
resolveLocalizable,
|
|
26
26
|
resolveDocsCollection,
|
|
27
|
+
withChangelogIndexText,
|
|
27
28
|
discoverPages,
|
|
28
29
|
routeIsTaken,
|
|
29
30
|
hasGeneratedChangelog,
|
|
31
|
+
navTargetRoutes,
|
|
30
32
|
customOgRoutes,
|
|
31
33
|
resolveAskBackend,
|
|
32
34
|
captchaSettings,
|
|
@@ -53,7 +55,7 @@ import {
|
|
|
53
55
|
isOpenApiSource,
|
|
54
56
|
buildRawMarkdown,
|
|
55
57
|
markdownRoutePaths
|
|
56
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-ehweg4fr.js";
|
|
57
59
|
import {
|
|
58
60
|
trimChar,
|
|
59
61
|
normalizeBasePath,
|
|
@@ -63,15 +65,14 @@ import {
|
|
|
63
65
|
absoluteUrl2
|
|
64
66
|
} from "./chunk-zccbjcj0.js";
|
|
65
67
|
import {
|
|
66
|
-
resolveLocalizable,
|
|
67
68
|
validateSearchPopularIcons,
|
|
68
69
|
validateNavTargets
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-ncj7w596.js";
|
|
70
71
|
import {
|
|
71
72
|
EXPANDABLE_VISIBLE_LINES,
|
|
72
73
|
buildSearchDocuments,
|
|
73
74
|
buildMcpData
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-n0v7m8ry.js";
|
|
75
76
|
import {
|
|
76
77
|
planComponentSlots,
|
|
77
78
|
publishRuntimeModules,
|
|
@@ -112,11 +113,21 @@ import {
|
|
|
112
113
|
examplesPageTemplate,
|
|
113
114
|
runtimePackageTemplate,
|
|
114
115
|
runtimeTsconfigTemplate
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-gb420vvz.js";
|
|
117
|
+
import {
|
|
118
|
+
validateUsedComponents,
|
|
119
|
+
missingExampleDiagnostics,
|
|
120
|
+
discoverIslands,
|
|
121
|
+
EXAMPLE_SCAN_GLOB,
|
|
122
|
+
exampleScanRoots,
|
|
123
|
+
discoverExamples,
|
|
124
|
+
exampleMarkdownLookup,
|
|
125
|
+
missingDependencyDiagnostic
|
|
126
|
+
} from "./chunk-66w9j7p6.js";
|
|
116
127
|
import {
|
|
117
128
|
emptyComponentOverrides,
|
|
118
129
|
analyzeComponentOverrides
|
|
119
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-54ztw1nj.js";
|
|
120
131
|
import {
|
|
121
132
|
writeTextAtomic
|
|
122
133
|
} from "./chunk-jq5n4avg.js";
|
|
@@ -127,12 +138,7 @@ import {
|
|
|
127
138
|
} from "./chunk-cm89scdv.js";
|
|
128
139
|
import {
|
|
129
140
|
registry
|
|
130
|
-
} from "./chunk-
|
|
131
|
-
import {
|
|
132
|
-
readClientMode,
|
|
133
|
-
discoverIslands,
|
|
134
|
-
missingDependencyDiagnostic
|
|
135
|
-
} from "./chunk-amrb6hgh.js";
|
|
141
|
+
} from "./chunk-c1y538kd.js";
|
|
136
142
|
|
|
137
143
|
// src/astro/integration.ts
|
|
138
144
|
import { join as join4, relative, resolve as resolve2 } from "pathe";
|
|
@@ -236,6 +242,10 @@ var DENSE_SCRIPT_LANGS = new Set(["ja", "ko", "zh"]);
|
|
|
236
242
|
import { close, createIndex } from "pagefind";
|
|
237
243
|
import { dirname as dirname2, join as join2 } from "pathe";
|
|
238
244
|
|
|
245
|
+
// src/search/sync/algolia.ts
|
|
246
|
+
var jsonBytes = (value) => Buffer.byteLength(JSON.stringify(value), "utf-8");
|
|
247
|
+
var WIDEST_CHARACTER = jsonBytes("\x00");
|
|
248
|
+
|
|
239
249
|
// src/deploy/sitemap.ts
|
|
240
250
|
import { escape as escapeXml } from "html-escaper";
|
|
241
251
|
var ERROR_ROUTES = new Set(["/404", "/500"]);
|
|
@@ -363,7 +373,7 @@ import { existsSync as existsSync6, readFileSync as readFileSync3, realpathSync
|
|
|
363
373
|
import {
|
|
364
374
|
lstat,
|
|
365
375
|
mkdir as mkdir2,
|
|
366
|
-
readFile as
|
|
376
|
+
readFile as readFile3,
|
|
367
377
|
readlink,
|
|
368
378
|
realpath,
|
|
369
379
|
rm as rm2,
|
|
@@ -371,9 +381,9 @@ import {
|
|
|
371
381
|
} from "node:fs/promises";
|
|
372
382
|
import { createRequire as createRequire2 } from "node:module";
|
|
373
383
|
import { pathToFileURL } from "node:url";
|
|
374
|
-
import
|
|
375
|
-
import { dirname as dirname8, isAbsolute as
|
|
376
|
-
import { glob
|
|
384
|
+
import pMap from "p-map";
|
|
385
|
+
import { dirname as dirname8, isAbsolute as isAbsolute5, join as join11, normalize as normalize2, relative as relative5, resolve as resolve6 } from "pathe";
|
|
386
|
+
import { glob } from "tinyglobby";
|
|
377
387
|
|
|
378
388
|
// src/ai/api/problem.ts
|
|
379
389
|
var PROBLEM_TYPE = "application/problem+json";
|
|
@@ -949,75 +959,6 @@ var navVariants = (data, hiddenDefault = null) => [
|
|
|
949
959
|
})))
|
|
950
960
|
];
|
|
951
961
|
|
|
952
|
-
// src/core/builtin-tags.ts
|
|
953
|
-
var BUILTIN_MDX_TAGS = new Set([
|
|
954
|
-
"Accordion",
|
|
955
|
-
"AccordionItem",
|
|
956
|
-
"ApiOverview",
|
|
957
|
-
"ApiTagOperations",
|
|
958
|
-
"AutoTypeTable",
|
|
959
|
-
"Badge",
|
|
960
|
-
"Callout",
|
|
961
|
-
"Card",
|
|
962
|
-
"CardGroup",
|
|
963
|
-
"CodeBlock",
|
|
964
|
-
"CodeGroup",
|
|
965
|
-
"Color",
|
|
966
|
-
"Column",
|
|
967
|
-
"Columns",
|
|
968
|
-
"Component",
|
|
969
|
-
"Diff",
|
|
970
|
-
"Expandable",
|
|
971
|
-
"FileTree",
|
|
972
|
-
"Frame",
|
|
973
|
-
"GithubInfo",
|
|
974
|
-
"Icon",
|
|
975
|
-
"Math",
|
|
976
|
-
"Operation",
|
|
977
|
-
"Panel",
|
|
978
|
-
"ParamField",
|
|
979
|
-
"Prompt",
|
|
980
|
-
"RequestExample",
|
|
981
|
-
"ResponseExample",
|
|
982
|
-
"ResponseField",
|
|
983
|
-
"Step",
|
|
984
|
-
"Steps",
|
|
985
|
-
"Tab",
|
|
986
|
-
"Tabs",
|
|
987
|
-
"Tile",
|
|
988
|
-
"Tooltip",
|
|
989
|
-
"Tree",
|
|
990
|
-
"TypeTable",
|
|
991
|
-
"View",
|
|
992
|
-
"Visibility",
|
|
993
|
-
"YouTube"
|
|
994
|
-
]);
|
|
995
|
-
|
|
996
|
-
// src/core/component-diagnostics.ts
|
|
997
|
-
var toKebab = (tag) => tag.replaceAll(/(?<lower>[a-z0-9])(?<upper>[A-Z])/gu, "$<lower>-$<upper>").toLowerCase();
|
|
998
|
-
var validateUsedComponents = (pages, extraTags, registryNames) => {
|
|
999
|
-
const diagnostics = [];
|
|
1000
|
-
const seen = new Set;
|
|
1001
|
-
for (const page of pages) {
|
|
1002
|
-
for (const tag of page.componentsUsed ?? []) {
|
|
1003
|
-
if (BUILTIN_MDX_TAGS.has(tag) || extraTags.has(tag) || seen.has(tag)) {
|
|
1004
|
-
continue;
|
|
1005
|
-
}
|
|
1006
|
-
seen.add(tag);
|
|
1007
|
-
const name = toKebab(tag);
|
|
1008
|
-
const suggestion = registryNames.has(name) ? `Run \`blume add ${name}\` to install it, or register <${tag}> in components.ts (mdx).` : `Register <${tag}> in components.ts (mdx), or add an islands/${tag}.tsx component.`;
|
|
1009
|
-
diagnostics.push({
|
|
1010
|
-
code: "BLUME_UNKNOWN_COMPONENT",
|
|
1011
|
-
file: page.sourcePath ?? page.id,
|
|
1012
|
-
message: `<${tag}> is used in ${page.route} but isn't a known component.`,
|
|
1013
|
-
severity: "warning",
|
|
1014
|
-
suggestion
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
return diagnostics;
|
|
1019
|
-
};
|
|
1020
|
-
|
|
1021
962
|
// src/core/svg-dimensions.ts
|
|
1022
963
|
var ROOT = /<svg\s(?:[^>"']|"[^"]*"|'[^']*')*>/u;
|
|
1023
964
|
var WIDTH = /\swidth=(?<quote>['"])(?<value>[^%]+?)\k<quote>/u;
|
|
@@ -1580,6 +1521,15 @@ var resolveSearchPopular = (popular, basePath) => popular.map(({ href, icon, lab
|
|
|
1580
1521
|
return page;
|
|
1581
1522
|
});
|
|
1582
1523
|
|
|
1524
|
+
// src/search/source-pages.ts
|
|
1525
|
+
import { relative as relative2 } from "pathe";
|
|
1526
|
+
var sourcePages = (project) => project.manifest.routes.flatMap((route) => route.indexable && route.sourcePath ? [
|
|
1527
|
+
[
|
|
1528
|
+
relative2(project.context.root, route.sourcePath),
|
|
1529
|
+
{ title: route.title, url: route.path }
|
|
1530
|
+
]
|
|
1531
|
+
] : []);
|
|
1532
|
+
|
|
1583
1533
|
// src/theme/code-block-padding.ts
|
|
1584
1534
|
var CODE_PADDING_BLOCK_REM = 1;
|
|
1585
1535
|
|
|
@@ -2474,8 +2424,11 @@ pre:has(.line.focused):hover .line:not(.focused) {
|
|
|
2474
2424
|
Strip the surrounding chrome so the printout is just the article. Scoped to
|
|
2475
2425
|
the chrome itself, never bare \`header\`/\`aside\`: content renders those too
|
|
2476
2426
|
(every Callout and Panel is an <aside>, every changelog Update has a
|
|
2477
|
-
<header>), and they belong in the printout. \`body > header\`
|
|
2478
|
-
\`layout.Header\`
|
|
2427
|
+
<header>), and they belong in the printout. \`body > header\` and
|
|
2428
|
+
\`body > footer\` keep \`layout.Header\` and \`layout.Footer\` overrides out
|
|
2429
|
+
as well. Everything after the article (directory and related-page cards,
|
|
2430
|
+
last updated, feedback, prev/next) is page chrome too, and so are the
|
|
2431
|
+
copy, ask, and expand buttons on code blocks. */
|
|
2479
2432
|
@media print {
|
|
2480
2433
|
[data-blume-banner],
|
|
2481
2434
|
[data-blume-header],
|
|
@@ -2485,7 +2438,13 @@ pre:has(.line.focused):hover .line:not(.focused) {
|
|
|
2485
2438
|
[data-blume-assistant-panel],
|
|
2486
2439
|
[data-blume-page-actions],
|
|
2487
2440
|
#blume-content > nav,
|
|
2488
|
-
#blume-content > details
|
|
2441
|
+
#blume-content > details,
|
|
2442
|
+
[data-blume-page-end],
|
|
2443
|
+
[data-blume-footer],
|
|
2444
|
+
body > footer,
|
|
2445
|
+
[data-blume-copy],
|
|
2446
|
+
[data-blume-ask],
|
|
2447
|
+
[data-blume-code-expand] {
|
|
2489
2448
|
display: none !important;
|
|
2490
2449
|
}
|
|
2491
2450
|
|
|
@@ -2496,6 +2455,23 @@ pre:has(.line.focused):hover .line:not(.focused) {
|
|
|
2496
2455
|
overflow: visible;
|
|
2497
2456
|
}
|
|
2498
2457
|
|
|
2458
|
+
/* A collapsed \`expandable\` block prints open: its toggle is hidden above,
|
|
2459
|
+
so the collapse would cut the block off at its first lines. Same
|
|
2460
|
+
selector as the collapse, so this later rule wins. */
|
|
2461
|
+
.prose pre[data-expandable]:not([data-expanded]) > code {
|
|
2462
|
+
mask-image: none;
|
|
2463
|
+
max-height: none;
|
|
2464
|
+
overflow-y: visible;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/* The theme script switches a dark page to light for printing
|
|
2468
|
+
(\`beforeprint\`); a color transition would print mid-fade. */
|
|
2469
|
+
*,
|
|
2470
|
+
*::before,
|
|
2471
|
+
*::after {
|
|
2472
|
+
transition: none !important;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2499
2475
|
#blume-content {
|
|
2500
2476
|
padding: 0 !important;
|
|
2501
2477
|
}
|
|
@@ -2557,7 +2533,7 @@ ${options.userCss}
|
|
|
2557
2533
|
`;
|
|
2558
2534
|
|
|
2559
2535
|
// src/theme/sources.ts
|
|
2560
|
-
import { dirname as dirname6, isAbsolute as isAbsolute3, relative as
|
|
2536
|
+
import { dirname as dirname6, isAbsolute as isAbsolute3, relative as relative3, resolve as resolve4 } from "pathe";
|
|
2561
2537
|
var SOURCE_DIRECTIVE = /@source(?<not>\s+not)?\s+(?<quote>["'])(?<path>[^"']+)\k<quote>/gu;
|
|
2562
2538
|
var rebaseSourceDirectives = (css, options) => {
|
|
2563
2539
|
const base = dirname6(options.from);
|
|
@@ -2565,7 +2541,7 @@ var rebaseSourceDirectives = (css, options) => {
|
|
|
2565
2541
|
if (isAbsolute3(path)) {
|
|
2566
2542
|
return directive;
|
|
2567
2543
|
}
|
|
2568
|
-
const rebased =
|
|
2544
|
+
const rebased = relative3(options.to, resolve4(base, path));
|
|
2569
2545
|
return `@source${not ?? ""} ${quote}${rebased}${quote}`;
|
|
2570
2546
|
});
|
|
2571
2547
|
};
|
|
@@ -2652,104 +2628,27 @@ var twoslashCss = () => {
|
|
|
2652
2628
|
${OVERRIDES}`;
|
|
2653
2629
|
};
|
|
2654
2630
|
|
|
2655
|
-
// src/astro/examples.ts
|
|
2656
|
-
import { readFile as readFile3 } from "node:fs/promises";
|
|
2657
|
-
import pMap from "p-map";
|
|
2658
|
-
import { isAbsolute as isAbsolute4, join as join10, relative as relative3 } from "pathe";
|
|
2659
|
-
import { glob } from "tinyglobby";
|
|
2660
|
-
var FRAMEWORK_BY_EXT = {
|
|
2661
|
-
astro: "astro",
|
|
2662
|
-
jsx: "react",
|
|
2663
|
-
svelte: "svelte",
|
|
2664
|
-
tsx: "react",
|
|
2665
|
-
vue: "vue"
|
|
2666
|
-
};
|
|
2667
|
-
var EXAMPLE_FILE = /\.(?<ext>astro|jsx|svelte|tsx|vue)$/u;
|
|
2668
|
-
var DEFAULT_EXAMPLE_GLOB = "**/*.{astro,jsx,svelte,tsx,vue}";
|
|
2669
|
-
var READ_CONCURRENCY = 16;
|
|
2670
|
-
var EXAMPLE_SCAN_GLOB = "**/*.{astro,jsx,svelte,ts,tsx,vue}";
|
|
2671
|
-
var exampleScanRoots = (root, examplesDir) => {
|
|
2672
|
-
const path = relative3(root, examplesDir);
|
|
2673
|
-
const outside = path.startsWith("..") || isAbsolute4(path);
|
|
2674
|
-
return outside ? [root, examplesDir] : [root];
|
|
2675
|
-
};
|
|
2676
|
-
var GLOB_MAGIC = /[!*?[\]{}]/u;
|
|
2677
|
-
var splitGlobBase = (pattern) => {
|
|
2678
|
-
const segments = pattern.split("/");
|
|
2679
|
-
const firstMagic = segments.findIndex((segment) => GLOB_MAGIC.test(segment));
|
|
2680
|
-
return {
|
|
2681
|
-
base: segments.slice(0, firstMagic).join("/"),
|
|
2682
|
-
rest: segments.slice(firstMagic).join("/")
|
|
2683
|
-
};
|
|
2684
|
-
};
|
|
2685
|
-
var discoverExamples = async (root, pattern = "examples") => {
|
|
2686
|
-
const { base, rest } = GLOB_MAGIC.test(pattern) ? splitGlobBase(pattern) : { base: pattern, rest: DEFAULT_EXAMPLE_GLOB };
|
|
2687
|
-
const dir = join10(root, base);
|
|
2688
|
-
const matches = await glob([rest], {
|
|
2689
|
-
absolute: true,
|
|
2690
|
-
cwd: dir,
|
|
2691
|
-
onlyFiles: true
|
|
2692
|
-
});
|
|
2693
|
-
const files = matches.toSorted();
|
|
2694
|
-
const sources = await pMap(files, (file) => readFile3(file, "utf-8"), {
|
|
2695
|
-
concurrency: READ_CONCURRENCY
|
|
2696
|
-
});
|
|
2697
|
-
const examples = [];
|
|
2698
|
-
const warnings = [];
|
|
2699
|
-
const seen = new Map;
|
|
2700
|
-
const collectExample = (file, source) => {
|
|
2701
|
-
const ext = file.match(EXAMPLE_FILE)?.groups?.ext;
|
|
2702
|
-
const framework = ext ? FRAMEWORK_BY_EXT[ext] : undefined;
|
|
2703
|
-
if (!(ext && framework)) {
|
|
2704
|
-
return;
|
|
2705
|
-
}
|
|
2706
|
-
const path = relative3(dir, file).slice(0, -(ext.length + 1));
|
|
2707
|
-
const existing = seen.get(path);
|
|
2708
|
-
if (existing) {
|
|
2709
|
-
warnings.push(`Two examples both resolve to "${path}" ("${existing}" and "${file}"); ignoring the second. Give them distinct paths.`);
|
|
2710
|
-
return;
|
|
2711
|
-
}
|
|
2712
|
-
seen.set(path, file);
|
|
2713
|
-
examples.push({
|
|
2714
|
-
client: framework === "astro" ? undefined : readClientMode(source, file, warnings),
|
|
2715
|
-
file,
|
|
2716
|
-
framework,
|
|
2717
|
-
lang: ext,
|
|
2718
|
-
path,
|
|
2719
|
-
source
|
|
2720
|
-
});
|
|
2721
|
-
};
|
|
2722
|
-
for (const [index, file] of files.entries()) {
|
|
2723
|
-
collectExample(file, sources[index] ?? "");
|
|
2724
|
-
}
|
|
2725
|
-
return { dir, examples, warnings };
|
|
2726
|
-
};
|
|
2727
|
-
var exampleMarkdownLookup = (examples) => Object.fromEntries(examples.map((example) => [
|
|
2728
|
-
example.path,
|
|
2729
|
-
{ lang: example.lang, source: example.source }
|
|
2730
|
-
]));
|
|
2731
|
-
|
|
2732
2631
|
// src/astro/render-deps.ts
|
|
2733
2632
|
import { existsSync as existsSync5, realpathSync } from "node:fs";
|
|
2734
2633
|
import {
|
|
2735
2634
|
basename,
|
|
2736
2635
|
dirname as dirname7,
|
|
2737
|
-
isAbsolute as
|
|
2738
|
-
join as
|
|
2636
|
+
isAbsolute as isAbsolute4,
|
|
2637
|
+
join as join10,
|
|
2739
2638
|
normalize,
|
|
2740
2639
|
relative as relative4,
|
|
2741
2640
|
resolve as resolve5
|
|
2742
2641
|
} from "pathe";
|
|
2743
2642
|
var depsCandidates = (pkgDir) => [
|
|
2744
|
-
|
|
2643
|
+
join10(pkgDir, "node_modules"),
|
|
2745
2644
|
dirname7(pkgDir)
|
|
2746
2645
|
];
|
|
2747
|
-
var candidateHolding = (pkgDir, ...segments) => depsCandidates(pkgDir).find((dir) => existsSync5(
|
|
2646
|
+
var candidateHolding = (pkgDir, ...segments) => depsCandidates(pkgDir).find((dir) => existsSync5(join10(dir, ...segments))) ?? null;
|
|
2748
2647
|
var packageDirFrom = (name, fromDir) => {
|
|
2749
2648
|
let dir = normalize(fromDir);
|
|
2750
2649
|
while (true) {
|
|
2751
|
-
const candidate =
|
|
2752
|
-
if (existsSync5(
|
|
2650
|
+
const candidate = join10(dir, "node_modules", name);
|
|
2651
|
+
if (existsSync5(join10(candidate, "package.json"))) {
|
|
2753
2652
|
return normalize(realpathSync(candidate));
|
|
2754
2653
|
}
|
|
2755
2654
|
const parent = dirname7(dir);
|
|
@@ -2761,23 +2660,26 @@ var packageDirFrom = (name, fromDir) => {
|
|
|
2761
2660
|
};
|
|
2762
2661
|
|
|
2763
2662
|
// src/astro/generate.ts
|
|
2764
|
-
var BLUME_SRC =
|
|
2663
|
+
var BLUME_SRC = join11(packageRoot(), "src");
|
|
2765
2664
|
var resolveReactCompiler = (config, needsReact, pkgDir = packageRoot()) => {
|
|
2766
2665
|
if (!(needsReact && config.react.compiler)) {
|
|
2767
|
-
return
|
|
2666
|
+
return false;
|
|
2768
2667
|
}
|
|
2769
2668
|
try {
|
|
2770
|
-
|
|
2669
|
+
const astroReact = createRequire2(pathToFileURL(join11(pkgDir, "_.js")).href).resolve("@astrojs/react");
|
|
2670
|
+
const pluginReact = createRequire2(astroReact).resolve("@vitejs/plugin-react");
|
|
2671
|
+
createRequire2(pluginReact).resolve("oxc-transform-react");
|
|
2672
|
+
return true;
|
|
2771
2673
|
} catch {
|
|
2772
|
-
return
|
|
2674
|
+
return false;
|
|
2773
2675
|
}
|
|
2774
2676
|
};
|
|
2775
|
-
var reactCompilerWarnings = (config, needsReact,
|
|
2776
|
-
"React Compiler is enabled but `
|
|
2677
|
+
var reactCompilerWarnings = (config, needsReact, compiler) => needsReact && config.react.compiler && !compiler ? [
|
|
2678
|
+
"React Compiler is enabled but `oxc-transform-react` could not be resolved; falling back to an uncompiled build. Reinstall Blume, or set `react: { compiler: false }` to silence this."
|
|
2777
2679
|
] : [];
|
|
2778
2680
|
var resolveAstroPackageJson = (modulesDir) => {
|
|
2779
2681
|
try {
|
|
2780
|
-
return realpathSync2(
|
|
2682
|
+
return realpathSync2(join11(modulesDir, "astro", "package.json"));
|
|
2781
2683
|
} catch {
|
|
2782
2684
|
return null;
|
|
2783
2685
|
}
|
|
@@ -2785,7 +2687,7 @@ var resolveAstroPackageJson = (modulesDir) => {
|
|
|
2785
2687
|
var resolvedAstroHit = (fromDir) => {
|
|
2786
2688
|
let dir = normalize2(fromDir);
|
|
2787
2689
|
while (true) {
|
|
2788
|
-
const modulesDir =
|
|
2690
|
+
const modulesDir = join11(dir, "node_modules");
|
|
2789
2691
|
const pkg = resolveAstroPackageJson(modulesDir);
|
|
2790
2692
|
if (pkg) {
|
|
2791
2693
|
return { modulesDir, pkg };
|
|
@@ -2862,7 +2764,7 @@ var dropStaleDepsLink = async (link, pkgDir) => {
|
|
|
2862
2764
|
let linkedBlume;
|
|
2863
2765
|
let runningBlume;
|
|
2864
2766
|
try {
|
|
2865
|
-
linkedBlume = await realpath(
|
|
2767
|
+
linkedBlume = await realpath(join11(link, "blume"));
|
|
2866
2768
|
runningBlume = await realpath(pkgDir);
|
|
2867
2769
|
} catch {
|
|
2868
2770
|
return;
|
|
@@ -2878,7 +2780,7 @@ var ensureDepsLink = async (outDir, pkgDir = packageRoot()) => {
|
|
|
2878
2780
|
}
|
|
2879
2781
|
const mdxDir = candidateHolding(pkgDir, "@astrojs", "mdx");
|
|
2880
2782
|
const blumeAstro = resolveAstroPackageJson(astroDir);
|
|
2881
|
-
await dropStaleDepsLink(
|
|
2783
|
+
await dropStaleDepsLink(join11(outDir, "node_modules"), pkgDir);
|
|
2882
2784
|
const outDirHit = resolvedAstroHit(outDir);
|
|
2883
2785
|
const astroCorrect = blumeAstro !== null && outDirHit?.pkg === blumeAstro;
|
|
2884
2786
|
const walkLandsInDeps = astroCorrect && outDirHit !== null && sameRealDir(outDirHit.modulesDir, astroDir);
|
|
@@ -2886,16 +2788,16 @@ var ensureDepsLink = async (outDir, pkgDir = packageRoot()) => {
|
|
|
2886
2788
|
return null;
|
|
2887
2789
|
}
|
|
2888
2790
|
if (mdxDir && (mdxDir === astroDir || astroCorrect)) {
|
|
2889
|
-
await linkDepsJunction(
|
|
2791
|
+
await linkDepsJunction(join11(outDir, "node_modules"), mdxDir);
|
|
2890
2792
|
return null;
|
|
2891
2793
|
}
|
|
2892
2794
|
return astroConflictWarning(blumeAstro, outDirHit?.pkg ?? null);
|
|
2893
2795
|
};
|
|
2894
|
-
var examplesCssFile = (root, config) => config.examples.css ?
|
|
2796
|
+
var examplesCssFile = (root, config) => config.examples.css ? join11(root, config.examples.css) : null;
|
|
2895
2797
|
var writeExamplesPreview = async (options) => {
|
|
2896
2798
|
const { config, hasExamples, root, srcDir, write } = options;
|
|
2897
2799
|
if (hasExamples) {
|
|
2898
|
-
await write(
|
|
2800
|
+
await write(join11(srcDir, "pages", ...config.basePath.split("/").filter(Boolean), "blume-examples", "[...path].astro"), examplesPageTemplate());
|
|
2899
2801
|
}
|
|
2900
2802
|
const cssFile = examplesCssFile(root, config);
|
|
2901
2803
|
return cssFile && !existsSync6(cssFile) ? [
|
|
@@ -2907,7 +2809,7 @@ var readOptional = async (path) => {
|
|
|
2907
2809
|
return "";
|
|
2908
2810
|
}
|
|
2909
2811
|
try {
|
|
2910
|
-
return await
|
|
2812
|
+
return await readFile3(path, "utf-8");
|
|
2911
2813
|
} catch {
|
|
2912
2814
|
return "";
|
|
2913
2815
|
}
|
|
@@ -2917,7 +2819,7 @@ var readUserCss = async (file, outputDir) => {
|
|
|
2917
2819
|
return file ? rebaseSourceDirectives(css, { from: file, to: outputDir }) : css;
|
|
2918
2820
|
};
|
|
2919
2821
|
var detectNeedsReact = async (root) => {
|
|
2920
|
-
const matches = await
|
|
2822
|
+
const matches = await glob(["**/*.{tsx,jsx}"], {
|
|
2921
2823
|
cwd: root,
|
|
2922
2824
|
ignore: ["**/node_modules/**", "**/.blume/**", "**/dist/**"],
|
|
2923
2825
|
onlyFiles: true
|
|
@@ -2925,15 +2827,15 @@ var detectNeedsReact = async (root) => {
|
|
|
2925
2827
|
return matches.length > 0;
|
|
2926
2828
|
};
|
|
2927
2829
|
var containsMath = (content) => content.includes("$$") || content.includes("<Math");
|
|
2928
|
-
var
|
|
2830
|
+
var READ_CONCURRENCY = 16;
|
|
2929
2831
|
var detectUsesMath = async (root, staged = []) => {
|
|
2930
|
-
const files = await
|
|
2832
|
+
const files = await glob(["**/*.{md,mdx}"], {
|
|
2931
2833
|
cwd: root,
|
|
2932
2834
|
ignore: ["**/node_modules/**", "**/.blume/**", "**/dist/**"],
|
|
2933
2835
|
onlyFiles: true
|
|
2934
2836
|
});
|
|
2935
|
-
const contents = await
|
|
2936
|
-
concurrency:
|
|
2837
|
+
const contents = await pMap(files, (file) => readOptional(join11(root, file)), {
|
|
2838
|
+
concurrency: READ_CONCURRENCY
|
|
2937
2839
|
});
|
|
2938
2840
|
return [...contents, ...staged].some(containsMath);
|
|
2939
2841
|
};
|
|
@@ -2950,7 +2852,7 @@ var loadIntegrationBridge = async (config, context) => {
|
|
|
2950
2852
|
var writeIfChanged = async (path, content) => {
|
|
2951
2853
|
let existing = null;
|
|
2952
2854
|
try {
|
|
2953
|
-
existing = await
|
|
2855
|
+
existing = await readFile3(path, "utf-8");
|
|
2954
2856
|
} catch {
|
|
2955
2857
|
existing = null;
|
|
2956
2858
|
}
|
|
@@ -2961,7 +2863,7 @@ var writeIfChanged = async (path, content) => {
|
|
|
2961
2863
|
return true;
|
|
2962
2864
|
};
|
|
2963
2865
|
var pruneOrphans = async (srcDir, written) => {
|
|
2964
|
-
const existing = await
|
|
2866
|
+
const existing = await glob("**/*", {
|
|
2965
2867
|
absolute: true,
|
|
2966
2868
|
cwd: srcDir,
|
|
2967
2869
|
onlyFiles: true
|
|
@@ -2994,7 +2896,7 @@ var writeStagedContent = async (out, staged) => {
|
|
|
2994
2896
|
const contentDir = stagedContentDir(out);
|
|
2995
2897
|
const written = new Set;
|
|
2996
2898
|
await Promise.all([...staged].map(async ([entryId, text]) => {
|
|
2997
|
-
const path =
|
|
2899
|
+
const path = join11(contentDir, entryId);
|
|
2998
2900
|
written.add(normalize2(path));
|
|
2999
2901
|
await writeIfChanged(path, text);
|
|
3000
2902
|
}));
|
|
@@ -3009,8 +2911,8 @@ var readLogoSvg = (project, source) => {
|
|
|
3009
2911
|
}
|
|
3010
2912
|
const rel = source.replace(/^\//u, "");
|
|
3011
2913
|
const file = [
|
|
3012
|
-
|
|
3013
|
-
|
|
2914
|
+
join11(project.context.root, "public", rel),
|
|
2915
|
+
join11(project.context.root, rel)
|
|
3014
2916
|
].find((path) => existsSync6(path));
|
|
3015
2917
|
return file ? readFileSync3(file, "utf-8") : undefined;
|
|
3016
2918
|
};
|
|
@@ -3066,10 +2968,10 @@ var faviconType = (name) => {
|
|
|
3066
2968
|
var inlineDataUri = (file, type) => `data:${type};base64,${readFileSync3(file).toString("base64")}`;
|
|
3067
2969
|
var defaultFavicon = () => ({
|
|
3068
2970
|
dark: {
|
|
3069
|
-
href: inlineDataUri(
|
|
2971
|
+
href: inlineDataUri(join11(BLUME_SRC, "assets", "icon-dark.png"), "image/png"),
|
|
3070
2972
|
type: "image/png"
|
|
3071
2973
|
},
|
|
3072
|
-
href: inlineDataUri(
|
|
2974
|
+
href: inlineDataUri(join11(BLUME_SRC, "assets", "icon.png"), "image/png"),
|
|
3073
2975
|
type: "image/png"
|
|
3074
2976
|
});
|
|
3075
2977
|
var APPLE_ICON_CANDIDATES = [
|
|
@@ -3081,12 +2983,12 @@ var APPLE_ICON_CANDIDATES = [
|
|
|
3081
2983
|
var resolveIconFile = (project, candidates) => {
|
|
3082
2984
|
const { root } = project.context;
|
|
3083
2985
|
for (const name of candidates) {
|
|
3084
|
-
if (existsSync6(
|
|
2986
|
+
if (existsSync6(join11(root, "public", name))) {
|
|
3085
2987
|
return { href: `/${name}`, type: faviconType(name) };
|
|
3086
2988
|
}
|
|
3087
2989
|
}
|
|
3088
2990
|
for (const name of candidates) {
|
|
3089
|
-
const file =
|
|
2991
|
+
const file = join11(root, name);
|
|
3090
2992
|
if (existsSync6(file)) {
|
|
3091
2993
|
const type = faviconType(name);
|
|
3092
2994
|
return { href: inlineDataUri(file, type ?? "image/x-icon"), type };
|
|
@@ -3097,18 +2999,18 @@ var resolveIconFile = (project, candidates) => {
|
|
|
3097
2999
|
var resolveFavicon = (project) => {
|
|
3098
3000
|
const { root } = project.context;
|
|
3099
3001
|
for (const name of FAVICON_CANDIDATES) {
|
|
3100
|
-
if (existsSync6(
|
|
3002
|
+
if (existsSync6(join11(root, "public", name))) {
|
|
3101
3003
|
const type = faviconType(name);
|
|
3102
3004
|
const sibling = darkSibling(name);
|
|
3103
|
-
return existsSync6(
|
|
3005
|
+
return existsSync6(join11(root, "public", sibling)) ? { dark: { href: `/${sibling}`, type }, href: `/${name}`, type } : { href: `/${name}`, type };
|
|
3104
3006
|
}
|
|
3105
3007
|
}
|
|
3106
3008
|
for (const name of FAVICON_CANDIDATES) {
|
|
3107
|
-
const file =
|
|
3009
|
+
const file = join11(root, name);
|
|
3108
3010
|
if (existsSync6(file)) {
|
|
3109
3011
|
const type = faviconType(name);
|
|
3110
3012
|
const mime = type ?? "image/x-icon";
|
|
3111
|
-
const siblingFile =
|
|
3013
|
+
const siblingFile = join11(root, darkSibling(name));
|
|
3112
3014
|
return existsSync6(siblingFile) ? {
|
|
3113
3015
|
dark: { href: inlineDataUri(siblingFile, mime), type },
|
|
3114
3016
|
href: inlineDataUri(file, mime),
|
|
@@ -3213,8 +3115,8 @@ var buildRuntimeData = (project) => {
|
|
|
3213
3115
|
}
|
|
3214
3116
|
const rel = relative5(context.root, sourcePath).split("\\").join("/");
|
|
3215
3117
|
const editDir = trimChar(github?.dir ?? "", "/");
|
|
3216
|
-
const editPath = normalize2(editDir ?
|
|
3217
|
-
if (editPath.startsWith("..") ||
|
|
3118
|
+
const editPath = normalize2(editDir ? join11(editDir, rel) : rel);
|
|
3119
|
+
if (editPath.startsWith("..") || isAbsolute5(editPath)) {
|
|
3218
3120
|
return null;
|
|
3219
3121
|
}
|
|
3220
3122
|
return `${editBase}/${editPath}`;
|
|
@@ -3227,15 +3129,15 @@ var buildRuntimeData = (project) => {
|
|
|
3227
3129
|
});
|
|
3228
3130
|
const uiByLocale = i18n ? Object.fromEntries(i18n.locales.map(({ code }) => [
|
|
3229
3131
|
code,
|
|
3230
|
-
resolveUIStrings(code, {
|
|
3132
|
+
withChangelogIndexText(config, resolveUIStrings(code, {
|
|
3231
3133
|
defaultLocale: i18n.defaultLocale,
|
|
3232
3134
|
overrides: i18n.ui
|
|
3233
|
-
})
|
|
3135
|
+
}), code)
|
|
3234
3136
|
])) : {};
|
|
3235
|
-
const defaultUi = i18n ? resolveUIStrings(i18n.defaultLocale, {
|
|
3137
|
+
const defaultUi = withChangelogIndexText(config, i18n ? resolveUIStrings(i18n.defaultLocale, {
|
|
3236
3138
|
defaultLocale: i18n.defaultLocale,
|
|
3237
3139
|
overrides: i18n.ui
|
|
3238
|
-
}) : EN_UI;
|
|
3140
|
+
}) : EN_UI, i18n?.defaultLocale);
|
|
3239
3141
|
const navigationByLocale = i18n ? Object.fromEntries(i18n.locales.map(({ code }) => [
|
|
3240
3142
|
code,
|
|
3241
3143
|
withRepoUrl(graph.navigationByLocale[code] ?? {
|
|
@@ -3305,6 +3207,7 @@ var buildRuntimeData = (project) => {
|
|
|
3305
3207
|
openInChat: config.ai.openInChat,
|
|
3306
3208
|
repoUrl: repoUrl2,
|
|
3307
3209
|
search: {
|
|
3210
|
+
analytics: config.search.analytics,
|
|
3308
3211
|
enabled: config.search.provider.mode !== "none",
|
|
3309
3212
|
popular: resolveSearchPopular(config.search.popular, config.basePath),
|
|
3310
3213
|
provider: config.search.provider.kind
|
|
@@ -3363,7 +3266,7 @@ var buildRuntimeData = (project) => {
|
|
|
3363
3266
|
var planMcp = (project, srcDir, userPages) => {
|
|
3364
3267
|
const { config } = project;
|
|
3365
3268
|
const { route } = config.agents.mcp;
|
|
3366
|
-
const dir =
|
|
3269
|
+
const dir = join11(srcDir, "blume-mcp");
|
|
3367
3270
|
const base = {
|
|
3368
3271
|
dir,
|
|
3369
3272
|
discoveryPages: [],
|
|
@@ -3387,11 +3290,11 @@ var planMcp = (project, srcDir, userPages) => {
|
|
|
3387
3290
|
...base,
|
|
3388
3291
|
discoveryPages: [
|
|
3389
3292
|
{
|
|
3390
|
-
entrypoint:
|
|
3293
|
+
entrypoint: join11(dir, "discovery.ts"),
|
|
3391
3294
|
pattern: "/.well-known/mcp.json"
|
|
3392
3295
|
},
|
|
3393
3296
|
{
|
|
3394
|
-
entrypoint:
|
|
3297
|
+
entrypoint: join11(dir, "server-card.ts"),
|
|
3395
3298
|
pattern: "/.well-known/mcp/server-card.json"
|
|
3396
3299
|
}
|
|
3397
3300
|
],
|
|
@@ -3418,9 +3321,9 @@ var writeMcpFiles = async (plan, write, data) => {
|
|
|
3418
3321
|
version: data.version
|
|
3419
3322
|
};
|
|
3420
3323
|
await Promise.all([
|
|
3421
|
-
write(
|
|
3422
|
-
write(
|
|
3423
|
-
write(
|
|
3324
|
+
write(join11(plan.srcDir, "pages", mcpPageFile(plan.route)), mcpEndpointTemplate()),
|
|
3325
|
+
write(join11(plan.dir, "discovery.ts"), staticJsonEndpointTemplate(buildMcpDiscovery(discoveryInput))),
|
|
3326
|
+
write(join11(plan.dir, "server-card.ts"), staticJsonEndpointTemplate(buildMcpServerCard(discoveryInput)))
|
|
3424
3327
|
]);
|
|
3425
3328
|
};
|
|
3426
3329
|
var ownsApiRest = (page) => page.pattern.startsWith("/api/[");
|
|
@@ -3432,7 +3335,7 @@ var planApi = (project, srcDir, userPages) => {
|
|
|
3432
3335
|
catchAll: server && !userPages.some(ownsApiRest) && !project.graph.pages.some(contentUnderApi),
|
|
3433
3336
|
enabled: config.agents.api,
|
|
3434
3337
|
server,
|
|
3435
|
-
spec: !routeIsTaken(userPages, project.graph.pages, OPENAPI_PATH) && !existsSync6(
|
|
3338
|
+
spec: !routeIsTaken(userPages, project.graph.pages, OPENAPI_PATH) && !existsSync6(join11(context.root, "public", "openapi.json")),
|
|
3436
3339
|
srcDir
|
|
3437
3340
|
};
|
|
3438
3341
|
};
|
|
@@ -3442,20 +3345,20 @@ var writeApiFiles = async (project, plan, write, data, mcp) => {
|
|
|
3442
3345
|
}
|
|
3443
3346
|
const { config } = project;
|
|
3444
3347
|
const mcpRoute = mcp.enabled ? mcp.route : null;
|
|
3445
|
-
const apiDir =
|
|
3348
|
+
const apiDir = join11(plan.srcDir, "pages", "api");
|
|
3446
3349
|
const writes = [
|
|
3447
|
-
write(
|
|
3448
|
-
write(
|
|
3449
|
-
write(
|
|
3350
|
+
write(join11(apiDir, "docs", "pages.json.ts"), apiPagesIndexTemplate()),
|
|
3351
|
+
write(join11(apiDir, "docs", "pages", "[...route].json.ts"), apiPageTemplate()),
|
|
3352
|
+
write(join11(apiDir, "docs", "navigation.json.ts"), apiNavigationTemplate())
|
|
3450
3353
|
];
|
|
3451
3354
|
if (plan.server) {
|
|
3452
|
-
writes.push(write(
|
|
3355
|
+
writes.push(write(join11(apiDir, "docs", "search.ts"), apiSearchTemplate()));
|
|
3453
3356
|
}
|
|
3454
3357
|
if (plan.catchAll) {
|
|
3455
|
-
writes.push(write(
|
|
3358
|
+
writes.push(write(join11(apiDir, "[...path].ts"), apiNotFoundTemplate({ base: data.base, site: data.site })));
|
|
3456
3359
|
}
|
|
3457
3360
|
if (plan.spec) {
|
|
3458
|
-
writes.push(write(
|
|
3361
|
+
writes.push(write(join11(plan.srcDir, "pages", "openapi.json.ts"), staticJsonEndpointTemplate(buildApiSpec({
|
|
3459
3362
|
agentReadability: config.agents.agentReadability,
|
|
3460
3363
|
base: data.base,
|
|
3461
3364
|
description: config.description,
|
|
@@ -3469,10 +3372,10 @@ var writeApiFiles = async (project, plan, write, data, mcp) => {
|
|
|
3469
3372
|
}
|
|
3470
3373
|
await Promise.all(writes);
|
|
3471
3374
|
};
|
|
3472
|
-
var PLAYGROUND_PROXY_ENTRY =
|
|
3375
|
+
var PLAYGROUND_PROXY_ENTRY = join11("blume-openapi", "api-proxy.ts");
|
|
3473
3376
|
var planPlaygroundProxy = (config, srcDir) => ({
|
|
3474
3377
|
enabled: needsPlaygroundProxy(config),
|
|
3475
|
-
entrypoint:
|
|
3378
|
+
entrypoint: join11(srcDir, PLAYGROUND_PROXY_ENTRY),
|
|
3476
3379
|
pattern: playgroundProxyPattern(config)
|
|
3477
3380
|
});
|
|
3478
3381
|
var specOriginsOf = (spec) => {
|
|
@@ -3545,7 +3448,7 @@ var writeAskFiles = async (project, srcDir, write, modules) => {
|
|
|
3545
3448
|
if (backend.grounded) {
|
|
3546
3449
|
modules.set("blume:ask-data", JSON.stringify(await buildAskData(project)));
|
|
3547
3450
|
}
|
|
3548
|
-
await write(
|
|
3451
|
+
await write(join11(srcDir, "pages", "api", "ask.ts"), askEndpointTemplate(backend, {
|
|
3549
3452
|
captcha: assistant.captcha,
|
|
3550
3453
|
cors: assistant.cors,
|
|
3551
3454
|
instructions: assistant.instructions,
|
|
@@ -3559,9 +3462,9 @@ var writeNotFoundPage = async (write, srcDir, pages, contentPages) => {
|
|
|
3559
3462
|
return;
|
|
3560
3463
|
}
|
|
3561
3464
|
await Promise.all([
|
|
3562
|
-
write(
|
|
3563
|
-
write(
|
|
3564
|
-
write(
|
|
3465
|
+
write(join11(srcDir, "pages", "404.astro"), notFoundPageTemplate()),
|
|
3466
|
+
write(join11(srcDir, "pages", "404.md.ts"), notFoundMarkdownTemplate()),
|
|
3467
|
+
write(join11(srcDir, "pages", "404.json.ts"), notFoundJsonTemplate())
|
|
3565
3468
|
]);
|
|
3566
3469
|
};
|
|
3567
3470
|
var diagnosticWarning = (diagnostic) => diagnostic.suggestion ? `${diagnostic.message} ${diagnostic.suggestion}` : diagnostic.message;
|
|
@@ -3576,7 +3479,7 @@ var dependencyPreflight = async (project, frameworks) => {
|
|
|
3576
3479
|
}
|
|
3577
3480
|
return [diagnosticWarning(diagnostic)];
|
|
3578
3481
|
};
|
|
3579
|
-
var analyzeComponentsFile = async (componentsFile) => componentsFile ? analyzeComponentOverrides(await
|
|
3482
|
+
var analyzeComponentsFile = async (componentsFile) => componentsFile ? analyzeComponentOverrides(await readFile3(componentsFile, "utf-8"), componentsFile) : emptyComponentOverrides();
|
|
3580
3483
|
var projectOgFonts = (project) => resolveOgFonts({
|
|
3581
3484
|
locales: fontLocaleCodes(project.config.i18n),
|
|
3582
3485
|
ogFonts: project.config.seo.og.fonts,
|
|
@@ -3604,21 +3507,21 @@ var languageIconCssFrom = (project, rawMarkdown) => languageIconCss(languageIcon
|
|
|
3604
3507
|
].join(`
|
|
3605
3508
|
`)));
|
|
3606
3509
|
var languageIconCssFor = async (project) => languageIconCssFrom(project, await buildRawMarkdown(project));
|
|
3607
|
-
var writeNavFragments = (write, srcDir, navFragments) => navFragments ? write(
|
|
3510
|
+
var writeNavFragments = (write, srcDir, navFragments) => navFragments ? write(join11(srcDir, "pages", "blume-nav", "[version]", "[locale]", "[id].astro"), navFragmentTemplate()) : Promise.resolve(false);
|
|
3608
3511
|
var clientFeaturesFor = async (project) => clientFeaturesFrom(project, await buildRawMarkdown(project));
|
|
3609
3512
|
var generateRuntime = async (project) => {
|
|
3610
3513
|
const { context, config } = project;
|
|
3611
3514
|
assertFontFilesExist(project);
|
|
3612
3515
|
const out = context.outDir;
|
|
3613
|
-
const srcDir =
|
|
3614
|
-
const generatedDir =
|
|
3615
|
-
const askPath =
|
|
3616
|
-
const themePath =
|
|
3617
|
-
const searchClientPath =
|
|
3618
|
-
const consentClientPath =
|
|
3619
|
-
const featuresPath =
|
|
3620
|
-
const examplesPath =
|
|
3621
|
-
const examplesThemePath =
|
|
3516
|
+
const srcDir = join11(out, "src");
|
|
3517
|
+
const generatedDir = join11(srcDir, "generated");
|
|
3518
|
+
const askPath = join11(srcDir, "generated", "Ask.astro");
|
|
3519
|
+
const themePath = join11(srcDir, "generated", "app.css");
|
|
3520
|
+
const searchClientPath = join11(srcDir, "generated", "search-client.ts");
|
|
3521
|
+
const consentClientPath = join11(srcDir, "generated", "consent-client.ts");
|
|
3522
|
+
const featuresPath = join11(srcDir, "generated", "features.ts");
|
|
3523
|
+
const examplesPath = join11(srcDir, "generated", "examples.ts");
|
|
3524
|
+
const examplesThemePath = join11(srcDir, "generated", "examples.css");
|
|
3622
3525
|
const written = new Set;
|
|
3623
3526
|
const write = (path, content) => {
|
|
3624
3527
|
written.add(normalize2(path));
|
|
@@ -3669,7 +3572,7 @@ var generateRuntime = async (project) => {
|
|
|
3669
3572
|
const needsReact = detectedReact || assistantEnabled || frameworks.has("react");
|
|
3670
3573
|
const needsVue = frameworks.has("vue");
|
|
3671
3574
|
const needsSvelte = frameworks.has("svelte");
|
|
3672
|
-
const
|
|
3575
|
+
const reactCompiler = resolveReactCompiler(config, needsReact);
|
|
3673
3576
|
const ogRoutes = customOgRoutes(pages, config.title, config.seo.og.titles);
|
|
3674
3577
|
const changelogIndex = hasGeneratedChangelog(project, pages);
|
|
3675
3578
|
const mcp = planMcp(project, srcDir, pages);
|
|
@@ -3693,7 +3596,7 @@ var generateRuntime = async (project) => {
|
|
|
3693
3596
|
const docsCollection = resolveDocsCollection(config, context.root);
|
|
3694
3597
|
const [structural] = await Promise.all([
|
|
3695
3598
|
Promise.all([
|
|
3696
|
-
write(
|
|
3599
|
+
write(join11(out, "astro.config.mjs"), astroConfigTemplate({
|
|
3697
3600
|
aliases: resolveTsconfigAliases(context.root),
|
|
3698
3601
|
askPath,
|
|
3699
3602
|
config,
|
|
@@ -3710,20 +3613,20 @@ var generateRuntime = async (project) => {
|
|
|
3710
3613
|
needsSvelte,
|
|
3711
3614
|
needsVue,
|
|
3712
3615
|
pages,
|
|
3713
|
-
|
|
3616
|
+
reactCompiler,
|
|
3714
3617
|
searchClientPath,
|
|
3715
3618
|
themePath
|
|
3716
3619
|
})),
|
|
3717
|
-
write(
|
|
3718
|
-
write(
|
|
3719
|
-
write(
|
|
3620
|
+
write(join11(out, "package.json"), runtimePackageTemplate(runtimeDependencies({ config, needsReact, needsSvelte, needsVue }))),
|
|
3621
|
+
write(join11(out, "tsconfig.json"), runtimeTsconfigTemplate()),
|
|
3622
|
+
write(join11(srcDir, "content.config.ts"), contentConfigTemplate({
|
|
3720
3623
|
collection: docsCollection,
|
|
3721
3624
|
config,
|
|
3722
3625
|
context,
|
|
3723
3626
|
filesystem: hasFilesystemSource,
|
|
3724
3627
|
staged: hasStaged
|
|
3725
3628
|
})),
|
|
3726
|
-
write(
|
|
3629
|
+
write(join11(srcDir, "pages", "[...slug].astro"), catchAllPageTemplate({
|
|
3727
3630
|
exportEpub,
|
|
3728
3631
|
exportPdf,
|
|
3729
3632
|
mathEnabled: usesMath,
|
|
@@ -3732,8 +3635,8 @@ var generateRuntime = async (project) => {
|
|
|
3732
3635
|
})),
|
|
3733
3636
|
writeNavFragments(write, srcDir, navFragments),
|
|
3734
3637
|
write(askPath, askComponentTemplate(assistantEnabled)),
|
|
3735
|
-
write(
|
|
3736
|
-
write(
|
|
3638
|
+
write(join11(srcDir, "generated", "components.ts"), slotPlan.module),
|
|
3639
|
+
write(join11(srcDir, "generated", "examples.ts"), exampleMapTemplate(exampleDiscovery.examples, config.basePath)),
|
|
3737
3640
|
write(examplesThemePath, examplesEntryTemplate({
|
|
3738
3641
|
configTokens: buildThemeCss(config.theme),
|
|
3739
3642
|
sources: exampleScanRoots(context.root, exampleDiscovery.dir).map((dir) => `${dir}/${EXAMPLE_SCAN_GLOB}`),
|
|
@@ -3744,21 +3647,21 @@ var generateRuntime = async (project) => {
|
|
|
3744
3647
|
languageIcons,
|
|
3745
3648
|
sources: [
|
|
3746
3649
|
`${BLUME_SRC}/**/*.{astro,ts,tsx}`,
|
|
3747
|
-
`${context.root}/**/*.{astro,mdx,ts,tsx}`
|
|
3650
|
+
`${context.root}/**/*.{astro,jsx,mdx,ts,tsx}`
|
|
3748
3651
|
],
|
|
3749
3652
|
twoslashCss: twoslashCss(),
|
|
3750
3653
|
userTheme
|
|
3751
3654
|
}))
|
|
3752
3655
|
]),
|
|
3753
|
-
Promise.all(slotPlan.wrappers.map((wrapper) => write(
|
|
3754
|
-
Promise.all(exampleDiscovery.examples.map((example) => write(
|
|
3656
|
+
Promise.all(slotPlan.wrappers.map((wrapper) => write(join11(srcDir, "generated", "component-slots", `${wrapper.name}.astro`), wrapper.content))),
|
|
3657
|
+
Promise.all(exampleDiscovery.examples.map((example) => write(join11(srcDir, "generated", "examples", `${exampleSlug(example.path)}.astro`), exampleWrapperTemplate(example)))),
|
|
3755
3658
|
writeAskFiles(project, srcDir, write, modules),
|
|
3756
3659
|
writeMcpFiles(mcp, write, agentData),
|
|
3757
3660
|
writeApiFiles(project, api, write, agentData, mcp),
|
|
3758
|
-
playgroundProxy.enabled ? write(playgroundProxy.entrypoint, playgroundProxyTemplate(proxyOrigins)) : Promise.resolve(false)
|
|
3661
|
+
playgroundProxy.enabled ? write(playgroundProxy.entrypoint, playgroundProxyTemplate(proxyOrigins, config.rateLimit)) : Promise.resolve(false)
|
|
3759
3662
|
]);
|
|
3760
3663
|
if (config.seo.og.enabled) {
|
|
3761
|
-
await write(
|
|
3664
|
+
await write(join11(srcDir, "pages", "og", "[...slug].png.ts"), ogEndpointTemplate(ogRoutes, {
|
|
3762
3665
|
...projectOgFonts(project),
|
|
3763
3666
|
cache: {
|
|
3764
3667
|
dir: ogCacheDir(project.context),
|
|
@@ -3768,7 +3671,7 @@ var generateRuntime = async (project) => {
|
|
|
3768
3671
|
}, changelogIndex));
|
|
3769
3672
|
}
|
|
3770
3673
|
if (changelogIndex) {
|
|
3771
|
-
await write(
|
|
3674
|
+
await write(join11(srcDir, "pages", "changelog.astro"), changelogIndexTemplate({
|
|
3772
3675
|
exportEpub,
|
|
3773
3676
|
exportPdf,
|
|
3774
3677
|
needsReact,
|
|
@@ -3792,55 +3695,47 @@ var generateRuntime = async (project) => {
|
|
|
3792
3695
|
if (searchAdapter.mode === "static") {
|
|
3793
3696
|
const documents = await buildSearchDocuments(project);
|
|
3794
3697
|
modules.set("blume:search-index", JSON.stringify(documents));
|
|
3795
|
-
await write(
|
|
3698
|
+
await write(join11(srcDir, "pages", "blume-search.json.ts"), searchEndpointTemplate());
|
|
3796
3699
|
}
|
|
3797
3700
|
if (searchAdapter.kind === "mixedbread") {
|
|
3798
|
-
await write(
|
|
3701
|
+
await write(join11(srcDir, "pages", "api", "search.ts"), mixedbreadSearchEndpointTemplate(searchAdapter.options, sourcePages(project), config.rateLimit));
|
|
3799
3702
|
}
|
|
3800
|
-
await write(
|
|
3703
|
+
await write(join11(srcDir, "generated", "includes.json"), `${JSON.stringify(buildIncludeGraph(project.graph.pages))}
|
|
3801
3704
|
`);
|
|
3802
3705
|
modules.set("blume:raw-markdown", JSON.stringify(rawMarkdown));
|
|
3803
3706
|
const contentAssets = await collectContentAssets(project);
|
|
3804
3707
|
modules.set("blume:content-assets", JSON.stringify(contentAssets));
|
|
3805
3708
|
await Promise.all([
|
|
3806
|
-
write(
|
|
3807
|
-
write(
|
|
3808
|
-
write(
|
|
3709
|
+
write(join11(srcDir, "pages", "[...slug].md.ts"), rawMarkdownEndpointTemplate("md")),
|
|
3710
|
+
write(join11(srcDir, "pages", "[...slug].mdx.ts"), rawMarkdownEndpointTemplate("mdx")),
|
|
3711
|
+
write(join11(srcDir, "pages", "blume-assets", "[...asset].ts"), contentAssetsEndpointTemplate(join11(project.context.outDir, "public", "blume-assets")))
|
|
3809
3712
|
]);
|
|
3810
3713
|
const feeds = buildRssFeeds(project);
|
|
3811
3714
|
if (feeds.length > 0) {
|
|
3812
3715
|
const feedXml = Object.fromEntries(feeds.map((feed) => [feed.type, renderRssFeed(feed)]));
|
|
3813
3716
|
modules.set("blume:rss", JSON.stringify(feedXml));
|
|
3814
|
-
await write(
|
|
3717
|
+
await write(join11(srcDir, "pages", "[section]", "rss.xml.ts"), rssEndpointTemplate());
|
|
3815
3718
|
}
|
|
3816
3719
|
const warnings = [
|
|
3817
3720
|
...depsLinkWarning ? [depsLinkWarning] : [],
|
|
3818
3721
|
...proxyAllowlistWarnings(config, openApiData),
|
|
3819
3722
|
...apiPageProxyWarnings(project),
|
|
3820
|
-
...reactCompilerWarnings(config, needsReact,
|
|
3723
|
+
...reactCompilerWarnings(config, needsReact, reactCompiler),
|
|
3821
3724
|
...mcp.warnings,
|
|
3822
3725
|
...islandDiscovery.warnings,
|
|
3823
3726
|
...exampleDiscovery.warnings,
|
|
3824
3727
|
...examplesWarnings,
|
|
3825
3728
|
...overrideWarnings
|
|
3826
3729
|
];
|
|
3827
|
-
const navTargetRoutes = new Set([
|
|
3828
|
-
...project.graph.routes.keys(),
|
|
3829
|
-
...pages.map((page) => page.pattern),
|
|
3830
|
-
...referenceRoutes(config)
|
|
3831
|
-
]);
|
|
3832
|
-
if (changelogIndex) {
|
|
3833
|
-
navTargetRoutes.add("/changelog");
|
|
3834
|
-
}
|
|
3835
3730
|
warnings.push(...[
|
|
3836
|
-
...validateNavTargets(project.graph.navigation, navTargetRoutes),
|
|
3731
|
+
...validateNavTargets(project.graph.navigation, navTargetRoutes(project, pages)),
|
|
3837
3732
|
...validateSearchPopularIcons(config.search.popular)
|
|
3838
3733
|
].map(diagnosticWarning));
|
|
3839
3734
|
const knownComponentTags = new Set([
|
|
3840
3735
|
...islandDiscovery.islands.map((island) => island.name),
|
|
3841
3736
|
...overrideAnalysis.mdx.map((entry) => entry.key)
|
|
3842
3737
|
]);
|
|
3843
|
-
warnings.push(...validateUsedComponents(project.graph.pages, knownComponentTags, new Set(registry.map((item) => item.name))).map(diagnosticWarning), ...dependencyWarnings);
|
|
3738
|
+
warnings.push(...validateUsedComponents(project.graph.pages, knownComponentTags, new Set(registry.map((item) => item.name))).map(diagnosticWarning), ...missingExampleDiagnostics(project.graph.pages, exampleDiscovery, context.root, knownComponentTags).map(diagnosticWarning), ...dependencyWarnings);
|
|
3844
3739
|
if (hasScalarReferences(config)) {
|
|
3845
3740
|
const references = await buildReferenceFiles({
|
|
3846
3741
|
config,
|
|
@@ -3848,12 +3743,12 @@ var generateRuntime = async (project) => {
|
|
|
3848
3743
|
root: context.root
|
|
3849
3744
|
});
|
|
3850
3745
|
warnings.push(...references.warnings);
|
|
3851
|
-
await Promise.all(references.files.map((file) => write(
|
|
3746
|
+
await Promise.all(references.files.map((file) => write(join11(srcDir, "pages", file.pagePath), file.content)));
|
|
3852
3747
|
}
|
|
3853
3748
|
modules.set("blume:data", buildRuntimeData(project));
|
|
3854
3749
|
modules.set("blume:openapi", JSON.stringify(openApiData));
|
|
3855
3750
|
await Promise.all([
|
|
3856
|
-
write(
|
|
3751
|
+
write(join11(out, "blume.manifest.json"), `${JSON.stringify(project.manifest, null, 2)}
|
|
3857
3752
|
`),
|
|
3858
3753
|
writeStagedContent(out, staged)
|
|
3859
3754
|
]);
|
|
@@ -3863,7 +3758,7 @@ var generateRuntime = async (project) => {
|
|
|
3863
3758
|
return { structuralChange: structural.some(Boolean), warnings };
|
|
3864
3759
|
};
|
|
3865
3760
|
|
|
3866
|
-
export { publishBuildProject, refreshBlumeContent, showBlumeErrorOverlay, ogCacheDir, pruneCardCache, cardCacheTally, buildApiSpec, buildAskData, resolveOgFonts, buildReferenceFiles, tailwindEntryTemplate, examplesEntryTemplate, rebaseSourceDirectives, twoslashCss,
|
|
3761
|
+
export { publishBuildProject, refreshBlumeContent, showBlumeErrorOverlay, ogCacheDir, pruneCardCache, cardCacheTally, buildApiSpec, buildAskData, resolveOgFonts, buildReferenceFiles, sourcePages, tailwindEntryTemplate, examplesEntryTemplate, rebaseSourceDirectives, twoslashCss, packageDirFrom, detectNeedsReact, detectUsesMath, collectStaged, playgroundProxyPattern, buildRuntimeData, PLAYGROUND_PROXY_ENTRY, specOrigins, proxyAllowlistWarnings, analyzeComponentsFile, languageIconCssFor, clientFeaturesFor, generateRuntime };
|
|
3867
3762
|
|
|
3868
|
-
//# debugId=
|
|
3869
|
-
//# sourceMappingURL=chunk-
|
|
3763
|
+
//# debugId=06510295E6F5A8F264756E2164756E21
|
|
3764
|
+
//# sourceMappingURL=chunk-ep6nd0rn.js.map
|