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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Document, OperationObject } from "@scalar/openapi-types/3.
|
|
1
|
+
import type { Document, OperationObject } from "@scalar/openapi-types/3.2";
|
|
2
|
+
import type { GraphqlAuthOptions } from "../reference/options.ts";
|
|
2
3
|
import type { AsyncApiAction, AsyncApiDocument, AsyncApiSpecValue } from "./asyncapi.ts";
|
|
3
4
|
import type { GraphqlDocument, GraphqlMember } from "./graphql.ts";
|
|
4
5
|
import type { ReferenceKind } from "./references.ts";
|
|
@@ -12,10 +13,18 @@ export { slugify } from "./references.ts";
|
|
|
12
13
|
* Each operation is flattened into an {@link ApiOperationRef} with a real,
|
|
13
14
|
* per-operation route so it becomes a first-class Blume page.
|
|
14
15
|
*/
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* A normalized OpenAPI document, internal `$ref`s intact. Typed as 3.2, which
|
|
18
|
+
* is backward compatible with 3.1, so one type covers both the upgraded 3.1
|
|
19
|
+
* documents and the 3.2 ones read as written.
|
|
20
|
+
*/
|
|
16
21
|
export type ApiDocument = Document;
|
|
17
|
-
/**
|
|
18
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The HTTP methods an OpenAPI path item may declare, in spec order. `query`
|
|
24
|
+
* is OpenAPI 3.2's (the QUERY method: a safe request that carries a body); a
|
|
25
|
+
* 3.1 path item can't declare it, so listing it changes nothing there.
|
|
26
|
+
*/
|
|
27
|
+
export declare const HTTP_METHODS: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace", "query"];
|
|
19
28
|
export type HttpMethod = (typeof HTTP_METHODS)[number];
|
|
20
29
|
/** A stable, URL-safe key for an operation: its `operationId`, else method+path. */
|
|
21
30
|
export declare const operationKey: (method: string, path: string, operationId?: string) => string;
|
|
@@ -79,6 +88,8 @@ export interface ApiSpecData {
|
|
|
79
88
|
* (GraphQL only; OpenAPI documents carry their servers in the document).
|
|
80
89
|
*/
|
|
81
90
|
endpoint?: string;
|
|
91
|
+
/** How the GraphQL endpoint authenticates (GraphQL only). */
|
|
92
|
+
auth?: GraphqlAuthOptions;
|
|
82
93
|
/** Operations keyed by {@link ApiOperationRef.key}. */
|
|
83
94
|
operations: Record<string, ApiOperationRef>;
|
|
84
95
|
tags: ApiTagRef[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { AsyncApiDocument } from "./asyncapi.ts";
|
|
2
|
+
import type { SpecIssue } from "./checks.ts";
|
|
2
3
|
import type { GraphqlDocument } from "./graphql.ts";
|
|
3
4
|
import type { ApiDocument } from "./model.ts";
|
|
4
5
|
export interface ParsedSpec {
|
|
5
6
|
document: ApiDocument;
|
|
7
|
+
/** `x-codeSamples` entries whose `$ref` couldn't be inlined. */
|
|
8
|
+
issues: SpecIssue[];
|
|
6
9
|
warnings: string[];
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ResolvedConfig } from "../core/schema.ts";
|
|
2
|
+
import type { GraphqlAuthOptions } from "../reference/options.ts";
|
|
2
3
|
import type { ScalarOptions } from "../reference/scalar.ts";
|
|
3
4
|
import type { ResolvedReferenceAdapter } from "../reference/schema.ts";
|
|
4
5
|
export { normalizeRoute } from "../core/base-path.ts";
|
|
@@ -47,6 +48,12 @@ export interface ReferenceSource {
|
|
|
47
48
|
*/
|
|
48
49
|
basePath: string;
|
|
49
50
|
label: string;
|
|
51
|
+
/**
|
|
52
|
+
* The source's own `label`, when it sets one: it names the sidebar group
|
|
53
|
+
* of the source's route. An unlabeled source's group keeps the name its
|
|
54
|
+
* route gives it.
|
|
55
|
+
*/
|
|
56
|
+
groupLabel?: string;
|
|
50
57
|
/** Whether generated pages are included in llms.txt/llms-full.txt. */
|
|
51
58
|
includeInLlms: boolean;
|
|
52
59
|
/** Whether generated pages are included in site search. */
|
|
@@ -70,6 +77,8 @@ export interface ReferenceSource {
|
|
|
70
77
|
* (GraphQL only — a schema, unlike an OpenAPI document, names no server).
|
|
71
78
|
*/
|
|
72
79
|
endpoint?: string;
|
|
80
|
+
/** How the GraphQL endpoint authenticates (GraphQL only). */
|
|
81
|
+
auth?: GraphqlAuthOptions;
|
|
73
82
|
/**
|
|
74
83
|
* The `scalar()` adapter's own options (`scalar` kind only): `theme` plus
|
|
75
84
|
* any Scalar config forwarded verbatim to `<ScalarComponent>`, which takes
|
|
@@ -112,6 +121,13 @@ export declare const resolveReferences: (config: ResolvedConfig) => ReferenceSou
|
|
|
112
121
|
export declare const referenceRoutes: (config: ResolvedConfig) => string[];
|
|
113
122
|
/** Blume-rendered references (every kind but Scalar), deduped by route (first wins). */
|
|
114
123
|
export declare const blumeReferences: (config: ResolvedConfig) => BlumeReferenceSource[];
|
|
124
|
+
/**
|
|
125
|
+
* The local files every reference reads, as absolute paths: each spec and
|
|
126
|
+
* overlay that isn't an `http(s)` URL, resolved from the project root the way
|
|
127
|
+
* the parser resolves them. `blume dev` watches these, so an edit to a spec
|
|
128
|
+
* regenerates its reference like an edit to a page does.
|
|
129
|
+
*/
|
|
130
|
+
export declare const referenceSpecFiles: (config: ResolvedConfig, root: string) => string[];
|
|
115
131
|
/** Whether any reference is Scalar-rendered (gates the Scalar pages). */
|
|
116
132
|
export declare const hasScalarReferences: (config: ResolvedConfig) => boolean;
|
|
117
133
|
/**
|
|
@@ -24,4 +24,4 @@ export { memory } from "./memory.ts";
|
|
|
24
24
|
export type { MemoryAdapter, RateLimitOptions } from "./memory.ts";
|
|
25
25
|
export type { RateLimitAdapter } from "./schema.ts";
|
|
26
26
|
export { upstash } from "./upstash.ts";
|
|
27
|
-
export type { UpstashAdapter } from "./upstash.ts";
|
|
27
|
+
export type { UpstashAdapter, UpstashOptions } from "./upstash.ts";
|
|
@@ -22,6 +22,8 @@ export declare const rateLimitAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
22
22
|
options: z.ZodObject<{
|
|
23
23
|
requests: z.ZodOptional<z.ZodNumber>;
|
|
24
24
|
window: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
26
|
+
urlEnv: z.ZodOptional<z.ZodString>;
|
|
25
27
|
}, z.core.$strict>;
|
|
26
28
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
27
29
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
@@ -55,6 +57,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
|
|
|
55
57
|
options: z.ZodObject<{
|
|
56
58
|
requests: z.ZodOptional<z.ZodNumber>;
|
|
57
59
|
window: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
61
|
+
urlEnv: z.ZodOptional<z.ZodString>;
|
|
58
62
|
}, z.core.$strict>;
|
|
59
63
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
60
64
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
@@ -80,6 +84,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
|
|
|
80
84
|
options: {
|
|
81
85
|
requests?: number | undefined;
|
|
82
86
|
window?: number | undefined;
|
|
87
|
+
tokenEnv?: string | undefined;
|
|
88
|
+
urlEnv?: string | undefined;
|
|
83
89
|
};
|
|
84
90
|
requiredSecrets: string[];
|
|
85
91
|
runtimeDeps: string[];
|
|
@@ -105,6 +111,8 @@ export declare const rateLimitConfigSchema: z.ZodPipe<z.ZodOptional<z.ZodUnion<r
|
|
|
105
111
|
options: {
|
|
106
112
|
requests?: number | undefined;
|
|
107
113
|
window?: number | undefined;
|
|
114
|
+
tokenEnv?: string | undefined;
|
|
115
|
+
urlEnv?: string | undefined;
|
|
108
116
|
};
|
|
109
117
|
requiredSecrets: string[];
|
|
110
118
|
runtimeDeps: string[];
|
|
@@ -1,21 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import type { AdapterDescriptor } from "../core/adapter.ts";
|
|
2
3
|
import type { RateLimitOptions } from "./memory.ts";
|
|
3
|
-
/**
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
/** Options for {@link upstash}. */
|
|
5
|
+
export interface UpstashOptions extends RateLimitOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Name of the env var holding the REST token. Defaults to
|
|
8
|
+
* `UPSTASH_REDIS_REST_TOKEN`; a database added from Vercel's Marketplace
|
|
9
|
+
* sets `KV_REST_API_TOKEN`.
|
|
10
|
+
*/
|
|
11
|
+
tokenEnv?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Name of the env var holding the REST endpoint. Defaults to
|
|
14
|
+
* `UPSTASH_REDIS_REST_URL`; a database added from Vercel's Marketplace
|
|
15
|
+
* sets `KV_REST_API_URL`.
|
|
16
|
+
*/
|
|
17
|
+
urlEnv?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const upstashOptionsSchema: z.ZodObject<{
|
|
20
|
+
requests: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
window: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
23
|
+
urlEnv: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type UpstashAdapter = AdapterDescriptor<"upstash", UpstashOptions>;
|
|
26
|
+
export declare const upstashAdapterSchema: z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"upstash">;
|
|
28
|
+
options: z.ZodObject<{
|
|
29
|
+
requests: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
window: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
32
|
+
urlEnv: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
35
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
/** The env vars the endpoint and its token are read from, in that order. */
|
|
38
|
+
export declare const upstashSecrets: (options: UpstashOptions) => [string, string];
|
|
15
39
|
/**
|
|
16
40
|
* Keeps the count in Upstash Redis, which every instance on every host shares,
|
|
17
41
|
* so the limit holds exactly. It talks to Upstash's REST API, so there is
|
|
18
42
|
* nothing to install; the endpoint and token come from
|
|
19
|
-
* `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN
|
|
43
|
+
* `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`, or the env vars
|
|
44
|
+
* `urlEnv` and `tokenEnv` name.
|
|
20
45
|
*/
|
|
21
|
-
export declare const upstash: (options?:
|
|
46
|
+
export declare const upstash: (options?: UpstashOptions) => UpstashAdapter;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { AdapterDescriptor } from "../core/adapter.ts";
|
|
3
|
-
import type { GraphqlSourceOptions, PlaygroundOptions } from "./options.ts";
|
|
3
|
+
import type { GraphqlAuthOptions, GraphqlSourceOptions, PlaygroundOptions } from "./options.ts";
|
|
4
4
|
/** Options for {@link graphql}. */
|
|
5
5
|
export interface GraphqlOptions {
|
|
6
|
+
/**
|
|
7
|
+
* How the endpoint authenticates, like the site's `api.auth`: `bearer`,
|
|
8
|
+
* `basic`, or `key` (sent in the `name` header, `x-api-key` by default).
|
|
9
|
+
* The Try it panel gets a field for the credential and the code samples
|
|
10
|
+
* send a placeholder. Applies to every source; a per-source `auth` wins.
|
|
11
|
+
*/
|
|
12
|
+
auth?: GraphqlAuthOptions;
|
|
6
13
|
/**
|
|
7
14
|
* Code-sample languages shown per operation, in order. Defaults to
|
|
8
15
|
* `["curl", "js", "python"]`; `false` shows none.
|
|
@@ -36,6 +43,15 @@ export interface GraphqlOptions {
|
|
|
36
43
|
* AsyncAPI documents only.
|
|
37
44
|
*/
|
|
38
45
|
export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
46
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
method: z.ZodEnum<{
|
|
48
|
+
none: "none";
|
|
49
|
+
key: "key";
|
|
50
|
+
bearer: "bearer";
|
|
51
|
+
basic: "basic";
|
|
52
|
+
}>;
|
|
53
|
+
name: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
39
55
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
40
56
|
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
41
57
|
includeInLlms: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -45,6 +61,15 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
|
45
61
|
route: z.ZodOptional<z.ZodString>;
|
|
46
62
|
seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
|
|
47
63
|
spec: z.ZodString;
|
|
64
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
method: z.ZodEnum<{
|
|
66
|
+
none: "none";
|
|
67
|
+
key: "key";
|
|
68
|
+
bearer: "bearer";
|
|
69
|
+
basic: "basic";
|
|
70
|
+
}>;
|
|
71
|
+
name: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
48
73
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
49
74
|
}, z.core.$strict>>>;
|
|
50
75
|
codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -69,6 +94,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
|
69
94
|
spec: string;
|
|
70
95
|
label?: string | undefined;
|
|
71
96
|
route?: string | undefined;
|
|
97
|
+
auth?: {
|
|
98
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
72
101
|
endpoint?: string | undefined;
|
|
73
102
|
}[];
|
|
74
103
|
codeSamples: false | string[];
|
|
@@ -77,6 +106,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
|
77
106
|
proxy: string | boolean;
|
|
78
107
|
};
|
|
79
108
|
route: string;
|
|
109
|
+
auth?: {
|
|
110
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
111
|
+
name?: string | undefined;
|
|
112
|
+
} | undefined;
|
|
80
113
|
endpoint?: string | undefined;
|
|
81
114
|
spec?: string | undefined;
|
|
82
115
|
}, "spec" | "overlays">, {
|
|
@@ -88,6 +121,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
|
88
121
|
spec: string;
|
|
89
122
|
label?: string | undefined;
|
|
90
123
|
route?: string | undefined;
|
|
124
|
+
auth?: {
|
|
125
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
126
|
+
name?: string | undefined;
|
|
127
|
+
} | undefined;
|
|
91
128
|
endpoint?: string | undefined;
|
|
92
129
|
}[];
|
|
93
130
|
codeSamples: false | string[];
|
|
@@ -96,6 +133,10 @@ export declare const graphqlOptionsSchema: z.ZodPipe<z.ZodObject<{
|
|
|
96
133
|
proxy: string | boolean;
|
|
97
134
|
};
|
|
98
135
|
route: string;
|
|
136
|
+
auth?: {
|
|
137
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
138
|
+
name?: string | undefined;
|
|
139
|
+
} | undefined;
|
|
99
140
|
endpoint?: string | undefined;
|
|
100
141
|
spec?: string | undefined;
|
|
101
142
|
}>>;
|
|
@@ -107,6 +148,15 @@ export type ResolvedGraphqlAdapter = AdapterDescriptor<"graphql", ResolvedGraphq
|
|
|
107
148
|
export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
108
149
|
kind: z.ZodLiteral<"graphql">;
|
|
109
150
|
options: z.ZodPipe<z.ZodObject<{
|
|
151
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
method: z.ZodEnum<{
|
|
153
|
+
none: "none";
|
|
154
|
+
key: "key";
|
|
155
|
+
bearer: "bearer";
|
|
156
|
+
basic: "basic";
|
|
157
|
+
}>;
|
|
158
|
+
name: z.ZodOptional<z.ZodString>;
|
|
159
|
+
}, z.core.$strict>>;
|
|
110
160
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
111
161
|
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
112
162
|
includeInLlms: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -116,6 +166,15 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
|
116
166
|
route: z.ZodOptional<z.ZodString>;
|
|
117
167
|
seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
|
|
118
168
|
spec: z.ZodString;
|
|
169
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
method: z.ZodEnum<{
|
|
171
|
+
none: "none";
|
|
172
|
+
key: "key";
|
|
173
|
+
bearer: "bearer";
|
|
174
|
+
basic: "basic";
|
|
175
|
+
}>;
|
|
176
|
+
name: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, z.core.$strict>>;
|
|
119
178
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
120
179
|
}, z.core.$strict>>>;
|
|
121
180
|
codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -140,6 +199,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
|
140
199
|
spec: string;
|
|
141
200
|
label?: string | undefined;
|
|
142
201
|
route?: string | undefined;
|
|
202
|
+
auth?: {
|
|
203
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
204
|
+
name?: string | undefined;
|
|
205
|
+
} | undefined;
|
|
143
206
|
endpoint?: string | undefined;
|
|
144
207
|
}[];
|
|
145
208
|
codeSamples: false | string[];
|
|
@@ -148,6 +211,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
|
148
211
|
proxy: string | boolean;
|
|
149
212
|
};
|
|
150
213
|
route: string;
|
|
214
|
+
auth?: {
|
|
215
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
216
|
+
name?: string | undefined;
|
|
217
|
+
} | undefined;
|
|
151
218
|
endpoint?: string | undefined;
|
|
152
219
|
spec?: string | undefined;
|
|
153
220
|
}, "spec" | "overlays">, {
|
|
@@ -159,6 +226,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
|
159
226
|
spec: string;
|
|
160
227
|
label?: string | undefined;
|
|
161
228
|
route?: string | undefined;
|
|
229
|
+
auth?: {
|
|
230
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
231
|
+
name?: string | undefined;
|
|
232
|
+
} | undefined;
|
|
162
233
|
endpoint?: string | undefined;
|
|
163
234
|
}[];
|
|
164
235
|
codeSamples: false | string[];
|
|
@@ -167,6 +238,10 @@ export declare const graphqlAdapterSchema: z.ZodObject<{
|
|
|
167
238
|
proxy: string | boolean;
|
|
168
239
|
};
|
|
169
240
|
route: string;
|
|
241
|
+
auth?: {
|
|
242
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
243
|
+
name?: string | undefined;
|
|
244
|
+
} | undefined;
|
|
170
245
|
endpoint?: string | undefined;
|
|
171
246
|
spec?: string | undefined;
|
|
172
247
|
}>>;
|
|
@@ -26,7 +26,7 @@ export { graphql } from "./graphql.ts";
|
|
|
26
26
|
export type { GraphqlAdapter, GraphqlOptions } from "./graphql.ts";
|
|
27
27
|
export { openapi } from "./openapi.ts";
|
|
28
28
|
export type { OpenApiAdapter, OpenApiOptions } from "./openapi.ts";
|
|
29
|
-
export type { GraphqlSourceOptions, PlaygroundOptions, ReferenceSourceOptions, } from "./options.ts";
|
|
29
|
+
export type { GraphqlAuthOptions, GraphqlSourceOptions, PlaygroundOptions, ReferenceSourceOptions, } from "./options.ts";
|
|
30
30
|
export { scalar } from "./scalar.ts";
|
|
31
31
|
export type { ScalarAdapter, ScalarOptions, ScalarSourceOptions, } from "./scalar.ts";
|
|
32
32
|
export type { ReferenceAdapter, ResolvedReferenceAdapter } from "./schema.ts";
|
|
@@ -5,8 +5,8 @@ import type { OpenApiSourceOptions, PlaygroundOptions } from "./options.ts";
|
|
|
5
5
|
export interface OpenApiOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Code-sample languages generated per operation (Blume renderer), in
|
|
8
|
-
* order. Defaults to `["curl", "js", "python"]`; `false`
|
|
9
|
-
* only the spec's own `x-codeSamples` show.
|
|
8
|
+
* order. Defaults to `["curl", "js", "python"]`; `false` (or an empty list)
|
|
9
|
+
* generates none, so only the spec's own `x-codeSamples` show.
|
|
10
10
|
*/
|
|
11
11
|
codeSamples?: string[] | false;
|
|
12
12
|
/** Start nested schema rows expanded rather than collapsed (Blume renderer). Defaults to `false`. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { AuthMethod } from "../components/content/api-page.ts";
|
|
2
3
|
/**
|
|
3
4
|
* A single spec rendered by a reference. `spec` is a local path or an
|
|
4
5
|
* `http(s)` URL (an OpenAPI document for `openapi()`, an AsyncAPI document
|
|
@@ -71,10 +72,34 @@ export interface OpenApiSourceOptions extends ReferenceSourceOptions {
|
|
|
71
72
|
*/
|
|
72
73
|
overlays?: string[];
|
|
73
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* How a GraphQL endpoint authenticates, in the shape the site's `api.auth`
|
|
77
|
+
* takes for hand-written endpoints: `bearer`, `basic`, or `key` (sent in the
|
|
78
|
+
* `name` header, `x-api-key` by default). A schema, unlike an OpenAPI
|
|
79
|
+
* document, declares no security schemes, so this is what gives the Try it
|
|
80
|
+
* panel its credential field.
|
|
81
|
+
*/
|
|
82
|
+
export declare const graphqlAuthSchema: z.ZodObject<{
|
|
83
|
+
method: z.ZodEnum<{
|
|
84
|
+
none: "none";
|
|
85
|
+
key: "key";
|
|
86
|
+
bearer: "bearer";
|
|
87
|
+
basic: "basic";
|
|
88
|
+
}>;
|
|
89
|
+
name: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
/** The `auth` option of `graphql()` and its sources. */
|
|
92
|
+
export interface GraphqlAuthOptions {
|
|
93
|
+
/** `bearer`, `basic`, `key`, or `none`. */
|
|
94
|
+
method: AuthMethod;
|
|
95
|
+
/** The header an API key goes in. Defaults to `x-api-key`. */
|
|
96
|
+
name?: string;
|
|
97
|
+
}
|
|
74
98
|
/**
|
|
75
99
|
* A single GraphQL schema: the shared source shape plus `endpoint`, the live
|
|
76
100
|
* GraphQL API URL the playground and code samples target (a schema, unlike an
|
|
77
|
-
* OpenAPI document, names no server)
|
|
101
|
+
* OpenAPI document, names no server), and `auth`, how that endpoint
|
|
102
|
+
* authenticates.
|
|
78
103
|
*/
|
|
79
104
|
export declare const graphqlSourceSchema: z.ZodObject<{
|
|
80
105
|
includeInLlms: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -84,10 +109,21 @@ export declare const graphqlSourceSchema: z.ZodObject<{
|
|
|
84
109
|
route: z.ZodOptional<z.ZodString>;
|
|
85
110
|
seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
|
|
86
111
|
spec: z.ZodString;
|
|
112
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
method: z.ZodEnum<{
|
|
114
|
+
none: "none";
|
|
115
|
+
key: "key";
|
|
116
|
+
bearer: "bearer";
|
|
117
|
+
basic: "basic";
|
|
118
|
+
}>;
|
|
119
|
+
name: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strict>>;
|
|
87
121
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
88
122
|
}, z.core.$strict>;
|
|
89
123
|
/** One schema source, as `graphql()` accepts it. */
|
|
90
124
|
export interface GraphqlSourceOptions extends ReferenceSourceOptions {
|
|
125
|
+
/** How the endpoint authenticates; wins over the adapter's `auth`. */
|
|
126
|
+
auth?: GraphqlAuthOptions;
|
|
91
127
|
/** URL of the live GraphQL endpoint (playground + code samples); wins over the adapter's `endpoint`. */
|
|
92
128
|
endpoint?: string;
|
|
93
129
|
}
|
|
@@ -81,6 +81,15 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
81
81
|
}, z.core.$strict>, z.ZodObject<{
|
|
82
82
|
kind: z.ZodLiteral<"graphql">;
|
|
83
83
|
options: z.ZodPipe<z.ZodObject<{
|
|
84
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
method: z.ZodEnum<{
|
|
86
|
+
none: "none";
|
|
87
|
+
key: "key";
|
|
88
|
+
bearer: "bearer";
|
|
89
|
+
basic: "basic";
|
|
90
|
+
}>;
|
|
91
|
+
name: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strict>>;
|
|
84
93
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
85
94
|
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
86
95
|
includeInLlms: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -90,6 +99,15 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
90
99
|
route: z.ZodOptional<z.ZodString>;
|
|
91
100
|
seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
|
|
92
101
|
spec: z.ZodString;
|
|
102
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
method: z.ZodEnum<{
|
|
104
|
+
none: "none";
|
|
105
|
+
key: "key";
|
|
106
|
+
bearer: "bearer";
|
|
107
|
+
basic: "basic";
|
|
108
|
+
}>;
|
|
109
|
+
name: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strict>>;
|
|
93
111
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
94
112
|
}, z.core.$strict>>>;
|
|
95
113
|
codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -114,6 +132,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
114
132
|
spec: string;
|
|
115
133
|
label?: string | undefined;
|
|
116
134
|
route?: string | undefined;
|
|
135
|
+
auth?: {
|
|
136
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
137
|
+
name?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
117
139
|
endpoint?: string | undefined;
|
|
118
140
|
}[];
|
|
119
141
|
codeSamples: false | string[];
|
|
@@ -122,6 +144,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
122
144
|
proxy: string | boolean;
|
|
123
145
|
};
|
|
124
146
|
route: string;
|
|
147
|
+
auth?: {
|
|
148
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
149
|
+
name?: string | undefined;
|
|
150
|
+
} | undefined;
|
|
125
151
|
endpoint?: string | undefined;
|
|
126
152
|
spec?: string | undefined;
|
|
127
153
|
}, "spec" | "overlays">, {
|
|
@@ -133,6 +159,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
133
159
|
spec: string;
|
|
134
160
|
label?: string | undefined;
|
|
135
161
|
route?: string | undefined;
|
|
162
|
+
auth?: {
|
|
163
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
164
|
+
name?: string | undefined;
|
|
165
|
+
} | undefined;
|
|
136
166
|
endpoint?: string | undefined;
|
|
137
167
|
}[];
|
|
138
168
|
codeSamples: false | string[];
|
|
@@ -141,6 +171,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
141
171
|
proxy: string | boolean;
|
|
142
172
|
};
|
|
143
173
|
route: string;
|
|
174
|
+
auth?: {
|
|
175
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
176
|
+
name?: string | undefined;
|
|
177
|
+
} | undefined;
|
|
144
178
|
endpoint?: string | undefined;
|
|
145
179
|
spec?: string | undefined;
|
|
146
180
|
}>>;
|
|
@@ -286,6 +320,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
286
320
|
spec: string;
|
|
287
321
|
label?: string | undefined;
|
|
288
322
|
route?: string | undefined;
|
|
323
|
+
auth?: {
|
|
324
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
325
|
+
name?: string | undefined;
|
|
326
|
+
} | undefined;
|
|
289
327
|
endpoint?: string | undefined;
|
|
290
328
|
}[];
|
|
291
329
|
codeSamples: false | string[];
|
|
@@ -294,6 +332,10 @@ export declare const referenceAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[
|
|
|
294
332
|
proxy: string | boolean;
|
|
295
333
|
};
|
|
296
334
|
route: string;
|
|
335
|
+
auth?: {
|
|
336
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
337
|
+
name?: string | undefined;
|
|
338
|
+
} | undefined;
|
|
297
339
|
endpoint?: string | undefined;
|
|
298
340
|
spec?: string | undefined;
|
|
299
341
|
}, "spec" | "overlays">;
|
|
@@ -398,6 +440,15 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
398
440
|
}, z.core.$strict>, z.ZodObject<{
|
|
399
441
|
kind: z.ZodLiteral<"graphql">;
|
|
400
442
|
options: z.ZodPipe<z.ZodObject<{
|
|
443
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
444
|
+
method: z.ZodEnum<{
|
|
445
|
+
none: "none";
|
|
446
|
+
key: "key";
|
|
447
|
+
bearer: "bearer";
|
|
448
|
+
basic: "basic";
|
|
449
|
+
}>;
|
|
450
|
+
name: z.ZodOptional<z.ZodString>;
|
|
451
|
+
}, z.core.$strict>>;
|
|
401
452
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
402
453
|
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
403
454
|
includeInLlms: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -407,6 +458,15 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
407
458
|
route: z.ZodOptional<z.ZodString>;
|
|
408
459
|
seoDescriptionSuffix: z.ZodDefault<z.ZodBoolean>;
|
|
409
460
|
spec: z.ZodString;
|
|
461
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
462
|
+
method: z.ZodEnum<{
|
|
463
|
+
none: "none";
|
|
464
|
+
key: "key";
|
|
465
|
+
bearer: "bearer";
|
|
466
|
+
basic: "basic";
|
|
467
|
+
}>;
|
|
468
|
+
name: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, z.core.$strict>>;
|
|
410
470
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
411
471
|
}, z.core.$strict>>>;
|
|
412
472
|
codeSamples: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -431,6 +491,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
431
491
|
spec: string;
|
|
432
492
|
label?: string | undefined;
|
|
433
493
|
route?: string | undefined;
|
|
494
|
+
auth?: {
|
|
495
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
496
|
+
name?: string | undefined;
|
|
497
|
+
} | undefined;
|
|
434
498
|
endpoint?: string | undefined;
|
|
435
499
|
}[];
|
|
436
500
|
codeSamples: false | string[];
|
|
@@ -439,6 +503,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
439
503
|
proxy: string | boolean;
|
|
440
504
|
};
|
|
441
505
|
route: string;
|
|
506
|
+
auth?: {
|
|
507
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
508
|
+
name?: string | undefined;
|
|
509
|
+
} | undefined;
|
|
442
510
|
endpoint?: string | undefined;
|
|
443
511
|
spec?: string | undefined;
|
|
444
512
|
}, "spec" | "overlays">, {
|
|
@@ -450,6 +518,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
450
518
|
spec: string;
|
|
451
519
|
label?: string | undefined;
|
|
452
520
|
route?: string | undefined;
|
|
521
|
+
auth?: {
|
|
522
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
523
|
+
name?: string | undefined;
|
|
524
|
+
} | undefined;
|
|
453
525
|
endpoint?: string | undefined;
|
|
454
526
|
}[];
|
|
455
527
|
codeSamples: false | string[];
|
|
@@ -458,6 +530,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
458
530
|
proxy: string | boolean;
|
|
459
531
|
};
|
|
460
532
|
route: string;
|
|
533
|
+
auth?: {
|
|
534
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
535
|
+
name?: string | undefined;
|
|
536
|
+
} | undefined;
|
|
461
537
|
endpoint?: string | undefined;
|
|
462
538
|
spec?: string | undefined;
|
|
463
539
|
}>>;
|
|
@@ -603,6 +679,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
603
679
|
spec: string;
|
|
604
680
|
label?: string | undefined;
|
|
605
681
|
route?: string | undefined;
|
|
682
|
+
auth?: {
|
|
683
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
684
|
+
name?: string | undefined;
|
|
685
|
+
} | undefined;
|
|
606
686
|
endpoint?: string | undefined;
|
|
607
687
|
}[];
|
|
608
688
|
codeSamples: false | string[];
|
|
@@ -611,6 +691,10 @@ export declare const referenceConfigSchema: z.ZodDefault<z.ZodArray<z.ZodPipe<z.
|
|
|
611
691
|
proxy: string | boolean;
|
|
612
692
|
};
|
|
613
693
|
route: string;
|
|
694
|
+
auth?: {
|
|
695
|
+
method: "none" | "key" | "bearer" | "basic";
|
|
696
|
+
name?: string | undefined;
|
|
697
|
+
} | undefined;
|
|
614
698
|
endpoint?: string | undefined;
|
|
615
699
|
spec?: string | undefined;
|
|
616
700
|
}, "spec" | "overlays">;
|
|
@@ -69,6 +69,7 @@ declare const adapterVariants: readonly [z.ZodObject<{
|
|
|
69
69
|
apiKey: z.ZodString;
|
|
70
70
|
collection: z.ZodString;
|
|
71
71
|
host: z.ZodString;
|
|
72
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
72
73
|
port: z.ZodOptional<z.ZodNumber>;
|
|
73
74
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
74
75
|
http: "http";
|
|
@@ -141,6 +142,7 @@ export declare const resolvedSearchAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUn
|
|
|
141
142
|
apiKey: z.ZodString;
|
|
142
143
|
collection: z.ZodString;
|
|
143
144
|
host: z.ZodString;
|
|
145
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
144
146
|
port: z.ZodOptional<z.ZodNumber>;
|
|
145
147
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
146
148
|
http: "http";
|
|
@@ -212,6 +214,7 @@ export declare const resolvedSearchAdapterSchema: z.ZodPipe<z.ZodDiscriminatedUn
|
|
|
212
214
|
apiKey: string;
|
|
213
215
|
collection: string;
|
|
214
216
|
host: string;
|
|
217
|
+
locale?: string | undefined;
|
|
215
218
|
port?: number | undefined;
|
|
216
219
|
protocol?: "http" | "https" | undefined;
|
|
217
220
|
};
|