@redocly/realm 0.138.0-next.1 → 0.138.0-next.10
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 +182 -0
- package/dist/bin.js +0 -0
- package/dist/cli/build/analytics/collect-analytics.js +1 -1
- package/dist/cli/build/analytics/collectors/get-sidebars-usage.d.ts +12 -0
- package/dist/cli/build/analytics/collectors/get-sidebars-usage.js +1 -0
- package/dist/cli/build/index.js +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/eject/resolveEjectParams.js +1 -1
- package/dist/cli/generate/string-utils.js +1 -1
- package/dist/cli/stats/collectors/extension-sampling.js +1 -1
- package/dist/cli/translations/collect-config-translations.js +1 -1
- package/dist/client/App.js +1 -1
- package/dist/client/TestProvider.d.ts +3 -1
- package/dist/client/TestProvider.js +1 -1
- package/dist/client/app/Link.js +1 -1
- package/dist/client/app/ReviewComments/ReviewComments.js +2 -2
- package/dist/client/app/Sidebar/Sidebar.js +1 -1
- package/dist/client/app/Sidebar/useSidebarItems.js +1 -1
- package/dist/client/app/hooks/codeHighlight/treeview-transformer.js +1 -1
- package/dist/client/app/hooks/codeHighlight/useCodeHighlight.js +1 -1
- package/dist/client/app/hooks/index.d.ts +1 -0
- package/dist/client/app/hooks/index.js +1 -1
- package/dist/client/app/hooks/markdown/useMarkdownText.js +1 -1
- package/dist/client/app/hooks/useConsent.d.ts +11 -0
- package/dist/client/app/hooks/useConsent.js +1 -0
- package/dist/client/app/l10n/L10nContext.d.ts +10 -0
- package/dist/client/app/l10n/L10nContext.js +1 -0
- package/dist/client/app/l10n/hooks/useL10n.js +1 -1
- package/dist/client/app/l10n/hooks/useTranslate.js +1 -1
- package/dist/client/app/l10n/hooks/useTranslationKeys.d.ts +2 -0
- package/dist/client/app/l10n/hooks/useTranslationKeys.js +1 -1
- package/dist/client/app/l10n/ssrL10n.d.ts +4 -0
- package/dist/client/app/l10n/ssrL10n.js +1 -0
- package/dist/client/app/markdoc/custom-components/openapi/openapi-example.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/openapi-response-sample.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/replay-openapi.js +1 -1
- package/dist/client/app/markdoc/hooks/use-store.d.ts +2 -3
- package/dist/client/app/pages/DevLogin/DevLoginForm.js +1 -1
- package/dist/client/app/pages/Invite/Invite.js +1 -1
- package/dist/client/app/search/index.d.ts +1 -1
- package/dist/client/app/search/index.js +1 -1
- package/dist/client/app/search/useSearch.d.ts +3 -0
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/app/webmcp/index.d.ts +2 -0
- package/dist/client/app/webmcp/index.js +1 -0
- package/dist/client/app/webmcp/tools/api-tools.d.ts +8 -0
- package/dist/client/app/webmcp/tools/api-tools.js +1 -0
- package/dist/client/app/webmcp/tools/shared.d.ts +13 -0
- package/dist/client/app/webmcp/tools/shared.js +1 -0
- package/dist/client/app/webmcp/tools/site-tools.d.ts +5 -0
- package/dist/client/app/webmcp/tools/site-tools.js +3 -0
- package/dist/client/app/webmcp/types.d.ts +36 -0
- package/dist/client/app/webmcp/types.js +0 -0
- package/dist/client/app/webmcp/useWebMcpTools.d.ts +9 -0
- package/dist/client/app/webmcp/useWebMcpTools.js +1 -0
- package/dist/client/providers/page-data/hooks.d.ts +2 -0
- package/dist/client/providers/page-data/hooks.js +1 -1
- package/dist/client/providers/theme/ThemeDataProvider.js +1 -1
- package/dist/client/runtime/loader.js +1 -1
- package/dist/client/server-entry.d.ts +2 -1
- package/dist/client/server-entry.js +1 -1
- package/dist/client/templates/api-docs/helpers.js +1 -1
- package/dist/client/templates/api-docs/template.js +7 -3
- package/dist/client/utils/catalog/parse-filter-query.js +1 -1
- package/dist/client/{app/Sidebar/helpers → utils}/filter-out-versioned-items.d.ts +12 -2
- package/dist/client/utils/filter-out-versioned-items.js +1 -0
- package/dist/client/utils/navigation-tabs.d.ts +14 -0
- package/dist/client/utils/navigation-tabs.js +1 -0
- package/dist/compiled/svgo/svgo-node.js +39 -39
- package/dist/constants/common.d.ts +1 -0
- package/dist/constants/common.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/nodes/table.d.ts +2 -0
- package/dist/markdoc/nodes/table.js +1 -1
- package/dist/server/config/env-config.d.ts +0 -6
- package/dist/server/config/env-schema.d.ts +0 -15
- package/dist/server/config/env-schemas/feature-flags.d.ts +0 -12
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/constants/common.d.ts +3 -1
- package/dist/server/constants/common.js +1 -1
- package/dist/server/constants/entitlements.js +1 -1
- package/dist/server/constants/plugins/consent.d.ts +3 -0
- package/dist/server/constants/plugins/consent.js +1 -0
- package/dist/server/constants/plugins/search.js +1 -1
- package/dist/server/esbuild/esbuild-logger.js +3 -3
- package/dist/server/plugins/analytics/adobe/index.js +1 -1
- package/dist/server/plugins/analytics/amplitude/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/amplitude/index.js +1 -1
- package/dist/server/plugins/analytics/fullstory/index.js +1 -1
- package/dist/server/plugins/analytics/ga/index.js +1 -1
- package/dist/server/plugins/analytics/gtm/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/gtm/index.js +1 -1
- package/dist/server/plugins/analytics/heap/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/rudderstack/index.js +1 -1
- package/dist/server/plugins/analytics/segment/index.js +1 -1
- package/dist/server/plugins/api-docs/index.js +1 -1
- package/dist/server/plugins/api-docs/utils/apply-nav-item-to-root.d.ts +9 -0
- package/dist/server/plugins/api-docs/utils/apply-nav-item-to-root.js +1 -0
- package/dist/server/plugins/api-docs/utils/decorators.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.d.ts +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.d.ts +5 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.js +7 -1
- package/dist/server/plugins/catalog-entities/database/repositories/entities/entities-write-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/ajv-validator.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/extract-parts-from-components-ref.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/is-valid-tag-name.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/openapi-component-content-extractor.js +1 -1
- package/dist/server/plugins/config-parser/format-custom-tags.d.ts +1 -0
- package/dist/server/plugins/config-parser/format-custom-tags.js +1 -1
- package/dist/server/plugins/config-parser/index.js +1 -1
- package/dist/server/plugins/config-parser/loaders/redocly-config-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/versions-config-loader.js +1 -1
- package/dist/server/plugins/config-parser/safe-parse.js +1 -1
- package/dist/server/plugins/consent/build-consent-script.d.ts +6 -0
- package/dist/server/plugins/consent/build-consent-script.js +230 -0
- package/dist/server/plugins/consent/gate-ssr-components.d.ts +5 -0
- package/dist/server/plugins/consent/gate-ssr-components.js +1 -0
- package/dist/server/plugins/consent/index.d.ts +3 -0
- package/dist/server/plugins/consent/index.js +1 -0
- package/dist/server/plugins/consent/is-consent-enabled.d.ts +8 -0
- package/dist/server/plugins/consent/is-consent-enabled.js +1 -0
- package/dist/server/plugins/consent/zone-modes.d.ts +8 -0
- package/dist/server/plugins/consent/zone-modes.js +1 -0
- package/dist/server/plugins/default-theme/extract-team-names.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/App.js +5 -5
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeyOverview.js +3 -3
- package/dist/server/plugins/get-reserved-routes.d.ts +4 -2
- package/dist/server/plugins/get-reserved-routes.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/markdoc/markdoc-options.d.ts +2 -0
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +9 -9
- package/dist/server/plugins/markdown/search/nodes/tag-node.d.ts +1 -1
- package/dist/server/plugins/markdown/search/nodes/tag-node.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.js +1 -1
- package/dist/server/plugins/markdown/utils/sanitize-malformed-md-content.js +1 -1
- package/dist/server/plugins/mcp/audit/audit-log.js +1 -1
- package/dist/server/plugins/mcp/audit/secret-patterns.js +1 -1
- package/dist/server/plugins/mcp/auth/assistant-anonymous-token.d.ts +9 -0
- package/dist/server/plugins/mcp/auth/assistant-anonymous-token.js +1 -0
- package/dist/server/plugins/mcp/auth/auth-handlers.d.ts +5 -3
- package/dist/server/plugins/mcp/auth/auth-handlers.js +1 -1
- package/dist/server/plugins/mcp/codemode/build-tool-list.d.ts +6 -1
- package/dist/server/plugins/mcp/codemode/build-tool-list.js +2 -2
- package/dist/server/plugins/mcp/codemode/build-tool-type-declarations.js +4 -4
- package/dist/server/plugins/mcp/codemode/capabilities/fetch/index.js +3 -3
- package/dist/server/plugins/mcp/codemode/capabilities/types.d.ts +0 -1
- package/dist/server/plugins/mcp/codemode/capabilities/utils.d.ts +1 -2
- package/dist/server/plugins/mcp/codemode/capabilities/utils.js +4 -4
- package/dist/server/plugins/mcp/codemode/code-execution-audit.d.ts +3 -2
- package/dist/server/plugins/mcp/codemode/code-execution-audit.js +1 -1
- package/dist/server/plugins/mcp/codemode/code-execution-telemetry.d.ts +3 -4
- package/dist/server/plugins/mcp/codemode/code-execution-telemetry.js +1 -1
- package/dist/server/plugins/mcp/codemode/prompts.js +1 -1
- package/dist/server/plugins/mcp/codemode/tools/describe-tools.js +2 -2
- package/dist/server/plugins/mcp/codemode/tools/execute-schema.d.ts +0 -2
- package/dist/server/plugins/mcp/codemode/tools/execute-schema.js +1 -1
- package/dist/server/plugins/mcp/codemode/tools/execute.js +1 -1
- package/dist/server/plugins/mcp/codemode/tools/manage-credentials.js +2 -2
- package/dist/server/plugins/mcp/custom-tools/scan-custom-tools.js +1 -1
- 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/whoami.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/constants.d.ts +2 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/constants.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/endpoint-suggestions.d.ts +6 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/endpoint-suggestions.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-security-schemes.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/load-api-description.d.ts +2 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/load-api-description.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/utils.d.ts +6 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/utils.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/utils/resolve-refs.d.ts +20 -14
- package/dist/server/plugins/mcp/docs-mcp/utils/resolve-refs.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/credential-validation.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.d.ts +16 -10
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.js +5 -5
- package/dist/server/plugins/mcp/gateway-mcp/fetch/allowed-hosts.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/fetch-bridge.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/ssrf-guard.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/url-placeholders.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/ip-key.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth-scheme.d.ts +0 -6
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth-scheme.js +2 -2
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/handlers/mcp-credentials-handler.js +1 -1
- package/dist/server/plugins/mcp/handlers/mcp-credentials-page.js +35 -35
- 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 +2 -4
- package/dist/server/plugins/mcp/types.d.ts +5 -11
- package/dist/server/plugins/mcp/utils/disabled-tools.d.ts +3 -0
- package/dist/server/plugins/mcp/utils/disabled-tools.js +1 -0
- package/dist/server/plugins/mcp/utils/json-schema-validator.d.ts +2 -2
- package/dist/server/plugins/mcp/utils/json-schema-validator.js +1 -1
- package/dist/server/plugins/mcp/utils/mcp-client.js +1 -1
- package/dist/server/plugins/mcp/utils/public-endpoint.d.ts +9 -0
- package/dist/server/plugins/mcp/utils/public-endpoint.js +1 -0
- package/dist/server/plugins/mcp/utils/telemetry-attributes.d.ts +2 -1
- package/dist/server/plugins/mcp/utils/telemetry-attributes.js +1 -1
- package/dist/server/plugins/mcp/utils/tool-registration.d.ts +2 -1
- package/dist/server/plugins/mcp/utils/tool-registration.js +1 -1
- package/dist/server/plugins/mcp/utils/xmcp-utils.d.ts +0 -7
- package/dist/server/plugins/mcp/utils/xmcp-utils.js +1 -1
- package/dist/server/plugins/mcp/workers/execute-mcp-tool.js +1 -1
- package/dist/server/plugins/mcp/workers/mcp-tool-telemetry.d.ts +5 -7
- package/dist/server/plugins/mcp/workers/mcp-tool-telemetry.js +1 -1
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/scorecard-classic/index.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/Grid/GridHeader.js +21 -8
- package/dist/server/plugins/scorecard-classic/template/ScorecardDashboard.js +3 -3
- package/dist/server/plugins/scorecard-classic/template/index.styles.d.ts +1 -0
- package/dist/server/plugins/scorecard-classic/template/index.styles.js +15 -5
- package/dist/server/plugins/scorecard-classic/template/useData.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/views.js +1 -1
- package/dist/server/plugins/search/engines/flexsearch/index.js +2 -1
- package/dist/server/plugins/search/engines/flexsearch/search-index.d.ts +2 -2
- package/dist/server/plugins/search/engines/flexsearch/search-index.js +1 -1
- package/dist/server/plugins/search/llmstxt/index.js +1 -1
- package/dist/server/plugins/sidebars/index.js +7 -3
- package/dist/server/plugins/sidebars/tabs.d.ts +19 -0
- package/dist/server/plugins/sidebars/tabs.js +1 -0
- package/dist/server/plugins/sso/index.js +1 -1
- package/dist/server/ssr/render.js +1 -1
- package/dist/server/store.d.ts +2 -0
- package/dist/server/store.js +1 -1
- package/dist/server/tools/notifiers/helpers/privacy/mask-subject.js +1 -1
- package/dist/server/tools/notifiers/helpers/privacy/remove-pii.js +1 -1
- package/dist/server/types/plugins/search.d.ts +7 -5
- package/dist/server/utils/catalog-classic/get-catalog-shared-data-id.d.ts +3 -0
- package/dist/server/utils/catalog-classic/get-catalog-shared-data-id.js +1 -0
- package/dist/server/utils/envs/interpolate-env-variables.js +1 -1
- package/dist/server/utils/rbac-expand.js +1 -1
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/utils/redact-url.d.ts +6 -0
- package/dist/server/utils/redact-url.js +1 -0
- package/dist/server/utils/report-all-errors.js +1 -1
- package/dist/server/utils/sandbox-context.js +1 -1
- package/dist/server/utils/search/highlight-text-for-search.d.ts +1 -0
- package/dist/server/utils/search/highlight-text-for-search.js +1 -1
- package/dist/server/utils/search/text-match.d.ts +6 -0
- package/dist/server/utils/search/text-match.js +1 -0
- package/dist/server/utils/static-data.js +1 -1
- package/dist/server/utils/write-problems-report.d.ts +3 -0
- package/dist/server/utils/write-problems-report.js +1 -0
- package/dist/server/web-server/auth.d.ts +16 -2
- package/dist/server/web-server/auth.js +4 -4
- package/dist/server/web-server/jwt/jwt.js +1 -1
- package/dist/server/web-server/jwt/token-types.d.ts +11 -0
- package/dist/server/web-server/jwt/token-types.js +1 -0
- package/dist/server/web-server/jwt/types.d.ts +4 -4
- package/dist/server/web-server/jwt/types.js +1 -1
- package/dist/server/web-server/middleware/ensureSearchData.js +1 -1
- package/dist/server/web-server/middleware/responseHeadersMiddleware.js +1 -1
- package/dist/server/web-server/middleware/telemetry-middleware.js +1 -1
- package/dist/server/web-server/routes/ask-ai.js +1 -1
- package/dist/server/web-server/routes/auth.d.ts +1 -1
- package/dist/server/web-server/routes/auth.js +1 -1
- package/dist/server/web-server/routes/cors-proxy.js +2 -2
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/index.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/semantic-search.d.ts +1 -1
- package/dist/server/web-server/routes/semantic-search.js +1 -1
- package/dist/server/web-server/routes/static-content.js +1 -1
- package/dist/server/workers/worker-pool.js +1 -1
- package/dist/types/entitlements.d.ts +1 -0
- package/dist/utils/path/parse-path-versions.js +1 -1
- package/dist/utils/string/to-kebab-case.js +1 -1
- package/package.json +9 -9
- package/dist/client/app/Sidebar/helpers/filter-out-versioned-items.js +0 -1
- package/dist/server/plugins/mcp/auth/token-audience-telemetry.d.ts +0 -7
- package/dist/server/plugins/mcp/auth/token-audience-telemetry.js +0 -1
- package/dist/server/plugins/mcp/auth/token-audience.d.ts +0 -6
- package/dist/server/plugins/mcp/auth/token-audience.js +0 -1
- /package/dist/server/{plugins/mcp/gateway-mcp/fetch → web-server/utils}/ssrf-blocklist.d.ts +0 -0
- /package/dist/server/{plugins/mcp/gateway-mcp/fetch → web-server/utils}/ssrf-blocklist.js +0 -0
- /package/dist/server/{plugins/mcp/gateway-mcp/fetch → web-server/utils}/ssrf-safe-lookup.d.ts +0 -0
- /package/dist/server/{plugins/mcp/gateway-mcp/fetch → web-server/utils}/ssrf-safe-lookup.js +0 -0
|
@@ -56,9 +56,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
56
56
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
57
57
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
58
58
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
59
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
60
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
61
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
62
59
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
63
60
|
} & {
|
|
64
61
|
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
@@ -137,9 +134,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
137
134
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
138
135
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
139
136
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
140
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
141
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
142
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
143
137
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
144
138
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
145
139
|
SEARCH_DEV_DEBUG: boolean;
|
|
@@ -211,9 +205,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
211
205
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
212
206
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
213
207
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
214
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
215
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
216
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
217
208
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
218
209
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
219
210
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
@@ -285,9 +276,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
285
276
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
286
277
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
287
278
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
288
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
289
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
290
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
291
279
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
292
280
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
293
281
|
SEARCH_DEV_DEBUG: boolean;
|
|
@@ -359,9 +347,6 @@ export declare const envSchema: z.ZodEffects<z.ZodObject<{
|
|
|
359
347
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
360
348
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
361
349
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
362
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
363
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
364
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
365
350
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
366
351
|
SEARCH_DEV_REINIT?: string | undefined;
|
|
367
352
|
SEARCH_DEV_DEBUG?: "false" | "true" | undefined;
|
|
@@ -15,12 +15,6 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
15
15
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL: z.ZodOptional<z.ZodString>;
|
|
16
16
|
/** (Optional) API endpoint for the agent feedback endpoint;**/
|
|
17
17
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
18
|
-
/** Escape hatch: disables the Node Permission Model sandbox on API function and MCP tool worker processes (hosted Reunite environments only). */
|
|
19
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
20
|
-
/** Rejects `/mcp` bearer tokens whose `aud` claim is not `ORGANIZATION_ID` with a 401; log-only when unset. */
|
|
21
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
22
|
-
/** Experimental: register custom MCP tools from `@mcp` folders. */
|
|
23
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
24
18
|
/** Experimental: enables the GraphQL request body in Try It and embedded Replay. */
|
|
25
19
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean | undefined, "false" | "true" | undefined>;
|
|
26
20
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -33,9 +27,6 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
33
27
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: boolean | undefined;
|
|
34
28
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
35
29
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
36
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: boolean | undefined;
|
|
37
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: boolean | undefined;
|
|
38
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: boolean | undefined;
|
|
39
30
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: boolean | undefined;
|
|
40
31
|
}, {
|
|
41
32
|
NEW_CATALOG_ENABLED?: "false" | "true" | undefined;
|
|
@@ -47,9 +38,6 @@ export declare const featureFlagsSchema: z.ZodObject<{
|
|
|
47
38
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED?: "false" | "true" | undefined;
|
|
48
39
|
REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL?: string | undefined;
|
|
49
40
|
REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT?: string | undefined;
|
|
50
|
-
REDOCLY_DISABLE_API_FUNCTION_SANDBOX?: "false" | "true" | undefined;
|
|
51
|
-
REDOCLY_MCP_ENFORCE_TOKEN_AUDIENCE?: "false" | "true" | undefined;
|
|
52
|
-
REDOCLY_EXP_MCP_CUSTOM_TOOLS_ENABLED?: "false" | "true" | undefined;
|
|
53
41
|
REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED?: "false" | "true" | undefined;
|
|
54
42
|
}>;
|
|
55
43
|
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as _}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const
|
|
1
|
+
import{z as _}from"zod";import{envBooleanStringOptional as E}from"../../utils/envs/env-boolean-string.js";const o=_.object({NEW_CATALOG_ENABLED:E(),NEW_SCORECARDS_ENABLED:E(),ENABLE_COMMENTS:_.string().optional(),REDOCLY_EXP_DISABLE_MD_VALIDATION:E(),ENABLE_SOURCE_MAPS:E(),PLAN_GATES:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_ENABLED:E(),REDOCLY_EXP_LLMSTXT_AGENT_FEEDBACK_URL:_.string().optional(),REDOCLY_EXP_LLMSTXT_AGENT_ENDPOINT:_.string().optional(),REDOCLY_EXP_REPLAY_GRAPHQL_ENABLED:E()});export{o as featureFlagsSchema};
|
|
@@ -3,6 +3,7 @@ export declare const PUBLIC_ASSETS_FOLDER = "/assets";
|
|
|
3
3
|
export declare const DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER = "/_spec";
|
|
4
4
|
export declare const PUBLIC_API_DEFINITIONS_FOLDER = "/_bundle";
|
|
5
5
|
export declare const PUBLIC_STATIC_FOLDER = "static";
|
|
6
|
+
export declare const STATIC_DATA_FOLDER = "static-data";
|
|
6
7
|
export declare const LINK_ORIGINAL_ATTR_NAME = "redocly:::linkOriginal";
|
|
7
8
|
export declare const VERSION_SEPARATOR = "@";
|
|
8
9
|
export declare const DEFAULT_VERSION_NAME = "default";
|
|
@@ -10,6 +11,8 @@ export declare const VERSIONED_FOLDER_REGEXP_MATCH: RegExp;
|
|
|
10
11
|
export declare const DEFAULT_THEME_PLUGIN_PATH = "@redocly/theme/plugin.js";
|
|
11
12
|
export declare const STYLES_FILE = "styles.css";
|
|
12
13
|
export declare const DEFAULT_PROJECT_PLUGIN_PATHS: string[];
|
|
14
|
+
/** Public constant. A deployment that keeps it has no project-scoped secret to sign with. */
|
|
15
|
+
export declare const FALLBACK_JWT_SECRET_KEY = "test_secret_key";
|
|
13
16
|
export declare const JWT_SECRET_KEY: string;
|
|
14
17
|
export declare const MAX_AUTH_TOKEN_COOKIE_BYTES: number;
|
|
15
18
|
export declare const MCP_ACCESS_TOKEN_TTL_SEC: number;
|
|
@@ -28,7 +31,6 @@ export declare const PROJECT_SLUG: string | undefined;
|
|
|
28
31
|
export declare const ORG_ID: string | undefined;
|
|
29
32
|
export declare const ORG_SLUG: string | undefined;
|
|
30
33
|
export declare const BH_API_PROJECTS_URL: string | undefined;
|
|
31
|
-
export declare const BH_API_PROJECTS_URL_V2: string | undefined;
|
|
32
34
|
export declare const ENTITLEMENTS_JWKS_URL: string;
|
|
33
35
|
export declare const FEEDBACK_API_URL: string;
|
|
34
36
|
export declare const ASK_AI_API_URL: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ServerRoutes as
|
|
1
|
+
import{ServerRoutes as n}from"../../constants/api.js";import{USER_THEME_ALIAS as A}from"../../constants/common.js";import{envConfig as _}from"../config/env-config.js";const N="runtime",x="/assets",a="/_spec",U="/_bundle",M="static",l="static-data",P="redocly:::linkOriginal",i="@",m="default",F=new RegExp("((?!@i18n\\/|@l10n\\/)\\/?@.*?(?=\\/))","g"),K="@redocly/theme/plugin.js",H="styles.css",Y=["@theme/plugin.js","@theme/plugin.cjs","@theme/plugin.mjs"],I="test_secret_key",B=_.JWT_SECRET_KEY||I,S=4096,L=196,d=S-L,u=3600,G=1440*60,c="@i18n",r="@l10n",g=[A,c,r,"@api","@mcp"],W="https://redocly.com/auth/aud",h="catalog.json",k="scorecard.json",J="page-count.json",f="sitemap.xml",w="llms.txt",o=_.PROJECT_ID,X=_.PROJECT_SLUG,R=_.ORGANIZATION_ID,j=_.ORG_SLUG,t=_.BH_API_URL,E=t&&R&&o?`${t}/orgs/${R}/projects/${o}`:void 0,p=t?`${t}/entitlements/.well-known/jwks`:"https://app.cloud.redocly.com/api/entitlements/.well-known/jwks",V=_.ENTITLEMENTS_JWKS_CDN_URL||p,$=E?`${E}/feedback`:"",v=E?`${E}/ai-agentic-conversations`:"",y=E?`${E}/ai-assistant-escalations`:"",b=E?`${E}/ai-assistant-feedback`:"",Z=E?`${E}/semantic-search`:"",q="no-store",z=365*24*60*60,Q="X-Redocly-Cache-Control",__="no-cache",E_="public, s-maxage=86400, max-age=10, must-revalidate",t_=_.AUTH_URL,o_="Developer Documentation",e=_.REDOCLY_SSR_RENDER_MODE==="worker"?"worker":"main",R_=e==="main"?0:_.REDOCLY_SSR_WORKERS_MIN!=null?Number(_.REDOCLY_SSR_WORKERS_MIN):2,e_=e==="main"?1:_.REDOCLY_SSR_WORKERS_MAX!=null?Number(_.REDOCLY_SSR_WORKERS_MAX):5,T_="-----BEGIN CERTIFICATE-----",s_="-----END CERTIFICATE-----",n_=!_.isDevelopMode&&_.REDOCLY_TELEMETRY!=="off"||_.REDOCLY_TELEMETRY==="on",A_="http://localhost:4318/v1/traces",I_=[n.HEALTH],T=_.SERVER_EDITOR_APP_URL||"http://127.0.0.1:3000",S_=_.REDOCLY_CORS_ORIGINS?_.REDOCLY_CORS_ORIGINS.split(",").map(s=>s.trim()).filter(Boolean).concat(T):[T],L_="markdown/partials",c_="markdown/partials-deps";export{y as AI_ASSISTANT_ESCALATIONS_API_URL,b as AI_ASSISTANT_FEEDBACK_API_URL,S_ as ALLOWED_CORS_ORIGINS,W as ALTERNATIVE_AUD_CLAIM_NAME,v as ASK_AI_API_URL,t_ as AUTH_URL,T_ as BEGIN_CERTIFICATE_DELIMITER,E as BH_API_PROJECTS_URL,q as CACHE_CONTROL_NO_STORE_HEADER_VALUE,__ as CACHE_CONTROL_PUBLIC_HTML,h as CATALOG_OUTPUT_FILE_NAME,z as DEFAULT_IMMUTABLE_CACHE_MAX_AGE,Y as DEFAULT_PROJECT_PLUGIN_PATHS,K as DEFAULT_THEME_PLUGIN_PATH,o_ as DEFAULT_TITLE,m as DEFAULT_VERSION_NAME,a as DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER,s_ as END_CERTIFICATE_DELIMITER,V as ENTITLEMENTS_JWKS_URL,I as FALLBACK_JWT_SECRET_KEY,$ as FEEDBACK_API_URL,c as I18N_DIR_NAME,B as JWT_SECRET_KEY,r as L10N_DIR_NAME,P as LINK_ORIGINAL_ATTR_NAME,w as LLMS_TXT_FILE_NAME,L_ as MARKDOC_PARTIALS_DATA_KEY,c_ as MARKDOC_PARTIALS_DEPS_KEY,d as MAX_AUTH_TOKEN_COOKIE_BYTES,u as MCP_ACCESS_TOKEN_TTL_SEC,G as MCP_REFRESH_SESSION_LIFETIME_SEC,R as ORG_ID,j as ORG_SLUG,I_ as OTEL_EXCLUDED_ROUTES,A_ as OTEL_TRACES_DEV_URL,J as PAGE_COUNT_OUTPUT_FILE_NAME,o as PROJECT_ID,X as PROJECT_SLUG,U as PUBLIC_API_DEFINITIONS_FOLDER,x as PUBLIC_ASSETS_FOLDER,M as PUBLIC_STATIC_FOLDER,g as RESERVED_DIR_NAMES,N as RUNTIME_RESOURCES_DIR,k as SCORECARD_OUTPUT_FILE_NAME,Z as SEMANTIC_SEARCH_API_URL,T as SERVER_EDITOR_APP_URL,f as SITEMAP_FILE_NAME,e as SSR_RENDER_MODE,e_ as SSR_WORKERS_MAX,R_ as SSR_WORKERS_MIN,l as STATIC_DATA_FOLDER,H as STYLES_FILE,n_ as TELEMETRY_ENABLED,F as VERSIONED_FOLDER_REGEXP_MATCH,i as VERSION_SEPARATOR,Q as X_REDOCLY_CACHE_CONTROL_HEADER,E_ as X_REDOCLY_CACHE_CONTROL_PUBLIC_HTML};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GATEWAY_FETCH_LIMIT_DEFAULTS as e}from"../../constants/common.js";const a={pro:{rbac:!1,sso:!1,analytics:!0,removeAttribution:!1,advancedSearch:!1,ssoDirect:!1,aiSearchLimit:0,kvStorageLimit:.5,mcp:!1,mcpGateway:!1,mcpMode:"tools",gatewayFetchRatePerMin:e.ratePerMin,gatewayFetchQuotaPerDay:e.quotaPerDay,gatewayFetchBudgetPerExec:e.budgetPerExec},enterprise:{rbac:!0,sso:!0,analytics:!0,removeAttribution:!0,advancedSearch:!0,ssoDirect:!1,aiSearchLimit:750,kvStorageLimit:5,mcp:!0,mcpGateway:!0,mcpMode:"code",gatewayFetchRatePerMin:e.ratePerMin,gatewayFetchQuotaPerDay:e.quotaPerDay,gatewayFetchBudgetPerExec:e.budgetPerExec}},r=["@redocly/portal-plugin-async-api/plugin.js","@redocly/portal-plugin-mock-server/plugin.js","@redocly/portal-plugin-soap-api/plugin.js"],o={"code-walkthrough":"codeWalkthrough",step:"codeWalkthrough",toggle:"codeWalkthrough",input:"codeWalkthrough"};export{o as GATED_MARKDOC_TAGS,r as GATED_PLUGINS,a as PLAN_GATES_DEFAULTS};
|
|
1
|
+
import{GATEWAY_FETCH_LIMIT_DEFAULTS as e}from"../../constants/common.js";const a={pro:{rbac:!1,sso:!1,cookieConsent:!1,analytics:!0,removeAttribution:!1,advancedSearch:!1,ssoDirect:!1,aiSearchLimit:0,kvStorageLimit:.5,mcp:!1,mcpGateway:!1,mcpMode:"tools",gatewayFetchRatePerMin:e.ratePerMin,gatewayFetchQuotaPerDay:e.quotaPerDay,gatewayFetchBudgetPerExec:e.budgetPerExec},enterprise:{rbac:!0,sso:!0,cookieConsent:!0,analytics:!0,removeAttribution:!0,advancedSearch:!0,ssoDirect:!1,aiSearchLimit:750,kvStorageLimit:5,mcp:!0,mcpGateway:!0,mcpMode:"code",gatewayFetchRatePerMin:e.ratePerMin,gatewayFetchQuotaPerDay:e.quotaPerDay,gatewayFetchBudgetPerExec:e.budgetPerExec}},r=["@redocly/portal-plugin-async-api/plugin.js","@redocly/portal-plugin-mock-server/plugin.js","@redocly/portal-plugin-soap-api/plugin.js"],o={"code-walkthrough":"codeWalkthrough",step:"codeWalkthrough",toggle:"codeWalkthrough",input:"codeWalkthrough"};export{o as GATED_MARKDOC_TAGS,r as GATED_PLUGINS,a as PLAN_GATES_DEFAULTS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH","BR","JP","KR","CN","TR","ZA","TH","SA","IN","IL","AR","CA","AX","GP","MQ","GF","RE","YT","MF","GG","IM","JE","GI","SJ","FO","GL","MC","SM","VA","AD"]),i={"Africa/Abidjan":["CI"],"Africa/Accra":["GH"],"Africa/Addis_Ababa":["ET"],"Africa/Algiers":["DZ"],"Africa/Asmara":["ER"],"Africa/Asmera":["ER"],"Africa/Bamako":["ML"],"Africa/Bangui":["CF"],"Africa/Banjul":["GM"],"Africa/Bissau":["GW"],"Africa/Blantyre":["MW"],"Africa/Brazzaville":["CG"],"Africa/Bujumbura":["BI"],"Africa/Cairo":["EG"],"Africa/Casablanca":["MA"],"Africa/Ceuta":["ES"],"Africa/Conakry":["GN"],"Africa/Dakar":["SN"],"Africa/Dar_es_Salaam":["TZ"],"Africa/Djibouti":["DJ"],"Africa/Douala":["CM"],"Africa/El_Aaiun":["EH"],"Africa/Freetown":["SL"],"Africa/Gaborone":["BW"],"Africa/Harare":["ZW"],"Africa/Johannesburg":["ZA"],"Africa/Juba":["SS"],"Africa/Kampala":["UG"],"Africa/Khartoum":["SD"],"Africa/Kigali":["RW"],"Africa/Kinshasa":["CD"],"Africa/Lagos":["NG"],"Africa/Libreville":["GA"],"Africa/Lome":["TG"],"Africa/Luanda":["AO"],"Africa/Lubumbashi":["CD"],"Africa/Lusaka":["ZM"],"Africa/Malabo":["GQ"],"Africa/Maputo":["MZ"],"Africa/Maseru":["LS"],"Africa/Mbabane":["SZ"],"Africa/Mogadishu":["SO"],"Africa/Monrovia":["LR"],"Africa/Nairobi":["KE"],"Africa/Ndjamena":["TD"],"Africa/Niamey":["NE"],"Africa/Nouakchott":["MR"],"Africa/Ouagadougou":["BF"],"Africa/Porto-Novo":["BJ"],"Africa/Sao_Tome":["ST"],"Africa/Timbuktu":["ML"],"Africa/Tripoli":["LY"],"Africa/Tunis":["TN"],"Africa/Windhoek":["NA"],"America/Adak":["US"],"America/Anchorage":["US"],"America/Anguilla":["AI"],"America/Antigua":["AG"],"America/Araguaina":["BR"],"America/Argentina/Buenos_Aires":["AR"],"America/Argentina/Catamarca":["AR"],"America/Argentina/ComodRivadavia":["AR"],"America/Argentina/Cordoba":["AR"],"America/Argentina/Jujuy":["AR"],"America/Argentina/La_Rioja":["AR"],"America/Argentina/Mendoza":["AR"],"America/Argentina/Rio_Gallegos":["AR"],"America/Argentina/Salta":["AR"],"America/Argentina/San_Juan":["AR"],"America/Argentina/San_Luis":["AR"],"America/Argentina/Tucuman":["AR"],"America/Argentina/Ushuaia":["AR"],"America/Aruba":["AW"],"America/Asuncion":["PY"],"America/Atikokan":["CA"],"America/Atka":["US"],"America/Bahia":["BR"],"America/Bahia_Banderas":["MX"],"America/Barbados":["BB"],"America/Belem":["BR"],"America/Belize":["BZ"],"America/Blanc-Sablon":["CA"],"America/Boa_Vista":["BR"],"America/Bogota":["CO"],"America/Boise":["US"],"America/Buenos_Aires":["AR"],"America/Cambridge_Bay":["CA"],"America/Campo_Grande":["BR"],"America/Cancun":["MX"],"America/Caracas":["VE"],"America/Catamarca":["AR"],"America/Cayenne":["GF"],"America/Cayman":["KY"],"America/Chicago":["US"],"America/Chihuahua":["MX"],"America/Ciudad_Juarez":["MX"],"America/Coral_Harbour":["CA"],"America/Cordoba":["AR"],"America/Costa_Rica":["CR"],"America/Coyhaique":["CL"],"America/Creston":["CA"],"America/Cuiaba":["BR"],"America/Curacao":["CW"],"America/Danmarkshavn":["GL"],"America/Dawson":["CA"],"America/Dawson_Creek":["CA"],"America/Denver":["US"],"America/Detroit":["US"],"America/Dominica":["DM"],"America/Edmonton":["CA"],"America/Eirunepe":["BR"],"America/El_Salvador":["SV"],"America/Ensenada":["MX"],"America/Fort_Nelson":["CA"],"America/Fort_Wayne":["US"],"America/Fortaleza":["BR"],"America/Glace_Bay":["CA"],"America/Godthab":["GL"],"America/Goose_Bay":["CA"],"America/Grand_Turk":["TC"],"America/Grenada":["GD"],"America/Guadeloupe":["GP"],"America/Guatemala":["GT"],"America/Guayaquil":["EC"],"America/Guyana":["GY"],"America/Halifax":["CA"],"America/Havana":["CU"],"America/Hermosillo":["MX"],"America/Indiana/Indianapolis":["US"],"America/Indiana/Knox":["US"],"America/Indiana/Marengo":["US"],"America/Indiana/Petersburg":["US"],"America/Indiana/Tell_City":["US"],"America/Indiana/Vevay":["US"],"America/Indiana/Vincennes":["US"],"America/Indiana/Winamac":["US"],"America/Indianapolis":["US"],"America/Inuvik":["CA"],"America/Iqaluit":["CA"],"America/Jamaica":["JM"],"America/Jujuy":["AR"],"America/Juneau":["US"],"America/Kentucky/Louisville":["US"],"America/Kentucky/Monticello":["US"],"America/Knox_IN":["US"],"America/Kralendijk":["BQ"],"America/La_Paz":["BO"],"America/Lima":["PE"],"America/Los_Angeles":["US"],"America/Louisville":["US"],"America/Lower_Princes":["SX"],"America/Maceio":["BR"],"America/Managua":["NI"],"America/Manaus":["BR"],"America/Marigot":["MF"],"America/Martinique":["MQ"],"America/Matamoros":["MX"],"America/Mazatlan":["MX"],"America/Mendoza":["AR"],"America/Menominee":["US"],"America/Merida":["MX"],"America/Metlakatla":["US"],"America/Mexico_City":["MX"],"America/Miquelon":["PM"],"America/Moncton":["CA"],"America/Monterrey":["MX"],"America/Montevideo":["UY"],"America/Montreal":["CA"],"America/Montserrat":["MS"],"America/Nassau":["BS"],"America/New_York":["US"],"America/Nipigon":["CA"],"America/Nome":["US"],"America/Noronha":["BR"],"America/North_Dakota/Beulah":["US"],"America/North_Dakota/Center":["US"],"America/North_Dakota/New_Salem":["US"],"America/Nuuk":["GL"],"America/Ojinaga":["MX"],"America/Panama":["PA"],"America/Pangnirtung":["CA"],"America/Paramaribo":["SR"],"America/Phoenix":["US"],"America/Port-au-Prince":["HT"],"America/Port_of_Spain":["TT"],"America/Porto_Acre":["BR"],"America/Porto_Velho":["BR"],"America/Puerto_Rico":["PR"],"America/Punta_Arenas":["CL"],"America/Rainy_River":["CA"],"America/Rankin_Inlet":["CA"],"America/Recife":["BR"],"America/Regina":["CA"],"America/Resolute":["CA"],"America/Rio_Branco":["BR"],"America/Rosario":["AR"],"America/Santa_Isabel":["MX"],"America/Santarem":["BR"],"America/Santiago":["CL"],"America/Santo_Domingo":["DO"],"America/Sao_Paulo":["BR"],"America/Scoresbysund":["GL"],"America/Shiprock":["US"],"America/Sitka":["US"],"America/St_Barthelemy":["BL"],"America/St_Johns":["CA"],"America/St_Kitts":["KN"],"America/St_Lucia":["LC"],"America/St_Thomas":["VI"],"America/St_Vincent":["VC"],"America/Swift_Current":["CA"],"America/Tegucigalpa":["HN"],"America/Thule":["GL"],"America/Thunder_Bay":["CA"],"America/Tijuana":["MX"],"America/Toronto":["CA"],"America/Tortola":["VG"],"America/Vancouver":["CA"],"America/Virgin":["PR"],"America/Whitehorse":["CA"],"America/Winnipeg":["CA"],"America/Yakutat":["US"],"America/Yellowknife":["CA"],"Antarctica/Casey":["AQ"],"Antarctica/Davis":["AQ"],"Antarctica/DumontDUrville":["AQ"],"Antarctica/Macquarie":["AU"],"Antarctica/Mawson":["AQ"],"Antarctica/McMurdo":["AQ"],"Antarctica/Palmer":["AQ"],"Antarctica/Rothera":["AQ"],"Antarctica/South_Pole":["NZ"],"Antarctica/Syowa":["AQ"],"Antarctica/Troll":["AQ"],"Antarctica/Vostok":["AQ"],"Arctic/Longyearbyen":["SJ"],"Asia/Aden":["YE"],"Asia/Almaty":["KZ"],"Asia/Amman":["JO"],"Asia/Anadyr":["RU"],"Asia/Aqtau":["KZ"],"Asia/Aqtobe":["KZ"],"Asia/Ashgabat":["TM"],"Asia/Ashkhabad":["TM"],"Asia/Atyrau":["KZ"],"Asia/Baghdad":["IQ"],"Asia/Bahrain":["BH"],"Asia/Baku":["AZ"],"Asia/Bangkok":["TH"],"Asia/Barnaul":["RU"],"Asia/Beirut":["LB"],"Asia/Bishkek":["KG"],"Asia/Brunei":["BN"],"Asia/Calcutta":["IN"],"Asia/Chita":["RU"],"Asia/Choibalsan":["MN"],"Asia/Chongqing":["CN"],"Asia/Chungking":["CN"],"Asia/Colombo":["LK"],"Asia/Dacca":["BD"],"Asia/Damascus":["SY"],"Asia/Dhaka":["BD"],"Asia/Dili":["TL"],"Asia/Dubai":["AE"],"Asia/Dushanbe":["TJ"],"Asia/Famagusta":["CY"],"Asia/Gaza":["PS"],"Asia/Harbin":["CN"],"Asia/Hebron":["PS"],"Asia/Ho_Chi_Minh":["VN"],"Asia/Hong_Kong":["HK"],"Asia/Hovd":["MN"],"Asia/Irkutsk":["RU"],"Asia/Istanbul":["TR"],"Asia/Jakarta":["ID"],"Asia/Jayapura":["ID"],"Asia/Jerusalem":["IL"],"Asia/Kabul":["AF"],"Asia/Kamchatka":["RU"],"Asia/Karachi":["PK"],"Asia/Kashgar":["CN"],"Asia/Kathmandu":["NP"],"Asia/Katmandu":["NP"],"Asia/Khandyga":["RU"],"Asia/Kolkata":["IN"],"Asia/Krasnoyarsk":["RU"],"Asia/Kuala_Lumpur":["MY"],"Asia/Kuching":["MY"],"Asia/Kuwait":["KW"],"Asia/Macao":["MO"],"Asia/Macau":["MO"],"Asia/Magadan":["RU"],"Asia/Makassar":["ID"],"Asia/Manila":["PH"],"Asia/Muscat":["OM"],"Asia/Nicosia":["CY"],"Asia/Novokuznetsk":["RU"],"Asia/Novosibirsk":["RU"],"Asia/Omsk":["RU"],"Asia/Oral":["KZ"],"Asia/Phnom_Penh":["KH"],"Asia/Pontianak":["ID"],"Asia/Pyongyang":["KP"],"Asia/Qatar":["QA"],"Asia/Qostanay":["KZ"],"Asia/Qyzylorda":["KZ"],"Asia/Rangoon":["MM"],"Asia/Riyadh":["SA"],"Asia/Saigon":["VN"],"Asia/Sakhalin":["RU"],"Asia/Samarkand":["UZ"],"Asia/Seoul":["KR"],"Asia/Shanghai":["CN"],"Asia/Singapore":["SG"],"Asia/Srednekolymsk":["RU"],"Asia/Taipei":["TW"],"Asia/Tashkent":["UZ"],"Asia/Tbilisi":["GE"],"Asia/Tehran":["IR"],"Asia/Tel_Aviv":["IL"],"Asia/Thimbu":["BT"],"Asia/Thimphu":["BT"],"Asia/Tokyo":["JP"],"Asia/Tomsk":["RU"],"Asia/Ujung_Pandang":["ID"],"Asia/Ulaanbaatar":["MN"],"Asia/Ulan_Bator":["MN"],"Asia/Urumqi":["CN"],"Asia/Ust-Nera":["RU"],"Asia/Vientiane":["LA"],"Asia/Vladivostok":["RU"],"Asia/Yakutsk":["RU"],"Asia/Yangon":["MM"],"Asia/Yekaterinburg":["RU"],"Asia/Yerevan":["AM"],"Atlantic/Azores":["PT"],"Atlantic/Bermuda":["BM"],"Atlantic/Canary":["ES"],"Atlantic/Cape_Verde":["CV"],"Atlantic/Faeroe":["FO"],"Atlantic/Faroe":["FO"],"Atlantic/Jan_Mayen":["DE"],"Atlantic/Madeira":["PT"],"Atlantic/Reykjavik":["IS"],"Atlantic/South_Georgia":["GS"],"Atlantic/St_Helena":["SH"],"Atlantic/Stanley":["FK"],"Australia/ACT":["AU"],"Australia/Adelaide":["AU"],"Australia/Brisbane":["AU"],"Australia/Broken_Hill":["AU"],"Australia/Canberra":["AU"],"Australia/Currie":["AU"],"Australia/Darwin":["AU"],"Australia/Eucla":["AU"],"Australia/Hobart":["AU"],"Australia/LHI":["AU"],"Australia/Lindeman":["AU"],"Australia/Lord_Howe":["AU"],"Australia/Melbourne":["AU"],"Australia/NSW":["AU"],"Australia/North":["AU"],"Australia/Perth":["AU"],"Australia/Queensland":["AU"],"Australia/South":["AU"],"Australia/Sydney":["AU"],"Australia/Tasmania":["AU"],"Australia/Victoria":["AU"],"Australia/West":["AU"],"Australia/Yancowinna":["AU"],"Brazil/Acre":["BR"],"Brazil/DeNoronha":["BR"],"Brazil/East":["BR"],"Brazil/West":["BR"],CET:["BE"],"Canada/Atlantic":["CA"],"Canada/Central":["CA"],"Canada/Eastern":["CA"],"Canada/Mountain":["CA"],"Canada/Newfoundland":["CA"],"Canada/Pacific":["CA"],"Canada/Saskatchewan":["CA"],"Canada/Yukon":["CA"],"Chile/Continental":["CL"],"Chile/EasterIsland":["CL"],Cuba:["CU"],EET:["GR"],EST:["US"],Egypt:["EG"],Eire:["IE"],"Europe/Amsterdam":["NL"],"Europe/Andorra":["AD"],"Europe/Astrakhan":["RU"],"Europe/Athens":["GR"],"Europe/Belfast":["GB"],"Europe/Belgrade":["RS"],"Europe/Berlin":["DE"],"Europe/Bratislava":["SK"],"Europe/Brussels":["BE"],"Europe/Bucharest":["RO"],"Europe/Budapest":["HU"],"Europe/Busingen":["DE"],"Europe/Chisinau":["MD"],"Europe/Copenhagen":["DK"],"Europe/Dublin":["IE"],"Europe/Gibraltar":["GI"],"Europe/Guernsey":["GG"],"Europe/Helsinki":["FI"],"Europe/Isle_of_Man":["IM"],"Europe/Istanbul":["TR"],"Europe/Jersey":["JE"],"Europe/Kaliningrad":["RU"],"Europe/Kiev":["UA"],"Europe/Kirov":["RU"],"Europe/Kyiv":["UA"],"Europe/Lisbon":["PT"],"Europe/Ljubljana":["SI"],"Europe/London":["GB"],"Europe/Luxembourg":["LU"],"Europe/Madrid":["ES"],"Europe/Malta":["MT"],"Europe/Mariehamn":["AX"],"Europe/Minsk":["BY"],"Europe/Monaco":["MC"],"Europe/Moscow":["RU"],"Europe/Nicosia":["CY"],"Europe/Oslo":["NO"],"Europe/Paris":["FR"],"Europe/Podgorica":["ME"],"Europe/Prague":["CZ"],"Europe/Riga":["LV"],"Europe/Rome":["IT"],"Europe/Samara":["RU"],"Europe/San_Marino":["SM"],"Europe/Sarajevo":["BA"],"Europe/Saratov":["RU"],"Europe/Simferopol":["UA"],"Europe/Skopje":["MK"],"Europe/Sofia":["BG"],"Europe/Stockholm":["SE"],"Europe/Tallinn":["EE"],"Europe/Tirane":["AL"],"Europe/Tiraspol":["MD"],"Europe/Ulyanovsk":["RU"],"Europe/Uzhgorod":["UA"],"Europe/Vaduz":["LI"],"Europe/Vatican":["VA"],"Europe/Vienna":["AT"],"Europe/Vilnius":["LT"],"Europe/Volgograd":["RU"],"Europe/Warsaw":["PL"],"Europe/Zagreb":["HR"],"Europe/Zaporozhye":["UA"],"Europe/Zurich":["CH"],GB:["GB"],"GB-Eire":["GB"],HST:["US"],Hongkong:["HK"],Iceland:["IS"],"Indian/Antananarivo":["MG"],"Indian/Chagos":["IO"],"Indian/Christmas":["CX"],"Indian/Cocos":["CC"],"Indian/Comoro":["KM"],"Indian/Kerguelen":["TF"],"Indian/Mahe":["SC"],"Indian/Maldives":["MV"],"Indian/Mauritius":["MU"],"Indian/Mayotte":["YT"],"Indian/Reunion":["RE"],Iran:["IR"],Israel:["IL"],Jamaica:["JM"],Japan:["JP"],Kwajalein:["MH"],Libya:["LY"],MET:["BE"],MST:["US"],"Mexico/BajaNorte":["MX"],"Mexico/BajaSur":["MX"],"Mexico/General":["MX"],NZ:["NZ"],"NZ-CHAT":["NZ"],Navajo:["US"],PRC:["CN"],"Pacific/Apia":["WS"],"Pacific/Auckland":["NZ"],"Pacific/Bougainville":["PG"],"Pacific/Chatham":["NZ"],"Pacific/Chuuk":["FM"],"Pacific/Easter":["CL"],"Pacific/Efate":["VU"],"Pacific/Enderbury":["KI"],"Pacific/Fakaofo":["TK"],"Pacific/Fiji":["FJ"],"Pacific/Funafuti":["TV"],"Pacific/Galapagos":["EC"],"Pacific/Gambier":["PF"],"Pacific/Guadalcanal":["SB"],"Pacific/Guam":["GU"],"Pacific/Honolulu":["US"],"Pacific/Johnston":["US"],"Pacific/Kanton":["KI"],"Pacific/Kiritimati":["KI"],"Pacific/Kosrae":["FM"],"Pacific/Kwajalein":["MH"],"Pacific/Majuro":["MH"],"Pacific/Marquesas":["PF"],"Pacific/Midway":["UM"],"Pacific/Nauru":["NR"],"Pacific/Niue":["NU"],"Pacific/Norfolk":["NF"],"Pacific/Noumea":["NC"],"Pacific/Pago_Pago":["AS"],"Pacific/Palau":["PW"],"Pacific/Pitcairn":["PN"],"Pacific/Pohnpei":["FM"],"Pacific/Ponape":["SB"],"Pacific/Port_Moresby":["PG"],"Pacific/Rarotonga":["CK"],"Pacific/Saipan":["MP"],"Pacific/Samoa":["AS"],"Pacific/Tahiti":["PF"],"Pacific/Tarawa":["KI"],"Pacific/Tongatapu":["TO"],"Pacific/Truk":["PG"],"Pacific/Wake":["UM"],"Pacific/Wallis":["WF"],"Pacific/Yap":["PG"],Poland:["PL"],Portugal:["PT"],ROC:["TW"],ROK:["KR"],Singapore:["SG"],Turkey:["TR"],"US/Alaska":["US"],"US/Aleutian":["US"],"US/Arizona":["US"],"US/Central":["US"],"US/East-Indiana":["US"],"US/Eastern":["US"],"US/Hawaii":["US"],"US/Indiana-Starke":["US"],"US/Michigan":["US"],"US/Mountain":["US"],"US/Pacific":["US"],"US/Samoa":["AS"],"W-SU":["RU"],WET:["PT"]};export{a as OPT_IN_COUNTRIES,i as TZ_COUNTRIES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=["title","text","path","httpPath","parameters[]:name","parameters[]:description","parameters[]:path"],_="Documentation",
|
|
1
|
+
const t=["title","text","path","httpMethod","httpPath","parameters[]:name","parameters[]:description","parameters[]:path","parameters[]:example","parameters[]:enum"],_="Documentation",e="API Reference",E="search",o=100,A=10,r=25,p=100,I=150,s="ai-search",a=50,n=250,R=Symbol("metadata"),S=!0,c=["title"];export{s as AI_INDEX_EXPORT_FOLDER,a as AI_SEARCH_CHUNK_SIZE,n as AI_SEARCH_DOCUMENT_CHUNK_SIZE,S as DEFAULT_AI_SEARCH_ENABLED,c as DISABLE_DEEP_LINK_IF_FIELDS_EXIST,I as HIGHLIGHTED_TEXT_MAX_LENGTH,E as SEARCH_DATA_EXPORT_FOLDER,R as SEARCH_DOCUMENT_METADATA_KEY,A as SEARCH_GROUP_LIMIT,e as SEARCH_GROUP_NAME_API,_ as SEARCH_GROUP_NAME_DOCUMENTATION,t as SEARCH_INDEX_FIELDS,o as SEARCH_LIMIT,r as SEARCH_MAX_FACET_VALUES,p as SEARCH_MAX_INMEMORY_DOCUMENTS_COUNT};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import*as E from"esbuild";import{logger as
|
|
2
|
-
`),hasMatched:!1};const
|
|
3
|
-
`),{lineText:s}=r,o
|
|
1
|
+
import*as E from"esbuild";import{logger as d}from"../tools/notifiers/logger.js";import{reporter as m}from"../tools/notifiers/reporter.js";import{envConfig as h}from"../config/env-config.js";import{telemetry as f}from"../../cli/telemetry/index.js";import{stopAllCompilers as y}from"./esbuild.js";import{getCodeframe as C}from"../utils/codeframes/codeframes.js";import{shutdowner as M}from"../tools/shutdowner.js";class T extends Error{errors;warnings;constructor(r){super(r.message??"",r instanceof Error?{cause:r}:void 0),this.errors=r.errors??[],this.warnings=r.warnings??[]}}async function N({errors:e,warnings:r,message:n}){const s=typeof n=="string"&&n.length>0?n:void 0,i=await g(e,"error"),l=await g(r,"warning");if(r.forEach((t,a)=>{d.warn(l[a])}),e.forEach((t,a)=>{const c=t.location?.file||"";c&&c.includes("node_modules/")?(d.error(i[a]),f.sendCliErrorCaughtMessage([{id:"cli",object:"error",uri:"urn:redocly:realm:cli:error:cli",message:JSON.stringify(t)}])):(d.contentError(i[a]),f.sendCliErrorCaughtMessage([{id:"cli",object:"error",uri:"urn:redocly:realm:cli:error:cli",message:JSON.stringify(t),scope:"content"}]))}),!e.length&&s!==void 0){const t=`JavaScript compilation failed: ${s}`;d.error(t),f.sendCliErrorCaughtMessage([{id:"cli",object:"error",uri:"urn:redocly:realm:cli:error:cli",message:t}])}(e.length>0||s!==void 0)&&h.isBuildMode&&(await y(),await M.exitWithCode(1))}async function g(e,r){return e.length?h.REDOCLY_LOG_FORMAT==="JSON"?e.map(n=>JSON.stringify(n)):await E.formatMessages(e,{kind:r,color:!1,terminalWidth:0}):[]}function w(e,r){if(!r?.lineText)return{line:1,column:1,lines:e.split(`
|
|
2
|
+
`),hasMatched:!1};const n=e.split(`
|
|
3
|
+
`),{lineText:s}=r,i=o=>{const t=o.indexOf(s);return t===-1?null:t};if(r.line&&r.line<=n.length&&i(n[r.line-1]))return{line:r.line,column:r.column||1,lines:n,hasMatched:!0};const l=n.findIndex(o=>i(o)!==null);if(l>=0){const o=i(n[l]);return{line:l+1,column:(o??0)+1,lines:n,hasMatched:!0}}return{line:1,column:1,lines:n,hasMatched:!1}}function _(e,r,n,s){const{line:i,column:l,lines:o,hasMatched:t}=w(n,s),{frame:a,start:c}=C({start:{line:i,character:l},end:{line:i,character:l+(s?.lineText?.length||0)},lines:o},!0),p=`${e}::${r}::${i}`,u={message:e,sourceFileRelativePath:r,sourceFileLocation:c,codeframe:a,hasMatched:t};return m.getCompilationProblem(p)||m.reportCompilationError({type:"ERROR",severity:"ERROR",...u}),u}export{T as EsbuildError,N as esbuildLogger,_ as reportEsbuildError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{envConfig as
|
|
1
|
+
import{envConfig as i}from"../../../config/env-config.js";import{gateSsrComponents as e}from"../../consent/gate-ssr-components.js";import{buildScript as s}from"./build-script.js";import{resolveBrowserHooksPath as a}from"./resolve-browser-hooks.js";async function m(){return{id:"Adobe Analytics",requiredEntitlements:["analytics"],async processContent(o,{getConfig:r}){const t=await r(),n=t?.analytics?.adobe;!n?.scriptUrl||!i.isProductionEnv&&!n.includeInDevelopment||(o.addSsrComponents(e([s(n.scriptUrl)],"analytics",t.consent),"head"),o.addBrowserPlugin(a()))}}}export{m as adobeAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=(n,t)=>{if(!t?.analytics?.amplitude)return;const{location:e}=n;typeof window.amplitudeExcludePaths<"u"&&window.amplitudeExcludePaths.some(i=>i.test(e.pathname))||window.amplitude.getInstance().logEvent(window.amplitudeEventTypes.pageView,{location:e?e.pathname+e.search+e.hash:void 0})};export{o as onRouteChange};
|
|
1
|
+
const o=(n,t)=>{if(!t?.analytics?.amplitude)return;const{location:e}=n;typeof window.amplitudeExcludePaths<"u"&&window.amplitudeExcludePaths.some(i=>i.test(e.pathname))||window.amplitude?.getInstance&&window.amplitude.getInstance().logEvent(window.amplitudeEventTypes.pageView,{location:e?e.pathname+e.search+e.hash:void 0})};export{o as onRouteChange};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Minimatch as
|
|
1
|
+
import{Minimatch as d}from"minimatch";import{envConfig as c}from"../../../config/env-config.js";import{gateSsrComponents as s}from"../../consent/gate-ssr-components.js";import{buildScripts as l}from"./build-scripts.js";import{resolveBrowserHooksPath as u}from"./resolve-browser-hooks.js";async function P(){return{id:"Amplitude Analytics",requiredEntitlements:["analytics"],async processContent(t,{getConfig:r}){const e=await r(),n=e?.analytics?.amplitude;if(!n?.apiKey||!c.isProductionEnv&&!n.includeInDevelopment)return;let o=[];typeof n.exclude<"u"&&n.exclude.map(p=>{const i=new d(p).makeRe();i&&o.push(i)});const{headComponents:m,postBodyComponents:a}=l(n,o);t.addSsrComponents(s(m,"analytics",e.consent),"head"),t.addSsrComponents(s(a,"analytics",e.consent),"postBody"),t.addBrowserPlugin(u())}}}export{P as amplitudeAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{envConfig as r}from"../../../config/env-config.js";import{buildScript as
|
|
1
|
+
import{envConfig as r}from"../../../config/env-config.js";import{gateSsrComponents as e}from"../../consent/gate-ssr-components.js";import{buildScript as c}from"./build-script.js";async function u(){return{id:"Fullstory Analytics",requiredEntitlements:["analytics"],async processContent(o,{getConfig:i}){const t=await i(),n=t?.analytics?.fullstory;if(!n?.orgId||!r.isProductionEnv&&!n.includeInDevelopment)return;const s=[c(n.orgId)];o.addSsrComponents(e(s,"analytics",t.consent),"head")}}}export{u as fullstoryAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{withPathPrefix as
|
|
1
|
+
import{withPathPrefix as d}from"@redocly/theme/core/utils";import{envConfig as g}from"../../../config/env-config.js";import{normalizeRouteSlug as a}from"../../../../utils/path/normalize-route-slug.js";import{gateSsrComponents as s}from"../../consent/gate-ssr-components.js";import{buildScripts as u}from"./build-scripts.js";import{resolveBrowserHooksPath as f}from"./resolve-browser-hooks.js";async function C(){const r=g.isProductionEnv;return{id:"Google Analytics",requiredEntitlements:["analytics"],afterRoutesCreated(e){const t=e.getGlobalData()||{},o=t.analytics?.ga||{trackingId:""};o?.exclude||(o.exclude=[]),o.trackers={};for(const i of Object.values(t.products||{})){const n=i.configOverride?.analytics?.ga;!n||!r&&!n.includeInDevelopment||(n.exclude?.length&&o.exclude.push(...n.exclude),o.trackers[a(i.slug)]=n)}if(o.trackingId&&(r||o.includeInDevelopment)&&(o.trackers[a(d("/"))]={trackingId:o.trackingId,conversionId:o.conversionId,floodlightId:o.floodlightId,optimizeId:o.optimizeId}),e.setGlobalData({...t,analytics:{...t?.analytics,ga:o}}),!Object.keys(o.trackers).length)return;const{headComponents:c,postBodyComponents:l}=u(o);e.addSsrComponents(s(c,"analytics",t.consent),"head"),e.addSsrComponents(s(l,"analytics",t.consent),"postBody"),e.addBrowserPlugin(f())}}}export{C as googleAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onCLS as
|
|
1
|
+
import{onCLS as f,onFID as l,onLCP as p}from"web-vitals";import{envConfig as w}from"../../../config/env-config.js";import{debounce as s}from"../../../../utils/time/debounce.js";const r=new Set,y=(n,a)=>{const e=a?.analytics?.gtm;if(!e||w.NODE_ENV!=="production"&&!e.includeInDevelopment)return;const t=window.redocly?.consent;if(t&&!t.state.analytics){if(e.enableWebVitalsTracking&&!n.prevLocation){const u=t.on("change",m=>{m.analytics&&(u(),d(e.dataLayerName))})}return}e.enableWebVitalsTracking&&!n.prevLocation&&d(e.dataLayerName);const o=e.dataLayerName||"dataLayer",i=window;i[o]=i[o]||[];const c=e.pageViewEventName?e.pageViewEventName:"pageView";i[o].push({event:c})};function d(n="dataLayer"){const a=window;function e(c){r.has(c.name)||(r.add(c.name),L(c,a[n]))}const t=s(e,3e3),o=e,i=s(e,3e3);f(t),l(o),p(i)}function L({name:n,value:a,id:e},t){t.push({event:"core-web-vitals",webVitalsMeasurement:{name:n,id:e,value:Math.round(n==="CLS"?a*1e3:a),nonInteraction:!0}})}export{y as onRouteChange};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{envConfig as
|
|
1
|
+
import{envConfig as a}from"../../../config/env-config.js";import{gateSsrComponents as e}from"../../consent/gate-ssr-components.js";import{buildScripts as c}from"./build-scripts.js";import{resolveBrowserHooksPath as m}from"./resolve-browser-hooks.js";async function u(){return{id:"Google Tag Manager Analytics",requiredEntitlements:["analytics"],async processContent(n,{getConfig:r}){const o=await r(),t=o?.analytics?.gtm;if(!t?.trackingId||!a.isProductionEnv&&!t.includeInDevelopment)return;const{headComponents:s,preBodyComponents:i}=c(t);n.addSsrComponents(e(s,"analytics",o.consent),"head"),n.addSsrComponents(e(i,"analytics",o.consent),"preBody"),n.addBrowserPlugin(m())}}}export{u as gtmAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const h=(r,o)=>{const e=o?.analytics?.heap;if(e?.appId&&!r.prevLocation){const n=window.redocly?.consent;if(n&&!n.state.analytics){const t=n.on("change",a=>{a.analytics&&(t(),i(e.appId))});return}i(e.appId)}};function i(r){window.heap=window.heap||[],window.heap.load=function(o,e){window.heap.appid=o,window.heap.config=e=e||{};let n=e.forceSSL||document.location.protocol==="https:",t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=(n?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+o+".js";let a=document.getElementsByTagName("script")[0];a.parentNode?.insertBefore(t,a);for(let s=function(d){return function(...l){window.heap.push([d].concat(Array.prototype.slice.call(l,0)))}},c=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],p=0;p<c.length;p++)window.heap[c[p]]=s(c[p])},window.heap.load(r)}export{h as onRouteChange};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{envConfig as e}from"../../../config/env-config.js";import{
|
|
1
|
+
import{envConfig as e}from"../../../config/env-config.js";import{gateSsrComponents as i}from"../../consent/gate-ssr-components.js";import{buildScript as s}from"./build-script.js";import{resolveBrowserHooksPath as a}from"./resolve-browser-hooks.js";async function m(){return{id:"Rudderstack Analytics",requiredEntitlements:["analytics"],async processContent(t,{getConfig:o}){const r=await o(),n=r?.analytics?.rudderstack;!n?.writeKey||!e.isProductionEnv&&!n.includeInDevelopment||(t.addSsrComponents(i([s(n)],"analytics",r.consent),"head"),t.addBrowserPlugin(a()))}}}export{m as rudderstackAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{envConfig as i}from"../../../config/env-config.js";import{buildScript as
|
|
1
|
+
import{envConfig as i}from"../../../config/env-config.js";import{gateSsrComponents as r}from"../../consent/gate-ssr-components.js";import{buildScript as s}from"./build-script.js";import{resolveBrowserHooksPath as a}from"./resolve-browser-hooks.js";async function d(){return{id:"Segment Analytics",requiredEntitlements:["analytics"],async processContent(t,{getConfig:o}){const e=await o(),n=e?.analytics?.segment;!n?.writeKey||!i.isProductionEnv&&!n.includeInDevelopment||(t.addSsrComponents(r([s(n)],"analytics",e.consent),"head"),t.addBrowserPlugin(a()))}}}export{d as segmentAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_ROUTE_RBAC as w,REDOCLY_TEAMS_RBAC as v}from"@redocly/config";import{mcpTagSchemas as Z,schemaDefinitionTag as ee,markdocParser as
|
|
1
|
+
import{REDOCLY_ROUTE_RBAC as w,REDOCLY_TEAMS_RBAC as v}from"@redocly/config";import{mcpTagSchemas as Z,schemaDefinitionTag as ee,markdocParser as U}from"@redocly/api-docs";import{withPathPrefix as q}from"@redocly/theme/core/utils";import{API_DOCS_TEMPLATE_ID as V,GRAPHQL_SPEC_SLUG as te,PUBLIC_RBAC_SCOPE_ITEM as x}from"../../../constants/common.js";import{DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER as oe,PUBLIC_API_DEFINITIONS_FOLDER as re}from"../../constants/common.js";import{API_DOCS_SHARED_DATA_PREFIX as C}from"../../constants/plugins/api-docs.js";import{fromCurrentDir as ae}from"../../utils/paths.js";import{normalizeRouteSlug as se}from"../../../utils/path/normalize-route-slug.js";import{createSlugify as ie}from"../create-slugify.js";import{apiDocLoader as ne,apiDocsLoader as ce}from"./loader.js";import{getTemplatePath as j}from"./get-template-path.js";import{storeDefinitionBundles as pe}from"./store-definition-bundles.js";import{telemetryTraceStep as ue}from"../../../cli/telemetry/helpers/trace-step.js";import{searchResolver as le}from"./search/search-resolver.js";import{getAiDocumentsStore as de}from"./search/get-ai-search-documents.js";import{getApiConfigByPath as me}from"../get-api-config.js";import{getRouteSlugsForPath as fe}from"../utils.js";import{collectItemRoutes as ge}from"./utils/collect-item-routes.js";import{applyNavItemToRoot as he}from"./utils/apply-nav-item-to-root.js";import{buildRoutesMapping as De}from"./utils/build-routes-mapping.js";import{buildItemPositions as Se}from"./utils/build-item-positions.js";import{resolveApiDocTitle as Pe}from"./utils/resolve-api-doc-title.js";import{resolveConfigRbac as ye}from"./utils/resolve-config-rbac.js";import{relativePathToBaseSlug as Ie}from"./utils/relative-path-to-base-slug.js";import{normalizeApiVersion as Ae}from"./utils/normalize-api-version.js";import{importApiDocsBuilder as W}from"./import-api-docs-builder.js";import{envConfig as $}from"../../config/env-config.js";import{logger as ve}from"../../tools/notifiers/logger.js";const T="openapi-spec-download",Re={asyncapi:"AsyncAPI Docs",graphql:"GraphQL Docs",openapi:"OpenAPI Docs"};async function st(){let t=[],r=new Map;const s=new WeakMap;let n=new Set,m={};function k(o,g,A){const P=s.get(o)??new Map;s.set(o,P);const h=g??"";return P.get(h)===A?!1:(P.set(h,A),!0)}return{id:"api-docs",requiredEntitlements:["openapi","asyncapi","graphql"],loaders:{"api-doc":ne,"api-docs":ce},processContent:async(o,g)=>{await ue("com.redocly.build.plugin.apiDocs",async()=>{o.createRequestHandler(T,ae(import.meta.url,"./spec-download.api.js")),o.addApiRoute({slug:re+"/*",requestHandlerId:T,httpMethod:"all",[v]:x,getStaticData:async()=>({props:{}})}),o.addApiRoute({slug:oe+"/*",requestHandlerId:T,httpMethod:"all",[v]:x,getStaticData:async()=>({props:{}})}),o.addApiRoute({slug:te+"/*",requestHandlerId:T,httpMethod:"all",[v]:x,getStaticData:async()=>({props:{}})});const A=o.createTemplate(V,j("../../../client/templates/api-docs/template.js")),P=o.registerServerPropsGetter(V,j("./get-server-props.js")),h=await g.getConfig();r=new Map,m={};const y=await o.loadApiDocuments(g);pe(y,o.outdir);const E=!!h.plugins?.some(e=>typeof e=="string"&&e.startsWith("@redocly/portal-plugin-async-api/"));E&&y.some(e=>e.type==="asyncapi")&&ve.warn("The plugin '@redocly/portal-plugin-async-api' is deprecated. Please remove it from your config to use built-in AsyncAPI docs.");const c=E?y.filter(e=>e.type!=="asyncapi"):y;t=c.map(({markdocChunks:e,relativePath:I,isVirtual:p,customOutputRelativeFile:a,realRelativePath:f})=>({chunks:e??[],relativePath:I,realRelativePath:f,isVirtual:a!=null||p}));const{buildItems:i}=await W(o.serverOutDir),D=(await g.cache.load("content-slugs","content-slugs")).data,S=ie(D),O=e=>se(S(e));for(const e of c){const I=e.customOutputRelativeFile||e.relativePath,p=O(I);Ee(e,p);const{items:a,store:f}=await i({type:e.type,document:e.document,options:e.options,basePath:p,markdownParser:U}),R=`${C}${e.relativePath}`,M=$.isDevelopMode?e.relativePath:void 0,u=Ce(e.document),b=u?.["x-metadata"],_=e.isVirtual?void 0:b?.apiId,N={document:e,basePath:p,sourcePath:M,apiId:_};await o.createSharedData(R,Q(N,a,f));const K=ye(e.config),F=!!e.options.excludeFromSearch,Y=e.type==="openapi",d=ge(a,K).map(l=>{const B=l.metadata?.seo,H={...we(l.link,p),fsPath:I,templateId:A,sharedData:[{key:"apiDocsStore",id:R}],serverPropsGetterIds:[P],excludeFromSearch:F,getStaticData:_e(l.label,B),[v]:l[v]};return Y?{...H,...l.httpVerb?{httpVerb:l.httpVerb,metadata:{subType:"openapi-operation"}}:{}}:H});if(!d.length)continue;const G=Pe(u,e.type,a),X=Ae(u?.version),L={type:e.type,title:G,version:X,description:typeof u?.description=="string"?u.description:void 0,summary:typeof u?.summary=="string"?u.summary:void 0,...u?.["x-metadata"]&&typeof u["x-metadata"]=="object"?u["x-metadata"]:{}};d[0]={...d[0],metadata:L,hasClientRoutes:!0,getSidebar:(l,B)=>he(z(a),p,B),getNavText:()=>G??Re[e.type]??"API Docs",getSearchDocuments:le(a,L,o.getSearchFacets,o.setSearchFacets,F,f,e.document),getAiDocumentsStore:de({items:a,metadata:L,store:f,document:e.document,specType:e.type,excludeFromSearch:F,basePath:p,getSearchFacets:o.getSearchFacets,markdocTags:{...Z,schemaDefinition:ee}})};const J=d[0];d[0]=d[d.length-1],d[d.length-1]=J;for(const l of d)o.addRoute(l);if(_){const l=me(e.config?.apis,e.realRelativePath);m[_]={[v]:l.rbac,[w]:{fsPath:I}}}r.set(R,N)}})},afterRoutesCreated:async(o,g)=>{const{buildItems:A,simplifyAstStructure:P}=await W(o.serverOutDir),h=new Set,y=new Set;for(const{chunks:c,relativePath:i,isVirtual:D}of t){const S=`${C}${i}`,O=fe(o.getAllRoutes(),i);for(const{node:e,markdown:I,pointer:p,key:a,relativePath:f}of c){const{ast:R,compoundHash:M}=await o.parseMarkdoc({input:{content:I,relativePath:f,isVirtual:D},resource:p,context:g,deps:{sharedDataIds:[`${C}${f}`],routeSlugs:O}});if(h.add(p),!(a==="graphql-docs"?e?.description?.value!==void 0:!!(a&&e[a]))||!k(e,a,M))continue;y.add(S);const b=P(R);if(a==="graphql-docs"){e.description&&(e.description.value=b);const _=`${C}${f}`;be(r.get(_),b)}else a&&(e[a]=b)}}const E=n.difference(h);for(const c of E)g.cache.delete(c);n=h,Object.entries(m).forEach(([c,i])=>{const D=i[w]?.fsPath;if(!D)return;const S=o.getRouteByFsPath(D)?.baseSlug;m[c]={...i,[w]:{...i[w],slug:S},slug:S}}),o.setGlobalData({apiProducts:m});for(const[c,i]of r){if(!y.has(c))continue;const{items:D,store:S}=await A({type:i.document.type,document:i.document.document,options:i.document.options,basePath:i.basePath,markdownParser:U});await o.createSharedData(c,Q(i,D,S))}}}}function Q({document:t,basePath:r,sourcePath:s,apiId:n},m,k){return{items:m,store:k,options:t.options,baseSlug:r,routesMapping:$.isDevelopMode?De(m,r):{},graphqlPositions:$.isDevelopMode&&t.type==="graphql"?Se(m,r):void 0,sourcePath:s,apiId:n}}function be(t,r){t?.document.type!=="graphql"||!t.document.options||(t.document.options.info={...t.document.options.info||{},description:r})}function _e(t,r){return async function(s){return{props:{settings:{baseUrlPath:q(s.baseSlug)},disableAutoScroll:!0,seo:{title:t,...r}}}}}function Ee(t,r){const s=t.options?.mockServer,n=q(`/_mock${Ie(t.relativePath)}`);s?.url===n&&(t.options={...t.options,mockServer:{...s,url:q(`/_mock${r}`)}})}function we(t,r){if(t===r)return{};const s=r==="/"?"/":`${r}/`;if(t.startsWith(s)){const n=t.slice(s.length);return n?{slugSuffix:n}:{}}return{slug:t}}function Ce(t){if(t&&typeof t=="object"&&"info"in t)return t.info}function z(t){return t.map(({content:r,items:s,...n})=>({...n,...s&&{items:z(s)}}))}export{st as apiDocsPlugin,we as toRouteSlugFields};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NavItem, ResolvedNavItem } from '@redocly/config';
|
|
2
|
+
/** A sidebars.yaml entry as core passes it to `getSidebar`: `icon` is the resolved path, or `undefined`
|
|
3
|
+
* with the resolved `srcSet` when the entry's icon is an `icon.srcSet` object. */
|
|
4
|
+
export type SidebarEntry = NavItem & {
|
|
5
|
+
srcSet?: string;
|
|
6
|
+
};
|
|
7
|
+
/** Puts the sidebars.yaml entry's label, icon and badges on the API root item, as core does for a page. */
|
|
8
|
+
export declare function applyNavItemToRoot(items: ResolvedNavItem[], basePath: string, entry?: SidebarEntry): ResolvedNavItem[];
|
|
9
|
+
//# sourceMappingURL=apply-nav-item-to-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const u=[({label:n,labelTranslationKey:o})=>n?{label:n,labelTranslationKey:o}:void 0,({icon:n,srcSet:o})=>{const t=typeof n=="string"?n:void 0;return t||o?{icon:t,srcSet:o}:void 0},({badges:n})=>n?{badges:n}:void 0];function c(n,o,t){if(!t)return n;const r=d(t);return n.map(e=>i(e,o)?{...e,...r}:e)}function d(n){return u.reduce((o,t)=>({...o,...t(n)}),{})}function i(n,o){return n.link===o}export{c as applyNavItemToRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import b from"node:path";import{REDOCLY_TEAMS_RBAC as p}from"@redocly/config";import{slash as k}from"../../../../utils/path/slash.js";function f(t,r,a){if(!r)throw new Error("Visitor required");if(t){t.description&&r(t,"description",a.location.absolutePointer+"/description",a);for(const o in t["x-enumDescriptions"])r(t["x-enumDescriptions"],o,a.location.absolutePointer+"/x-enumDescriptions/"+o,a)}}const x=/^[a-zA-Z0-9\s\-,.!?:;'"()/]+$/,d
|
|
1
|
+
import b from"node:path";import{REDOCLY_TEAMS_RBAC as p}from"@redocly/config";import{slash as k}from"../../../../utils/path/slash.js";function f(t,r,a){if(!r)throw new Error("Visitor required");if(t){t.description&&r(t,"description",a.location.absolutePointer+"/description",a);for(const o in t["x-enumDescriptions"])r(t["x-enumDescriptions"],o,a.location.absolutePointer+"/x-enumDescriptions/"+o,a)}}const x=/^[a-zA-Z0-9\s\-,.!?:;'"()/]+$/,d=/^[^\S\r\n\u2028\u2029]*(?:[-+*]\s|\d+[.)]\s)/m;function g(t){return x.test(t)&&!d.test(t)}const s=({outputRelativePath:t,cwd:r})=>{const a=function(e,u,l,m){const{node:n}=m.resolve(e[u]);if(!n||typeof n!="string"||g(n))return;const i=m.getVisitorData();i.markdocChunks=i.markdocChunks||[],i.markdocChunks.push({node:e,pointer:k(b.relative(r,l)),markdown:n,relativePath:t,key:u})};return{any:{leave(o,e){f(o,a,e)}},ref:{leave(o,e){f(o,a,e)}}}},c=()=>{const t={};return{Tag:{enter(r){r?.["x-rbac"]&&(t[String(r.name)]=r["x-rbac"])}},any:{leave(r,a){if((a.type.name==="Operation"||a.type.name==="Webhook")&&"tags"in r&&Array.isArray(r.tags))for(const o of r.tags)t[o]&&(r["x-rbac"]=r["x-rbac"]||t[o]);r?.["x-rbac"]&&(r[p]=r["x-rbac"],delete r["x-rbac"])}},ref:{leave(r){r?.["x-rbac"]&&(r[p]=r["x-rbac"],delete r["x-rbac"])}}}};function D(t,r,a){const o={id:"markdown",decorators:{oas2:{markdown:s,rbac:c},oas3:{markdown:s,rbac:c},async3:{markdown:s,rbac:c}}};return{...t,decorators:{"markdown/rbac":"on","markdown/markdown":{outputRelativePath:r,cwd:a},...t.decorators||{}},plugins:[...t.plugins||[],o]}}export{s as MarkdownParserDecorator,c as RbacDecorator,D as injectDecoratorIntoConfig,g as isPlainNonMarkdownText};
|
package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ export declare class RevisionRepository {
|
|
|
9
9
|
revision: string | null;
|
|
10
10
|
}): Promise<{
|
|
11
11
|
shouldSetNewCurrentRevision: boolean;
|
|
12
|
-
hasCurrentRevision: boolean;
|
|
13
12
|
}>;
|
|
14
13
|
markAllRevisionsAsNotCurrent(key: string): Promise<void>;
|
|
14
|
+
demoteVersion(key: string, version: string): Promise<void>;
|
|
15
15
|
/**
|
|
16
16
|
* Ensures that the one of the revisions has current and default version.
|
|
17
17
|
*/
|
package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{and as
|
|
1
|
+
import{and as l,desc as d,eq as r,isNull as f,sql as v}from"drizzle-orm";import{VERSION_NOT_SPECIFIED as u}from"@redocly/theme/core/constants";import{entitiesTable as e}from"../../../../../providers/database/databases/sqlite-db/schemas/entities-table.js";import{compareVersions as h}from"../../../../../../utils/version/compare-versions.js";import{VersionRepository as m}from"./version-repository.js";import{buildSemanticVersionSortExpr as y}from"../utils/semantic-version-sort.js";import{normalizeRevisionFlags as C}from"../utils/normalize-revision-flags.js";class g{#t;#e;constructor(t){this.#e=t,this.#t=new m(t)}async getCurrentRevisionInfo({key:t,version:i,revision:n}){const o=await this.#i(t);if(!o)return{shouldSetNewCurrentRevision:!0};if(i){const a=await this.#t.doesVersionExist(t,i),s=i!==u&&h(i,o.version)>0,c=o.version===u&&i!==u;if(!a&&(s||c))return{shouldSetNewCurrentRevision:!0}}return i&&n&&i===o.version&&n>=o.revision?{shouldSetNewCurrentRevision:!0}:{shouldSetNewCurrentRevision:!1}}async markAllRevisionsAsNotCurrent(t){await this.#e.client.update(e).set({isCurrent:!1}).where(r(e.key,t)).run()}async demoteVersion(t,i){await this.#e.client.update(e).set({isCurrent:!1,isDefaultVersion:!1}).where(l(r(e.key,t),r(e.version,i))).run()}async ensureDefaultAndCurrentRevisionForKey(t){const i=await this.#t.getOrderedVersionListForKey(t),n=this.#t.getLatestVersion(i);n&&await this.#e.client.update(e).set({isDefaultVersion:!0,isCurrent:!0}).where(l(r(e.key,t),r(e.revision,n.revision),n.version?r(e.version,n.version):f(e.version))).run()}async shouldSkipRevisionCreation(t,i,n,o,a){if(o||a)return!1;const s=await this.#e.client.select({hash:e.hash,isDeleted:e.isDeleted}).from(e).where(l(r(e.key,t),i?r(e.version,i):f(e.version))).orderBy(d(e.revision)).limit(1).get();return!s||!!s.isDeleted?!1:s.hash===n}async#i(t){return await this.#e.client.select({version:e.version,revision:e.revision}).from(e).where(l(r(e.key,t),r(e.isCurrent,!0),r(e.isDeleted,!1))).orderBy(d(e.revision)).limit(1).get()??null}async listEntityRevisions(t,i){const n=[r(e.key,t),r(e.isDeleted,!1),...i?[r(e.version,i)]:[]],a=(await this.#e.client.select({version:e.version,revision:e.revision,isCurrent:e.isCurrent,createdAt:e.createdAt,updatedAt:e.updatedAt,isDefaultVersion:e.isDefaultVersion}).from(e).where(l(...n)).orderBy(v`${y("version")} DESC`,v.raw("revision DESC")).all()).map(s=>({version:s.version,revision:s.revision??"",isCurrent:s.isCurrent!==null?s.isCurrent:!1,createdAt:s.createdAt,updatedAt:s.updatedAt,isDefaultVersion:s.isDefaultVersion!==null?s.isDefaultVersion:!1}));return C(a),a}}export{g as RevisionRepository};
|
package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.d.ts
CHANGED
|
@@ -3,9 +3,13 @@ export declare class VersionRepository {
|
|
|
3
3
|
private readonly db;
|
|
4
4
|
constructor(db: DatabaseClient);
|
|
5
5
|
markAllVersionsAsNotDefault(key: string): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* A version whose most recent revision is soft-deleted counts as not existing.
|
|
8
|
+
*/
|
|
6
9
|
doesVersionExist(key: string, version: string): Promise<boolean>;
|
|
7
10
|
/**
|
|
8
|
-
* Gets the ordered list of versions for a given key
|
|
11
|
+
* Gets the ordered list of live versions for a given key: soft-deleted rows and rows of a
|
|
12
|
+
* version whose most recent revision is soft-deleted are excluded.
|
|
9
13
|
* The list is ordered by creation date, and then by version.
|
|
10
14
|
*/
|
|
11
15
|
getOrderedVersionListForKey(key: string): Promise<{
|
package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
import{eq as
|
|
1
|
+
import{eq as n,and as u,desc as c,sql as f}from"drizzle-orm";import{VERSION_NOT_SPECIFIED as m}from"@redocly/theme/core/constants";import{entitiesTable as e}from"../../../../../providers/database/databases/sqlite-db/schemas/entities-table.js";import{compareVersions as v}from"../../../../../../utils/version/compare-versions.js";class g{db;constructor(i){this.db=i}async markAllVersionsAsNotDefault(i){await this.db.client.update(e).set({isDefaultVersion:!1}).where(u(n(e.key,i),n(e.isDefaultVersion,!0))).run()}async doesVersionExist(i,o){const t=await this.db.client.select({isDeleted:e.isDeleted}).from(e).where(u(n(e.key,i),n(e.version,o))).orderBy(c(e.revision)).limit(1).get();return t!==void 0&&!t.isDeleted}async getOrderedVersionListForKey(i){return(await this.db.client.select({version:e.version,isDefaultVersion:e.isDefaultVersion,revision:e.revision,createdAt:e.createdAt}).from(e).where(u(n(e.key,i),n(e.isDeleted,!1),f`NOT EXISTS (
|
|
2
|
+
SELECT 1 FROM entities tombstone
|
|
3
|
+
WHERE tombstone.key = ${e.key}
|
|
4
|
+
AND tombstone.version IS ${e.version}
|
|
5
|
+
AND tombstone.is_deleted = 1
|
|
6
|
+
AND tombstone.revision > ${e.revision}
|
|
7
|
+
)`)).orderBy(c(e.createdAt)).all()).map(t=>({version:t.version,isDefaultVersion:!!t.isDefaultVersion,revision:t.revision,createdAt:new Date(t.createdAt)}))}getLatestVersion(i){const o=i.find(s=>s.isDefaultVersion);if(o)return o;const{versionedEntities:t,unversionedEntities:d}=i.reduce((s,r)=>(r.version!==null&&r.version!==m?s.versionedEntities.push(r):s.unversionedEntities.push(r),s),{versionedEntities:[],unversionedEntities:[]});if(t.length>0){t.sort((a,l)=>v(l.version,a.version));const s=t[0].version,r=t.filter(a=>a.version===s);return r.sort((a,l)=>l.createdAt.getTime()-a.createdAt.getTime()),r[0]}return d.length>0?(d.sort((s,r)=>r.createdAt.getTime()-s.createdAt.getTime()),d[0]):null}}export{g as VersionRepository};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{and as
|
|
1
|
+
import{and as k,eq as u,isNull as C,or as x,sql as V}from"drizzle-orm";import{VERSION_NOT_SPECIFIED as F}from"@redocly/theme/core/constants";import{sha1 as K}from"../../../../../utils/crypto/sha1.js";import{envConfig as O}from"../../../../../config/env-config.js";import{entitiesTable as t}from"../../../../../providers/database/databases/sqlite-db/schemas/entities-table.js";import{convertFilterToWhereCondition as W}from"../../../../../providers/database/pagination/filter.js";import{entitiesRelationsTable as a}from"../../../../../providers/database/databases/sqlite-db/schemas/entities-relations-table.js";import{promiseMapLimit as m}from"../../../../../utils/async/promise-map-limit.js";import{RevisionRepository as z}from"../common/revision-repository.js";import{VersionRepository as H}from"../common/version-repository.js";import{EntityAttributesWriteRepository as P}from"../entityAttributes/entity-attributes-write-repository.js";import{createEntityDbRecord as L}from"../../mappers/create-entity-db-record.js";import{createEntityReadModel as N}from"../../mappers/create-entity-read-model.js";import{createEntityRelationDbRecordFromFileSchema as U}from"../../mappers/create-entity-relation-db-record-from-file-schema.js";import{createEntityRelationDbRecordFromDto as j}from"../../mappers/create-entity-relation-db-record-from-dto.js";import{EntitiesReadRepository as G}from"./entities-read-repository.js";import{RelationsReadRepository as M}from"../relations/relations-read-repository.js";import{RelationsWriteRepository as $}from"../relations/relations-write-repository.js";const E=15;class de{#e;#t;#n;#o;#i;#s;#a;#l;#r;constructor(e,i,r){this.#e=e,this.#i=i,this.#s=r,this.#t=new z(e),this.#n=new H(e),this.#o=new P(e),this.#a=new G(e),this.#l=new M(e),this.#r=new $(e,i,r)}async createEntity({entity:e,source:i,fileHash:r,sourceFile:o,isRootEntity:s,isDeleted:n,rbacTeams:l,errorOnSkip:c=!1,revision:d}){const{relations:h=[],...f}=e,y=K(JSON.stringify(f)),v=e.version??F,R=d??new Date().toISOString(),D=await this.#t.shouldSkipRevisionCreation(e.key,v,y,s,n);Array.isArray(l)&&await this.#o.upsertEntityAttributes({entityKey:e.key,rbacTeams:l,organizationId:this.#i,projectId:this.#s});const p=O.isDevelopMode&&!O.REDOCLY_INTERNAL_DEV;if(h?.length&&!p&&await this.#r.createEntityRelations(h.map(I=>({...I,sourceKey:e.key,targetKey:I.key,sourceFile:o??null,fileHash:r??null}))),D){if(c)throw new Error("Entity validation failed: entity already exists");return null}const g=(await this.#t.getCurrentRevisionInfo({key:e.key,version:v,revision:R})).shouldSetNewCurrentRevision&&!n,S=L({entity:{...e,revision:R,hash:y,isCurrent:g,isDefaultVersion:g,isDeleted:n,version:v},organizationId:this.#i,projectId:this.#s,source:i,sourceFile:o??null,fileHash:r??null}),{key:w,..._}=S;g&&(await this.#t.markAllRevisionsAsNotCurrent(w),await this.#n.markAllVersionsAsNotDefault(w));const T=p?await this.#c(S,h,g):await this.#u(S,_);return n&&(await this.#t.demoteVersion(w,v),await this.#t.ensureDefaultAndCurrentRevisionForKey(w)),T}async#u(e,i){const r=await this.#e.client.insert(t).values(e).onConflictDoUpdate({target:[t.key,t.source,t.revision,t.version],set:i}).returning();return r.length?N(r[0]):null}async updateEntity(e,i){const{shouldSetNewCurrentRevision:r}=await this.#t.getCurrentRevisionInfo({key:i.key,version:e.version??i.version??F,revision:i.revision});r&&(await this.#t.markAllRevisionsAsNotCurrent(i.key),await this.#n.markAllVersionsAsNotDefault(i.key));const o=L({entity:{...i,...e,hash:K(JSON.stringify({...i,...e})),isCurrent:r,isDefaultVersion:r,createdAt:i.createdAt??void 0},organizationId:this.#i,projectId:this.#s,source:"remote",sourceFile:null,fileHash:null}),{key:s,source:n,scorecardsStatus:l,...c}=o,d=await this.#e.client.insert(t).values(o).onConflictDoUpdate({target:[t.key,t.source,t.revision,t.version],set:{...c,scorecardsStatus:V`CASE WHEN ${t.scorecardsStatus} = 'CALCULATING' THEN 'CANCELLED' ELSE 'OUTDATED' END`}}).returning();return d.length?N(d[0]):null}async setEntitiesAsOutdated(e){const i=W(e);await this.#e.client.update(t).set({scorecardsStatus:"OUTDATED"}).where(i)}async#c(e,i,r){const{key:o,source:s,version:n,...l}=e,{isCurrent:c,isDefaultVersion:d,...h}=l,f=r?l:h,R=await this.#e.client.select({id:t.id}).from(t).where(k(u(t.key,o),n?u(t.version,n):C(t.version))).limit(1).get()!=null?await this.#e.client.update(t).set(f).where(k(u(t.key,o),n?u(t.version,n):C(t.version))).returning():await this.#e.client.insert(t).values(e).onConflictDoUpdate({target:[t.key,t.source,t.revision,t.version],set:f}).returning(),D=i?.map(p=>{const A=U({relation:p,sourceFile:e.sourceFile??"",fileHash:e.fileHash??"",sourceKey:e.key,sourceVersion:e.version??null,sourceRevision:e.revision??null,organizationId:this.#i,projectId:this.#s});return this.#e.client.insert(a).values(A).onConflictDoUpdate({target:[a.sourceKey,a.targetKey,a.sourceVersion,a.targetVersion,a.sourceRevision,a.targetRevision,a.sourceToTargetRelation],set:A}).run()})??[];return await m(D,E,async p=>p),N(R[0])}async softDeleteEntitiesWithRelations({filter:e,revision:i,fileHash:r}){const s={op:"AND",conditions:[e,{field:"is_deleted",operator:"equal",value:!1}]};for(;;){const n=await this.#a.getEntities({paginationParams:{filter:s,limit:500}});if(n.items.length===0)break;const l=await this.#d({entities:n.items,revision:i,fileHash:r});await this.#h(l,i)}}async deleteEntity(e){return await this.#r.deleteEntityRelationsOnEntityRemoval(e),await this.#e.client.delete(t).where(u(t.id,e.id)),await this.#t.ensureDefaultAndCurrentRevisionForKey(e.key),e.id}async deleteEntities(e){const i=W(e);if(!i)return!1;const r=await this.#e.client.delete(t).where(i).returning({key:t.key,source:t.source,isCurrent:t.isCurrent,isDefaultVersion:t.isDefaultVersion,version:t.version});if(r.length===0)return!0;const o=r.reduce((s,n)=>((n.isCurrent||n.isDefaultVersion)&&s.add(n.key),s),new Set);if(o.size===0)return!0;await m(Array.from(o),E,async s=>this.#t.ensureDefaultAndCurrentRevisionForKey(s));for(const s of r)await this.#e.client.delete(a).where(x(k(u(a.sourceKey,s.key),...s.version?[u(a.sourceVersion,s.version)]:[C(a.sourceVersion)]),k(u(a.targetKey,s.key),...s.version?[u(a.targetVersion,s.version)]:[C(a.targetVersion)])));return!0}async updateEntityScorecardsStatus(e,i){return(await this.#e.client.update(t).set({scorecardsStatus:i}).where(u(t.id,e)).returning()).length>0}async updateEntityScorecardsStatusIfCalculating(e,i){return(await this.#e.client.update(t).set({scorecardsStatus:i}).where(V`${t.id} = ${e} AND ${t.scorecardsStatus} = 'CALCULATING'`).returning()).length>0}async#d({entities:e,revision:i,fileHash:r}){return(await m(e,E,async s=>{const n={type:s.type,key:s.key,title:s.title,summary:s.summary??void 0,tags:s.tags??void 0,metadata:s.metadata??void 0,git:s.git??void 0,contact:s.contact??void 0,links:s.links??void 0,version:s.version??void 0};return this.createEntity({entity:n,sourceFile:s.sourceFile??"",fileHash:r,isDeleted:!0,errorOnSkip:!1,source:s.source,revision:i})})).filter(s=>s!==null)}async#h(e,i){if(e.length===0)return!0;const r=await m(e,E,async o=>(await this.#l.getRelationsForEntity(o.key,o.version,i)).map(n=>{if(!n)return null;const l=n.direction,c=n.sourceToTargetRelation,d=n.targetKey,h=l==="outgoing"?o.key:d,f=l==="outgoing"?d:o.key,y=l==="outgoing"?c:c.startsWith("reverse:")?c.slice(8):c;return!y||!h||!f?null:j({type:y,sourceKey:h,targetKey:f,sourceVersion:o.version,targetVersion:o.version,sourceRevision:i,targetRevision:i,isDeleted:!0},this.#i,this.#s)}).filter(n=>n!==null));return await m(r.flat(),E,async o=>this.#r.upsertEntityRelation(o)),!0}}export{de as EntitiesWriteRepository};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from"@redocly/ajv";const i=new l({coerceTypes:!0,removeAdditional:!0,discriminator:!0,allErrors:!0});i.addKeyword({keyword:"nodeTypeName",schemaType:"string"}),i.addFormat("uri",{type:"string",validate:r=>{try{return new URL(r),!0}catch{return!1}}}),i.addFormat("email",{type:"string",validate:r=>{if(!r||/\s/.test(r))return!1;const e=r.indexOf("@");return e<=0||r.indexOf("@",e+1)!==-1?!1:r.slice(e+2,-1).includes(".")}});function p(r,e){const{errorPrefix:n,dataVar:a="data"}=e??{},t=i.compile(r);return function(o){if(!t(o)){const c=t.errors?.length?t.errors.map(s=>{const u=s.instancePath.replaceAll("/",".");return`'${a}${u}' ${s.message}`}).join(", "):"unknown error",d=n?`${n} `:"";throw new Error(`${d}${c}`)}return o}}function h(r,e){const n=i.compile(r),a=n(e);return{success:a,data:a?e:void 0,error:a?void 0:n.errors?.map(t=>`${t.instancePath} ${t.message}`).join(", ")}}export{p as createValidator,h as validateWithResult};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(o){const e=/^#\/components\/(?<componentType>.+)\/(?<componentName
|
|
1
|
+
function t(o){const e=/^#\/components\/(?<componentType>.+)\/(?<componentName>[^/\n]+\/?)$/,n=o.match(e);return!n||!n.groups?null:{componentType:n?.groups?.componentType??null,componentName:n?.groups?.componentName??null}}export{t as extractPartsFromComponentsRef};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(t){if(!t||typeof t!="string")return!1;const
|
|
1
|
+
function e(t){if(!t||typeof t!="string")return!1;const n=t.trim();return n?![/^\[[^/\n]*\/.*\]/,/^\//,/\{\?/,/\?[\w=&]+/].some(i=>i.test(n)):!1}export{e as isValidTagName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
class i{#n;constructor(t){this.#n=t}extract({component:t,definition:p,openapiOperation:e,visitedRefs:r=new Set}){if("content"in t)return t?.content??{};const n=t?.$ref;if(!n)return{};if(r.has(n))return this.#n.warn(`Circular reference detected: ${n} for operation: ${e.operationId}`),{};r.add(n);const s=/^#\/components\/(?<componentType>.+)\/(?<componentName
|
|
1
|
+
class i{#n;constructor(t){this.#n=t}extract({component:t,definition:p,openapiOperation:e,visitedRefs:r=new Set}){if("content"in t)return t?.content??{};const n=t?.$ref;if(!n)return{};if(r.has(n))return this.#n.warn(`Circular reference detected: ${n} for operation: ${e.operationId}`),{};r.add(n);const s=/^#\/components\/(?<componentType>.+)\/(?<componentName>[^/\n]+\/?)$/,c=n.match(s);if(!c?.groups?.componentType||!c?.groups?.componentName)return this.#n.warn(`Invalid component reference format: ${n}. Should be #/components/<componentType>/<componentName>`),{};const{componentType:m,componentName:a}=c.groups,o=p.components?.[m]?.[a];return o?"$ref"in o?this.extract({component:o,definition:p,openapiOperation:e,visitedRefs:r}):"content"in o?o.content??{}:{}:(this.#n.warn(`Component not found: ${m}/${a} for operation: ${e.operationId}`),{})}}export{i as OpenapiComponentContentExtractor};
|
|
@@ -2,6 +2,7 @@ import type { RedoclyConfig } from '@redocly/config';
|
|
|
2
2
|
export declare function formatCustomScripts(customScripts: NonNullable<RedoclyConfig['scripts']>['head'], opts: {
|
|
3
3
|
contentDir: string;
|
|
4
4
|
outdir: string;
|
|
5
|
+
consentEnabled?: boolean;
|
|
5
6
|
}): Promise<string>;
|
|
6
7
|
export declare function formatCustomLinks(customLinks: RedoclyConfig['links'], opts: {
|
|
7
8
|
contentDir: string;
|