@redocly/realm 0.129.2 → 0.130.0-custom.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 +508 -83
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/eject/resolveEjectParams.js +1 -1
- package/dist/cli/eject/resolveTheme.d.ts +1 -1
- package/dist/cli/eject/resolveTheme.js +1 -1
- package/dist/cli/prepare/copy-env-files.js +1 -1
- package/dist/cli/prepare/index.js +1 -1
- package/dist/cli/stats/collectors/openapi.d.ts +3 -0
- package/dist/cli/stats/collectors/openapi.js +1 -0
- package/dist/cli/stats/index.d.ts +7 -0
- package/dist/cli/stats/index.js +1 -0
- package/dist/cli/stats/options.d.ts +3 -0
- package/dist/cli/stats/options.js +1 -0
- package/dist/cli/telemetry/index.d.ts +2 -2
- package/dist/cli/telemetry/index.js +1 -1
- package/dist/client/App.js +1 -1
- package/dist/client/ErrorBoundary.js +1 -1
- package/dist/client/app/DevModeFloatingBar/index.d.ts +3 -0
- package/dist/client/app/DevModeFloatingBar/index.js +43 -0
- package/dist/client/app/Feedback/useSubmitFeedback.js +1 -1
- package/dist/client/app/Sidebar/RequestAccessButton.js +2 -2
- package/dist/client/app/Sidebar/Sidebar.js +2 -2
- package/dist/client/app/Sidebar/helpers/filter-out-versioned-items.d.ts +23 -0
- package/dist/client/app/Sidebar/helpers/filter-out-versioned-items.js +1 -0
- package/dist/client/app/Sidebar/useSidebarItems.d.ts +2 -2
- package/dist/client/app/Sidebar/useSidebarItems.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalogClassic.d.ts +1 -1
- package/dist/client/app/hooks/catalog/useCatalogClassic.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalogFilter.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalogViewMode.js +1 -1
- package/dist/client/app/hooks/catalog/useSearchTracker.js +1 -1
- package/dist/client/app/hooks/codeHighlight/useCodeHighlight.js +1 -1
- package/dist/client/app/hooks/useAutoScroll.js +1 -1
- package/dist/client/app/hooks/usePageTimeTracker.js +1 -1
- package/dist/client/app/hooks/useRouteChangeTracker.js +1 -1
- package/dist/client/app/hooks/useTelemetry.d.ts +2 -2
- package/dist/client/app/hooks/utils/pathname-matches-active-section.d.ts +6 -0
- package/dist/client/app/hooks/utils/pathname-matches-active-section.js +1 -0
- package/dist/client/app/markdoc/custom-components/html-script.js +1 -0
- package/dist/client/app/markdoc/custom-components/openapi/openapi-code-sample.js +1 -0
- package/dist/client/app/markdoc/custom-components/openapi/openapi-response-sample.js +1 -0
- package/dist/client/app/markdoc/custom-components/openapi/replay-openapi.js +1 -0
- package/dist/client/app/markdoc/hooks/use-store.js +1 -0
- package/dist/client/app/pages/DevLogin/DevLogin.js +1 -1
- package/dist/client/app/search/message-handlers.d.ts +29 -0
- package/dist/client/app/search/message-handlers.js +1 -0
- package/dist/client/app/search/sse-parser.d.ts +10 -0
- package/dist/client/app/search/sse-parser.js +2 -0
- package/dist/client/app/search/useAiSearch.d.ts +9 -11
- package/dist/client/app/search/useAiSearch.js +1 -1
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/app/telemetry/index.d.ts +11 -1
- package/dist/client/app/telemetry/index.js +1 -1
- package/dist/client/browser-entry.js +3 -3
- package/dist/client/constants/ai-search.d.ts +30 -0
- package/dist/client/constants/ai-search.js +1 -0
- package/dist/client/constants/common.d.ts +2 -0
- package/dist/client/constants/common.js +1 -0
- package/dist/client/constants/index.d.ts +2 -0
- package/dist/client/constants/index.js +1 -0
- package/dist/client/runtime/useSocketMessages.js +1 -1
- package/dist/{server/plugins/asyncapi-docs/template → client/templates/asyncapi-docs}/helpers.d.ts +3 -3
- package/dist/client/templates/asyncapi-docs/helpers.js +1 -0
- package/dist/{server/plugins/asyncapi-docs/template/AsyncApiDocs.d.ts → client/templates/asyncapi-docs/template.d.ts} +3 -2
- package/dist/client/templates/asyncapi-docs/template.js +15 -0
- package/dist/{server/plugins/openapi-docs/template → client/templates/openapi-docs}/helpers.d.ts +2 -2
- package/dist/client/templates/openapi-docs/helpers.js +5 -0
- package/dist/{server/plugins/openapi-docs/template/OpenAPIDocs.d.ts → client/templates/openapi-docs/template.d.ts} +1 -1
- package/dist/client/templates/openapi-docs/template.js +18 -0
- package/dist/client/types/ai-search.d.ts +73 -0
- package/dist/client/types/ai-search.js +0 -0
- package/dist/client/types/index.d.ts +1 -0
- package/dist/client/utils/catalog/inject-catalog-items.d.ts +1 -1
- package/dist/client/utils/catalog/inject-catalog-items.js +1 -1
- package/dist/constants/catalog-entities.d.ts +12 -0
- package/dist/constants/catalog-entities.js +1 -0
- package/dist/constants/common.d.ts +6 -4
- 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/{server/plugins/markdown/markdoc → markdoc}/helpers/get-inner-text.d.ts +1 -1
- package/dist/markdoc/helpers/get-inner-text.js +2 -0
- package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/get-variable.d.ts +2 -2
- package/dist/markdoc/helpers/get-variable.js +1 -0
- package/dist/markdoc/nodes/fence/index.js +1 -0
- package/dist/markdoc/nodes/heading.js +1 -0
- package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/index.d.ts +6 -6
- package/dist/markdoc/tags/json-example.d.ts +3 -0
- package/dist/markdoc/tags/json-schema.d.ts +3 -0
- package/dist/markdoc/tags/openapi-code-sample.d.ts +3 -0
- package/dist/markdoc/tags/openapi-example.d.ts +3 -0
- package/dist/markdoc/tags/openapi-response-sample.d.ts +3 -0
- package/dist/markdoc/tags/replay-openapi.d.ts +3 -0
- package/dist/markdoc/types.d.ts +8 -0
- package/dist/markdoc/types.js +0 -0
- package/dist/server/api-routes/execute-api-route.js +1 -1
- package/dist/server/api-routes/import-api-routes-handlers.js +1 -1
- package/dist/server/api-routes/run-api-routes-worker.js +1 -1
- package/dist/server/config/env-config.d.ts +17 -0
- package/dist/server/config/env-config.js +1 -0
- package/dist/server/config/env-schema.d.ts +245 -0
- package/dist/server/config/env-schema.js +3 -0
- package/dist/server/config/env-schemas/api-urls.d.ts +24 -0
- package/dist/server/config/env-schemas/api-urls.js +1 -0
- package/dist/server/config/env-schemas/auth.d.ts +42 -0
- package/dist/server/config/env-schemas/auth.js +1 -0
- package/dist/server/config/env-schemas/catalog.d.ts +12 -0
- package/dist/server/config/env-schemas/catalog.js +1 -0
- package/dist/server/config/env-schemas/database.d.ts +15 -0
- package/dist/server/config/env-schemas/database.js +1 -0
- package/dist/server/config/env-schemas/environment-detection.d.ts +24 -0
- package/dist/server/config/env-schemas/environment-detection.js +1 -0
- package/dist/server/config/env-schemas/feature-flags.d.ts +24 -0
- package/dist/server/config/env-schemas/feature-flags.js +1 -0
- package/dist/server/config/env-schemas/organization-project.d.ts +30 -0
- package/dist/server/config/env-schemas/organization-project.js +1 -0
- package/dist/server/config/env-schemas/scorecards.d.ts +12 -0
- package/dist/server/config/env-schemas/scorecards.js +1 -0
- package/dist/server/config/env-schemas/search.d.ts +21 -0
- package/dist/server/config/env-schemas/search.js +1 -0
- package/dist/server/config/env-schemas/server-config.d.ts +51 -0
- package/dist/server/config/env-schemas/server-config.js +1 -0
- package/dist/server/config/env-schemas/site.d.ts +12 -0
- package/dist/server/config/env-schemas/site.js +1 -0
- package/dist/server/config/env-schemas/ssr.d.ts +18 -0
- package/dist/server/config/env-schemas/ssr.js +1 -0
- package/dist/server/config/env-schemas/telemetry.d.ts +15 -0
- package/dist/server/config/env-schemas/telemetry.js +1 -0
- package/dist/server/config/env-schemas/test.d.ts +22 -0
- package/dist/server/config/env-schemas/test.js +1 -0
- package/dist/server/constants/common.d.ts +3 -0
- package/dist/server/constants/common.js +1 -1
- package/dist/server/constants/feedback.d.ts +6 -0
- package/dist/server/constants/feedback.js +1 -0
- package/dist/server/constants/plugins/catalog-entities.d.ts +1 -11
- package/dist/server/constants/plugins/catalog-entities.js +1 -1
- package/dist/server/entitlements/entitlements-provider.js +1 -1
- package/dist/server/esbuild/esbuild-logger.js +2 -2
- package/dist/server/esbuild/esbuild.js +3 -3
- package/dist/server/esbuild/plugins/assets-resolver.js +1 -1
- package/dist/server/esbuild/plugins/esbuild-compile-resolver.js +1 -1
- package/dist/server/esbuild/plugins/styled-components-ssr.js +1 -1
- package/dist/server/esbuild/plugins/themes-resolver.js +2 -2
- package/dist/server/{config/external-plugins.d.ts → external-plugins/resolve-external-plugins.d.ts} +2 -2
- package/dist/server/{config/external-plugins.js → external-plugins/resolve-external-plugins.js} +1 -1
- package/dist/server/fs/cache.js +1 -1
- package/dist/server/fs/content-fs.d.ts +1 -0
- package/dist/server/fs/content-fs.js +1 -1
- package/dist/server/fs/last-modified-tracker.js +1 -1
- package/dist/server/fs/utils/is-loader-cache-enabled.js +1 -1
- package/dist/server/node-bundle-entry.js +1 -1
- package/dist/server/persistence/kv/repositories/kv-remote-repository.d.ts +1 -0
- package/dist/server/persistence/kv/repositories/kv-remote-repository.js +2 -1
- package/dist/server/persistence/kv/services/kv-service.js +1 -1
- package/dist/server/plugins/analytics/adobe/index.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/index.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/asyncapi-docs/asyncapi-doc-loader.js +3 -3
- package/dist/server/plugins/asyncapi-docs/get-server-props.js +1 -1
- package/dist/server/plugins/asyncapi-docs/index.js +1 -1
- package/dist/server/plugins/asyncapi-docs/search/get-ai-search-documents.js +27 -27
- package/dist/server/plugins/asyncapi-docs/search/schema-processor.js +1 -1
- package/dist/server/plugins/asyncapi-docs/search/search-resolver.js +1 -1
- package/dist/server/plugins/asyncapi-docs/store-definition-bundles.js +1 -1
- package/dist/server/plugins/catalog-classic/get-server-props.d.ts +8 -3
- package/dist/server/plugins/catalog-classic/get-server-props.js +1 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +38 -64
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.d.ts +8 -0
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-attributes-db-record.js +1 -0
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-db-record.d.ts +2 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-read-model.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/{create-entity-relation.d.ts → create-entity-relation-read-model.d.ts} +2 -2
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-relation-read-model.js +1 -0
- package/dist/server/plugins/catalog-entities/database/mappers/map-entity-relation-row.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.d.ts +27 -0
- package/dist/server/plugins/catalog-entities/database/repositories/common/revision-repository.js +1 -0
- package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.d.ts +36 -0
- package/dist/server/plugins/catalog-entities/database/repositories/common/version-repository.js +1 -0
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-bff-repository.d.ts +15 -4
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-bff-repository.js +38 -27
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.d.ts +36 -9
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-read-repository.js +37 -21
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.d.ts +41 -42
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-write-repository.d.ts +3 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-write-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-relations-repository.d.ts +7 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-relations-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/remote/catalog-entities-remote-repository.d.ts +5 -9
- package/dist/server/plugins/catalog-entities/database/repositories/remote/catalog-entities-remote-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/utils/build-entities-exclusion-filter.d.ts +13 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/build-entities-exclusion-filter.js +1 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/build-rbac-filter.d.ts +31 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/build-rbac-filter.js +9 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/create-merged-entity-fields-for-select.d.ts +34 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/create-merged-entity-fields-for-select.js +13 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/normalize-revision-flags.d.ts +23 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/normalize-revision-flags.js +1 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/semantic-version-sort.d.ts +78 -0
- package/dist/server/plugins/catalog-entities/database/repositories/utils/semantic-version-sort.js +34 -0
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/arazzo-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/asyncapi-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.d.ts +6 -4
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/base.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/graphql-entities-extractor.js +2 -2
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/openapi-entities-extractor.d.ts +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/openapi-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/fs-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/get-server-props.js +1 -1
- package/dist/server/plugins/catalog-entities/plugin.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.d.ts +3 -0
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/dto-schemas.d.ts +15 -1
- package/dist/server/plugins/catalog-entities/schemas/dto-schemas.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/read-model-schemas.d.ts +26 -164
- package/dist/server/plugins/catalog-entities/schemas/read-model-schemas.js +0 -1
- package/dist/server/plugins/catalog-entities/types/extractors.d.ts +4 -4
- package/dist/server/plugins/catalog-entities/types/openapi.d.ts +11 -0
- package/dist/server/plugins/catalog-entities/types/openapi.js +0 -0
- package/dist/server/plugins/catalog-entities/types/params.d.ts +6 -0
- package/dist/server/plugins/catalog-entities/types/params.js +0 -0
- package/dist/server/plugins/catalog-entities/utils/ajv-validator.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/catalog-data-collector.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/get-not-accessible-catalog-resources.d.ts +11 -0
- package/dist/server/plugins/catalog-entities/utils/get-not-accessible-catalog-resources.js +1 -0
- package/dist/server/plugins/config-parser/index.js +1 -1
- package/dist/server/plugins/config-parser/loaders/content-slugs-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/nearest-redocly-config-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/redocly-config-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/utils/read-and-validate-config.js +1 -1
- package/dist/server/plugins/default-theme/index.js +1 -1
- package/dist/server/plugins/entitlements/index.js +1 -1
- package/dist/server/plugins/graphql-docs/graphql-doc-loader.js +1 -1
- package/dist/server/plugins/graphql-docs/index.js +1 -1
- package/dist/server/plugins/graphql-docs/search/search-resolver.js +1 -1
- package/dist/server/plugins/graphql-docs/template/GraphQLDocs.js +6 -2
- package/dist/server/plugins/lifecycle.js +2 -2
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/filesets-resolver.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-code-snippet-from-file.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-href.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-html-source-attribute.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src-set.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-image-src.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-example-ref.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-json-schema-ref.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-native-md-link.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-nav-links.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-open-api-ref.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-parsed-yaml.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-raw-content.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-or-cdn-icon.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-relative-path.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-sample-from-json-schema.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.js +1 -1
- package/dist/server/plugins/markdown/compiler.d.ts +1 -0
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/index.js +1 -1
- package/dist/server/plugins/markdown/is-partial.d.ts +1 -1
- package/dist/server/plugins/markdown/is-partial.js +1 -1
- package/dist/server/plugins/markdown/markdoc/import-user-tags.js +1 -1
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/markdown/markdoc/partials.js +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/headings.js +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/render-mermaid.js +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/utils.js +1 -1
- package/dist/server/plugins/markdown/markdoc/resolve-raw-partials.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/resolve-raw-partials.js +2 -2
- package/dist/server/plugins/markdown/markdown-static-data-loader.js +1 -1
- package/dist/server/plugins/markdown/runtime-transform.js +1 -1
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +1 -1
- package/dist/server/plugins/markdown/search/get-search-documents.js +2 -2
- package/dist/server/plugins/markdown/search/nodes/section-node.js +1 -1
- package/dist/server/plugins/markdown/search/search-resolver.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.js +17 -13
- package/dist/server/plugins/markdown/search/walk-sections.js +1 -1
- package/dist/server/plugins/markdown/utils/stringify-tag-children-objects.js +1 -1
- package/dist/server/plugins/mcp/auth/auth-handlers.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/docs-mcp-tool.d.ts +58 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/docs-mcp-tool.js +1 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/get-endpoint-info.d.ts +9 -8
- package/dist/server/plugins/mcp/docs-mcp/tools/get-endpoint-info.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/get-endpoints.d.ts +9 -8
- package/dist/server/plugins/mcp/docs-mcp/tools/get-endpoints.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/get-full-api-description.d.ts +9 -8
- package/dist/server/plugins/mcp/docs-mcp/tools/get-full-api-description.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/get-security-schemes.d.ts +9 -8
- package/dist/server/plugins/mcp/docs-mcp/tools/get-security-schemes.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/index.d.ts +7 -13
- package/dist/server/plugins/mcp/docs-mcp/tools/index.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/list-apis.d.ts +9 -6
- package/dist/server/plugins/mcp/docs-mcp/tools/list-apis.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/search.d.ts +10 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/search.js +6 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/utils.d.ts +2 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/utils.js +6 -6
- package/dist/server/plugins/mcp/docs-mcp/tools/whoami.d.ts +9 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/whoami.js +1 -1
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/handlers/errors.js +1 -1
- package/dist/server/plugins/mcp/handlers/handle-mcp-request.d.ts +5 -0
- package/dist/server/plugins/mcp/handlers/handle-mcp-request.js +1 -0
- package/dist/server/plugins/mcp/handlers/mcp-request-handler.d.ts +0 -1
- package/dist/server/plugins/mcp/handlers/mcp-request-handler.js +1 -1
- package/dist/server/plugins/mcp/servers/base-server.js +1 -1
- package/dist/server/plugins/mcp/servers/docs-server.d.ts +9 -2
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/types.d.ts +59 -0
- package/dist/server/plugins/mcp/workers/execute-mcp-tool.d.ts +3 -0
- package/dist/server/plugins/mcp/workers/execute-mcp-tool.js +1 -0
- package/dist/server/plugins/nav-utils.d.ts +1 -1
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/openapi-docs/decorators.d.ts +3 -0
- package/dist/server/plugins/openapi-docs/decorators.js +1 -1
- package/dist/server/plugins/openapi-docs/get-server-props-custom-fields.d.ts +2 -4
- package/dist/server/plugins/openapi-docs/get-server-props-custom-fields.js +1 -1
- package/dist/server/plugins/openapi-docs/get-server-props.js +1 -1
- package/dist/server/plugins/openapi-docs/index.js +1 -1
- package/dist/server/plugins/openapi-docs/load-definition.d.ts +1 -0
- package/dist/server/plugins/openapi-docs/load-definition.js +3 -3
- package/dist/server/plugins/openapi-docs/openrpc-converter.d.ts +2 -0
- package/dist/server/plugins/openapi-docs/openrpc-converter.js +1 -0
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +20 -20
- package/dist/server/plugins/openapi-docs/search/search-resolver.js +1 -1
- package/dist/server/plugins/openapi-docs/search-indexer.js +1 -1
- package/dist/server/plugins/openapi-docs/store-definition-bundles.js +1 -1
- package/dist/server/plugins/openapi-docs/utils.d.ts +1 -0
- package/dist/server/plugins/scorecard-classic/compute-scorecard.d.ts +2 -1
- package/dist/server/plugins/scorecard-classic/compute-scorecard.js +4 -4
- package/dist/server/plugins/scorecard-classic/get-scorecard-config.d.ts +2 -1
- package/dist/server/plugins/scorecard-classic/index.js +1 -1
- package/dist/server/plugins/scorecard-classic/lint.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/lint.js +1 -1
- package/dist/server/plugins/scorecard-classic/loaders/scorecard-config.js +1 -1
- package/dist/server/plugins/scorecard-classic/loaders/scorecard.d.ts +6 -4
- package/dist/server/plugins/scorecard-classic/loaders/scorecard.js +1 -1
- package/dist/server/plugins/scorecard-classic/shared-utils.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/shared-utils.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/Grid/Grid.d.ts +3 -1
- package/dist/server/plugins/scorecard-classic/template/Grid/Grid.js +3 -3
- package/dist/server/plugins/scorecard-classic/template/Grid/GridHeader.js +15 -9
- package/dist/server/plugins/scorecard-classic/template/Grid/GridRow.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/LevelIndicator.d.ts +1 -0
- package/dist/server/plugins/scorecard-classic/template/LevelIndicator.js +4 -4
- package/dist/server/plugins/scorecard-classic/template/components.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/index.styles.d.ts +1 -0
- package/dist/server/plugins/scorecard-classic/template/index.styles.js +92 -19
- package/dist/server/plugins/scorecard-classic/template/index.types.d.ts +5 -1
- 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/scorecard-classic/types.d.ts +5 -3
- package/dist/server/plugins/scorecard-classic/types.js +1 -1
- package/dist/server/plugins/scorecards/database/repositories/local/scorecards-config-local-repository.d.ts +12 -0
- package/dist/server/plugins/scorecards/database/repositories/local/scorecards-config-local-repository.js +1 -0
- package/dist/server/plugins/scorecards/database/scorecards-config-service.d.ts +11 -0
- package/dist/server/plugins/scorecards/database/scorecards-config-service.js +1 -0
- package/dist/server/plugins/scorecards/plugin.js +1 -1
- package/dist/server/plugins/scorecards/workers/run-scorecards-worker.d.ts +2 -1
- package/dist/server/plugins/scorecards/workers/run-scorecards-worker.js +1 -1
- package/dist/server/plugins/scorecards/workers/scorecards.d.ts +1 -12
- package/dist/server/plugins/scorecards/workers/scorecards.js +1 -1
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.d.ts +11 -0
- package/dist/server/plugins/search/ai-indexer/prepare-semantic-documents.js +1 -0
- package/dist/server/plugins/search/documents/search-documents.js +1 -1
- package/dist/server/plugins/search/engines/flexsearch/index.js +1 -1
- package/dist/server/plugins/search/engines/typesense/index.js +1 -1
- package/dist/server/plugins/search/index.js +1 -1
- package/dist/server/plugins/search/llmstxt/index.js +5 -5
- package/dist/server/plugins/search/utils.d.ts +2 -0
- package/dist/server/plugins/search/utils.js +2 -2
- package/dist/server/plugins/sidebars/index.d.ts +0 -2
- package/dist/server/plugins/sidebars/index.js +3 -3
- package/dist/server/plugins/sso/index.js +1 -1
- package/dist/server/providers/database/base-repository.d.ts +1 -0
- package/dist/server/providers/database/base-repository.js +1 -1
- package/dist/server/providers/database/database-connection-factory.js +1 -1
- package/dist/server/providers/database/database-initialization-strategy.js +1 -1
- package/dist/server/providers/database/database-preconnect-service.js +1 -1
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/0005_catalog-relations-constraint-fix.sql +2 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/0006_add-catalog-entitities-attributes-table.sql +11 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/0005_snapshot.json +393 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/0006_snapshot.json +458 -0
- package/dist/server/providers/database/databases/catalog-sqlite/migrations/meta/_journal.json +14 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-attributes-table.d.ts +143 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-attributes-table.js +1 -0
- package/dist/server/providers/database/databases/catalog-sqlite/schemas/entities-relations-table.js +1 -1
- package/dist/server/providers/database/databases/main-sqlite/migrations/0006_change-scorecards-config-timestamps-field-types.sql +19 -0
- package/dist/server/providers/database/databases/main-sqlite/migrations/meta/0006_snapshot.json +261 -0
- package/dist/server/providers/database/databases/main-sqlite/migrations/meta/_journal.json +7 -0
- package/dist/server/providers/database/databases/main-sqlite/schemas/scorecards-config-table.d.ts +24 -18
- package/dist/server/providers/database/databases/main-sqlite/schemas/scorecards-config-table.js +1 -1
- package/dist/server/providers/database/databases/sqld-sqlite/drizzle.config.js +1 -1
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/0007_catalog-relations-constraint-fix.sql +2 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/0008_add-catalog-entitities-attributes-table.sql +11 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/0007_snapshot.json +833 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/0008_snapshot.json +898 -0
- package/dist/server/providers/database/databases/sqld-sqlite/migrations/meta/_journal.json +14 -0
- package/dist/server/providers/database/pagination/entities-to-filter.d.ts +15 -0
- package/dist/server/providers/database/pagination/entities-to-filter.js +1 -0
- package/dist/server/providers/database/pagination/utils/index.d.ts +4 -0
- package/dist/server/providers/database/pagination/utils/index.js +1 -1
- package/dist/server/providers/database/pagination/utils/is-nested-condition.d.ts +16 -0
- package/dist/server/providers/database/pagination/utils/is-nested-condition.js +1 -0
- package/dist/server/providers/database/pagination/utils/is-simple-condition.d.ts +18 -0
- package/dist/server/providers/database/pagination/utils/is-simple-condition.js +1 -0
- package/dist/server/providers/database/pagination/utils/map-operator.d.ts +10 -0
- package/dist/server/providers/database/pagination/utils/map-operator.js +1 -0
- package/dist/server/providers/database/pagination/utils/transform-condition.d.ts +12 -0
- package/dist/server/providers/database/pagination/utils/transform-condition.js +1 -0
- package/dist/server/providers/database/sqld-not-running-error.d.ts +5 -0
- package/dist/server/providers/database/sqld-not-running-error.js +1 -0
- package/dist/server/ssr/render.js +1 -1
- package/dist/server/ssr/server-side-props/get-server-props-from-user-handler.js +1 -1
- package/dist/server/ssr/utils.js +8 -8
- package/dist/server/store.d.ts +16 -6
- package/dist/server/store.js +1 -1
- package/dist/server/telemetry/index.js +1 -1
- package/dist/server/tools/notifiers/formatter.js +3 -3
- package/dist/server/tools/notifiers/helpers/colors.js +1 -1
- package/dist/server/tools/notifiers/logger.js +2 -2
- package/dist/server/tools/notifiers/reporter.js +9 -9
- package/dist/server/tools/notifiers/terminal-manager.js +4 -4
- package/dist/server/types/plugins/common.d.ts +8 -1
- package/dist/server/types/plugins/markdown.d.ts +2 -7
- package/dist/server/types/plugins/scorecards.d.ts +30 -0
- package/dist/server/types/plugins/scorecards.js +0 -0
- package/dist/server/utils/ai-agent-detection.d.ts +16 -0
- package/dist/server/utils/ai-agent-detection.js +1 -0
- package/dist/server/utils/envs/get-api-route-allowed-env-variables.js +1 -1
- package/dist/server/utils/envs/load-env-variables.d.ts +1 -1
- package/dist/server/utils/envs/load-env-variables.js +1 -1
- package/dist/server/utils/envs/sanitize-branch-name.d.ts +6 -0
- package/dist/server/utils/envs/sanitize-branch-name.js +1 -0
- package/dist/server/utils/fs.js +1 -1
- package/dist/server/utils/globs.js +1 -1
- package/dist/server/utils/index.d.ts +2 -2
- package/dist/server/utils/index.js +1 -1
- package/dist/server/utils/is-catalog-entities-enabled.js +1 -1
- package/dist/server/utils/is-scorecards-enabled.js +1 -1
- package/dist/server/utils/lifecycle-hooks.js +1 -1
- package/dist/server/utils/rbac.d.ts +76 -7
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/utils/report-all-errors.js +1 -1
- package/dist/server/utils/set-execution-mode.d.ts +5 -0
- package/dist/server/utils/set-execution-mode.js +1 -0
- package/dist/server/utils/time/with-timestamp.d.ts +42 -10
- package/dist/server/utils/time/with-timestamp.js +1 -1
- package/dist/server/version.js +1 -1
- package/dist/server/web-server/auth.d.ts +2 -0
- package/dist/server/web-server/auth.js +4 -4
- package/dist/server/web-server/dev-server.js +1 -1
- package/dist/server/web-server/handle-api-route-request.js +1 -1
- package/dist/server/web-server/http.js +2 -2
- package/dist/server/web-server/middleware/apiKeyMiddleware.js +1 -1
- package/dist/server/web-server/middleware/catalogAuthMiddleware.d.ts +4 -6
- package/dist/server/web-server/middleware/catalogAuthMiddleware.js +1 -1
- package/dist/server/web-server/middleware/corsMiddleware.js +1 -1
- package/dist/server/web-server/middleware/dynamic-middleware/dynamic-middleware.js +1 -1
- package/dist/server/web-server/middleware/idleTimeoutMiddleware.js +1 -1
- package/dist/server/web-server/middleware/responseHeadersMiddleware.js +1 -1
- package/dist/server/web-server/mime-types.js +1 -1
- package/dist/server/web-server/routes/ask-ai.js +1 -1
- package/dist/server/web-server/routes/auth.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog-related-entities.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog.js +1 -1
- package/dist/server/web-server/routes/catalog/catalog-relations.js +1 -1
- package/dist/server/web-server/routes/catalog/catalog.js +1 -1
- package/dist/server/web-server/routes/catalog/dto/read-entity-dto.d.ts +3 -0
- package/dist/server/web-server/routes/catalog/dto/read-entity-dto.js +0 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-relation-update-schema.d.ts +43 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-relation-update-schema.js +1 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-schema.d.ts +6823 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-schema.js +1 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.d.ts +1102 -0
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.js +1 -0
- package/dist/server/web-server/routes/catalog/helpers/has-access-to-entity.d.ts +10 -0
- package/dist/server/web-server/routes/catalog/helpers/has-access-to-entity.js +1 -0
- package/dist/server/web-server/routes/catalog/mappers/map-entity-read-model-schema-to-entity-read-dto.d.ts +4 -0
- package/dist/server/web-server/routes/catalog/mappers/map-entity-read-model-schema-to-entity-read-dto.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entities.d.ts +4 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entities.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entity-update-data.d.ts +4 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entity-update-data.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entity.d.ts +4 -0
- package/dist/server/web-server/routes/catalog/parsers/entities/parse-entity.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entities-relations.d.ts +13 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entities-relations.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation-update-data.d.ts +13 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation-update-data.js +1 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation.d.ts +13 -0
- package/dist/server/web-server/routes/catalog/parsers/relations/parse-entity-relation.js +1 -0
- package/dist/server/web-server/routes/cors-proxy.d.ts +5 -0
- package/dist/server/web-server/routes/cors-proxy.js +2 -0
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/error.js +1 -1
- package/dist/server/web-server/routes/feedback.js +1 -1
- package/dist/server/web-server/routes/helpers/get-current-rbac-teams.d.ts +3 -0
- package/dist/server/web-server/routes/helpers/get-current-rbac-teams.js +1 -0
- package/dist/server/web-server/routes/helpers/get-md-asset-pathname.d.ts +2 -0
- package/dist/server/web-server/routes/helpers/get-md-asset-pathname.js +1 -0
- package/dist/server/web-server/routes/helpers/get-rbac-restrictions-data-for-catalog.d.ts +11 -0
- package/dist/server/web-server/routes/helpers/get-rbac-restrictions-data-for-catalog.js +1 -0
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/info.js +1 -1
- package/dist/server/web-server/routes/mcp-oauth.js +1 -1
- package/dist/server/web-server/routes/otel/otel.js +1 -1
- package/dist/server/web-server/routes/page-data.js +1 -1
- package/dist/server/web-server/routes/path-prefix-redirect.js +1 -1
- package/dist/server/web-server/routes/resolve-route.js +1 -1
- package/dist/server/web-server/routes/semantic-search.d.ts +4 -0
- package/dist/server/web-server/routes/semantic-search.js +1 -0
- package/dist/server/web-server/utils.d.ts +2 -2
- package/dist/server/workers/mcp-tool-worker-pool.d.ts +4 -0
- package/dist/server/workers/mcp-tool-worker-pool.js +1 -0
- package/dist/server/workers/mcp-tool-worker.d.ts +2 -0
- package/dist/server/workers/mcp-tool-worker.js +1 -0
- package/dist/server/workers/types.d.ts +7 -1
- package/dist/server/workers/worker-pool.js +1 -1
- package/dist/{server/utils → utils}/slugger.d.ts +13 -0
- package/package.json +21 -23
- package/dist/client/app/ErrorBubble/index.d.ts +0 -3
- package/dist/client/app/ErrorBubble/index.js +0 -59
- package/dist/client/app/PageCounter/index.d.ts +0 -3
- package/dist/client/app/PageCounter/index.js +0 -64
- package/dist/server/plugins/asyncapi-docs/template/AsyncApiDocs.js +0 -9
- package/dist/server/plugins/asyncapi-docs/template/helpers.js +0 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-relation.js +0 -1
- package/dist/server/plugins/catalog-entities/entities/validate-entity.d.ts +0 -6
- package/dist/server/plugins/catalog-entities/entities/validate-entity.js +0 -1
- package/dist/server/plugins/markdown/markdoc/custom-components/html-script.js +0 -1
- package/dist/server/plugins/markdown/markdoc/custom-components/openapi/openapi-code-sample.js +0 -1
- package/dist/server/plugins/markdown/markdoc/custom-components/openapi/openapi-response-sample.js +0 -1
- package/dist/server/plugins/markdown/markdoc/custom-components/openapi/replay-openapi.js +0 -1
- package/dist/server/plugins/markdown/markdoc/helpers/get-inner-text.js +0 -2
- package/dist/server/plugins/markdown/markdoc/helpers/get-variable.js +0 -1
- package/dist/server/plugins/markdown/markdoc/hooks/use-store.js +0 -1
- package/dist/server/plugins/markdown/markdoc/nodes/fence/index.js +0 -1
- package/dist/server/plugins/markdown/markdoc/nodes/heading.js +0 -1
- package/dist/server/plugins/markdown/markdoc/tags/json-example.d.ts +0 -3
- package/dist/server/plugins/markdown/markdoc/tags/json-schema.d.ts +0 -3
- package/dist/server/plugins/markdown/markdoc/tags/openapi-code-sample.d.ts +0 -3
- package/dist/server/plugins/markdown/markdoc/tags/openapi-example.d.ts +0 -3
- package/dist/server/plugins/markdown/markdoc/tags/openapi-response-sample.d.ts +0 -3
- package/dist/server/plugins/markdown/markdoc/tags/replay-openapi.d.ts +0 -3
- package/dist/server/plugins/mcp/workers/run-api-routes-worker.d.ts +0 -5
- package/dist/server/plugins/mcp/workers/run-api-routes-worker.js +0 -1
- package/dist/server/plugins/openapi-docs/template/OpenAPIDocs.js +0 -14
- package/dist/server/plugins/openapi-docs/template/helpers.js +0 -5
- package/dist/server/plugins/search/ai-indexer/prepare-ai-search-documents.d.ts +0 -6
- package/dist/server/plugins/search/ai-indexer/prepare-ai-search-documents.js +0 -1
- package/dist/server/utils/envs/is-build-mode.d.ts +0 -2
- package/dist/server/utils/envs/is-build-mode.js +0 -1
- package/dist/server/utils/envs/is-develop-mode.d.ts +0 -7
- package/dist/server/utils/envs/is-develop-mode.js +0 -1
- package/dist/server/utils/envs/is-production-mode.d.ts +0 -10
- package/dist/server/utils/envs/is-production-mode.js +0 -1
- package/dist/server/workers/mcp-worker-pool.d.ts +0 -4
- package/dist/server/workers/mcp-worker-pool.js +0 -1
- package/dist/utils/env/is-local-development.d.ts +0 -13
- package/dist/utils/env/is-local-development.js +0 -1
- package/dist/utils/env/is-production.d.ts +0 -13
- package/dist/utils/env/is-production.js +0 -1
- package/dist/utils/env/is-web-view.d.ts +0 -14
- package/dist/utils/env/is-web-view.js +0 -1
- /package/dist/client/app/{ErrorBubble → DevModeFloatingBar}/DetailedErrors.d.ts +0 -0
- /package/dist/client/app/{ErrorBubble → DevModeFloatingBar}/DetailedErrors.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/html-script.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/index.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/explain-step.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/explain-step.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation-info-by-id.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation-info-by-id.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation-info-by-pointer.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation-info-by-pointer.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/get-operation.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/index.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/index.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-identifier.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-identifier.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-info.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-info.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-parameters.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/get-operation/types/operation-parameters.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/index.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/json-example.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/json-example.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/json-schema.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/json-schema.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/openapi-code-sample.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/openapi-example.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/openapi-example.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/openapi-response-sample.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/replay-openapi.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/step-by-step-wrapper.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/step-by-step-wrapper.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/styled.elements.d.ts +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/styled.elements.js +0 -0
- /package/dist/{server/plugins/markdown → client/app}/markdoc/hooks/use-store.d.ts +0 -0
- /package/dist/{server/plugins/openapi-docs/template → client/templates/openapi-docs}/mock-server-config.d.ts +0 -0
- /package/dist/{server/plugins/openapi-docs/template → client/templates/openapi-docs}/mock-server-config.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/definition-path.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/definition-path.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/index.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/json-example-ref.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/json-example-ref.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/json-schema-ref.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/json-schema-ref.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/parsed-yaml.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/parsed-yaml.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/raw-content.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/raw-content.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/sample-from-json-schema.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/attributes/sample-from-json-schema.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/extract-rbac-from-condition-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/extract-rbac-from-condition-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/get-node-attribute.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/get-node-attribute.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-code-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-code-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-conditional-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-conditional-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-content-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-content-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-example-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-example-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-fence-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-fence-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-function.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-function.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-list-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-list-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-string-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-string-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-tag.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-tag.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-text-node.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-text-node.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-variable.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/guards/is-variable.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/remove-markdoc-tags.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/remove-markdoc-tags.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/set-node-attribute-value.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/helpers/set-node-attribute-value.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/fence/escape-html.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/fence/escape-html.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/fence/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/gfm-list-item.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/gfm-list-item.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/heading.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/index.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/index.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/table.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/table.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/text.d.ts +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/nodes/text.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/index.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/json-example.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/json-schema.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/openapi-code-sample.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/openapi-example.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/openapi-response-sample.js +0 -0
- /package/dist/{server/plugins/markdown/markdoc → markdoc}/tags/replay-openapi.js +0 -0
- /package/dist/server/{config → external-plugins}/resolve-module.d.ts +0 -0
- /package/dist/server/{config → external-plugins}/resolve-module.js +0 -0
- /package/dist/{server/utils → utils}/conflict-resolvers.d.ts +0 -0
- /package/dist/{server/utils → utils}/conflict-resolvers.js +0 -0
- /package/dist/{server/utils → utils}/slugger.js +0 -0
package/dist/server/{config/external-plugins.js → external-plugins/resolve-external-plugins.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as f}from"node:fs";import n from"node:path";import{resolvePlugins as g}from"@redocly/openapi-core";import{DEFAULT_PROJECT_PLUGIN_PATHS as m,DEFAULT_THEME_PLUGIN_PATH as d,STYLES_FILE as p}from"../constants/common.js";import{GATED_PLUGINS as P}from"../constants/entitlements.js";import{isDefined as y}from"../../utils/guards/is-defined.js";import{reporter as E}from"../tools/notifiers/reporter.js";import{sha as F}from"../utils/crypto/sha.js";import{resolveModule as C}from"./resolve-module.js";import{EntitlementsProvider as D}from"../entitlements/entitlements-provider.js";const u={sha:"",value:Promise.resolve({resolvedPlugins:[],errors:[]})};async function M(e,t=[]){const r=F(JSON.stringify(t));if(u.sha!==r){u.sha=r;const s=j(e,t),l=await g(s,e)||[];if(!s.some(i=>m.includes(i))){const i=m[0],
|
|
1
|
+
import{existsSync as f}from"node:fs";import n from"node:path";import{resolvePlugins as g}from"@redocly/openapi-core";import{DEFAULT_PROJECT_PLUGIN_PATHS as m,DEFAULT_THEME_PLUGIN_PATH as d,STYLES_FILE as p}from"../constants/common.js";import{GATED_PLUGINS as P}from"../constants/entitlements.js";import{isDefined as y}from"../../utils/guards/is-defined.js";import{reporter as E}from"../tools/notifiers/reporter.js";import{sha as F}from"../utils/crypto/sha.js";import{resolveModule as C}from"./resolve-module.js";import{EntitlementsProvider as D}from"../entitlements/entitlements-provider.js";const u={sha:"",value:Promise.resolve({resolvedPlugins:[],errors:[]})};async function M(e,t=[]){const r=F(JSON.stringify(t));if(u.sha!==r){u.sha=r;const s=j(e,t),l=await g(s,e)||[];if(!s.some(i=>m.includes(i))){const i=m[0],a=n.join(e,i);l.push({id:"",absolutePath:a,path:i})}u.value=Promise.all(l.map(i=>A(i))).then(i=>{const a=i.filter(y),h=a.filter(c=>c?.type&&["error","warning"].includes(c.type)),v=a.filter(c=>c.type==="resolvedPlugin");return{errors:h,resolvedPlugins:v}})}const o=await u.value;if(o.errors.length)for(let s=0;s<o.errors.length;s++)await E.panicOnBuildContentError(o.errors[s].error);return o.resolvedPlugins}function j(e,t=[]){const r=[...t];for(const o of m)!r.includes(o)&&f(n.join(e,o))&&r.push(o);return r.includes(d)||r.unshift(d),r}async function A(e){if(!e.absolutePath||!e.path)return{type:"error",error:`Plugin with path "${e}" not found`};const t=n.dirname(e.absolutePath),{lifecyclePlugin:r,config:o}=L(e);return{name:n.dirname(e.path),type:"resolvedPlugin",isNpmPackage:I(e.path),pluginDirAbsolutePath:t,lifecyclePlugin:r,config:o,stylesFile:n.resolve(t,p),markdoc:S(t)}}function I(e){const t=n.dirname(e);return C(n.join(t,"package.json"))!=null}function L(e){const t=D.instance(),r=e.path||"",o=!t.canAccessFeature("customPlugins")&&!P.includes(r),s=e.requiredEntitlements&&P.includes(r)&&!e.requiredEntitlements.every(l=>t.canAccessFeature(l));return o||s?{lifecyclePlugin:{id:e.id},config:{}}:{lifecyclePlugin:{id:e.id,processContent:e.processContent,afterRoutesCreated:e.afterRoutesCreated,loaders:e.loaders,requiredEntitlements:e.requiredEntitlements},config:{schema:e.redoclyConfigSchema,ejectIgnore:e.ejectIgnore}}}function S(e){const t=n.resolve(e,"markdoc"),r=n.join(t,"schema.ts");if(!f(r))return null;const o=n.join(t,"components.tsx");return{schemaFile:r,componentsFile:f(o)?o:void 0}}export{M as resolveExternalPlugins};
|
package/dist/server/fs/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sha1 as M}from"../utils/crypto/sha1.js";import{NestedMap as
|
|
1
|
+
import{sha1 as M}from"../utils/crypto/sha1.js";import{NestedMap as H}from"./utils/nested-map.js";import{trackAccessStore as y}from"./utils/async-storage.js";import{isLoaderCacheEnabled as S}from"./utils/is-loader-cache-enabled.js";import{LoadError as v}from"./load-error.js";import{createLifecycleContext as k}from"../plugins/lifecycle.js";function p(C,t){return C+":"+t}class z{fs;errors=new Map;#t=new Map;#n=new Map;#e=new Map;#s=new Map;#i=new H;#r;#o={};#a=new Map;constructor(t){this.fs=t,this.#r=k(t,this),this.#f()}#c(t){let e=this.#t.get(t);return e||(e=new Map,this.#t.set(t,e)),e}async load(t,e,n){let s,h;typeof e=="string"?(s=e,h=this.#o[e]):(s=e.name,h=e.loader);const o=p(s,t);if(this.#a.has(o))return this.#a.get(o);const a=n?.join(""),r=a!==void 0?a.length>30?M(a):a:void 0,c=y.getStore()??[],F=!this.#h(t,s,r),g=this.#c(s),u=g.get(t);if(F&&u)return c.push({type:"load",loaderId:s,resource:t,hash:u.compoundHash}),u;const d=Promise.withResolvers();this.#a.set(o,d.promise),r!==void 0&&this.#e.set(o,r);const{status:L,value:l}=await this.#p(t,s,async()=>{let m;const I=y.getStore()||[],w=[],P=i=>w.push(i);try{m=await h(t,this.#r,P),w.length>0?this.errors.set(o,w):this.errors.delete(o)}catch(i){const f=g.get(t)?.data,E=s==="redocly-config"||s==="nearest-redocly-config"?!1:(await this.load(t,"is-ignored")).data;if(!(i instanceof v)&&!E&&this.errors.set(o,[i]),!f)return{status:"error",value:i instanceof v?i:new v(i.message,{cause:i,loaderId:s})};m=f}const R=M(t+(r??"")+I.map(i=>i.hash).sort((i,f)=>i.localeCompare(f)).join(""));return c.push({type:"load",loaderId:s,resource:t,hash:R}),{status:"success",value:{data:m,compoundHash:R}}});return L==="error"?d.reject(l):(this.#l(t),S(s)&&g.set(t,l),this.#n.set(o,l.compoundHash),d.resolve(l)),this.#a.delete(o),d.promise}setLoaders(t){this.#o={...this.#o,...t}}delete(t,e){if(e){const n=p(e,t);this.#d(t,e),this.errors.delete(n),this.#n.delete(n),this.#e.delete(n);const s=this.#s.get(t);if(s){for(const h of s)this.delete(h,e);this.#s.delete(t)}this.#i.delete(e,t)}else for(const n of this.#t.keys())this.delete(t,n)}#d(t,e){const n=this.#t.get(e);n&&n.delete(t)}#l(t){const[e,n]=t.split("#");if(!n)return;const s=this.#s.get(e);s?s.add(t):this.#s.set(e,new Set([t]))}#f(){this.fs.watch(async t=>{for(const e of t)e.event==="unlink"&&this.delete(e.path)})}#h(t,e,n){const s=p(e,t);return n!==void 0&&this.#e.get(s)!==n?!0:(this.#i.get(e,t)??[]).some(a=>{switch(a.type){case"load":const r=p(a.loaderId,a.resource);return this.#n.get(r)!==a.hash||this.#h(a.resource,a.loaderId,this.#e.get(r));case"read":return a.hash!==this.fs.getFileInfo(a.path)?.hash;case"exists":const c=this.fs.getFileInfo(a.path);return a.hash!==(c&&!c.isVirtual?"t":"f");case"scan":return a.hash!==this.fs.getPatternScanHash(a.pattern)}})}#p(t,e,n){const s=[];return this.#i.set(e,t,s),y.run(s,n)}}export{z as Cache};
|
|
@@ -9,6 +9,7 @@ export declare class ContentFs extends Fs {
|
|
|
9
9
|
ignored: string[];
|
|
10
10
|
constructor(cwd: string, ignored?: string[]);
|
|
11
11
|
get localeFolders(): string[];
|
|
12
|
+
get isL10nEnabled(): boolean;
|
|
12
13
|
get localizationFolder(): string | undefined;
|
|
13
14
|
getFileInfo(relativePath: string): FileInfo | {
|
|
14
15
|
relativePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import p from"node:path";import{I18N_DIR_NAME as f,L10N_DIR_NAME as d}from"../constants/common.js";import{logger as u}from"../tools/notifiers/logger.js";import{Fs as m}from"./fs.js";import{isL10nPath as n}from"./utils/is-l10n-path.js";import{getLocaleFromRelativePath as c}from"./utils/get-locale-from-relative-path.js";import{removeL10nPrefix as l}from"./utils/remove-l10n-prefix.js";import{LastModifiedTracker as
|
|
1
|
+
import p from"node:path";import{I18N_DIR_NAME as f,L10N_DIR_NAME as d}from"../constants/common.js";import{logger as u}from"../tools/notifiers/logger.js";import{Fs as m}from"./fs.js";import{isL10nPath as n}from"./utils/is-l10n-path.js";import{getLocaleFromRelativePath as c}from"./utils/get-locale-from-relative-path.js";import{removeL10nPrefix as l}from"./utils/remove-l10n-prefix.js";import{LastModifiedTracker as g}from"./last-modified-tracker.js";class b extends m{cwd;ignored;#e=new Map;#s;#t;constructor(e,t=[]){super(e,t),this.cwd=e,this.ignored=t,this.#s=new g(this),this.#r()}get localeFolders(){return Array.from(this.#e.keys())}get isL10nEnabled(){return this.#e.size>1}get localizationFolder(){if(this.#t)return this.#t;let e=!1,t=!1;const s=this.localeFolders;if(!s.length)return;for(const i of s)for(const o of this.#e.get(i)?.values()||[]){const a=o.startsWith(d),h=o.startsWith(f);a&&!e&&(e=!0),h&&!t&&(t=!0)}e&&t?u.warn("Detected both `@l10n` and `@i18n` folders. Using `@l10n` folder for localization because `@i18n` folder is deprecated."):t&&u.warn("`@i18n` folder is deprecated. Please use `@l10n` folder instead.");const r=e?d:f;return this.#t=r,r}getFileInfo(e){if(e=e.replace(/^\.\//g,""),n(e)){if(super.exists(e))return super.getFileInfo(e);const t=l(e),s=super.getFileInfo(t);return s&&{...s,relativePath:e,realRelativePath:t,dirname:p.posix.dirname(e),isVirtual:!0}}return super.getFileInfo(e)}exists(e){return e=e.replace(/^\.\//g,""),n(e)?super.exists(e)||super.exists(l(e)):super.exists(e)}async read(e,t="utf-8"){return n(e)?await super.exists(e)?super.read(e,t):super.read(l(e),t):super.read(e,t)}scan(e){const t=super.scan(e),s={},r=new Set;for(const i of t)if(n(i.relativePath)){const o=c(i.relativePath),a=s[o]||new Set;a.add(l(i.relativePath)),s[o]=a}else r.add(i.relativePath);for(const i of r.values())for(const o of this.#e.keys())if(!s[o]?.has(i)){const a=`${this.localizationFolder}/${o}/${i}`;t.push({realRelativePath:i,relativePath:a,isVirtual:!0,hash:void 0})}return t}getLastModified(e){const t=this.getFileInfo(e);return this.#s.getLastModified(t?.realRelativePath||e)}async#r(){await this.watcher,this.#e=new Map;for(const e of this.filesList.values())if(n(e.relativePath)){const t=c(e.relativePath),s=this.#e.get(t)||new Set;s.add(e.relativePath),this.#e.set(t,s)}super.watch(async e=>{for(const t of e){if(t.event==="code-updated"||!n(t.path))continue;const s=c(t.path),r=this.#e.get(s)||new Set;switch(t.event){case"add":r.add(t.path),this.#e.set(s,r);break;case"unlink":r&&(r.delete(t.path),r.size===0&&this.#e.delete(s));break}}})}}export{b as ContentFs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"path";import{simpleGit as
|
|
1
|
+
import n from"path";import{simpleGit as r}from"simple-git";import{statSync as h}from"node:fs";import{envConfig as o}from"../config/env-config.js";import{fastMtime as a}from"./fast-mtime.js";class p{fs;#e;#i=void 0;#t=null;#s=new Map;#n=".";constructor(t){this.fs=t,t.watch(i=>{for(const e of i)e.event!=="code-updated"&&(e.event==="unlink"?this.#s.delete(e.path):this.#s.set(e.path,new Date().toISOString()))})}#o(){return this.#e?this.#e:(this.#e=new Promise(t=>{const i=r(this.fs.cwd,{binary:"git"});i.version().then(e=>{e.installed||t(void 0),i.revparse(["--show-toplevel"]).then(s=>{this.#n=s,t(i)}).catch(()=>{t(void 0)})})}),this.#e)}async#h(){return this.#i||(this.#i=this.#o().then(t=>{if(t)return a(this.fs.cwd,t)})),this.#i}async#a(){return this.#t||(this.#t=this.#o().then(async t=>{if(!t)return new Set;try{const i=!o.isDevelopMode,e=await t?.status(i?["--untracked-files=no"]:void 0);return new Set(e?.files.map(s=>n.posix.normalize(n.relative(this.fs.cwd,n.resolve(this.#n,s.path))))??[])}catch{return new Set}}),this.#t.then(()=>{o.isDevelopMode&&setTimeout(()=>{this.#t=null},5e3)})),this.#t}#r(t){return this.#s.get(t)||h(n.resolve(this.fs.cwd,t)).mtime.toISOString()}async getLastModified(t){const i=await this.#h(),e=await this.#a();try{if(e?.has(t))return this.#r(t);const s=i?.get(t);return s||this.#r(t)}catch{return null}}}export{p as LastModifiedTracker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as n}from"../../config/env-config.js";const r=[];function o(e){return n.isBuildMode?!r.includes(e):!0}export{o as isLoaderCacheEnabled};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolve as
|
|
1
|
+
import{resolve as n,dirname as l}from"node:path";import{fileURLToPath as d}from"node:url";import{readFile as u}from"fs/promises";import{createReadStream as v}from"fs";import{envConfig as s}from"./config/env-config.js";import{telemetry as S}from"./telemetry/index.js";import{createRouter as g}from"./web-server/router.js";import{installProdRoutes as D}from"./web-server/routes/index.js";import{Store as E}from"./store.js";import{loadEnvVariables as w}from"./utils/envs/load-env-variables.js";import{startHttpServer as P}from"./web-server/http.js";import{readStaticData as b}from"./utils/static-data.js";import{startIdleTimeout as R}from"./web-server/middleware/idleTimeoutMiddleware.js";import{reporter as x}from"./tools/notifiers/reporter.js";import{EntitlementsProvider as I}from"./entitlements/entitlements-provider.js";import{DatabasePreconnectService as y}from"./providers/database/database-preconnect-service.js";import{KvService as N}from"./persistence/kv/services/kv-service.js";import{runScorecardsWorker as O}from"./plugins/scorecards/workers/run-scorecards-worker.js";import{isCatalogEntitiesEnabled as T}from"./utils/is-catalog-entities-enabled.js";import{isScorecardsEnabled as h}from"./utils/is-scorecards-enabled.js";import{renderPage as $}from"./ssr/index.js";if(!s.isBuildMode){let f=function(){const r=process.argv.findIndex(i=>i==="--port"||i==="-p");if(r===-1)return null;const o=process.argv[r+1];if(o.startsWith("-"))return null;const e=parseInt(o,10);return isNaN(e)?null:e};const t=l(d(import.meta.url));await w(t);const m=JSON.parse(await u(n(t,"./store.json"),"utf-8")),c=E.fromJson(m,{outdir:n(t,"../client"),serverOutDir:t,serverMode:!0,contentDir:""});if(await I.instance().init({ignoreTokenExpiration:!0}),T()){await y.init(t);const r=await N.getInstance({baseDbDir:t});setInterval(()=>r.clearExpired(),300*1e3)}p(c).catch(r=>{console.error(r)});async function p(r){S.initialize();const o=await g();D(o,r,{readStaticAsset:async a=>v(a),resolveRouteData:async a=>b(a.slug,r.outdir)}),x.printErrors();const e=f(),i=s.PORT;return await P(o,e??i??4e3),R(),h(r.config)&&O(r.serverOutDir,r.config.scorecards),o}}export{$ as renderPage};
|
|
@@ -6,6 +6,7 @@ export declare class KvRemoteRepository extends BaseRepository {
|
|
|
6
6
|
#private;
|
|
7
7
|
constructor(dbConnection: DatabaseConnection);
|
|
8
8
|
static getInstance(options: RepositoryInstanceOptions): Promise<KvRemoteRepository | null>;
|
|
9
|
+
sync(): Promise<void>;
|
|
9
10
|
get<T extends KvValue = KvValue>(key: KvKey): Promise<T | null>;
|
|
10
11
|
getMany<T extends KvValue = KvValue>(keys: KvKey[]): Promise<(KvListEntry<T> | null)[]>;
|
|
11
12
|
list<T extends KvValue = KvValue>(selector: KvListSelector, options?: KvListOptions): Promise<KvListResponse<T>>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{eq as E,and as g,gte as m,gt as M,lt as f,asc as
|
|
1
|
+
import{eq as E,and as g,gte as m,gt as M,lt as f,asc as D,desc as B,or as K,isNull as b,sql as c,inArray as q,count as N}from"drizzle-orm";import{logger as d}from"../../../tools/notifiers/logger.js";import{kvTable as t}from"../../../providers/database/databases/sqld-sqlite/schemas/kv-table.js";import{BaseRepository as $}from"../../../providers/database/base-repository.js";import{DatabaseConnectionFactory as I}from"../../../providers/database/database-connection-factory.js";import{createKvValue as S}from"../mappers/create-kv-value.js";import{createKvDbRecord as V,encodeKvKey as l}from"../mappers/create-kv-db-record.js";import{decodeCursor as L}from"../helpers/decode-cursor.js";import{encodeCursor as Q}from"../helpers/encode-cursor.js";import{createKvListEntry as C}from"../mappers/create-kv-list-entry.js";const U="";class u extends ${static#e;#t=!1;constructor(e){super(e)}static async getInstance(e){if(!u.#e)try{const r=await I.create("sqld-remote",e);if(!r)return u.#e=null,null;u.#e=new u(r)}catch(r){return d.error("Error creating kv remote repository",r),u.#e=null,null}return u.#e}async sync(){if(this.isNonRemoteDatabaseMode()){this.#t||(d.warn(`KV database is currently operating in local mode: not connected to the remote database.
|
|
2
|
+
All changes and data will only persist locally and will not be synced remotely.`),this.#t=!0);return}await this.databaseClient.sync()}async get(e){try{const r=l(e),n=await this.databaseClient.client.select().from(t).where(g(E(t.encodedKey,r),K(b(t.expiresAt),m(c`datetime(${t.expiresAt})`,c`datetime('now')`)))).get();return n?S(n):null}catch(r){return d.error("Error getting kv entry by key",r),null}}async getMany(e){try{if(e.length===0)return[];const r=e.map(i=>l(i)),n=K(b(t.expiresAt),m(c`datetime(${t.expiresAt})`,c`datetime('now')`)),a=await this.databaseClient.client.select().from(t).where(g(q(t.encodedKey,r),n)).all(),s=new Map(a.map(i=>[i.encodedKey,i]));return e.map((i,w)=>{const h=r[w],x=s.get(h);return x?C(x):null})}catch(r){return d.error("Error getting multiple kv entries",r),[]}}async list(e,r){try{const n=r?.limit??100,a=r?.reverse??!1,s=[],v=K(b(t.expiresAt),m(c`datetime(${t.expiresAt})`,c`datetime('now')`));if(s.push(v),"prefix"in e){const o=l(e.prefix),y="start"in e?l(e.start):o,k="end"in e?l(e.end):o+U;s.push(m(t.encodedKey,y)),s.push(f(t.encodedKey,k))}else if("start"in e&&"end"in e){const o=l(e.start),y=l(e.end);s.push(m(t.encodedKey,o)),s.push(f(t.encodedKey,y))}if(r?.cursor){const o=L(r.cursor),y=a?f(t.encodedKey,o):M(t.encodedKey,o);s.push(y)}const i=this.databaseClient.client.select().from(t),w=s.length>0?i.where(g(...s)):i,h=this.databaseClient.client.select({count:N()}).from(t),A=(await(s.length>0?h.where(g(...s)):h).get())?.count??0,p=await w.orderBy(a?B(t.encodedKey):D(t.encodedKey)).limit(n).all();return{items:p.map(o=>C(o)),total:A,cursor:A>p.length?Q(p[p.length-1]?.encodedKey):null}}catch(n){return d.error("Error listing kv entries",n),{items:[],total:0,cursor:null}}}async set(e,r,n){try{const a=V({key:e,value:r,ttlInSeconds:n?.ttlInSeconds});return await this.databaseClient.client.insert(t).values(a).onConflictDoUpdate({target:[t.encodedKey],set:{value:a.value,expiresAt:a.expiresAt,updatedAt:a.updatedAt}}),C(a)}catch(a){return d.error("Error saving kv entry",a),null}}async delete(e){try{const r=l(e);await this.databaseClient.client.delete(t).where(E(t.encodedKey,r))}catch(r){d.error("Error deleting kv entry by key",r)}}async clearExpired(){try{await this.databaseClient.client.delete(t).where(f(c`datetime(${t.expiresAt})`,c`datetime('now')`))}catch(e){d.error("Error clearing expired kv entries",e)}}async transaction(e){return this.databaseClient.transactionsManager.transaction(async()=>e({get:async n=>this.get(n),getMany:async n=>this.getMany(n),set:async(n,a,s)=>this.set(n,a,s),delete:async n=>this.delete(n)}))}}export{U as KV_KEY_END_BOUNDARY,u as KvRemoteRepository};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{KvRemoteRepository as l}from"../repositories/kv-remote-repository.js";import{kvKeyValidator as a,kvListOptionsValidator as h,kvListSelectorValidator as u,kvSetOptionsValidator as c}from"../schemas/kv-schemas.js";class i{static#s;#t;constructor(t){this.#t=t}static async#r(t){const s=await l.getInstance(t),n=new i(s);i.#s=n}static async getInstance(t){return i.#s||await i.#r(t),i.#s}async get(t){const s=a.parse(t);return await this.#t?.sync(),await this.#t?.get(s)??null}async getMany(t){if(t.length===0)return[];const s=t.map(n=>a.parse(n));return await this.#t?.sync(),await this.#t?.getMany(s)??[]}async list(t,s){const n=u.parse(t),e=h.parse(s??{});return await this.#t?.sync(),await this.#t?.list(n,e)??{items:[],total:0,cursor:null}}async set(t,s,n){const e=a.parse(t),r=c.parse(n??{});return this.#e(s),this.#n(s),await this.#t?.set(e,s,r)??null}async delete(t){const s=a.parse(t);return this.#t?.delete(s)}async clearExpired(){return await this.#t?.clearExpired()}async transaction(t){if(!this.#t)throw new Error("Remote repository not available for transactions");return await this.#t.sync(),this.#t.transaction(async s=>t({get:async e=>{const r=a.parse(e);return s.get(r)},getMany:async e=>{const r=e.map(o=>a.parse(o));return s.getMany(r)},set:async(e,r,o)=>{const y=a.parse(e),p=c.parse(o);return this.#e(r),this.#n(r),s.set(y,r,p)},delete:async e=>{const r=a.parse(e);return s.delete(r)}}))}#e(t){try{JSON.stringify(t)}catch(s){const n=s instanceof Error?s.message:"Unknown error";throw new Error(`Value is not JSON serializable: ${n}`)}}#n(t){const n=JSON.stringify(t),e=Buffer.byteLength(n,"utf8");if(e>1048576){const r=(e/1024).toFixed(2);throw new Error(`Value size (${r} KB) exceeds the maximum allowed size of 1 MB (1024 KB)`)}}}export{i as KvService};
|
|
1
|
+
import{KvRemoteRepository as l}from"../repositories/kv-remote-repository.js";import{kvKeyValidator as a,kvListOptionsValidator as h,kvListSelectorValidator as u,kvSetOptionsValidator as c}from"../schemas/kv-schemas.js";class i{static#s;#t;constructor(t){this.#t=t}static async#r(t){const s=await l.getInstance(t),n=new i(s);i.#s=n}static async getInstance(t){return i.#s||await i.#r(t),i.#s}async get(t){const s=a.parse(t);return await this.#t?.sync(),await this.#t?.get(s)??null}async getMany(t){if(t.length===0)return[];const s=t.map(n=>a.parse(n));return await this.#t?.sync(),await this.#t?.getMany(s)??[]}async list(t,s){const n=u.parse(t),e=h.parse(s??{});return await this.#t?.sync(),await this.#t?.list(n,e)??{items:[],total:0,cursor:null}}async set(t,s,n){const e=a.parse(t),r=c.parse(n??{});return this.#e(s),this.#n(s),await this.#t?.set(e,s,r)??null}async delete(t){const s=a.parse(t);return this.#t?.delete(s)}async clearExpired(){return await this.#t?.clearExpired()}async transaction(t){if(!this.#t)throw new Error("Remote repository not available for transactions");return await this.#t.sync(),this.#t.transaction(async s=>t({get:async e=>{const r=a.parse(e);return s.get(r)},getMany:async e=>{const r=e.map(o=>a.parse(o));return s.getMany(r)},set:async(e,r,o)=>{const y=a.parse(e),p=c.parse(o??{});return this.#e(r),this.#n(r),s.set(y,r,p)},delete:async e=>{const r=a.parse(e);return s.delete(r)}}))}#e(t){try{JSON.stringify(t)}catch(s){const n=s instanceof Error?s.message:"Unknown error";throw new Error(`Value is not JSON serializable: ${n}`)}}#n(t){const n=JSON.stringify(t),e=Buffer.byteLength(n,"utf8");if(e>1048576){const r=(e/1024).toFixed(2);throw new Error(`Value size (${r} KB) exceeds the maximum allowed size of 1 MB (1024 KB)`)}}}export{i as KvService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as r}from"../../../config/env-config.js";import{buildScript as t}from"./build-script.js";import{resolveBrowserHooksPath as e}from"./resolve-browser-hooks.js";async function d(){return{id:"Adobe Analytics",requiredEntitlements:["analytics"],async processContent(o,{getConfig:i}){const n=(await i())?.analytics?.adobe;!n?.scriptUrl||!r.isProductionEnv&&!n.includeInDevelopment||(o.addSsrComponents([t(n.scriptUrl)],"head"),o.addBrowserPlugin(e()))}}}export{d as adobeAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Minimatch as p}from"minimatch";import{
|
|
1
|
+
import{Minimatch as p}from"minimatch";import{envConfig as m}from"../../../config/env-config.js";import{buildScripts as a}from"./build-scripts.js";import{resolveBrowserHooksPath as l}from"./resolve-browser-hooks.js";async function h(){return{id:"Amplitude Analytics",requiredEntitlements:["analytics"],async processContent(n,{getConfig:t}){const e=(await t())?.analytics?.amplitude;if(!e?.apiKey||!m.isProductionEnv&&!e.includeInDevelopment)return;let o=[];typeof e.exclude<"u"&&e.exclude.map(r=>{const d=new p(r);o.push(d.makeRe())});const{headComponents:i,postBodyComponents:s}=a(e,o);n.addSsrComponents(i,"head"),n.addSsrComponents(s,"postBody"),n.addBrowserPlugin(l())}}}export{h as amplitudeAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as r}from"../../../config/env-config.js";import{buildScript as s}from"./build-script.js";async function a(){return{id:"Fullstory Analytics",requiredEntitlements:["analytics"],async processContent(t,{getConfig:o}){const n=(await o())?.analytics?.fullstory;if(!n?.orgId||!r.isProductionEnv&&!n.includeInDevelopment)return;const i=[s(n.orgId)];t.addSsrComponents(i,"head")}}}export{a as fullstoryAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{withPathPrefix as s}from"@redocly/theme/core/utils";import{
|
|
1
|
+
import{withPathPrefix as s}from"@redocly/theme/core/utils";import{envConfig as c}from"../../../config/env-config.js";import{buildScripts as l}from"./build-scripts.js";import{resolveBrowserHooksPath as g}from"./resolve-browser-hooks.js";async function I(){const r=c.isProductionEnv;return{id:"Google Analytics",requiredEntitlements:["analytics"],afterRoutesCreated(t){const n=t.getGlobalData()||{},o=n.analytics?.ga||{trackingId:""};o?.exclude||(o.exclude=[]),o.trackers={};for(const i of Object.values(n.products||{})){const e=i.configOverride?.analytics?.ga;!e||!r&&!e.includeInDevelopment||(e.exclude?.length&&o.exclude.push(...e.exclude),o.trackers[i.slug]=e)}if(o.trackingId&&(r||o.includeInDevelopment)&&(o.trackers[s("/")]={trackingId:o.trackingId,conversionId:o.conversionId,floodlightId:o.floodlightId,optimizeId:o.optimizeId}),t.setGlobalData({...n,analytics:{...n?.analytics,ga:o}}),!Object.keys(o.trackers).length)return;const{headComponents:a,postBodyComponents:d}=l(o);t.addSsrComponents(a,"head"),t.addSsrComponents(d,"postBody"),t.addBrowserPlugin(g())}}}export{I as googleAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onCLS as d,onFID as u,onLCP as m}from"web-vitals";import{debounce as
|
|
1
|
+
import{onCLS as d,onFID as u,onLCP as m}from"web-vitals";import{envConfig as p}from"../../../config/env-config.js";import{debounce as r}from"../../../../utils/time/debounce.js";const c=new Set,v=(n,t)=>{const e=t?.analytics?.gtm;if(!e||p.NODE_ENV!=="production"&&!e.includeInDevelopment)return;e.enableWebVitalsTracking&&!n.prevLocation&&w(e.dataLayerName);const o=e.dataLayerName?window[e.dataLayerName]:window.dataLayer,a=e.pageViewEventName?e.pageViewEventName:"pageView";o.push({event:a})};function w(n="dataLayer"){const t=window;function e(i){c.has(i.name)||(c.add(i.name),f(i,t[n]))}const o=r(e,3e3),a=e,s=r(e,3e3);d(o),u(a),m(s)}function f({name:n,value:t,id:e},o){o.push({event:"core-web-vitals",webVitalsMeasurement:{name:n,id:e,value:Math.round(n==="CLS"?t*1e3:t),nonInteraction:!0}})}export{v as onRouteChange};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as i}from"../../../config/env-config.js";import{buildScripts as s}from"./build-scripts.js";import{resolveBrowserHooksPath as a}from"./resolve-browser-hooks.js";async function l(){return{id:"Google Tag Manager Analytics",requiredEntitlements:["analytics"],async processContent(n,{getConfig:t}){const o=(await t())?.analytics?.gtm;if(!o?.trackingId||!i.isProductionEnv&&!o.includeInDevelopment)return;const{headComponents:e,preBodyComponents:r}=s(o);n.addSsrComponents(e,"head"),n.addSsrComponents(r,"preBody"),n.addBrowserPlugin(a())}}}export{l as gtmAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as t}from"../../../config/env-config.js";import{resolveBrowserHooksPath as e}from"./resolve-browser-hooks.js";async function c(){return{id:"Heap Analytics",requiredEntitlements:["analytics"],async processContent(i,{getConfig:o}){const n=(await o())?.analytics?.heap;!n?.appId||!t.isProductionEnv&&!n.includeInDevelopment||i.addBrowserPlugin(e())}}}export{c as heapAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as e}from"../../../config/env-config.js";import{buildScript as i}from"./build-script.js";import{resolveBrowserHooksPath as o}from"./resolve-browser-hooks.js";async function u(){return{id:"Rudderstack Analytics",requiredEntitlements:["analytics"],async processContent(r,{getConfig:t}){const n=(await t())?.analytics?.rudderstack;!n?.writeKey||!e.isProductionEnv&&!n.includeInDevelopment||(r.addSsrComponents([i(n)],"head"),r.addBrowserPlugin(o()))}}}export{u as rudderstackAnalyticsPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{envConfig as i}from"../../../config/env-config.js";import{buildScript as o}from"./build-script.js";import{resolveBrowserHooksPath as r}from"./resolve-browser-hooks.js";async function m(){return{id:"Segment Analytics",requiredEntitlements:["analytics"],async processContent(e,{getConfig:t}){const n=(await t())?.analytics?.segment;!n?.writeKey||!i.isProductionEnv&&!n.includeInDevelopment||(e.addSsrComponents([o(n)],"head"),e.addBrowserPlugin(r()))}}}export{m as segmentAnalyticsPlugin};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c from"node:path";import{bundle as C,createConfig as B,getTotals as J}from"@redocly/openapi-core";import{CONFIG_FILE_NAME as M}from"../../../constants/common.js";import{deepMerge as _}from"../../../utils/object/deep-merge.js";import{pluralize as R}from"../../../utils/string/pluralize.js";import{getAllApiConfigsByPath as L}from"../get-api-config.js";import{injectDecoratorIntoConfig as W}from"../openapi-docs/decorators.js";import{ExternalResolver as T}from"../../fs/utils/external-ref-resolver.js";async function Z(o,{fs:n,logger:s,cache:u,getConfig:l,isPathIgnored:f}){let a;try{a=(await u.load(o,"yaml")).data}catch{return[]}if(!a?.asyncapi)return s.verbose(`${o} file is not AsyncAPI document. Skipping`),[];const p=[],i=n.getFileInfo(o),t=await l(c.posix.dirname(o)),A=L(t?.apis,o,t.configPath),D=await f(o);for(const d of A){if(!d.output&&D)continue;const O=t.configPath?c.posix.dirname(t.configPath):".",r=d.output?c.posix.join(O,d.output):o;if(await f(r))continue;i&&d.output&&!await n.exists(r)&&n.addVirtualFile(r,i);const m=_(t,{rbac:void 0},d),k=c.resolve(n.cwd,t.realConfigPath||M),w=new T(n),v=await B(W(m,r,n.cwd),{configPath:k,externalRefResolver:w}),h=c.resolve(n.cwd,o),g={config:v,base:c.dirname(h),doc:{source:{absoluteRef:h},parsed:JSON.parse(JSON.stringify(a))}},{bundle:{parsed:I},problems:y,visitorsData:N}=await C({...g,dereference:!0,externalRefResolver:w}),{bundle:{parsed:P}}=await C({...g,doc:{...g.doc,parsed:JSON.parse(JSON.stringify(a))}}),S=N["markdown/markdown"]?.markdocChunks??[],e=J(y);let b=[e.errors&&`${e.errors} ${R(e.errors,"error","errors")}`,e.warnings&&`${e.warnings} ${R(e.warnings,"warning","warnings")}`,e.ignored&&`${e.ignored} ignored`].filter(Boolean).join(", ");if(e.errors){const x=y.find(F=>F.severity==="error");throw new Error(`${b} while bundling ${r} definition.
|
|
2
2
|
|
|
3
|
-
${
|
|
3
|
+
${x?.message} at ${x?.location?.[0].pointer}
|
|
4
4
|
|
|
5
|
-
`)}
|
|
5
|
+
`)}e.warnings&&s.warn(`${b} while bundling %rp definition`,r);const V=$(I,t.metadata),j=$(P,t.metadata),E={document:V,documentWithReferences:j,config:m,relativePath:r,realRelativePath:i?.realRelativePath||r,customOutputRelativeFile:d.output&&r,markdocChunks:S,isVirtual:i?.isVirtual??!1};p.push(E)}return p}async function oo(o,n){const{fs:s,cache:u,getConfig:l}=n,f=[];for(const a of await s.scan(/(\.ya?ml|\.json)$/)){if(!await l(c.posix.dirname(a.relativePath)))continue;let i;try{i=await u.load(a.relativePath,"asyncapi-doc")}catch{continue}i.data?.length&&f.push(...i.data.map(t=>({...t,isVirtual:a.isVirtual||t.isVirtual,hash:i.compoundHash})))}return f}function $(o,n){if(!n)return o;const s={...o,info:{...o.info,"x-metadata":{...o.info?.["x-metadata"],...n}}};return delete s.info["x-metadata"]._customMessages,s}export{Z as asyncapiDocLoader,oo as asyncapiDocsLoader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getPublicEnvVariables as
|
|
1
|
+
import{getPublicEnvVariables as n}from"../../utils/envs/get-public-env-variables.js";const l=async({fsPath:r,slug:e},t,{partials:a,variables:i},o)=>{const s=o.getPartialsForRoute?.(e)||a;return{definitionId:r,...t.props,markdown:{partials:s,variables:{...i,env:n()}}}};var d=l;export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import I from"path";import{simplifyAstStructure as O}from"@redocly/openapi-docs/lib/utils/simplifyAstStructure.js";import{buildMenuItems as $}from"@redocly/asyncapi-docs/lib/utils/build-menu-items.js";import{findFirstBinding as F}from"@redocly/asyncapi-docs/lib/utils/find-first-binding.js";import{ASYNC_API_DOCS_TEMPLATE_ID as v}from"../../../constants/common.js";import{combineUrls as w}from"@redocly/theme/core/utils";import{PUBLIC_API_DEFINITIONS_FOLDER as E}from"../../constants/common.js";import{logger as x}from"../../tools/notifiers/logger.js";import{getTemplatePath as R}from"./get-template-path.js";import{storeDefinitionBundles as N}from"./store-definition-bundles.js";import{asyncapiDocLoader as G,asyncapiDocsLoader as L}from"./asyncapi-doc-loader.js";import{searchResolver as j}from"./search/search-resolver.js";import{getAiDocumentsStore as M}from"./search/get-ai-search-documents.js";import{OPENAPI_CUSTOM_FIELDS_SERVER_PROPS_GETTER_ID as b}from"../../constants/plugins/openapi-docs.js";import{telemetryTraceStep as U}from"../../../cli/telemetry/helpers/trace-step.js";const C="asyncapi-docs-";async function ot(c){let l=[],d=new Set;return{id:"asyncapi",requiredEntitlements:["asyncapi"],loaders:{"asyncapi-doc":G,"asyncapi-docs":L},processContent:async(e,a)=>{await U("build.plugin.asyncapi_docs",async()=>{const p=await a.getConfig(),A=!!p.rules?.["custom-fields-schema"];if(p.plugins?.some(r=>r.startsWith("@redocly/portal-plugin-async-api/"))){x.warn("The plugin '@redocly/portal-plugin-async-api' is deprecated. Please remove it from your config to use built-in AsyncAPI docs.");return}const D=e.createTemplate(v,R("../../../client/templates/asyncapi-docs/template.js")),u=e.registerServerPropsGetter(v,R("./get-server-props.js"));for(const r of await a.fs.scan(/(\.ya?ml|\.json)$/))if(!await a.isPathIgnored(r.relativePath))try{const{data:s,compoundHash:S}=await a.cache.load(r.realRelativePath,"asyncapi-doc");if(!s?.length)continue;l=s.map(({markdocChunks:t,relativePath:n,isVirtual:m,customOutputRelativeFile:f,realRelativePath:g})=>({chunks:t,relativePath:n,realRelativePath:g,isVirtual:f!=null||r.isVirtual||m})),N(s,e.outdir,S);for(const t of s){const n=`${C}${t.relativePath}`,m=F(t.document),{navItems:f,apiItems:g}=$({asyncApiDoc:t.document,protocol:m||""}),_=[{url:w(E,`${T(t.relativePath,".json")}?download`)},{url:w(E,`${T(t.relativePath,".yaml")}?download`)}];await e.createSharedData(n,{document:t.document,apiItems:g,protocol:m,downloadUrls:_,fsPath:t.relativePath}),f.forEach(i=>{const h={fsPath:t.relativePath,slugSuffix:`/${i.link}`,templateId:D,sharedData:[{key:"AsyncApiDefinition",id:n}],getStaticData:k(a.withPathPrefix,i.label),serverPropsGetterIds:A?[u,b]:[u]};e.addRoute(h),i.items&&i.items.forEach(o=>{e.addRoute({...h,slugSuffix:`/${o.link}`,getStaticData:k(a.withPathPrefix,o.label)}),o.items&&o.items.forEach(P=>{e.addRoute({...h,slugSuffix:`/${P.link}`,getStaticData:k(a.withPathPrefix,o.label)})})})}),e.addRoute({fsPath:t.customOutputRelativeFile||t.relativePath,templateId:D,hasClientRoutes:!0,getSidebar:i=>{const h=o=>{const P={...o};return o.link&&(P.routeSlug=w(i.slug,o.link),P.link=w(i.slug,o.link)),o.items&&(P.items=o.items.map(h)),P};return[{type:"link",label:t.document.info?.title??"AsyncAPI Overview",routeSlug:i.slug,link:i.slug},...f.map(h)]},getSearchDocuments:j(e,t.document),getStaticData:k(a.withPathPrefix,t.document.info?.title??"AsyncAPI Docs"),getAiDocumentsStore:M({actions:e,document:t.document,metadata:{type:"asyncapi",title:t.document.info?.title??"AsyncAPI Docs",description:t.document.info?.description??"",...t.document.info?.["x-metadata"]??{}}}),serverPropsGetterIds:A?[u,b]:[u],metadata:{type:"asyncapi",title:t.document.info?.title??"AsyncAPI Docs",description:t.document.info?.description??"",...t.document.info?.["x-metadata"]??{}},sharedData:[{key:"AsyncApiDefinition",id:n}]})}}catch(s){console.error(s)}})},afterRoutesCreated:async(e,a)=>{const p=new Set;for(const{chunks:y,relativePath:D,isVirtual:u,realRelativePath:r}of l){const s=(await a.cache.load(r,"asyncapi-doc")).compoundHash;await a.cache.load(D,{loader:async function(){for(const{node:t,markdown:n,pointer:m,key:f,relativePath:g}of y||[]){const{ast:_}=await e.parseMarkdoc({content:n,relativePath:m,isVirtual:u},a,{sharedDataIds:[`${C}${g}`]});t[`x-parsed-md-${f}`]={result:O(_)}}},name:"asyncapi-markdoc-inline-parser"},[s]);for(const{pointer:S}of y)p.add(S)}const A=d.difference(p);for(const y of A)a.cache.delete(y);d=p}}}function k(c,l){return async function(d,e){return{props:{settings:{baseUrlPath:c(d.baseSlug)},disableAutoScroll:!0,seo:{title:l}}}}}function T(c,l){const d=I.posix.dirname(c),e=I.posix.basename(c,I.posix.extname(c))+l;return I.posix.join(d,e)}export{ot as asyncAPIDocsPlugin};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import{basename as C}from"node:path";import{REDOCLY_TEAMS_RBAC as y}from"@redocly/config";import{isResourcePubliclyAccessible as u}from"../../../utils/rbac.js";import{getLocaleFromRelativePath as P}from"../../../fs/utils/get-locale-from-relative-path.js";import{extractDocumentSearchFacets as A}from"./search-facets.js";import{removeMarkdownLinks as m}from"../../openapi-docs/utils.js";import{processSchema as d}from"./schema-processor.js";import{llmsTxtLink as L,getLLMsTxtMdSlug as j}from"../../search/llmstxt/index.js";const W=({actions:
|
|
1
|
+
import{basename as C}from"node:path";import{REDOCLY_TEAMS_RBAC as y}from"@redocly/config";import{isResourcePubliclyAccessible as u}from"../../../utils/rbac.js";import{getLocaleFromRelativePath as P}from"../../../fs/utils/get-locale-from-relative-path.js";import{extractDocumentSearchFacets as A}from"./search-facets.js";import{removeMarkdownLinks as m}from"../../openapi-docs/utils.js";import{processSchema as d}from"./schema-processor.js";import{llmsTxtLink as L,getLLMsTxtMdSlug as j}from"../../search/llmstxt/index.js";const W=({actions:n,document:t,metadata:i})=>async(e,s,o)=>{const a=e.getSidebar?.(e)||[],c=await o.getConfig(),{allSearchDocuments:r,publiclyAccessibleSearchDocuments:l}=b(e,a,t,n,i,c);if(r.length)return{async getLLMsTxts(){return l.map(f=>({slug:f.url,fsPath:e.fsPath,title:f.title,content:f.content,includeInLLMsTxt:f.includeInLLMsTxt}))},async getSearchDocuments(){return r}}};function b(n,t,i,e,s,o,a){const c=[],r=[];for(const l of t){if(l.type==="group"){const h=l.apiItemData?.type==="channel"?l:a,{allSearchDocuments:D,publiclyAccessibleSearchDocuments:S}=b(n,l.items||[],i,e,s,o,h);c.push(...D),r.push(...S)}const f=k(n,l,i,e,s,o);f&&(c.push(f),q(l,o,a)&&r.push(f))}return{allSearchDocuments:c,publiclyAccessibleSearchDocuments:r}}function k(n,t,i,e,s,o){const a=F(t,i);if(!a)return null;const c=t.link||"",r=t.httpVerb||"",l=P(n.fsPath),f=A(e,s),h=M(n,t,i,a,r,c,o);return{url:c||n.slug,fsPath:n.fsPath,content:h.trim(),title:m(a.title||"")||C(n.fsPath),locale:l,product:n.product?.name,facets:f,includeInLLMsTxt:!t.apiItemData}}function M(n,t,i,e,s,o,a){let c="";const r=m(e.title||""),l=m(e.description||"")+m(e.summary||"");return r&&(c+=`# ${r}
|
|
2
2
|
|
|
3
3
|
`),l&&(c+=`${l}
|
|
4
4
|
|
|
5
5
|
`),s&&(c+=`Method: ${s.toUpperCase()}
|
|
6
|
-
`),c+=I(i),c+=O(i),t.type==="link"&&!t.apiItemData&&(c+=v(
|
|
7
|
-
`),
|
|
8
|
-
`),t}function O(
|
|
6
|
+
`),c+=I(i),c+=O(i),t.type==="link"&&!t.apiItemData&&(c+=v(n,a)),t.apiItemData?.type==="channel"&&(c+=T(t,i,o,n)),t.apiItemData?.type==="operation"&&(c+=N(t,i)),c}function I(n){let t="";return n.info?.version&&(t+=`Version: ${n.info.version}
|
|
7
|
+
`),n.info?.license?.name&&(t+=`License: ${n.info.license.name}
|
|
8
|
+
`),t}function O(n){if(!n.servers||Object.keys(n.servers).length===0)return"";let t=`
|
|
9
9
|
## Servers
|
|
10
10
|
|
|
11
|
-
`;for(const[i,
|
|
12
|
-
`,
|
|
13
|
-
`),t+=`Host: ${
|
|
14
|
-
`,t+=`Protocol: ${
|
|
15
|
-
`,
|
|
16
|
-
`),
|
|
11
|
+
`;for(const[i,e]of Object.entries(n.servers))t+=`### ${i}
|
|
12
|
+
`,e.description&&(t+=`${e.description}
|
|
13
|
+
`),t+=`Host: ${e.host}
|
|
14
|
+
`,t+=`Protocol: ${e.protocol}
|
|
15
|
+
`,e.protocolVersion&&(t+=`Protocol Version: ${e.protocolVersion}
|
|
16
|
+
`),e.pathname&&(t+=`Path: ${e.pathname}
|
|
17
17
|
`),t+=`
|
|
18
|
-
`;return t}function v(
|
|
18
|
+
`;return t}function v(n,t){const i=n.getSidebar?.(n)||[],e=$(i,t);if(Object.keys(e).length===0)return"";let s="";for(const[,o]of Object.entries(e))if(o.length>0)for(const a of o){const c=a.label||"Untitled",r=a.link||a.routeSlug||"";s+=`#### ${c}
|
|
19
19
|
|
|
20
20
|
`,r&&(s+=` - ${L({title:c,description:void 0,slug:j(r)})}
|
|
21
21
|
|
|
22
|
-
`)}return s}function T(
|
|
22
|
+
`)}return s}function T(n,t,i,e){const s=n.apiItemData?.id;if(!s)return"";const o=t.channels?.[s];if(!o)return"";let a="";if(o.parameters&&Object.keys(o.parameters).length>0){a+=`## Parameters
|
|
23
23
|
|
|
24
24
|
`;for(const[c,r]of Object.entries(o.parameters))a+=`### ${c}
|
|
25
25
|
`,typeof r=="object"&&r!==null&&"description"in r&&r.description&&(a+=`${r.description}
|
|
@@ -28,29 +28,29 @@ import{basename as C}from"node:path";import{REDOCLY_TEAMS_RBAC as y}from"@redocl
|
|
|
28
28
|
`),a+=`
|
|
29
29
|
`}if(o.messages&&Object.keys(o.messages).length>0){a+=`## Messages
|
|
30
30
|
|
|
31
|
-
`;for(const[c,r]of Object.entries(o.messages))a+=x(r,c,i,
|
|
32
|
-
`;if(
|
|
33
|
-
`),
|
|
34
|
-
`),
|
|
31
|
+
`;for(const[c,r]of Object.entries(o.messages))a+=x(r,c,i,e)}return a}function x(n,t,i,e){let o=`### ${n.title||n.name||t}
|
|
32
|
+
`;if(n.description&&(o+=`${n.description}
|
|
33
|
+
`),n.summary&&(o+=`${n.summary}
|
|
34
|
+
`),n.payload){const a=d(n.payload,"message payload",i.replace(e.slug+"/","").replace(/^\//,""),t);a.length>0&&(o+=`
|
|
35
35
|
#### Payload Schema
|
|
36
36
|
|
|
37
|
-
`,o+=g(a))}if(
|
|
37
|
+
`,o+=g(a))}if(n.headers){const a=d(n.headers,"message headers",i.replace(e.slug+"/","").replace(/^\//,""),t);a.length>0&&(o+=`
|
|
38
38
|
#### Headers Schema
|
|
39
39
|
|
|
40
|
-
`,o+=g(a))}return o}function g(
|
|
41
|
-
`,
|
|
42
|
-
`),
|
|
40
|
+
`,o+=g(a))}return o}function g(n){let t="";for(const i of n)if(typeof i=="object"&&i!==null&&"name"in i&&"type"in i){const e=i;t+=`- **${e.name}** (${e.type}${e.required?", required":""})
|
|
41
|
+
`,e.description&&(t+=` ${e.description}
|
|
42
|
+
`),e.enum&&Array.isArray(e.enum)&&e.enum.length>0&&(t+=` Enum: ${e.enum.join(", ")}
|
|
43
43
|
`),t+=`
|
|
44
|
-
`}return t}function N(
|
|
44
|
+
`}return t}function N(n,t){const i=n.apiItemData?.id;if(!i)return"";const e=t.operations?.[i];if(!e)return"";let s=`## Operation Details
|
|
45
45
|
|
|
46
|
-
`;if(
|
|
47
|
-
`),
|
|
48
|
-
`),
|
|
49
|
-
`),
|
|
46
|
+
`;if(e.action&&(s+=`Action: ${e.action}
|
|
47
|
+
`),e.description&&(s+=`${e.description}
|
|
48
|
+
`),e.summary&&(s+=`${e.summary}
|
|
49
|
+
`),e.messages&&e.messages.length>0){s+=`
|
|
50
50
|
### Messages
|
|
51
51
|
|
|
52
|
-
`;for(const o of
|
|
52
|
+
`;for(const o of e.messages){const a=o.title||o.name||"Message";s+=`#### ${a}
|
|
53
53
|
`,o.description&&(s+=`${o.description}
|
|
54
54
|
`),o.summary&&(s+=`${o.summary}
|
|
55
55
|
`),s+=`
|
|
56
|
-
`}}return s}function $(
|
|
56
|
+
`}}return s}function $(n,t){const i={};for(const e of n)e.type==="group"?e.apiItemData?.type==="channel"?R(e,i,t):V(e,i,t):e.apiItemData?.type==="channel"&&E(e,i,t);return i}function R(n,t,i){const e=n.label||"Channel";if(u(p(n),i)&&(t[e]||(t[e]=[]),t[e].push(n),n.items))for(const s of n.items)s.apiItemData?.type==="operation"&&u(p(s),i)&&t[e].push(s)}function V(n,t,i){if(n.items){const e=$(n.items,i);for(const[s,o]of Object.entries(e))t[s]||(t[s]=[]),t[s].push(...o)}}function E(n,t,i){const e=n.label||"Channel";if(u(p(n),i)&&(t[e]||(t[e]=[]),t[e].push(n),n.items))for(const s of n.items)s.apiItemData?.type==="operation"&&u(p(s),i)&&t[e].push(s)}function F(n,t){const{apiItemData:i,type:e}=n;return i?.type?w(i,t):e==="link"?_(t):null}function w(n,t){switch(n.type){case"channel":return t.channels?.[n.id]||null;case"operation":return t.operations?.[n.id]||null;default:return null}}function _(n){return{description:n.info?.description||"",title:n.info?.title||"",summary:""}}function q(n,t,i){const e=u(p(n),t);if(n.apiItemData?.type==="operation"&&i){const s=u(p(i),t);return e&&s}return e}function p(n){return{slug:n.link||"",[y]:n[y]}}export{W as getAiDocumentsStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{removeMarkdownLinks as j}from"../../openapi-docs/utils.js";function w(
|
|
1
|
+
import{removeMarkdownLinks as j}from"../../openapi-docs/utils.js";function w(r,n,o,i){if(!r)return[];const e={};return l(e,r,n,o,i),Object.values(e)}function l(r,n,o,i,e,f=[]){if(!(!n||n.type==="null")){if(n.type==="object"&&n.properties){for(const[t,u]of Object.entries(n.properties))if(typeof u=="object"&&u!==null){const y=f.concat([t]),d=n.required?.includes(t)||!1,p=c(t,u,o,y,d,i,e),O=A(p);if(r[O]!==void 0)continue;r[O]=p,l(r,u,o,i,e,y)}}if(n.type==="array"&&n.items&&typeof n.items=="object"&&n.items!==null&&l(r,n.items,o,i,e,f),n.oneOf&&Array.isArray(n.oneOf))for(const t of n.oneOf)typeof t=="object"&&t!==null&&l(r,t,o,i,e,f);if(n.anyOf&&Array.isArray(n.anyOf))for(const t of n.anyOf)typeof t=="object"&&t!==null&&l(r,t,o,i,e,f);if(n.allOf&&Array.isArray(n.allOf))for(const t of n.allOf)typeof t=="object"&&t!==null&&l(r,t,o,i,e,f)}}function c(r,n,o,i,e,f,t){const u=S(n),y=j(n.description||""),d=n.example;return{name:r,description:y,place:o,mediaType:void 0,path:i.slice(0,-1),type:u||"unknown",required:e,example:d?JSON.stringify(d):void 0,enum:void 0,deepLink:k(i,o,f,t)}}function S(r){return r.type?Array.isArray(r.type)?r.type.filter(n=>n!=="null").join(" | "):r.type:r.properties?"object":r.items?"array":r.enum?"enum":r.format?r.format:"unknown"}function A(r){return`${r.name}${r.description}${r.place}`}function k(r,n,o,i){let e="",f="";n==="message headers"?f="headers":n==="message payload"&&(f="payload"),r.length>0&&(e=r.join("/"));let t=`#${o}/messages`;return i&&(t+=`&m=${i.toLowerCase()}`),f&&(t+=`&t=${f}`),e&&(t+=`&path=${e.toLowerCase()}`),t}export{w as processSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_ROUTE_RBAC as D,REDOCLY_TEAMS_RBAC as d}from"@redocly/config";import{extractDocumentSearchFacets as O,setDocumentSearchFacets as T}from"./search-facets.js";import{removeMarkdownLinks as m}from"../../openapi-docs/utils.js";import{processSchema as S}from"./schema-processor.js";function q(e,t){return async(n,r)=>{const
|
|
1
|
+
import{REDOCLY_ROUTE_RBAC as D,REDOCLY_TEAMS_RBAC as d}from"@redocly/config";import{extractDocumentSearchFacets as O,setDocumentSearchFacets as T}from"./search-facets.js";import{removeMarkdownLinks as m}from"../../openapi-docs/utils.js";import{processSchema as S}from"./schema-processor.js";function q(e,t){return async(n,r)=>{const c=n.getSidebar?.(n)||[];return k({actions:e,document:t,staticData:r,route:n},c)}}function k(e,t){const n=[];for(const r of t){r.type==="group"&&n.push(...k(e,r.items||[]));const c=w(e,r);c&&n.push(c)}return n}function w(e,t){const{actions:n,document:r,staticData:c,route:s}=e,f=A(t,r);if(!f)return null;const g=t.link||"",L=t.httpVerb||"",P={slug:s.slug,fsPath:s.fsPath},R=s.metadata||{},y=O(n,R);T(n,y);const o={id:g,url:g,text:m(f.description||"")+m(f.summary||""),title:m(f.title||""),httpMethod:L,facets:y,[d]:t[d]||c[d],[D]:s[D]||P};if(t.apiItemData?.type==="channel"){const x=t.apiItemData.id,u=r.channels?.[x];if(u){const i=[];if(u.parameters)for(const[l,p]of Object.entries(u.parameters)){const a={name:l,description:m(p.description||""),place:"channel parameters",mediaType:void 0,type:"string",required:!1,example:void 0,deepLink:`#${o.url.replace(s.slug+"/","").replace(/^\//,"")}/parameters&path=${l}`};i.push(a)}if(u.messages){const l=u.messages;if(l)for(const[p,a]of Object.entries(l)){const C={name:a.title||a.name||p,description:m(a.description||"")+m(a.summary||""),place:"message",mediaType:void 0,type:"unknown",deepLink:`#${o.url.replace(s.slug+"/","").replace(/^\//,"")}/messages&m=${p.toLocaleLowerCase()}`,required:!1,example:void 0,enum:void 0};if(i.push(C),a.payload){const h=S(a.payload,"message payload",o.url.replace(s.slug+"/","").replace(/^\//,""),p);i.push(...h)}if(a.headers){const h=S(a.headers,"message headers",o.url.replace(s.slug+"/","").replace(/^\//,""),p);i.push(...h)}}}i.length>0&&(o.parameters=i)}}return o}function A(e,t){const{apiItemData:n}=e;return n?.type?E(n,t):e.type==="group"&&e.label?F(e.label,t):I(t)}function E(e,t){switch(e.type){case"channel":return t.channels?.[e.id]||null;case"operation":return t.operations?.[e.id]||null}}function F(e,t){const n=t.components?.tags?.[e];return{description:n?.description||"",title:n?.name||e,summary:""}}function I(e){return{description:e.info?.description||"",title:e.info?.title||"",summary:""}}export{q as searchResolver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{writeFileSync as l}from"fs";import o from"path";import{dump as d}from"js-yaml";import{PUBLIC_API_DEFINITIONS_FOLDER as u,PUBLIC_STATIC_FOLDER as m}from"../../constants/common.js";import{logger as x}from"../../tools/notifiers/logger.js";import{ensureDir as g}from"../../utils/fs.js";const c=new Map;function _(
|
|
1
|
+
import{writeFileSync as l}from"fs";import o from"path";import{dump as d}from"js-yaml";import{PUBLIC_API_DEFINITIONS_FOLDER as u,PUBLIC_STATIC_FOLDER as m}from"../../constants/common.js";import{logger as x}from"../../tools/notifiers/logger.js";import{ensureDir as g}from"../../utils/fs.js";const c=new Map;function _(e,t,i){const r=u.slice(1);try{for(const s of e){const{documentWithReferences:f,relativePath:n}=s;if(c.get(n)!==i){if(n.startsWith(m+"/")){const a=o.posix.extname(n);p({outDir:t,definitionFolder:".",relativePath:n.replace(m+"/",""),definitionString:a===".json"?JSON.stringify(f,null,2):d(f)}),c.set(n,i);continue}p({outDir:t,definitionFolder:r,relativePath:F(n,".json"),definitionString:JSON.stringify(f,null,2)}),c.set(n,i)}}}catch(s){x.error("failed to store definition bundles",s)}}function F(e,t){const i=o.posix.dirname(e),r=o.posix.basename(e,o.posix.extname(e))+t;return o.posix.join(i,r)}function p({outDir:e,definitionString:t,relativePath:i,definitionFolder:r}){l(g(o.resolve(e,`${r}/${i}`)),t,"utf8")}export{F as replaceFileExtension,_ as storeDefinitionBundles};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { PageRouteDetails } from '../../types';
|
|
2
|
+
export default function getServerProps(_route: PageRouteDetails, data: {
|
|
3
|
+
props: any;
|
|
4
|
+
}, context: {
|
|
5
|
+
variables: {
|
|
6
|
+
idpAccessToken?: string;
|
|
7
|
+
};
|
|
8
|
+
}): Promise<any>;
|
|
4
9
|
//# sourceMappingURL=get-server-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REGISTRY_APIS_API_URL as
|
|
1
|
+
import{REGISTRY_APIS_API_URL as r}from"../../constants/common.js";import{logger as e}from"../../tools/notifiers/logger.js";let c=null;async function f(){try{const s=process.env.REGISTRY_API_KEY||"";if(!s){e.warnProd("Cannot fetch custom fields: API key not found in env");return}const i=await(await fetch(r+"?limit=5000&fields=id,contentPath,customFields",{headers:{Authorization:`Bearer ${s}`}})).json();c={};for(const o of i.items)c[o.contentPath]=o.customFields||{};e.info("Refreshed cached API fields")}catch(s){console.log("error",s),e.warnProd("Failed to refresh cached API fields: "+s.message)}}f(),setInterval(f,1e3*60*5);async function m(s,t,i){const o=process.env.REDOCLY_LOCAL_DEV_TOKEN||i.variables.idpAccessToken;if(!o)return e.warnProd("Cannot fetch custom fields: access token not found"),t.props||{};if(!r)return e.warnProd("Cannot fetch custom fields: API URL not found in env"),t.props||{};const u=c||await l();return{...t.props,customFields:u};async function l(){try{const n=await fetch(r+"?limit=5000&fields=id,contentPath,customFields",{headers:{Cookie:`accessToken=${o}`}});if(n.status!==200)return e.warnProd(`Failed to fetch custom fields. API response status: ${n.status}. Request URL: ${r}`),t.props;const p=await n.json(),a={};for(const d of p.items)a[d.contentPath]=d.customFields||{};return a}catch(n){return e.warnProd("Failed to fetch custom fields: "+n.message),{}}}}export{m as default};
|