@redocly/redoc-revel 0.137.0-next.9 → 0.138.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +247 -0
- package/dist/bin.js +1 -1
- package/dist/cli/build/index.js +1 -1
- package/dist/cli/eject/themeOperations.js +1 -1
- package/dist/cli/generate/generate-tag.js +1 -1
- package/dist/cli/generate/generate.js +1 -1
- package/dist/client/app/Sidebar/useActions.js +1 -1
- package/dist/client/app/Sidebar/useSidebarItems.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalog.d.ts +1 -2
- package/dist/client/app/hooks/catalog/useCatalogClassic.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalogFilter.js +1 -1
- package/dist/client/app/l10n/hooks/useL10n.js +1 -1
- package/dist/client/app/l10n/index.js +1 -1
- package/dist/client/app/search/sse-parser.d.ts +5 -2
- package/dist/client/app/search/sse-parser.js +2 -2
- package/dist/client/app/search/useFacets.js +1 -1
- package/dist/client/app/seo/SeoTags.js +1 -1
- package/dist/client/app/utils/loadAndNavigate.js +1 -1
- package/dist/client/constants/ai-search.d.ts +8 -0
- package/dist/client/constants/ai-search.js +1 -1
- package/dist/constants/l10n/langs/ar.js +1 -1
- package/dist/constants/l10n/langs/de.js +1 -1
- package/dist/constants/l10n/langs/en.js +1 -1
- package/dist/constants/l10n/langs/es.js +1 -1
- package/dist/constants/l10n/langs/fr.js +1 -1
- package/dist/constants/l10n/langs/hi.js +1 -1
- package/dist/constants/l10n/langs/it.js +1 -1
- package/dist/constants/l10n/langs/ja.js +1 -1
- package/dist/constants/l10n/langs/ko.js +1 -1
- package/dist/constants/l10n/langs/pl.js +1 -1
- package/dist/constants/l10n/langs/pt-BR.js +1 -1
- package/dist/constants/l10n/langs/pt.js +1 -1
- package/dist/constants/l10n/langs/ru.js +1 -1
- package/dist/constants/l10n/langs/uk.js +1 -1
- package/dist/constants/l10n/langs/zh.js +1 -1
- package/dist/markdoc/helpers/guards/is-example-node.d.ts +2 -1
- package/dist/markdoc/helpers/guards/is-example-node.js +1 -1
- package/dist/markdoc/nodes/fence/index.js +1 -1
- package/dist/server/config/env-config.d.ts +2 -0
- package/dist/server/config/env-schema.d.ts +5 -0
- package/dist/server/config/env-schemas/feature-flags.d.ts +4 -0
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/constants/entitlements.d.ts +1 -2
- package/dist/server/constants/plugins/search.js +1 -1
- package/dist/server/esbuild/esbuild-logger.d.ts +2 -2
- package/dist/server/esbuild/esbuild-logger.js +3 -3
- package/dist/server/esbuild/plugins/styled-components-ssr.js +1 -1
- package/dist/server/esbuild/plugins/themes-resolver.js +2 -2
- package/dist/server/fs/cache.js +1 -1
- package/dist/server/fs/fs.js +1 -1
- package/dist/server/fs/utils/remove-l10n-prefix.js +1 -1
- package/dist/server/persistence/file-hashes/repositories/file-hashes-repository.d.ts +1 -2
- package/dist/server/persistence/file-hashes/services/file-hashes-service.d.ts +1 -2
- package/dist/server/plugins/analytics/rudderstack/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/segment/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/segment/build-script.js +3 -3
- package/dist/server/plugins/api-docs/loader.d.ts +2 -3
- package/dist/server/plugins/api-docs/options.d.ts +1 -1
- package/dist/server/plugins/api-docs/options.js +1 -1
- package/dist/server/plugins/api-docs/search/create-indexer.d.ts +5 -0
- package/dist/server/plugins/api-docs/search/create-indexer.js +1 -0
- package/dist/server/plugins/api-docs/search/get-ai-search-documents.d.ts +2 -2
- package/dist/server/plugins/api-docs/search/get-ai-search-documents.js +41 -41
- package/dist/server/plugins/api-docs/search/search-resolver.js +1 -1
- package/dist/server/plugins/api-docs/utils/decorators.js +1 -1
- package/dist/server/plugins/api-functions/index.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/utils/normalize-revision-flags.js +1 -1
- package/dist/server/plugins/catalog-entities/types/extractors.d.ts +1 -2
- package/dist/server/plugins/catalog-entities/utils/openapi-component-content-extractor.d.ts +1 -2
- package/dist/server/plugins/catalog-entities/utils/openapi-schema-resolver.d.ts +1 -2
- package/dist/server/plugins/config-parser/format-error.js +4 -4
- package/dist/server/plugins/config-parser/loaders/content-slugs-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/versions-config-loader.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditAppDescriptionDialog.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditAppDialog.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/EditCallbackUrlDialog.js +1 -1
- package/dist/server/plugins/l10n/index.js +1 -1
- package/dist/server/plugins/lifecycle.js +2 -2
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.js +1 -1
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/errors.js +1 -1
- package/dist/server/plugins/markdown/is-partial.js +1 -1
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.d.ts +7 -0
- package/dist/server/plugins/markdown/markdoc/reparse-example-fences.js +1 -0
- package/dist/server/plugins/markdown/markdoc/resolve-raw-partials.js +1 -1
- package/dist/server/plugins/markdown/runtime-transform.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.js +20 -20
- package/dist/server/plugins/mcp/codemode/capabilities/fetch/index.js +5 -4
- package/dist/server/plugins/mcp/codemode/capabilities/types.d.ts +5 -2
- package/dist/server/plugins/mcp/codemode/capabilities/utils.js +4 -4
- package/dist/server/plugins/mcp/codemode/code-execution-audit.js +1 -1
- package/dist/server/plugins/mcp/codemode/code-execution-telemetry.d.ts +7 -2
- package/dist/server/plugins/mcp/codemode/code-execution-telemetry.js +1 -1
- package/dist/server/plugins/mcp/codemode/invoke-tool.js +1 -1
- package/dist/server/plugins/mcp/codemode/prompts.d.ts +1 -1
- package/dist/server/plugins/mcp/codemode/prompts.js +7 -6
- package/dist/server/plugins/mcp/codemode/sandbox/create-sandbox-setup.d.ts +2 -2
- package/dist/server/plugins/mcp/codemode/sandbox/create-sandbox-setup.js +1 -11
- package/dist/server/plugins/mcp/codemode/sandbox/polyfills/console.d.ts +2 -0
- package/dist/server/plugins/mcp/codemode/sandbox/polyfills/console.js +7 -0
- package/dist/server/plugins/mcp/codemode/sandbox/polyfills/index.d.ts +1 -0
- package/dist/server/plugins/mcp/codemode/sandbox/polyfills/index.js +2 -2
- package/dist/server/plugins/mcp/codemode/sandbox/tool-input-validator.d.ts +5 -0
- package/dist/server/plugins/mcp/codemode/sandbox/tool-input-validator.js +1 -0
- package/dist/server/plugins/mcp/codemode/sandbox/unknown-tool-hint.d.ts +12 -0
- package/dist/server/plugins/mcp/codemode/sandbox/unknown-tool-hint.js +2 -0
- package/dist/server/plugins/mcp/codemode/tools/describe-tools.js +3 -1
- package/dist/server/plugins/mcp/codemode/tools/execute.js +1 -1
- package/dist/server/plugins/mcp/codemode/tools/manage-credentials.d.ts +2 -2
- package/dist/server/plugins/mcp/codemode/tools/manage-credentials.js +2 -2
- package/dist/server/plugins/mcp/codemode/tools/tool-errors.d.ts +4 -0
- package/dist/server/plugins/mcp/codemode/tools/tool-errors.js +1 -1
- package/dist/server/plugins/mcp/constants.d.ts +1 -0
- package/dist/server/plugins/mcp/constants.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tool-schemas.d.ts +1 -0
- package/dist/server/plugins/mcp/docs-mcp/tool-schemas.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/create-anonymous-session.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/search.js +2 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/core/submit-feedback.d.ts +7 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/core/submit-feedback.js +3 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/core/types.d.ts +8 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/get-graphql-type.js +5 -5
- package/dist/server/plugins/mcp/docs-mcp/tools/graphql/types.d.ts +2 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/index.d.ts +1 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/index.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-endpoint-info.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-endpoints.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-full-api-description.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/get-security-schemes.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/list-apis.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/load-api-description.d.ts +17 -3
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/load-api-description.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/types.d.ts +6 -2
- package/dist/server/plugins/mcp/docs-mcp/utils/api-name-matching.d.ts +6 -1
- package/dist/server/plugins/mcp/docs-mcp/utils/api-name-matching.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/utils/api-titles.d.ts +14 -0
- package/dist/server/plugins/mcp/docs-mcp/utils/api-titles.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.d.ts +11 -0
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.js +5 -5
- package/dist/server/plugins/mcp/gateway-mcp/fetch/ssrf-guard.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/url-placeholders.d.ts +5 -0
- package/dist/server/plugins/mcp/gateway-mcp/fetch/url-placeholders.js +1 -0
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/index.js +1 -1
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/servers/mcp-server.js +3 -3
- package/dist/server/plugins/mcp/types.d.ts +1 -0
- package/dist/server/plugins/mcp/utils/available-sandbox-tools.js +1 -1
- package/dist/server/plugins/mcp/workers/execute-mcp-tool.js +1 -1
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.js +1 -1
- package/dist/server/plugins/search/engines/flexsearch/index.js +1 -1
- package/dist/server/plugins/search/engines/flexsearch/search-index.d.ts +8 -4
- package/dist/server/plugins/search/engines/flexsearch/search-index.js +1 -1
- package/dist/server/plugins/search/llmstxt/create-llms-txt-generator.js +1 -1
- package/dist/server/plugins/search/llmstxt/index.d.ts +3 -1
- package/dist/server/plugins/search/llmstxt/index.js +9 -9
- package/dist/server/plugins/search/llmstxt/is-included-in-llms-txt.d.ts +1 -2
- package/dist/server/sandbox/constants/host-functions.d.ts +3 -0
- package/dist/server/sandbox/constants/host-functions.js +1 -1
- package/dist/server/sandbox/constants/sandbox.d.ts +10 -0
- package/dist/server/sandbox/constants/sandbox.js +1 -1
- package/dist/server/sandbox/sandbox.js +3 -3
- package/dist/server/sandbox/types.d.ts +12 -0
- package/dist/server/sandbox/utils/execution-budget.js +1 -1
- package/dist/server/sandbox/utils/read-result.d.ts +8 -0
- package/dist/server/sandbox/utils/read-result.js +1 -0
- package/dist/server/sandbox/utils/return-last-expression.d.ts +6 -0
- package/dist/server/sandbox/utils/return-last-expression.js +1 -0
- package/dist/server/sandbox/utils/returns-from-top-level.d.ts +1 -2
- package/dist/server/sandbox/utils/returns-from-top-level.js +1 -1
- package/dist/server/sandbox/utils/setup-host-functions.d.ts +1 -0
- package/dist/server/sandbox/utils/setup-host-functions.js +3 -3
- package/dist/server/ssr/index.js +1 -1
- package/dist/server/ssr/render.js +1 -1
- package/dist/server/store.d.ts +1 -1
- package/dist/server/store.js +1 -1
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii.js +1 -1
- package/dist/server/types/plugins/common.d.ts +1 -2
- package/dist/server/types/plugins/search.d.ts +7 -2
- package/dist/server/utils/globs.d.ts +4 -0
- package/dist/server/utils/globs.js +1 -1
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/utils/search/highlight-text-for-search.js +1 -1
- package/dist/server/web-server/middleware/ensureSearchData.js +1 -1
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.d.ts +1 -1
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.js +1 -1
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/feedback.d.ts +3 -1
- package/dist/server/web-server/routes/feedback.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-server-card.js +1 -1
- package/dist/server/web-server/routes/otel/otel.js +1 -1
- package/dist/server/web-server/utils/legacy-openapi-redirects.js +1 -1
- package/dist/types/global-data.d.ts +1 -2
- package/dist/utils/slugger.js +1 -1
- package/dist/utils/url/sanitize-redirect-pathname.js +1 -1
- package/dist/{server/plugins/catalog-entities/utils/version-compare.d.ts → utils/version/compare-versions.d.ts} +1 -16
- package/dist/utils/version/compare-versions.js +1 -0
- package/package.json +11 -10
- package/dist/server/plugins/api-docs/search/search-indexer.d.ts +0 -9
- package/dist/server/plugins/api-docs/search/search-indexer.js +0 -1
- package/dist/server/plugins/catalog-entities/utils/version-compare.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,252 @@
|
|
|
1
1
|
# @redocly/redoc-revel
|
|
2
2
|
|
|
3
|
+
## 0.138.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0312a50ad9c: Added a `submit-feedback` tool to report documentation issues through the MCP server.
|
|
8
|
+
- e1b53618fb4: Changed the defaults of the `analytics.segment.trackPage`, `analytics.segment.includeTitleInPageCall`, and `analytics.rudderstack.trackPage` options to disable page view tracking by default.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 9e9b4914145: Improved the reliability of AI assistant answers during streaming.
|
|
13
|
+
- a4abb7fe95e: Fixed an issue where dropdown menus were cut off at the bottom of the viewport.
|
|
14
|
+
- a4abb7fe95e: Fixed an issue where GraphQL enum pages didn't render the **Referenced in** panel.
|
|
15
|
+
- fef7333d138: Fixed an issue where the `markdoc-example` tag rendered an empty result panel with `renderDemo=true`.
|
|
16
|
+
- 6605daa2732: Updated the Claude Desktop instructions on the `/mcp` page to add the Docs MCP server as a custom connector.
|
|
17
|
+
- e37c4f10360: Fixed an issue where MCP server lookups failed when several API description files shared a title.
|
|
18
|
+
- 2f3a264ac57: Fixed webhook and callback payload schemas in OpenAPI docs to correctly display read-only and write-only fields.
|
|
19
|
+
- 870f2254ffb: Fixed MCP server returning an empty result instead of an error when code execution produced a value too large or invalid for JSON conversion.
|
|
20
|
+
- 26e86082ad6: Fixed the API docs sidebar incorrectly highlighting an adjacent section while content was being lazy-loaded.
|
|
21
|
+
- bb5709ab9be: Updated the **Try it** console's example picker to label unnamed examples as `Default` instead of an internal identifier from the API description.
|
|
22
|
+
- bb5709ab9be: Fixed an issue where the **Try it** console opened on the first request body example in OpenAPI docs instead of the example selected in the request panel.
|
|
23
|
+
- e5306838bd9: Fixed an issue where the theme UI strings remained in the previously selected language after users navigated to a page in a different locale without using the language picker.
|
|
24
|
+
- Updated dependencies [a4abb7fe95e]
|
|
25
|
+
- Updated dependencies [a4abb7fe95e]
|
|
26
|
+
- Updated dependencies [ded8ed1ec72]
|
|
27
|
+
- Updated dependencies [fef7333d138]
|
|
28
|
+
- Updated dependencies [6605daa2732]
|
|
29
|
+
- Updated dependencies [de7f42377f7]
|
|
30
|
+
- Updated dependencies [2f3a264ac57]
|
|
31
|
+
- Updated dependencies [26e86082ad6]
|
|
32
|
+
- Updated dependencies [bb5709ab9be]
|
|
33
|
+
- Updated dependencies [bb5709ab9be]
|
|
34
|
+
- @redocly/theme@0.70.0-next.0
|
|
35
|
+
- @redocly/api-docs@0.3.0-next.0
|
|
36
|
+
- @redocly/realm-asyncapi-sdk@0.16.0-next.0
|
|
37
|
+
|
|
38
|
+
## 0.137.0
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- 7df87b0c29: Added the `singleExpanded` attribute to the `accordion-group` Markdoc tag to keep only one accordion open at a time.
|
|
43
|
+
- 34be1ea876: Improved search to index every field, heading, and message.
|
|
44
|
+
- b1ae95e5f8: Added `linkIcon`, `cta`, `iconColor`, `badge`, `badgeColor`, and `badgeIcon` attributes to the `card` Markdoc tag to enhance customization options.
|
|
45
|
+
- 1a3624bd9d: Added recovery hints displayed when Docs MCP lookup failed.
|
|
46
|
+
- 73e4213006: Added `accordion` and `accordion-group` Markdoc tags to organize content into collapsible sections.
|
|
47
|
+
- 2c5afad45c: Added a `Connect to the MCP server` page at `/mcp` with tabbed setup instructions for Claude, ChatGPT/Codex, and raw JSON configuration.
|
|
48
|
+
Extended the **Connect MCP** button with copy options for Claude Code and Codex CLI.
|
|
49
|
+
- c3957bee9b: Improved MCP server code mode to reduce AI agent script failures and provide clearer error messages.
|
|
50
|
+
- 772bee46a3: Improved the credentials page to show all accepted API credentials.
|
|
51
|
+
- da18d14476: Added validation to the MCP credentials form.
|
|
52
|
+
- dc778d3244: Added an opt-in `/mcp-public` endpoint to serve public content without authentication on RBAC-restricted projects.
|
|
53
|
+
- 1d9074a431: Added Docs MCP server audience validation for bearer tokens.
|
|
54
|
+
With audience enforcement active, tokens whose `aud` claims names other organizations are logged, reported, and rejected.
|
|
55
|
+
Tokens without an `aud` claim keep working.
|
|
56
|
+
- a2990a8835: Added an `onClose` prop to the custom `ReplayGate` component.
|
|
57
|
+
The prop closes the Try it overlay when users dismiss the sign-in panel.
|
|
58
|
+
- 99c30ac1f7: Added `idea` as a supported `type` for the `admonition` Markdoc tag.
|
|
59
|
+
- bf3aa0200b: Improved sidebar accessibility: separators are no longer announced as links by screen readers and no longer receive keyboard focus.
|
|
60
|
+
- 5f0a750301: Updated default border radius for components.
|
|
61
|
+
- d53bc00a38: Added translations for the `Connect to MCP server` and page action dropdown toggle labels.
|
|
62
|
+
- 282cd95c2b: Improved the version picker to sort versions from newest to oldest using numeric-aware sorting, that is: `2.10` before `2.9`.
|
|
63
|
+
Projects with a `versions.yaml` file keep the order and default version specified in that file.
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- 6314155150: Fixed an empty **Download** panel that appeared on the OpenAPI and AsyncAPI overview page when `downloadUrls` was set to an empty list.
|
|
68
|
+
- 0a77ab6ce1: Fixed an issue where API docs pages opened scrolled down, hiding the breadcrumbs and any custom navigation placed above the API description.
|
|
69
|
+
- 4925ce16be: Fixed an issue in API docs where a schema that inherited its `discriminator` from an `allOf` parent displayed only the discriminator property, without its variants or other properties.
|
|
70
|
+
- 941a6282ce: Fixed an issue where several Redocly extensions were incorrectly rendered as custom vendor extensions when `showExtensions` was enabled.
|
|
71
|
+
- dc778d3244: Fixed the gap between the label and the dropdown arrow in the `Connect to MCP` button.
|
|
72
|
+
- f53573e23b: Fixed an issue where the **Copied!** tooltip on copy buttons disappeared too early when the button was clicked repeatedly.
|
|
73
|
+
- 6edee5d9b4: Fixed an issue where raw HTML in operation descriptions leaked into search results and was rendered as literal text.
|
|
74
|
+
- 8eb519653c: Fixed security vulnerabilities `CVE-2026-84375`, `CVE-2026-84363`, `CVE-2026-84364` and `CVE-2026-39408` by upgrading `js-yaml` to version `4.3.2` and `hono` to version `4.13.7`.
|
|
75
|
+
- 96bec15e63: Fixed an issue where environment variable placeholders (`{{ process.env.VAR }}`) in `redocly.yaml` resolved to their build-time values instead of the server's runtime environment.
|
|
76
|
+
- 7feb5d129e: Fixed the styling of dividers on Markdown pages.
|
|
77
|
+
- 82ded2a052: Fixed an issue in API docs where the request code sample lost its form fields and displayed an empty body.
|
|
78
|
+
- 27bb2676bf: Fixed an issue in OpenAPI docs where schemas were positioned before operations in the sidebar.
|
|
79
|
+
- 8eda45d517: Updated `openapi-sampler` to version `1.7.5`.
|
|
80
|
+
- 4925ce16be: Fixed an issue where a variant whose schema was unavailable, such as a schema restricted by RBAC, displayed as an empty option.
|
|
81
|
+
- 34e13e3c9e: Fixed OAuth2 client credentials exchange in the MCP gateway credentials form.
|
|
82
|
+
- 5aa4838269: Fixed an issue where SSO login in projects without an `l10n` configuration caused identity providers with strict `ui_locales` validation to reject the login request.
|
|
83
|
+
- bff49e7278: Fixed an issue in OpenAPI docs where selecting an example in the response panel did not update the request code sample.
|
|
84
|
+
The issue occurred when request and response examples shared the same key.
|
|
85
|
+
- 2f5a68164c: Fixed an issue where Docs MCP API lookups rejected names that are unique parts of API titles.
|
|
86
|
+
- ac184788d1: Fixed an issue where angle brackets: `<`, `>` weren't rendered inside inline code within Markdown link text, such as `` [`command <name>`](./page.md) ``.
|
|
87
|
+
- d43a91af69: Fixed MCP code mode tool results and descriptions to match declared signatures.
|
|
88
|
+
- b146b82606: Fixed MCP server code mode crashes for runs that produce no output.
|
|
89
|
+
- e984568ea3: Improved the MCP gateway to ask which credentials the user holds instead of picking the default.
|
|
90
|
+
- 22036d1336: Fixed an issue where the MCP server sent outdated credentials.
|
|
91
|
+
This issue happened for APIs that accept multiple security schemes.
|
|
92
|
+
- f53b16a05d: Updated the MCP API-credentials page to match Redocly styling.
|
|
93
|
+
- 3e77c0c259: Fixed an issue where the MCP server served `http://` links behind proxies.
|
|
94
|
+
Credential, skill, and OAuth URLs respect the forwarded protocol and default to `https` for production.
|
|
95
|
+
In local development, URLs keep the `http` protocol.
|
|
96
|
+
- 03bb0c362f: Fixed MCP connections for clients on the `2026-07-28` protocol revision.
|
|
97
|
+
- 6ee5565e90: Fixed MCP OAuth discovery: the authorization server metadata `issuer` matches the portal origin (RFC 8414), 401 challenges include `scope` and `authorization_uri`.
|
|
98
|
+
Rejected bearer tokens return `error="invalid_token"`.
|
|
99
|
+
- 1957189949: Removed the `405` status code text from the MCP endpoint pages (`/mcp` and `/mcp-public`).
|
|
100
|
+
- 43ec2eb3a8: Fixed the `documentationUrl` in the MCP server card to include the path prefix.
|
|
101
|
+
- 9e802e7048: Fixed an issue where `describe-tools` tool in the MCP server didn't provide a human-readable name.
|
|
102
|
+
- db1e5edd9a: Fixed an issue where project SSO login failed when the IdP sent many group claims.
|
|
103
|
+
- 1a3624bd9d: Fixed an issue where the Docs MCP `get-endpoint-info` tool returned operations for paths hidden with `x-mcp`.
|
|
104
|
+
- 2a8d8ef03f: Fixed security vulnerabilities `CVE-2026-83610` and `CVE-2026-45820` by upgrading `@xmldom/xmldom` to version `0.9.12` and `fflate` to version `0.7.5`.
|
|
105
|
+
- 568a904d7b: Fixed spacing and the selected language tab indicator in API docs overview panels.
|
|
106
|
+
- 778ec4397e: Fixed an issue in OpenAPI docs where object-valued path item extensions, such as `x-okta-lifecycle`, rendered as extra HTTP operations in the navigation.
|
|
107
|
+
- 89a5b5b4d7: Fixed an issue where pages rendered blank for visitors with ad blockers.
|
|
108
|
+
This issue happened when the product name matched an ad-filter pattern (for example, "Ads").
|
|
109
|
+
- 67c2f278ff: Fixed an issue where example descriptions weren't rendered in the request and response samples panels.
|
|
110
|
+
- 126b583155: Fixed `mcp.docs.ignore` to correctly exclude ignored content from Docs MCP search results.
|
|
111
|
+
- 4925ce16be: Fixed an issue where code samples omitted the discriminator value of the selected variant.
|
|
112
|
+
- c09e6eb1c9: Fixed an issue in Replay where Basic authentication credentials with non-ASCII characters produced a corrupted Authorization header or prevented the request from being sent.
|
|
113
|
+
- e5705e50ad: Fixed an issue in Replay and the Try it console where operations with many editable fields got slower on each reopening.
|
|
114
|
+
- 2fde3a1558: Fixed an issue in the **Try it** console where closing an inactive tab moved the selection to a different tab instead of keeping the active tab.
|
|
115
|
+
- 9a6190c4c9: Fixed an issue in Replay where the request body editor didn't display property descriptions for content with Markdown formatting.
|
|
116
|
+
- efab0652d2: Fixed an issue in Replay's mobile layout where the first character typed in a request input moved focus to the close button.
|
|
117
|
+
This behavior caused the rest of the input to be lost.
|
|
118
|
+
- b486e9369b: Added missing tooltips to the Try it console parameter rows in OpenAPI docs.
|
|
119
|
+
- da83ea0a17: Fixed an issue in Replay where truncated tab names and request titles did not display their full versions on mouse hover or keyboard focus.
|
|
120
|
+
- c9412b45d4: Reworded the AI assistant's welcome message, disclaimer, and error messages for consistent naming.
|
|
121
|
+
- 2f980fd606: Improved the 404 page for API Docs.
|
|
122
|
+
- 6bb6424826: Fixed an issue where clicking an item in the table of contents caused the selection indicator to jump and highlight an incorrect item.
|
|
123
|
+
- 6bfb1e9861: Fixed an issue in API docs where deep links did not open the linked field.
|
|
124
|
+
- 43ec2eb3a8: Fixed broken `llms.txt` links to use the configured `seo.siteUrl` instead of the Redocly-hosted domain.
|
|
125
|
+
- d53bc00a38: Fixed small visual issues with the `Connect to MCP server` button and aligned its styling with the page action button.
|
|
126
|
+
- 27bb2676bf: Fixed an issue in API docs where the menu link for a section of a tag description contained a duplicated path segment.
|
|
127
|
+
- e85d19c492: Fixed an issue where Markdown tables would render a collapsed gray header row when all heading cells were empty.
|
|
128
|
+
- 505de02f7b: Fixed an issue where a search query that contained duplicated characters returned an error.
|
|
129
|
+
- 8e4959baca: Updated `@redocly/openapi-core` to version `2.53.0`.
|
|
130
|
+
- 4925ce16be: Fixed an issue where a mapping key that pointed to the same schema as `defaultMapping` disappeared from the variant list.
|
|
131
|
+
- b595126fdb: Updated the language selection indicator's position in the API docs Languages panel to display inside the language selection box.
|
|
132
|
+
- 5b825b1f1f: Fixed an issue in OpenAPI docs where the server URL was missing from the request panel for APIs with a single server.
|
|
133
|
+
This issue occurred when the mock server was disabled.
|
|
134
|
+
- 4925ce16be: Fixed an issue in API docs where the code samples panel displayed no `Discriminator` selector for schemas that inherited their `discriminator` from an `allOf` parent.
|
|
135
|
+
- 6514fcebcd: Fixed an issue where preview did not update `llms.txt` and page Markdown related to LLMs.
|
|
136
|
+
- Updated dependencies [7df87b0c29]
|
|
137
|
+
- Updated dependencies [6314155150]
|
|
138
|
+
- Updated dependencies [0a77ab6ce1]
|
|
139
|
+
- Updated dependencies [34be1ea876]
|
|
140
|
+
- Updated dependencies [4925ce16be]
|
|
141
|
+
- Updated dependencies [941a6282ce]
|
|
142
|
+
- Updated dependencies [b1ae95e5f8]
|
|
143
|
+
- Updated dependencies [dc778d3244]
|
|
144
|
+
- Updated dependencies [0f773ab0bc]
|
|
145
|
+
- Updated dependencies [f53573e23b]
|
|
146
|
+
- Updated dependencies [6edee5d9b4]
|
|
147
|
+
- Updated dependencies [73e4213006]
|
|
148
|
+
- Updated dependencies [8eb519653c]
|
|
149
|
+
- Updated dependencies [7feb5d129e]
|
|
150
|
+
- Updated dependencies [82ded2a052]
|
|
151
|
+
- Updated dependencies [27bb2676bf]
|
|
152
|
+
- Updated dependencies [8eda45d517]
|
|
153
|
+
- Updated dependencies [4925ce16be]
|
|
154
|
+
- Updated dependencies [bff49e7278]
|
|
155
|
+
- Updated dependencies [2c5afad45c]
|
|
156
|
+
- Updated dependencies [1957189949]
|
|
157
|
+
- Updated dependencies [dc778d3244]
|
|
158
|
+
- Updated dependencies [1d9074a431]
|
|
159
|
+
- Updated dependencies [941a6282ce]
|
|
160
|
+
- Updated dependencies [1bfa724240]
|
|
161
|
+
- Updated dependencies [568a904d7b]
|
|
162
|
+
- Updated dependencies [778ec4397e]
|
|
163
|
+
- Updated dependencies [89a5b5b4d7]
|
|
164
|
+
- Updated dependencies [67c2f278ff]
|
|
165
|
+
- Updated dependencies [4925ce16be]
|
|
166
|
+
- Updated dependencies [a2990a8835]
|
|
167
|
+
- Updated dependencies [9a6190c4c9]
|
|
168
|
+
- Updated dependencies [b486e9369b]
|
|
169
|
+
- Updated dependencies [c9412b45d4]
|
|
170
|
+
- Updated dependencies [2f980fd606]
|
|
171
|
+
- Updated dependencies [6bb6424826]
|
|
172
|
+
- Updated dependencies [99c30ac1f7]
|
|
173
|
+
- Updated dependencies [4a99bb2878]
|
|
174
|
+
- Updated dependencies [bf3aa0200b]
|
|
175
|
+
- Updated dependencies [5f0a750301]
|
|
176
|
+
- Updated dependencies [6bfb1e9861]
|
|
177
|
+
- Updated dependencies [ea1ead5b3f]
|
|
178
|
+
- Updated dependencies [d53bc00a38]
|
|
179
|
+
- Updated dependencies [d53bc00a38]
|
|
180
|
+
- Updated dependencies [27bb2676bf]
|
|
181
|
+
- Updated dependencies [e85d19c492]
|
|
182
|
+
- Updated dependencies [8e4959baca]
|
|
183
|
+
- Updated dependencies [4925ce16be]
|
|
184
|
+
- Updated dependencies [b595126fdb]
|
|
185
|
+
- Updated dependencies [5b825b1f1f]
|
|
186
|
+
- Updated dependencies [4925ce16be]
|
|
187
|
+
- @redocly/theme@0.69.0
|
|
188
|
+
- @redocly/api-docs@0.2.0
|
|
189
|
+
- @redocly/realm-asyncapi-sdk@0.15.0
|
|
190
|
+
- @redocly/portal-plugin-mock-server@0.22.0
|
|
191
|
+
|
|
192
|
+
## 0.137.0-next.12
|
|
193
|
+
|
|
194
|
+
### Minor Changes
|
|
195
|
+
|
|
196
|
+
- 7df87b0c29d: Added the `singleExpanded` attribute to the `accordion-group` Markdoc tag to keep only one accordion open at a time.
|
|
197
|
+
- c3957bee9b2: Improved MCP server code mode to reduce AI agent script failures and provide clearer error messages.
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- 43ec2eb3a83: Fixed the `documentationUrl` in the MCP server card to include the path prefix.
|
|
202
|
+
- c09e6eb1c9d: Fixed an issue in Replay where Basic authentication credentials with non-ASCII characters produced a corrupted Authorization header or prevented the request from being sent.
|
|
203
|
+
- e5705e50add: Fixed an issue in Replay and the Try it console where operations with many editable fields got slower on each reopening.
|
|
204
|
+
- 43ec2eb3a83: Fixed broken `llms.txt` links to use the configured `seo.siteUrl` instead of the Redocly-hosted domain.
|
|
205
|
+
- 8e4959baca4: Updated `@redocly/openapi-core` to version `2.53.0`.
|
|
206
|
+
- Updated dependencies [7df87b0c29d]
|
|
207
|
+
- Updated dependencies [0f773ab0bc9]
|
|
208
|
+
- Updated dependencies [8e4959baca4]
|
|
209
|
+
- @redocly/theme@0.69.0-next.11
|
|
210
|
+
- @redocly/realm-asyncapi-sdk@0.15.0-next.4
|
|
211
|
+
- @redocly/api-docs@0.2.0-next.12
|
|
212
|
+
- @redocly/portal-plugin-mock-server@0.22.0-next.9
|
|
213
|
+
|
|
214
|
+
## 0.137.0-next.11
|
|
215
|
+
|
|
216
|
+
### Patch Changes
|
|
217
|
+
|
|
218
|
+
- 63141551504: Fixed an empty Download panel that appeared on the OpenAPI and AsyncAPI overview page when `downloadUrls` was set to an empty list.
|
|
219
|
+
- 8eb519653cd: Fixed security vulnerabilities `CVE-2026-84375`, `CVE-2026-84363`, `CVE-2026-84364` and `CVE-2026-39408` by upgrading `js-yaml` to version `4.3.2` and `hono` to version `4.13.7`.
|
|
220
|
+
- 2fde3a15587: Fixed an issue in the **Try it** console where closing an inactive tab moved the selection to a different tab instead of keeping the tab the user was working in.
|
|
221
|
+
- efab0652d2f: Fixed an issue in Replay's mobile layout where the first character typed in a request input moved focus to the close button, causing the rest of the input to be lost.
|
|
222
|
+
- e85d19c4926: Fixed an issue where Markdown tables would render a collapsed gray header row when all heading cells were empty.
|
|
223
|
+
- Updated dependencies [63141551504]
|
|
224
|
+
- Updated dependencies [8eb519653cd]
|
|
225
|
+
- Updated dependencies [e85d19c4926]
|
|
226
|
+
- @redocly/api-docs@0.2.0-next.11
|
|
227
|
+
- @redocly/theme@0.69.0-next.10
|
|
228
|
+
- @redocly/portal-plugin-mock-server@0.22.0-next.8
|
|
229
|
+
|
|
230
|
+
## 0.137.0-next.10
|
|
231
|
+
|
|
232
|
+
### Minor Changes
|
|
233
|
+
|
|
234
|
+
- 34be1ea876c: Improved search to index every field, heading, and message.
|
|
235
|
+
Search links each result to the exact field on the page.
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- 0a77ab6ce1c: Fixed an issue where API docs pages opened scrolled down, hiding the breadcrumbs and any custom navigation placed above the API description.
|
|
240
|
+
- 2a8d8ef03f8: Fixed security vulnerabilities `CVE-2026-83610` and `CVE-2026-45820` by upgrading `@xmldom/xmldom` to version `0.9.12` and `fflate` to version `0.7.5`.
|
|
241
|
+
- b486e9369b6: Fixed missing tooltips in the Try it console parameter rows in OpenAPI docs.
|
|
242
|
+
- da83ea0a174: Fixed an issue in Replay where truncated tab names and request titles did not display their full versions on mouse hover or keyboard focus.
|
|
243
|
+
- Updated dependencies [0a77ab6ce1c]
|
|
244
|
+
- Updated dependencies [34be1ea876c]
|
|
245
|
+
- Updated dependencies [1bfa724240f]
|
|
246
|
+
- Updated dependencies [b486e9369b6]
|
|
247
|
+
- @redocly/api-docs@0.2.0-next.10
|
|
248
|
+
- @redocly/theme@0.69.0-next.9
|
|
249
|
+
|
|
3
250
|
## 0.137.0-next.9
|
|
4
251
|
|
|
5
252
|
### Minor Changes
|
package/dist/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./server/utils/set-execution-mode.js";import"./cli/utils/node-version-check.js";import
|
|
2
|
+
import"./server/utils/set-execution-mode.js";import"./cli/utils/node-version-check.js";import s from"mri";import*as t from"node:path";import{tmpdir as w}from"node:os";import*as d from"node:fs";import{cliCommandNames as v}from"./constants/common.js";import{initPlugins as j}from"./server/plugins/lifecycle.js";import{loadEnvVariables as E}from"./server/utils/envs/load-env-variables.js";import{PORTAL_VERSION as O}from"./server/version.js";import{logger as n}from"./server/tools/notifiers/logger.js";import{reporter as o}from"./server/tools/notifiers/reporter.js";import{sha as h}from"./server/utils/crypto/sha.js";import{envConfig as y}from"./server/config/env-config.js";import{PACKAGE_NAME as g}from"./config/product-gates.js";import{develop as A}from"./cli/develop.js";import{eject as D}from"./cli/eject/index.js";import{beforeCommand as C}from"./server/utils/lifecycle-hooks.js";import{Store as b}from"./server/store.js";import{build as P}from"./cli/build/index.js";import{fromCurrentDir as x}from"./server/utils/paths.js";import{translationsCliOpts as T}from"./cli/translations/options.js";import{generateTranslations as S}from"./cli/translations/index.js";import{EntitlementsProvider as k}from"./server/entitlements/entitlements-provider.js";import{isValidPlan as I}from"./server/entitlements/is-valid-plan.js";import{stopAllCompilers as V}from"./server/esbuild/esbuild.js";import{copyLibsqlPrebuiltBinary as L}from"./cli/build/libsql/copy-prebuilt-binary.js";import{telemetry as u}from"./cli/telemetry/index.js";import{stats as R}from"./cli/stats/index.js";import{statsCliOpts as M}from"./cli/stats/options.js";const m=process.argv[2];let c;const f={alias:{d:"project-dir",p:"port"},default:{"project-dir":y.REDOCLY_CONTENT_DIR||process.cwd(),outdir:"public"}},N={alias:f.alias,default:{...f.default,plan:"enterprise"}},_={alias:{d:"buildDir"},default:{buildDir:"public"}},F={boolean:["force"],alias:{f:"force",d:"project-dir"},default:{"project-dir":process.cwd()}};process.on("uncaughtException",async function(r){r?.code==="ERR_INVALID_STATE"?console.log("Ignore premature close error"):(n.error("Uncaught exception occurred. Stopping compilers."),await V(),n.error("Exiting due to uncaught exception"),await o.panic(r))});try{m||await o.panicOnContentError("Command not specified.");const r=k.instance();switch(["build","prepare","serve","stats"].includes(m)&&await r.init(),["eject","translate"].includes(m)&&await r.init({developModePlan:"enterprise"}),m){case"develop":case"preview":{const e=s(process.argv.slice(3),N),i=t.resolve(e["project-dir"]),a=encodeURIComponent(h(i)),l=t.join(w(),"redocly-public-"+a);d.existsSync(l)&&(n.verbose("Cleaning temporary output directory..."),d.rmSync(l,{recursive:!0,force:!0}),n.verbose("Temporary output directory cleaned."));const p=e.plan.toLowerCase();I(p)||await o.panicOnContentError(`Invalid --plan argument value '${p}'.`),await r.init({developModePlan:p}),c=new b({contentDir:t.resolve(e["project-dir"]),outdir:l,serverOutDir:x(import.meta.url,"./server/esbuild/cache/server")}),await C(v.DEVELOP,e,c),await A(e,c);break}case"build":case"prepare":{const e=s(process.argv.slice(3),f),i=t.resolve(t.join(e.outdir,"server"));c=new b({contentDir:t.resolve(e["project-dir"]),outdir:t.resolve(e.outdir,"client"),serverOutDir:i}),await C(v.BUILD,e,c),L(i),await P(e,c);break}case"serve":{await E();const e=s(process.argv.slice(3),_),i=t.resolve(e.buildDir);u.sendServeCliCommandExecutedMessage();const a=t.join(i,"server","index.mjs");d.existsSync(a)||await o.panic(`Server not found. Please run \`${g} build\` first (or \`${g} prepare\` for the deprecated command)`),import(a).catch(async l=>{await o.panic("Failed to load server",l)});break}case"eject":{r.canAccessFeature("themeEjecting")||await o.panicOnContentError('The "eject" command is not available for this project');const e=s(process.argv.slice(3),F),{lifecycleContext:{getConfig:i,fs:a}}=await j({outdir:"",contentDir:t.resolve(e["project-dir"]),setGlobalConfig:()=>null});a.dispose(),u.sendCliCommandEjectExecutedMessage([{id:"eject",object:"cliCommand",uri:"urn:redocly:realm:cli:cliCommand:eject",arguments:e}]),await D({...e,config:await i()}),n.clearAllTimeouts();break}case"translate":if(r.canAccessFeature("l10n")){const e=s(process.argv.slice(3),T);u.sendCliCommandTranslateExecutedMessage([{id:"translate",object:"cliCommand",uri:"urn:redocly:realm:cli:cliCommand:translate",arguments:e}]),await S(e)}else await o.panicOnContentError('The "translate" command is not available for this project');break;case"stats":{const e=s(process.argv.slice(3),M);await R(e);break}case"--version":console.log(O);break;default:await o.panicOnContentError(`Unknown command "${m}"`)}}catch(r){n.error("Exiting due to uncaught exception"),await o.panic(r)}
|
package/dist/cli/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import y from"node:path";import{unlink as R}from"node:fs/promises";import{writeFileSync as T}from"node:fs";import{envConfig as h}from"../../server/config/env-config.js";import{PORTAL_VERSION as A}from"../../server/version.js";import{logger as e}from"../../server/tools/notifiers/logger.js";import{reporter as f}from"../../server/tools/notifiers/reporter.js";import{shutdowner as O}from"../../server/tools/shutdowner.js";import{promiseMapLimit as D}from"../../server/utils/async/promise-map-limit.js";import{validateReactPages as E}from"../../server/plugins/pages/validators/validate-react-pages.js";import{ensureDir as S}from"../../server/utils/index.js";import{initPlugins as M,runPlugins as j,writeClientEntries as x}from"../../server/plugins/lifecycle.js";import{createClientCompiler as L,createNodeBundleCompiler as J}from"../../server/esbuild/esbuild.js";import{validateAllMarkdowns as k}from"../../server/plugins/markdown/compiler.js";import{copyEnvFiles as F}from"./copy-env-files.js";import{EsbuildError as s,esbuildLogger as d}from"../../server/esbuild/esbuild-logger.js";import{reportAllErrors as U}from"../../server/utils/report-all-errors.js";import{collectAnalytics as z}from"./analytics/collect-analytics.js";import{copyMigrationsFolder as N}from"../../server/providers/database/copy-migrations.js";import{telemetry as c}from"../telemetry/index.js";import{telemetryTraceStep as m}from"../telemetry/helpers/trace-step.js";async function li(v,i){c.initialize(A),e.info("Starting project build.");const C=e.startTiming();await m("com.redocly.build.start",async P=>{x(i);const p=await L(i,i.outdir,"production"),u=await J(i,i.serverOutDir,"production");let o,g;try{await m("com.redocly.build.clientCompilation",async()=>{const l=e.startTiming(),n=await p.rebuild().catch(a=>{throw new s(a)});Array.isArray(n.warnings)&&d(new s({warnings:n.warnings}));const r=e.infoTime(l,"Client JavaScript compiled");r&&c.sendTimingPerformedMessage([{id:"buildStep",object:"timing",uri:"urn:redocly:realm:cli:timing:buildStep",...r}])}),await m("com.redocly.build.serverCompilation",async()=>{const l=e.startTiming(),n=await u.rebuild().catch(a=>{throw new s(a)});Array.isArray(n.warnings)&&d(new s({warnings:n.warnings}));const r=e.infoTime(l,"Server JavaScript compiled");r&&c.sendTimingPerformedMessage([{id:"buildStep",object:"timing",uri:"urn:redocly:realm:cli:timing:buildStep",message:r.message,timeMs:r.timeMs}])}),await i.reloadMarkdocOptions();let t;({pluginInstances:t,lifecycleContext:o}=await M({outdir:i.outdir,serverOutDir:i.serverOutDir,contentDir:i.contentDir,devLogin:v.devLogin,setGlobalConfig:i.setGlobalConfig})),o.fs.dispose(),i.lifecycleContext=o,N(i),await j(t,i,o),g=z(i,o),await m("com.redocly.build.clientServerRecompile",async()=>{const l=e.startTiming();e.info("Re-compiling JavaScript with user code"),(await Promise.all([p.rebuild(),u.rebuild()]).catch(a=>{throw new s(a)})).forEach(({warnings:a})=>{Array.isArray(a)&&d(new s({warnings:a}))});const r=e.infoTime(l,"JavaScript re-compiled");r&&c.sendTimingPerformedMessage([{id:"buildStep",object:"timing",uri:"urn:redocly:realm:cli:timing:buildStep",...r}])}),await m("com.redocly.build.pagesValidation",async()=>{await E(i,o),await k(i,o)}),await U(o),i.markUserCodeReady()}catch(t){P?.error(t),t instanceof s&&await d(t),await f.panic(t instanceof Error?t:String(t))}finally{g&&await g.catch(()=>{}),await p.dispose(),await u.dispose()}f.printErrors(),e.info("Rendering pages..."),await m("com.redocly.build.prepareStaticData",async t=>{const l=e.startTiming(),n=[...i.getAllRoutes(),...i.getAllApiRoutes()];t?.setAttribute("totalRoutes",n.length.toString()),await D(n,15,a=>i.writeRouteStaticData(a,o));const r=e.successTime(l,"Page static data prepared.");r&&c.sendTimingPerformedMessage([{id:"buildStep",object:"timing",uri:"urn:redocly:realm:cli:timing:buildStep",...r}])}),await m("com.redocly.build.storeSerialization",async()=>{const t=e.startTiming();S(i.serverOutDir),T(y.join(i.serverOutDir,"store.json"),JSON.stringify(await i.toJson())),e.successTime(t,"Store serialized and written."),F(i)});const w=h.REDOCLY_PROBLEMS_OUTPUT_FILE;if(w){const t=e.startTiming();T(S(w),JSON.stringify(f.getProblems()),"utf-8"),e.successTime(t,"Broken links written.")}await R(y.join(i.serverOutDir,"index.css"));const b=e.successTime(C,"All done");b&&c.sendTimingPerformedMessage([{id:"buildStep",object:"timing",uri:"urn:redocly:realm:cli:timing:buildStep",...b}])}),await O.exitWithCode(0)}export{li as build};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as c from"path";import{lstatSync as m,readdirSync as y,copyFileSync as F,mkdirSync as h}from"fs";import{FsErrors as g}from"../../constants/common.js";import{logger as a}from"../../server/tools/notifiers/logger.js";import{getGlobMatcher as l}from"./glob.js";import{askUserToConfirm as x,askUserToSelectComponents as j}from"./ejectPrompt.js";function f(r){return y(r).flatMap(i=>{const t=c.join(r,i);return m(t).isDirectory()?f(t):t})}function A(r,i=c.resolve("")){const t=(n,o,e)=>{o.forEach(s=>{n[s]={...n[s]||{}},n=n[s]}),n["."]=Array.isArray(n["."])?[...n["."],e]:[e]};return r.reduce((n,o)=>{if(m(c.join(i,o)).isFile()){const{dir:e,base:s}=c.parse(o),d=e?e.split(c.sep).filter(Boolean):[];t(n,d,s)}return n},{})}function u(r,i){return c.normalize(r).replace(c.normalize(i),"").replace(/^[
|
|
1
|
+
import*as c from"path";import{lstatSync as m,readdirSync as y,copyFileSync as F,mkdirSync as h}from"fs";import{FsErrors as g}from"../../constants/common.js";import{logger as a}from"../../server/tools/notifiers/logger.js";import{getGlobMatcher as l}from"./glob.js";import{askUserToConfirm as x,askUserToSelectComponents as j}from"./ejectPrompt.js";function f(r){return y(r).flatMap(i=>{const t=c.join(r,i);return m(t).isDirectory()?f(t):t})}function A(r,i=c.resolve("")){const t=(n,o,e)=>{o.forEach(s=>{n[s]={...n[s]||{}},n=n[s]}),n["."]=Array.isArray(n["."])?[...n["."],e]:[e]};return r.reduce((n,o)=>{if(m(c.join(i,o)).isFile()){const{dir:e,base:s}=c.parse(o),d=e?e.split(c.sep).filter(Boolean):[];t(n,d,s)}return n},{})}function u(r,i){return c.normalize(r).replace(c.normalize(i),"").replace(/^[/\\]+/,"")}function C(r,i={}){let t=[];const{ignoreFilePatterns:n,onlyFilePatterns:o}=i;try{if(t=f(r).map(e=>u(e,r)),o){const e=l(o);t=t.filter(s=>e(s))}if(n){const e=l(n);return t.filter(s=>!e(s))}return t}catch(e){if(e.code===g.NotExist)return t;throw e}}function T(r,i){return r.filter(t=>i.includes(t))}function v(r,i,t){const n=u(t,i),o=c.resolve(i,n),e=c.resolve(r,n);return h(c.dirname(e),{recursive:!0}),F(o,e),e}function p(r,i,t,n){const o=a.startTiming(),e=v(t,i,r),s=`\u{1F4E6} Component ${r} has been ejected into %rp`;n?.onSuccess?.(s),a.infoTime(o,s,e)}async function S({componentToCopy:r,ejectedFiles:i=[],copyFrom:t,copyTo:n,options:o={}}){if(i.includes(r)&&!o.force){const e=`File [ ${r} ] will be overwritten. Are you sure ?`;return o&&o.onOverride?o.onOverride(e):await x(e)?p(r,t,n):a.info(`Skipped [ ${r} ] component ejection.`)}return p(r,t,n,o)}async function $({componentList:r,ejectedComponents:i,pathToThemeFolder:t,pathToPortalCustomThemeFolder:n,options:o}){const e=await j(r,t);for(const s of e)await S({componentToCopy:s,ejectedFiles:i,copyFrom:t,copyTo:n,options:o})}export{S as copyComponent,p as copyComponentAndReport,$ as copyComponentsFromList,v as copyThemeComponent,T as getEjectedFiles,C as getThemeFiles,u as stripComponentThemePath,A as toFileTree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{appendFileSync as P,mkdirSync as p,writeFileSync as a}from"fs";import e from"path";import{CUSTOM_MARKDOC_TAGS_PATH as d,CUSTOM_MARKDOC_OPTIONS_PATH as l
|
|
1
|
+
import{appendFileSync as P,mkdirSync as p,writeFileSync as a}from"fs";import e from"path";import{CUSTOM_MARKDOC_TAGS_PATH as d,CUSTOM_MARKDOC_OPTIONS_PATH as l,USER_THEME_ALIAS as C}from"../../constants/common.js";import{logger as T}from"../../server/tools/notifiers/logger.js";import{getComponentTemplate as O}from"./get-component-template.js";import{getComponentsFileTemplate as D}from"./get-components-file-template.js";import{getSchemaTemplate as E}from"./get-schema-template.js";import{isValidFilePath as f}from"./is-valid-file-path.js";import{capitalize as F}from"./string-utils.js";async function k(h,o,s){const t=F(o),n=e.resolve(h,C),c=e.resolve(n,l,d),i=e.resolve(n,t),S=e.resolve(n,l,"components.ts"),m=e.resolve(i,`${t}.tsx`),r=e.resolve(c,`${o}.markdoc.ts`),g=!await f(m,s),u=!await f(r,s);if((g||u)&&!s)return;const v=O(t),_=E(o),A=D(t);p(i,{recursive:!0}),p(c,{recursive:!0}),a(r,_),T.success(`Generated schema: file://${r}`),a(m,v),T.success(`Generated component: file://${m}`),P(S,A)}export{k as generateTag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{logger as a}from"../../server/tools/notifiers/logger.js";import{reporter as n}from"../../server/tools/notifiers/reporter.js";import{generateTag as i}from"./generate-tag.js";import{normalizeTagName as c}from"./normalize-tag-name.js";const p={Tag:"tag"},g={boolean:["force"],alias:{f:"force",d:"contentDir"},default:{contentDir:process.cwd()}};async function l(t){const[e,r]=t._;try{switch(e){case p.Tag:if(!r)return n.panicOnContentError(`${e} "name" is not provided.`);const o=await c(r);return i(t.contentDir,o,t.force)
|
|
1
|
+
import{logger as a}from"../../server/tools/notifiers/logger.js";import{reporter as n}from"../../server/tools/notifiers/reporter.js";import{generateTag as i}from"./generate-tag.js";import{normalizeTagName as c}from"./normalize-tag-name.js";const p={Tag:"tag"},g={boolean:["force"],alias:{f:"force",d:"contentDir"},default:{contentDir:process.cwd()}};async function l(t){const[e,r]=t._;try{switch(e){case p.Tag:{if(!r)return n.panicOnContentError(`${e} "name" is not provided.`);const o=await c(r);return i(t.contentDir,o,t.force)}case null:case void 0:await n.panicOnContentError('generation "type" is not provided.');break;default:await n.panicOnContentError(`Unsupported type: "${e}".`)}}catch{return a.warn(`${e} was not created.`)}}export{l as generate,g as generateCliOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{LayoutVariant as o}from"@redocly/config";import{usePageSharedData as f}from"../../providers/page-data/hooks";function d(){const t=f("apiDocsStore"),n=!!t,s=t?.options?.layout,[c,i]=e.useState(!1),[l,u]=e.useState(null),a=l??s??o.THREE_PANEL;function r(){u(a===o.STACKED?o.THREE_PANEL:o.STACKED)}function p(){i(S=>!S)}return{onChangeViewClick:r,onChangeCollapseSidebarClick:p,layout:a,collapsedSidebar:c,isApiDocs:n}}export{d as useActions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLocation as
|
|
1
|
+
import{useLocation as A}from"react-router";import{useEffect as w,useMemo as f,useRef as _,useState as k}from"react";import{useActiveSectionId as D}from"@redocly/theme/core/hooks";import{getMenuItemType as C}from"@redocly/theme/core/utils";import{MenuItemType as v}from"@redocly/theme/core/constants";import{CATALOG_BASE_SLUG as T,CATALOG_SLUGS as h}from"../../../constants/catalog-entities";import{usePageSharedData as y,useSidebarItemsData as G,useSidebarConnectedCatalogConfig as E,useSidebarConnectedCatalogEntity as O}from"../../providers/page-data/hooks";import{mapItemsPropsToState as b}from"./utils";import{injectCatalogItems as K}from"../../utils/catalog/inject-catalog-items";import{filterOutVersionedItems as R}from"./helpers/filter-out-versioned-items";const B="catalog.backToAllLabel",M=`${T}/${h.ALL}`;function U(o){const e=G();return f(()=>R(e,o),[e,o])}function J(o){const e=A(),t=D(e,!0),a=O(),g=E(),c=U(o),s=a?K(c,a.key,g?.slug,e.search):c,u=_(null),r=f(()=>b(s,e,t),[t,e,s]),l=y("current-catalog-info"),p=f(()=>S(r),[s]),[n,m]=k(p),i=n.length>0?n[n.length-1]:void 0,I=i&&b([...i.item.link?[{...i.item,items:[],menuStyle:void 0,separatorLine:!1}]:[],...i.item.items],e,t);w(()=>{if(!u.current||u.current!==t){const d=S(r);m(d),u.current=t}},[c,e,t]);const L=i?{slug:i.previousLink,event:"sidebar_drilldown_back_button.clicked"}:a?{label:"Back to Catalog",labelTranslationKey:B,slug:M,event:"back_to_catalog_button.clicked"}:l?{label:l.catalog.label,labelTranslationKey:l.catalog.labelTranslationKey,slug:l.catalog.link,event:"back_to_catalog_button.clicked"}:void 0;return{currentItems:I||r,allSidebarItems:r,popDrilldownState:()=>{n.length>0&&m(n.slice(0,n.length-1))},pushDrilldownState:d=>{m([...n,d])},backLink:L,versionLabel:a?.version??null}}function S(o,e=[]){for(const t of o){if(!t.active&&!t.hasActiveSubItem)continue;if(C(t)===v.DrillDown&&e.push({item:t}),t.active)return e;if(t.hasActiveSubItem)return S(t.items,e)}return e}export{U as useRawSidebarItems,J as useSidebarItems};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { UseCatalogResponse } from '@redocly/theme/core/types';
|
|
2
|
-
import type { UseCatalogProps } from '@redocly/theme/core/types';
|
|
1
|
+
import type { UseCatalogResponse, UseCatalogProps } from '@redocly/theme/core/types';
|
|
3
2
|
export declare function useCatalog(props?: UseCatalogProps): UseCatalogResponse;
|
|
4
3
|
//# sourceMappingURL=useCatalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as h from"react";import{useLocation as
|
|
1
|
+
import*as h from"react";import{useLocation as V,useNavigate as $}from"react-router";import{usePageData as R,usePageSharedData as K}from"../../hooks";import{withoutHash as D,getBaseDataAttributes as C}from"@redocly/theme/core/utils";import{telemetry as A}from"../../telemetry/index.js";import{toStringIfDefined as v}from"../../../../utils/string/to-string-if-defined.js";import{findDeepFirst as _}from"../../../../utils/tree/find-deep-first.js";import{compareVersions as q}from"../../../../utils/version/compare-versions.js";function ne(e,o){const r=V(),i=$(),a=R(),t=H(r),s=K("catalog"),[n,p]=h.useState(()=>(e.filters??[]).map(l=>{if(l.type==="date-range"){const[c,u]=t.get(l.property)?.split("--")??[];return!c&&!u?{}:{from:c,to:u}}return new Set(t.getAll(l.property))})),[d,g]=h.useState(()=>t.get("filter")||"");o||(o=[...s]);const S=h.useMemo(()=>L(o??[],e.filters),[o,e.filters]),I=a?.props?.customFields,w=h.useMemo(()=>J(o??[],e,I||{}),[o,e,I]),b=h.useCallback((l,c)=>{p(u=>{const F=u[l]?u[l]:new Set;return F instanceof Set?(F.has(c)?u.forEach((f,m)=>{f instanceof Set&&f.has(c)&&f.delete(c)}):F.add(c),[...u.slice(0,l),F,...u.slice(l+1)]):u}),A.sendCatalogFilterChangedMessage([{...C("catalogFilter","field"),type:"toggle"}]),window.scrollTo(0,0)},[]),P=h.useCallback((l,c)=>{p(u=>{const F=u[l]instanceof Set?new Set(c?[c]:[]):{from:c?.from,to:c?.to},f=S[l];return u.map((m,y)=>y===l?F:S[y].parentFilter===f.property?new Set:m)}),A.sendCatalogFilterChangedMessage([{...C("catalogFilter","field"),type:"select"}]),window.scrollTo(0,0)},[S]),N=()=>{const l=new URLSearchParams(Array.from(t.entries()));d?t.set("filter",d):t.delete("filter"),n.forEach((u,F)=>{const f=e.filters?.[F];if(!f)return;const m=X(u);Q(f.property,m,l)});const c=l.toString();c!==r.search.substring(1)&&i({search:c})};h.useEffect(()=>{N()},[e.filters,n,d,i,r]);const k=h.useMemo(()=>Z(e.filters),[e.filters]);return h.useMemo(()=>{const l=S.map((f,m)=>({...f,toggleOption:y=>b(m,y),selectOption:y=>P(m,y),selectedOptions:n[m]??new Set,isFilterUsed:(n[m]?.size??0)>0||!!n[m]?.from})),c=T(w,l,d),u=l.map((f,m)=>{const y=l.findIndex(O=>O.property===f.parentFilter),j=f.parentFilter?(n[y]?.size??0)>0||!!n[y].from:!0,z=l.filter((O,M)=>M!==m&&!k[m]?.has(M)),B=T(w,z,d),U=L(B.map(O=>({metadata:O})),e.filters);return{...f,parentUsed:j,filteredOptions:U[m].options}});return{groups:e.groupByFirstFilter&&u.length>0?G(u,c):[{title:"APIs",items:c}],filters:u,setFilterTerm:f=>{g(f),A.sendCatalogFilterChangedMessage([{...C("catalogFilter","field"),type:"term"}])},filterTerm:d}},[S,w,d,e.groupByFirstFilter,e.filters,n,b,P,k])}function G(e,o){return e[0].options.map(r=>({title:r.value,items:o.filter(i=>{const a=i?.[e[0].property]||e[0].missingCategoryName||"Others";return Array.isArray(a)?a.includes(r.value):a===r.value})})).filter(r=>r.items.length>0)}function H(e){return h.useMemo(()=>new URLSearchParams(e.search),[e.search])}function J(e,o,r){let i;if(o.separateVersions)i=e.map(a);else{const t={};for(const s of e){if(!s.versionFolderId){const p=s.link||s.fsPath||JSON.stringify(s);t[p]=[s];continue}let n=s.versionFolderId;if(t[n]?.find(p=>p.version===s.version)){const p=s.fsPath?.replace(/\/@.*?\//,"/@version/")??"";n=`${n}-${p}`}t[n]||(t[n]=[]),t[n].push(s)}i=Object.values(t).map(s=>{s.sort((d,g)=>q(g.version||"",d.version||""));const n=s.map(a);return{...a(s.find(d=>d.isDefault)||s[0]),versions:n}})}return i.sort((t,s)=>t.title.localeCompare(s.title)),i;function a(t){const s=t.metadata||{},n=r[t.fsPath||""]||{},p=t.link||_(t.items||[],g=>"link"in g&&!!g.link)?.link,d=t.sidebar?.[0];return{...s,...n,publishedAt:s.publishedAt||s.createdAt,title:v(s?.title)||t.label||"Untitled",description:v(s?.description),link:D(p)??"#",docsLink:D(d?.link),image:v(s?.image),version:t.version,versionFolderId:t.versionFolderId}}}function Z(e){if(!e)return[];const o=[];for(let r=0;r<e.length;r++){const i=e[r];if(i.parentFilter){const a=e.findIndex(t=>t.property===i.parentFilter);o[a]=o[a]||new Set,o[a].add(r)}}return o}function L(e,o){return(o??[]).map(r=>{const i=r.options?Object.fromEntries(r.options.map(n=>[n,0])):void 0,a=i??{};let t=0;for(const n of e){const p=Array.isArray(n.metadata?.[r.property])?n.metadata?.[r.property]:[n.metadata?.[r.property]];for(const d of p){const g=E(String(d),r.valuesMapping);if(i){g in i&&(a[g]=a[g]+1);continue}d?a[g]=(a[g]??0)+1:t++}}const s=Object.entries(a).map(([n,p])=>({value:n,count:p}));return i||s.sort((n,p)=>n.value.localeCompare(p.value)),t&&s.push({value:r.missingCategoryNameTranslationKey||r.missingCategoryName||"Others",count:t}),{...r,options:s}})}function T(e,o,r){const i=e.filter(a=>o.every(t=>{if(t.selectedOptions&&!(t.selectedOptions instanceof Set))try{const n=new Date(a[t.property]).toISOString().split("T")[0];return n>=(t.selectedOptions.from??"")&&n<=(t.selectedOptions.to??"Z")}catch{return!0}if(t.selectedOptions.size===0)return!0;const s=E(a?.[t.property]||t.missingCategoryName||"Others",t.valuesMapping);return Array.isArray(s)?s.some(n=>t.selectedOptions.has(n)):t.selectedOptions.has(s)}));return r?(r=r.toLowerCase(),i.filter(a=>Object.values(a).some(t=>Array.isArray(t)?t.some(s=>String(s).toLowerCase().includes(r)):String(t).toLowerCase().includes(r)))):i}function E(e,o){return o?Array.isArray(e)?e.map(r=>o[String(r)]||r):o[String(e)]||e:e}function Q(e,o,r){r.delete(e),o.forEach(i=>{r.append(e,i)})}function X(e){const o=new Set;return e instanceof Set?e.forEach(r=>o.add(r)):(e.from||e.to)&&o.add(`${e.from||""}--${e.to||""}`),o}export{Q as fillSearchParams,X as getFilterValues,ne as useCatalogClassic};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as h,useEffect as
|
|
1
|
+
import{useCallback as h,useEffect as P,useMemo as w,useState as Q}from"react";import{useSearchParams as b}from"react-router";import{telemetry as C}from"../../telemetry/index.js";import{parseFilterQuery as y,formatFilterQuery as U,collectFilterOptions as j}from"../../../utils";import{getBaseDataAttributes as I}from"@redocly/theme/core/utils";function O(t){return t instanceof Set?t.size>0:!!(t?.from||t?.to)}function z(t,d){const[u,p]=b(),c=u.get("filter")||"",[o,f]=Q(()=>y(c,t?.filters||[])),F=w(()=>j(t?.filters,d),[t?.filters,d]),m=t?.filters||[];m.length>0&&o.length!==m.length&&f(y(c,m));const S=h((s,e)=>{f(l=>l.map((r,i)=>{if(i!==s||!(r instanceof Set))return r;const n=new Set(r);return n.has(e)?n.delete(e):n.add(e),n})),window.scrollTo(0,0)},[]),g=h((s,e)=>{f(l=>l.map((a,r)=>r!==s?a:a instanceof Set?e&&typeof e=="string"?new Set([e]):new Set:{from:typeof e=="object"?e?.from:void 0,to:typeof e=="object"?e?.to:void 0})),C.sendCatalogFilterChangedMessage([{...I("catalogFilter","field"),type:"select"}]),window.scrollTo(0,0)},[]);return P(()=>{const s=new URLSearchParams(u),e=U(o,t?.filters||[]);e?s.set("filter",e):s.delete("filter"),p(s,{replace:!0})},[t?.filters,o,u,p]),w(()=>{const s=F.map((l,a)=>{const r=o[a],i=O(r);return{...l,toggleOption:n=>S(a,n),selectOption:n=>g(a,n),selectedOptions:r??new Set,isFilterUsed:i}});return{filters:s.map(l=>{const a=s.findIndex(n=>n.property===l.parentFilter),r=o[a],i=l.parentFilter?O(r):!0;return{...l,parentUsed:i}}),filterQuery:c}},[F,o,S,g,c])}export{z as useCatalogFilter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"i18next";import{useSyncExternalStore as g}from"react";const t=n=>(e.on("languageChanged",n),()=>e.off("languageChanged",n)),a=()=>e.language,u=()=>{const n=g(t,a,a);return{changeLanguage:e.changeLanguage,lang:n}};export{u as useL10n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"i18next";import{useEffect as
|
|
1
|
+
import e from"i18next";import{useEffect as r}from"react";import{DEFAULT_LOCALE_PLACEHOLDER as s}from"../../../constants/common";import{defaultTranslationImports as i}from"../../../constants/l10n/default-translations";import{useL10nConfig as l}from"../hooks";const d=()=>{const{currentLocale:t}=l();r(()=>{const o=!t||t===s?"en":t;document.documentElement.setAttribute("lang",o),t&&e.language!==t&&e.changeLanguage(t)},[t])},p=async t=>{if(!t)return;const o=new Set(e.languages);for(const n of Object.keys(t.translations)){const a=await i[n]?.()||{};e.addResourceBundle(n,"translation",{...a,...t.translations[n]?.translation??{}},!0,!0),o.delete(n)}for(const n of o)e.removeResourceBundle(n,"translation")};export{p as updateTranslations,d as useL10n};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { SSEMessage } from '../../types/ai-search';
|
|
2
2
|
/**
|
|
3
|
-
* Parses SSE
|
|
3
|
+
* Parses SSE lines, keeping the trailing incomplete line buffered between network chunks
|
|
4
4
|
*/
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function createSSEParser(): {
|
|
6
|
+
push(chunk: string): SSEMessage[];
|
|
7
|
+
flush(): SSEMessage[];
|
|
8
|
+
};
|
|
6
9
|
/**
|
|
7
10
|
* Creates an async generator that reads SSE messages from a ReadableStream
|
|
8
11
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SSE_EVENTS as
|
|
2
|
-
`);
|
|
1
|
+
import{SSE_EVENTS as a,SSE_DATA_PREFIX as c,SSE_EVENT_PREFIX as f,SSE_ERROR_EVENT_NAME as l}from"../../constants";const p="Stream error";function S(e){return Object.values(a).includes(e)}function E(){let e="",o="";const u=s=>{if(s==="")return o="",null;if(s.startsWith(f))return o=s.slice(f.length).trim(),null;if(!s.startsWith(c))return null;const r=s.slice(c.length);if(!r)return null;try{const n=JSON.parse(r);if(o===l){const t=typeof n.message=="string"?n.message:p;return{type:a.ERROR,error:{message:t}}}return d(n)}catch{return console.warn(`[redocly-ai-search] Skipping malformed SSE data line: ${r}`),null}},i=s=>{const r=[];for(const n of s){const t=u(n);t&&r.push(t)}return r};return{push(s){e+=s;const r=e.split(`
|
|
2
|
+
`);return e=r.pop()??"",i(r)},flush(){const s=e;return e="",s?i([s]):[]}}}function d(e){return e.type&&typeof e.type=="string"&&S(e.type)?e:"messageId"in e&&typeof e.messageId=="string"?{type:a.MESSAGE_ID,messageId:e.messageId}:"sources"in e&&Array.isArray(e.sources)?{type:a.SOURCES,sources:e.sources}:"answer"in e&&typeof e.answer=="string"?{type:a.ANSWER,answer:e.answer}:null}async function*m(e,o){const u=e.getReader(),i=new TextDecoder,s=E();try{for(;!o?.aborted;){const{value:r,done:n}=await u.read();if(o?.aborted)break;if(n){for(const t of[...s.push(i.decode()),...s.flush()])yield t;break}for(const t of s.push(i.decode(r,{stream:!0})))yield t}}finally{u.releaseLock()}}export{E as createSSEParser,m as streamSSEMessages};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as y,useEffect as
|
|
1
|
+
import{useCallback as y,useEffect as f,useMemo as S,useState as r}from"react";import{withPathPrefix as b}from"@redocly/theme/core/utils";import{ServerRoutes as d}from"../../../constants/api";import{useI18nConfig as g}from"../hooks";function h(e){const[s,a]=r([]),[t,n]=r(null),[c,o]=r(null),[p,i]=r(!1),{currentLocale:l}=g();f(()=>{i(!0),m()},[c]);const m=y(async()=>{if(e&&c===null){i(!1);return}let u={locale:l,field:e};c&&(u={...u,...c});const F=await(await fetch(b(d.SEARCH_FACETS),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)})).json();e?n(F):a(F),i(!1)},[l,c,e]);return{initialFacets:s,searchFacets:t,isFacetsLoading:p,setSearchFacetQuery:o}}function L(e){const[s,a]=r(null),{searchFacets:t,setSearchFacetQuery:n}=h(e);return f(()=>{const c=t?t.find(o=>o.field===e)??null:null;a(c)},[t,e]),{searchFacet:s,setSearchFacet:a,setSearchFacetQuery:n}}const O=e=>{const{initialFacets:s}=h();return{facets:S(()=>!e||!Object.keys(e).length?s:s.map(t=>({...t,values:e[t.field]?.map(n=>({...n,isCounterVisible:!0}))||[]})),[s,e])}};export{L as useFacetQuery,O as useFacets};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"react";import{Helmet as
|
|
1
|
+
import n from"react";import{Helmet as p}from"@dr.pogodin/react-helmet";import{combineUrls as g,withPathPrefix as k}from"@redocly/theme/core/utils";import{isTruthy as d}from"../../../utils/guards/is-truthy";import{usePageVersions as E}from"../../providers/page-data/hooks";import{getMetaTagsAttributes as h}from"../utils/get-meta-tags-attributes";import{useHreflangLinks as j}from"./hooks/useHreflangLinks";function U(o){const{seo:e,slug:s}=o,{versions:a}=E(),r=e?.siteUrl,{localeAlternates:m}=j(r);if(!e)return null;const c=h(e),f=[e.title,e.projectTitle].filter(d).join(" | "),i=a.find(t=>t.default)?.link,u=i?k(i):s;return n.createElement(p,null,n.createElement("title",null,f),r?n.createElement("link",{rel:"canonical",href:g(r,u)}):null,m.map(({hrefLang:t,href:l})=>n.createElement("link",{key:t,rel:"alternate",hrefLang:t,href:l})),e.jsonLd?n.createElement("script",{type:"application/ld+json"},JSON.stringify(e.jsonLd)):null,c.map((t,l)=>n.createElement("meta",{key:l,...t})))}export{U as SeoTags};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:
|
|
1
|
+
import{isLocalLink as f}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as m}from"../../../utils/auth/is-auth-route-path.js";import{withLoadProgress as u}from"./withLoadProgress";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:r,to:o,origin:a="browser",options:c}){o===""&&(o="/"),s=o;const{pathname:i,hash:d,search:t}=new URL(o,window.location.origin+window.location.pathname),n=decodeURIComponent(d),h=decodeURIComponent(window.location.hash);if(m(i)){window.location.href=o;return}const w=window.__LOADER,e=await u(w.tryLoad(i,void 0,t));if(e?.redirectTo){if(!f(e.redirectTo)){window.location.href=e.redirectTo;return}return A({navigate:r,to:e.redirectTo,origin:a,options:c})}if(e&&s===o){if(i!==window.location.pathname||t!==window.location.search||n!==h?r({pathname:i,search:t,hash:n},{...c,state:{origin:a},flushSync:!0}):n&&window.dispatchEvent(new HashChangeEvent("hashchange")),e.props?.disableAutoScroll)return;requestAnimationFrame(()=>{if(n){const l=n.slice(1);p(l)}else window.scrollTo(0,0)})}}export{A as loadAndNavigate};
|
|
@@ -4,6 +4,14 @@ import { AiSearchError } from '@redocly/theme/core/constants';
|
|
|
4
4
|
* Following the SSE specification: https://html.spec.whatwg.org/multipage/server-sent-events.html
|
|
5
5
|
*/
|
|
6
6
|
export declare const SSE_DATA_PREFIX = "data: ";
|
|
7
|
+
/**
|
|
8
|
+
* SSE protocol prefix that names the event a following `data:` line belongs to
|
|
9
|
+
*/
|
|
10
|
+
export declare const SSE_EVENT_PREFIX = "event: ";
|
|
11
|
+
/**
|
|
12
|
+
* Event name the API uses to frame a stream failure, see the `SseStream` decorator
|
|
13
|
+
*/
|
|
14
|
+
export declare const SSE_ERROR_EVENT_NAME = "error";
|
|
7
15
|
/**
|
|
8
16
|
* Maximum number of resources to display in the search results
|
|
9
17
|
* Limits UI clutter while providing sufficient context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AiSearchError as
|
|
1
|
+
import{AiSearchError as E}from"@redocly/theme/core/constants";const t="data: ",r="event: ",S="error",e=5,R={"Content-Type":"application/json"},_={MESSAGE_ID:"messageId",SOURCES:"sources",ANSWER:"answer",TOOL_CALL:"toolCall",TOOL_RESULT:"toolResult",ERROR:"error"},n={401:E.Unauthorized,403:E.Forbidden};export{R as AI_SEARCH_REQUEST_HEADERS,n as HTTP_ERROR_MAP,e as MAX_DISPLAYED_RESOURCES,t as SSE_DATA_PREFIX,S as SSE_ERROR_EVENT_NAME,_ as SSE_EVENTS,r as SSE_EVENT_PREFIX};
|