@redocly/redoc 0.131.0-next.0 → 0.131.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +200 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +1 -1
- package/dist/cli/build/copy-env-files.js +1 -0
- package/dist/cli/{prepare → build}/index.d.ts +2 -2
- package/dist/cli/build/index.js +1 -0
- package/dist/cli/develop.js +1 -1
- package/dist/cli/eject/resolveTheme.d.ts +1 -1
- package/dist/cli/eject/resolveTheme.js +1 -1
- package/dist/cli/stats/collectors/{openapi.d.ts → openapi/index.d.ts} +2 -2
- package/dist/cli/stats/collectors/openapi/index.js +1 -0
- package/dist/cli/stats/collectors/openapi/oas32.d.ts +15 -0
- package/dist/cli/stats/collectors/openapi/oas32.js +1 -0
- package/dist/cli/stats/index.js +1 -1
- package/dist/cli/telemetry/index.js +1 -1
- package/dist/cli/utils/listen-stdin.d.ts +10 -0
- package/dist/cli/utils/listen-stdin.js +2 -0
- package/dist/client/App.js +1 -1
- package/dist/client/ErrorBoundary.js +1 -1
- package/dist/client/TestProvider.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/useSidebarItems.js +1 -1
- package/dist/client/app/hooks/index.d.ts +1 -0
- package/dist/client/app/hooks/index.js +1 -1
- package/dist/client/app/hooks/useAnchorPositioning.d.ts +6 -0
- package/dist/client/app/hooks/useAnchorPositioning.js +1 -0
- package/dist/client/app/hooks/useAutoScroll.js +1 -1
- package/dist/client/app/hooks/useRouteChangeTracker.js +1 -1
- 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/search/useAiSearch.js +1 -1
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/browser-entry.js +5 -5
- package/dist/client/constants/common.d.ts +2 -0
- package/dist/client/constants/common.js +1 -0
- package/dist/client/providers/hooks.js +1 -1
- package/dist/client/providers/theme/ThemeDataProvider.js +1 -1
- package/dist/client/runtime/loader.js +1 -1
- 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} +1 -1
- package/dist/client/templates/asyncapi-docs/template.js +11 -0
- 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/{server/plugins/openapi-docs/template/OpenAPIDocs.js → client/templates/openapi-docs/template.js} +1 -1
- 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 +2 -2
- 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/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.js +1 -0
- package/dist/{config → server/config}/env-schema.d.ts +9 -6
- package/dist/{config → server/config}/env-schemas/database.d.ts +1 -1
- package/dist/server/config/env-schemas/database.js +1 -0
- package/dist/{config → server/config}/env-schemas/environment-detection.d.ts +2 -2
- package/dist/{config → server/config}/env-schemas/organization-project.d.ts +3 -0
- package/dist/{config → server/config}/env-schemas/organization-project.js +1 -1
- package/dist/{config → server/config}/env-schemas/search.d.ts +2 -2
- package/dist/server/config/env-schemas/search.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 +0 -11
- package/dist/server/constants/plugins/catalog-entities.js +1 -1
- package/dist/server/constants/plugins/search.d.ts +0 -4
- package/dist/server/constants/plugins/search.js +1 -1
- package/dist/server/entitlements/entitlements-provider.js +1 -1
- package/dist/server/esbuild/esbuild-logger.js +1 -1
- package/dist/server/esbuild/esbuild.js +1 -1
- 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/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/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/browser-hooks.js +1 -1
- package/dist/server/plugins/analytics/segment/build-script.js +5 -2
- package/dist/server/plugins/analytics/segment/index.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 +37 -37
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-write-repository.js +1 -1
- 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.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/graphql-entities-extractor.js +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/plugin.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/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/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/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/docs-mcp/tools/docs-mcp-tool.d.ts +1 -0
- package/dist/server/plugins/mcp/docs-mcp/tools/docs-mcp-tool.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/search.d.ts +3 -2
- package/dist/server/plugins/mcp/docs-mcp/tools/search.js +6 -1
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/handlers/handle-mcp-request.js +1 -1
- package/dist/server/plugins/mcp/servers/docs-server.d.ts +3 -1
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/types.d.ts +7 -0
- package/dist/server/plugins/openapi-docs/index.js +1 -1
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +29 -29
- package/dist/server/plugins/openapi-docs/search-indexer.js +1 -1
- package/dist/server/plugins/scorecard-classic/get-scorecard-config.d.ts +1 -1
- package/dist/server/plugins/scorecard-classic/index.js +1 -1
- package/dist/server/plugins/scorecard-classic/lint.js +1 -1
- package/dist/server/plugins/scorecards/database/scorecards-config-service.js +1 -1
- package/dist/server/plugins/scorecards/plugin.js +1 -1
- package/dist/server/plugins/scorecards/workers/run-scorecards-worker.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 +1 -1
- 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.js +2 -2
- package/dist/server/plugins/sso/index.js +1 -1
- 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-preconnect-service.js +1 -1
- package/dist/server/providers/database/databases/sqld-sqlite/drizzle.config.js +1 -1
- 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 +1 -1
- package/dist/server/store.d.ts +1 -1
- package/dist/server/store.js +1 -1
- package/dist/server/telemetry/index.js +1 -1
- package/dist/server/tools/notifiers/formatter.js +1 -1
- package/dist/server/tools/notifiers/helpers/colors.js +1 -1
- package/dist/server/tools/notifiers/logger.js +1 -1
- package/dist/server/tools/notifiers/reporter.d.ts +0 -1
- package/dist/server/tools/notifiers/reporter.js +6 -7
- package/dist/server/tools/notifiers/terminal-manager.js +5 -4
- package/dist/server/types/plugins/markdown.d.ts +0 -7
- 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/load-env-variables.js +1 -1
- package/dist/server/utils/fs.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.d.ts +2 -2
- package/dist/server/utils/lifecycle-hooks.js +1 -1
- 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/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/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.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/auth.js +1 -1
- 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-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/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/workers/worker-pool.js +1 -1
- package/dist/{server/utils → utils}/slugger.d.ts +13 -0
- package/package.json +13 -13
- package/dist/cli/prepare/copy-env-files.js +0 -1
- package/dist/cli/prepare/index.js +0 -1
- package/dist/cli/stats/collectors/openapi.js +0 -1
- 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/config/env-config.js +0 -1
- package/dist/config/env-schemas/database.js +0 -1
- package/dist/config/env-schemas/search.js +0 -1
- package/dist/server/plugins/asyncapi-docs/template/AsyncApiDocs.js +0 -11
- package/dist/server/plugins/asyncapi-docs/template/helpers.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/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/cli/{prepare → build}/analytics/collect-analytics.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collect-analytics.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-api-functions-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-api-functions-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-async-api-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-async-api-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-config-stats-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-config-stats-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-file-extensions-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-file-extensions-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-frontmatter-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-frontmatter-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-markdoc-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-markdoc-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-nested-configs-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-nested-configs-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-refs-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-refs-usage.js +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-theme-folder-usage.d.ts +0 -0
- /package/dist/cli/{prepare → build}/analytics/collectors/get-theme-folder-usage.js +0 -0
- /package/dist/cli/{prepare → build}/copy-env-files.d.ts +0 -0
- /package/dist/cli/{prepare → build}/libsql/copy-prebuilt-binary.d.ts +0 -0
- /package/dist/cli/{prepare → build}/libsql/copy-prebuilt-binary.js +0 -0
- /package/dist/cli/{prepare → build}/libsql/get-current-platform.d.ts +0 -0
- /package/dist/cli/{prepare → build}/libsql/get-current-platform.js +0 -0
- /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}/helpers.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/{config → server/config}/env-config.d.ts +0 -0
- /package/dist/{config → server/config}/env-schema.js +0 -0
- /package/dist/{config → server/config}/env-schemas/api-urls.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/api-urls.js +0 -0
- /package/dist/{config → server/config}/env-schemas/auth.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/auth.js +0 -0
- /package/dist/{config → server/config}/env-schemas/catalog.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/catalog.js +0 -0
- /package/dist/{config → server/config}/env-schemas/environment-detection.js +0 -0
- /package/dist/{config → server/config}/env-schemas/feature-flags.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/feature-flags.js +0 -0
- /package/dist/{config → server/config}/env-schemas/scorecards.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/scorecards.js +0 -0
- /package/dist/{config → server/config}/env-schemas/server-config.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/server-config.js +0 -0
- /package/dist/{config → server/config}/env-schemas/site.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/site.js +0 -0
- /package/dist/{config → server/config}/env-schemas/ssr.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/ssr.js +0 -0
- /package/dist/{config → server/config}/env-schemas/telemetry.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/telemetry.js +0 -0
- /package/dist/{config → server/config}/env-schemas/test.d.ts +0 -0
- /package/dist/{config → server/config}/env-schemas/test.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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Source as m}from"@redocly/openapi-core";import g from"node:fs/promises";import d from"node:path";import{withPathPrefix as S,getPathPrefix as h,combineUrls as E}from"@redocly/theme/core/utils";import{OPENAPI_SHARED_DATA_PREFIX as P}from"../../constants/plugins/openapi-docs.js";import{CATALOG_BASE_SLUG as y,
|
|
1
|
+
import{Source as m}from"@redocly/openapi-core";import g from"node:fs/promises";import d from"node:path";import{withPathPrefix as S,getPathPrefix as h,combineUrls as E}from"@redocly/theme/core/utils";import{OPENAPI_SHARED_DATA_PREFIX as P}from"../../constants/plugins/openapi-docs.js";import{CATALOG_BASE_SLUG as y,CATALOG_SLUGS as _}from"../../../constants/catalog-entities.js";import{CATALOG_ENTITIES_FILES_REGEX as I}from"../../constants/plugins/catalog-entities.js";import{removeTrailingSlash as T}from"../../../utils/url/remove-trailing-slash.js";import{normalizeRouteSlug as U}from"../../../utils/path/normalize-route-slug.js";import{promiseMapLimit as $}from"../../utils/async/promise-map-limit.js";import{getRoutesByLines as R,getPointerPosition as q}from"../../plugins/openapi-docs/ast-utils.js";import{readSharedData as j}from"../../utils/index.js";function X(o){return async t=>{const s=await t.req.json(),n=decodeURI(T(s.split("?")[0])),[e]=n.split("#"),u=h(),a=U(e.slice(u.length)),l=a.startsWith(y)?y:a,r=o.getRouteBySlug(l);if(r&&o.getRouteByFsPath(r.fsPath)?.metadata?.type==="openapi"){const c=await j(`${P}${r.fsPath}`,o.outdir),i=Object.keys(c.routesMapping).find(p=>E(r.baseSlug,c.routesMapping[p])===n);if(!c.sourcePath)return t.json({route:r},200);let f;if(i){const p=d.join(o.contentDir,r.fsPath),b=await g.readFile(p,"utf-8"),L=new m(p,b);f=q(i,L)}return t.json({route:{fsPath:r.fsPath,pointer:i,position:f}},200)}return t.json({route:r},200)}}function k(o){return async t=>{const s=await t.req.json(),n=await $(s,5,async e=>A(e,o));return t.json({routes:n},200)}}function J(o){return async t=>{const s=await t.req.json(),n=await A(s,o);return t.json(n,200)}}function K(o){return async t=>{const s=(t.req.query("lines")||"").split(",").map(a=>parseInt(a)),n=t.req.query("file");if(!n)return t.json("No data",400);const e=await j(`${P}${n}`,o.outdir),u=d.join(o.contentDir,n);try{const a=await g.readFile(u,"utf-8");if(!e)return t.json("No data",400);const l=new m(u,a),r=R(s,l,e.routesMapping,e.baseSlug);return t.json(r,200)}catch{return t.json("No data",400)}}}async function A(o,t){const[s,n]=o.split(":");if(I.test(s))return{route:{slug:`${y}/${_.ALL}`}};let e=t.getRouteByFsPath(s);if(e?.metadata?.type==="openapi"){const l=await j(`${P}${s}`,t.outdir);if(l?.sourcePath){const r=d.join(t.contentDir,e.fsPath),w=await g.readFile(r,"utf-8"),c=new m(r,w),i=R([parseInt(n,10)],c,l.routesMapping,e.baseSlug);if(i.length)return{route:{slug:h()?S(i[0]):i[0],filePath:o}}}}const u=e?.slug?h()?S(e?.slug):e?.slug:"";return{route:{...e,pageName:e?await e?.getNavText?.():"",slug:u,filePath:o}}}export{K as getRoutesByLineHandler,J as resolvePathHandler,k as resolvePathsHandler,X as resolveSlugHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{withPathPrefix as p}from"@redocly/theme/core/utils";import{SEMANTIC_SEARCH_API_URL as r}from"../../constants/common.js";function l(u){return async e=>{if(!r)return e.newResponse(null,404);const n=e.get("auth"),o={"Content-Type":"application/json"};n.idpAccessToken&&(o.Cookie=`accessToken=${n.idpAccessToken}`);const a=await e.req.json();try{const t=await fetch(r,{method:"POST",body:JSON.stringify(a),headers:o});if(t.ok){const c=(await t.json()).documents.map(s=>({...s,url:p(s.url)}));return e.json(c)}const i=await t.text();return e.newResponse(i,t.status,{"Content-Type":"application/json"})}catch(t){return e.json({error:"Failed to fetch semantic search results",details:String(t)},500)}}}export{l as semanticSearchHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"workerpool";import{envConfig as l}from"
|
|
1
|
+
import s from"workerpool";import{envConfig as l}from"../config/env-config.js";import{fromCurrentDir as n}from"../utils/paths.js";class f{#t=null;#o;constructor(o){this.#o=o,this.#o.lazy||(this.#t=this.#i())}#i(){const{workerScript:o,lazy:e,...i}=this.#o;let t=o;return!t.endsWith(".js")&&!t.endsWith(".mjs")&&(t=n(import.meta.url,`${t}.${l.isDevelopMode?"js":"mjs"}`)),s.pool(t,{...i})}#r(){return this.#t||(this.#t=this.#i()),this.#t}async exec(o,e,i){let r=this.#r().exec(o,e);return i?.timeout&&(r=r.timeout(i.timeout)),await r}async terminate(){this.#t&&(await this.#t.terminate(),this.#t=null)}}export{f as WorkerPool};
|
|
@@ -18,6 +18,19 @@ export declare class GithubSlugger {
|
|
|
18
18
|
reset(): void;
|
|
19
19
|
}
|
|
20
20
|
export declare const slugger: GithubSlugger;
|
|
21
|
+
/**
|
|
22
|
+
* Converts a string to a URL-safe slug (no uniqueness; use `slugger.slug` for unique slugs).
|
|
23
|
+
*
|
|
24
|
+
* @param value - The string to slugify.
|
|
25
|
+
* @param options - Options for case, dots, and slashes.
|
|
26
|
+
* @returns The slugified string, or '_' if empty after slugifying.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* slug('Hello World'); // 'hello-world'
|
|
31
|
+
* slug('v1.0', { replaceDots: true }); // 'v10'
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
21
34
|
export declare function slug(value: string, options?: SluggerOptions): string;
|
|
22
35
|
export {};
|
|
23
36
|
//# sourceMappingURL=slugger.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/redoc",
|
|
3
|
-
"version": "0.131.0-next.
|
|
3
|
+
"version": "0.131.0-next.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@opentelemetry/sdk-trace-node": "2.0.1",
|
|
29
29
|
"@opentelemetry/sdk-trace-web": "2.0.1",
|
|
30
30
|
"@opentelemetry/semantic-conventions": "1.34.0",
|
|
31
|
-
"@redocly/ajv": "8.
|
|
32
|
-
"@redocly/openapi-core": "2.
|
|
31
|
+
"@redocly/ajv": "8.18.0",
|
|
32
|
+
"@redocly/openapi-core": "2.20.3",
|
|
33
33
|
"@shikijs/transformers": "3.21.0",
|
|
34
34
|
"@tanstack/react-query": "5.62.3",
|
|
35
35
|
"@tanstack/react-table": "8.21.3",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"flexsearch": "0.7.43",
|
|
54
54
|
"graphql": "16.9.0",
|
|
55
55
|
"gray-matter": "4.0.3",
|
|
56
|
-
"hono": "4.11.
|
|
56
|
+
"hono": "4.11.10",
|
|
57
57
|
"htmlparser2": "8.0.2",
|
|
58
58
|
"i18next": "22.4.15",
|
|
59
59
|
"is-glob": "4.0.3",
|
|
60
60
|
"js-yaml": "4.1.1",
|
|
61
61
|
"lru-cache": "11.1.0",
|
|
62
|
-
"minimatch": "
|
|
62
|
+
"minimatch": "10.2.1",
|
|
63
63
|
"mri": "1.2.0",
|
|
64
64
|
"nanoid": "5.0.9",
|
|
65
65
|
"node-fetch": "3.3.1",
|
|
66
66
|
"nprogress": "0.2.0",
|
|
67
|
-
"openapi-sampler": "1.
|
|
67
|
+
"openapi-sampler": "1.7.0",
|
|
68
68
|
"os-browserify": "0.3.0",
|
|
69
69
|
"path-browserify": "1.0.1",
|
|
70
70
|
"picomatch": "2.3.1",
|
|
@@ -91,14 +91,14 @@
|
|
|
91
91
|
"xpath": "0.0.34",
|
|
92
92
|
"yaml-ast-parser": "0.0.43",
|
|
93
93
|
"zod": "^3.25.76",
|
|
94
|
-
"@redocly/asyncapi-docs": "1.8.0-next.
|
|
95
|
-
"@redocly/config": "0.
|
|
96
|
-
"@redocly/graphql-docs": "1.8.0-next.
|
|
97
|
-
"@redocly/openapi-docs": "3.19.0-next.
|
|
94
|
+
"@redocly/asyncapi-docs": "1.8.0-next.7",
|
|
95
|
+
"@redocly/config": "0.44.0",
|
|
96
|
+
"@redocly/graphql-docs": "1.8.0-next.5",
|
|
97
|
+
"@redocly/openapi-docs": "3.19.0-next.7",
|
|
98
98
|
"@redocly/portal-legacy-ui": "0.14.0-next.0",
|
|
99
|
-
"@redocly/portal-plugin-mock-server": "0.16.0-next.
|
|
100
|
-
"@redocly/realm-asyncapi-sdk": "0.9.0-next.
|
|
101
|
-
"@redocly/theme": "0.63.0-next.
|
|
99
|
+
"@redocly/portal-plugin-mock-server": "0.16.0-next.7",
|
|
100
|
+
"@redocly/realm-asyncapi-sdk": "0.9.0-next.3",
|
|
101
|
+
"@redocly/theme": "0.63.0-next.4"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"react": "^19.2.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"node:path";import{copyFileSync as v,existsSync as s,mkdirSync as u}from"node:fs";import{envConfig as c}from"../../config/env-config.js";import{logger as l}from"../../server/tools/notifiers/logger.js";import{sanitizeBranchName as a}from"../../server/utils/envs/sanitize-branch-name.js";const F=n=>{const i=f();s(n.serverOutDir)||u(n.serverOutDir,{recursive:!0});const e=[];for(const o of i){const r=t.join(n.contentDir,o);if(!s(r))continue;const p=t.join(n.serverOutDir,o);v(r,p),e.push(o)}e.length>0&&l.info(`Env files included in bundle: ${e.map(()=>"%rp").join(", ")}`,...e)},f=()=>{const n=c.redoclyEnv,i=c.PUBLIC_REDOCLY_BRANCH_NAME,e=[".env"];switch(i&&e.push(`.env.branch.${a(i)}`),n){case"production":e.push(".env.production");break;case"preview":e.push(".env.preview");break;default:e.push(".env.development");break}return e};export{F as copyEnvFiles};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import T from"node:path";import{unlink as h}from"node:fs/promises";import{writeFileSync as y}from"node:fs";import{envConfig as S}from"../../config/env-config.js";import{PORTAL_VERSION as A}from"../../server/version.js";import{logger as e}from"../../server/tools/notifiers/logger.js";import{reporter as b}from"../../server/tools/notifiers/reporter.js";import{shutdowner as O}from"../../server/tools/shutdowner.js";import{promiseMapLimit as D}from"../../server/utils/async/promise-map-limit.js";import{validateReactPages as E}from"../../server/plugins/pages/validators/validate-react-pages.js";import{ensureDir as v}from"../../server/utils/index.js";import{initPlugins as M,runPlugins as _,writeClientEntries as x}from"../../server/plugins/lifecycle.js";import{createClientCompiler as L,createNodeBundleCompiler as J}from"../../server/esbuild/esbuild.js";import{validateAllMarkdowns as j}from"../../server/plugins/markdown/compiler.js";import{copyEnvFiles as k}from"./copy-env-files.js";import{EsbuildError as l,esbuildLogger as p}from"../../server/esbuild/esbuild-logger.js";import{reportAllErrors as F}from"../../server/utils/report-all-errors.js";import{collectAnalytics as U}from"./analytics/collect-analytics.js";import{copyMigrationsFolder as z}from"../../server/providers/database/copy-migrations.js";import{telemetry as c}from"../telemetry/index.js";import{telemetryTraceStep as m}from"../telemetry/helpers/trace-step.js";async function si(C,i){c.initialize(A),e.info("Starting project build.");const P=e.startTiming();await m("build.start",async R=>{x(i);const d=await L(i,i.outdir,"production"),u=await J(i,i.serverOutDir,"production");let n,f;try{await m("build.client_compilation",async()=>{const s=e.startTiming(),o=await d.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Client JavaScript compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.server_compilation",async()=>{const s=e.startTiming(),o=await u.rebuild().catch(a=>{throw new l(a)});Array.isArray(o.warnings)&&p(new l({warnings:o.warnings}));const r=e.infoTime(s,"Server JavaScript compiled");r&&c.sendTimingPerformedMessage({message:r.message,timeMs:r.timeMs})}),await i.reloadMarkdocOptions();let t;({pluginInstances:t,lifecycleContext:n}=await M({outdir:i.outdir,serverOutDir:i.serverOutDir,contentDir:i.contentDir,devLogin:C.devLogin,setGlobalConfig:i.setGlobalConfig})),n.fs.dispose(),i.lifecycleContext=n,z(i),await _(t,i,n),f=U(i,n),await m("build.client_server_recompile",async()=>{const s=e.startTiming();e.info("Re-compiling JavaScript with user code"),(await Promise.all([d.rebuild(),u.rebuild()]).catch(a=>{throw new l(a)})).forEach(({warnings:a})=>{Array.isArray(a)&&p(new l({warnings:a}))});const r=e.infoTime(s,"JavaScript re-compiled");r&&c.sendTimingPerformedMessage(r)}),await m("build.pages_validation",async()=>{await E(i,n),await j(i,n)}),await F(n),i.markUserCodeReady()}catch(t){R?.error(t),t instanceof l&&p(t)}finally{f&&await f.catch(()=>{}),await d.dispose(),await u.dispose()}b.printErrors(),e.info("Rendering pages..."),await m("build.prepare_static_data",async t=>{const s=e.startTiming(),o=[...i.getAllRoutes(),...i.getAllApiRoutes()];t?.setAttribute("totalRoutes",o.length.toString()),await D(o,15,a=>i.writeRouteStaticData(a,n));const r=e.successTime(s,"Page static data prepared.");r&&c.sendTimingPerformedMessage(r)}),await m("build.store_serialization",async()=>{const t=e.startTiming();v(i.serverOutDir),y(T.join(i.serverOutDir,"store.json"),JSON.stringify(await i.toJson())),e.successTime(t,"Store serialized and written."),k(i)});const g=S.REDOCLY_PROBLEMS_OUTPUT_FILE;if(g){const t=e.startTiming();y(v(g),JSON.stringify(b.getProblems()),"utf-8"),e.successTime(t,"Broken links written.")}await h(T.join(i.serverOutDir,"index.css"));const w=e.successTime(P,"All done");w&&c.sendTimingPerformedMessage(w)}),await O.exitWithCode(0)}export{si as prepare};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{detectSpec as m,getTypes as f,normalizeTypes as d,normalizeVisitors as u,resolveDocument as w,BaseResolver as h,Stats as S,walkDocument as y}from"@redocly/openapi-core";import{logger as l}from"../../../server/tools/notifiers/logger.js";import{telemetryTraceStep as g}from"../../telemetry/helpers/trace-step.js";import{telemetry as D}from"../../telemetry/index.js";const t={refs:{metric:"References",total:0,color:"red",items:new Set},externalDocs:{metric:"External Documents",total:0,color:"magenta"},schemas:{metric:"Schemas",total:0,color:"white"},parameters:{metric:"Parameters",total:0,color:"yellow",items:new Set},links:{metric:"Links",total:0,color:"cyan",items:new Set},pathItems:{metric:"Path Items",total:0,color:"green"},webhooks:{metric:"Webhooks",total:0,color:"green"},operations:{metric:"Operations",total:0,color:"yellow"},tags:{metric:"Tags",total:0,color:"white",items:new Set}};async function x(a,r){await g("stats.openapi",async()=>{l.info("OpenAPI collector: start processing documents...");const s=(await a.cache.load(".","load-oas-docs")).data,e=[];for(const o of s)if(!o.isVirtual){const n=await b(o);e.push(n)}D.sendStatsOpenapiCollectedMessage([{object:"openapi_stats",openapiStats:e.map(o=>JSON.stringify(o))}]),r||console.table(e),l.info("OpenAPI collector: openapi docments processing completed.")})}async function b(a){const r=a.definition,s=m(r),e=d(f(s)),o=u([{severity:"warn",ruleId:"openapi_stats",visitor:S(t)}],e),n={problems:[],specVersion:s,visitorsData:{}},c={source:{absoluteRef:""},parsed:r},i=e.Root;if(!i)throw new Error("Root type not found in OpenAPI spec types");const p=await w({rootDocument:c,rootType:i,externalRefResolver:new h});return y({rootType:i,normalizedVisitors:o,resolvedRefMap:p,document:c,ctx:n}),{path:a.relativePath,refs:t.refs.total,externalDocs:t.externalDocs.total,schemas:t.schemas.total,parameters:t.parameters.total,links:t.links.total,pathItems:t.pathItems.total,webhooks:t.webhooks.total,operations:t.operations.total,tags:t.tags.total,version:s}}export{x as collectOpenapiDocumentsStatistics};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import r from"react";import l from"styled-components";import{WarningFilledIcon as m}from"@redocly/theme/icons/WarningFilledIcon/WarningFilledIcon";import{Button as f}from"@redocly/theme/components/Button/Button";import{DetailedErrors as h}from"./DetailedErrors";import{useSocketMessages as v}from"../../runtime/useSocketMessages";const E="errors-updated",k=99,N=()=>{const[e,s]=r.useState([]),[i,a]=r.useState(!1);v(E,n=>s(n.errors));const o=r.useMemo(()=>{const n=e.filter(t=>t.type==="BROKEN_LINK"),p=e.filter(t=>t.type==="MARKDOC"),g=e.filter(t=>t.type!=="BROKEN_LINK"&&t.type!=="MARKDOC");return{brokenLinks:n,markdocErrors:p,otherErrors:g}},[e]);if(!e.length)return null;const c=o.markdocErrors.length?r.createElement("span",null,"(",o.markdocErrors.length," markdoc)"):null,b=o.brokenLinks.length?r.createElement("span",null,"(",o.brokenLinks.length," broken links) "):null,u=o.otherErrors.length?r.createElement("span",null,"(",o.otherErrors.length," other) "):null;if(i)return r.createElement(h,{onHide:()=>a(!1),problems:e});const d=e.length>k?r.createElement(m,{color:"currentColor"}):r.createElement(x,null,r.createElement("span",null,e.length));return r.createElement(w,null,r.createElement(f,{tone:"danger",variant:"primary",size:"large","aria-label":"Show detailed error message",icon:d,onClick:()=>a(!0)},r.createElement(y,null,"Problems:",c,b,u)))},x=l.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
width: 26px;
|
|
6
|
-
height: 26px;
|
|
7
|
-
border-radius: 50%;
|
|
8
|
-
background-color: currentcolor;
|
|
9
|
-
font-size: 16px;
|
|
10
|
-
font-weight: bold;
|
|
11
|
-
|
|
12
|
-
> span {
|
|
13
|
-
color: var(--text-color-on-color);
|
|
14
|
-
}
|
|
15
|
-
`,y=l.div`
|
|
16
|
-
display: flex;
|
|
17
|
-
gap: var(--error-bubble-gap);
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
padding: 0;
|
|
20
|
-
font-size: var(--error-card-font-size);
|
|
21
|
-
color: var(--text-color-on-color);
|
|
22
|
-
`,w=l.div`
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: row;
|
|
25
|
-
align-items: center;
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: calc(var(--navbar-height) + 20px);
|
|
28
|
-
right: 0;
|
|
29
|
-
|
|
30
|
-
transition:
|
|
31
|
-
transform 0.2s ease-in-out,
|
|
32
|
-
opacity 0.2s ease-in-out;
|
|
33
|
-
|
|
34
|
-
transform: translateX(calc(100% - (24px + var(--spacing-sm) + var(--button-gap))));
|
|
35
|
-
width: fit-content;
|
|
36
|
-
|
|
37
|
-
&:hover {
|
|
38
|
-
transform: translateX(0);
|
|
39
|
-
opacity: 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
text-overflow: var(--error-bubble-text-overflow);
|
|
43
|
-
font-family: var(--error-bubble-font-family);
|
|
44
|
-
z-index: var(--error-bubble-z-index);
|
|
45
|
-
|
|
46
|
-
&& button {
|
|
47
|
-
--button-icon-size: 24px;
|
|
48
|
-
--button-font-size: var(--error-bubble-font-size);
|
|
49
|
-
--button-icon-left-padding: var(--error-bubble-padding);
|
|
50
|
-
--button-bg-color-primary-danger: var(--error-bubble-bg-color);
|
|
51
|
-
--button-bg-color-primary-danger-hover: var(--error-bubble-bg-color-hover);
|
|
52
|
-
--button-bg-color-primary-danger-pressed: var(--error-bubble-bg-colorpressed);
|
|
53
|
-
--button-content-color-danger: var(--error-bubble-content-color);
|
|
54
|
-
--button-content-color-danger-hover: var(--error-bubble-content-color-hover);
|
|
55
|
-
--button-content-color-danger-pressed: var(--error-bubble-content-color-pressed);
|
|
56
|
-
border-top-right-radius: 0;
|
|
57
|
-
border-bottom-right-radius: 0;
|
|
58
|
-
}
|
|
59
|
-
`;export{N as ErrorBubble};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import t from"react";import e from"styled-components";import{useSocketMessages as s}from"../../runtime/useSocketMessages";const l="pages-updated";function v(){const[a,o]=t.useState(0);return s(l,i=>o(i.pages)),a?t.createElement(g,null,t.createElement(c,{title:"Total number of pages in documentation"},t.createElement(n,null,"pages"),t.createElement(p,null,a),t.createElement(r,null,"pages"))):null}const r=e.span`
|
|
2
|
-
font-weight: var(--font-weight-regular);
|
|
3
|
-
font-size: var(--font-size-sm);
|
|
4
|
-
opacity: 0;
|
|
5
|
-
transition: opacity 0.2s ease-in-out;
|
|
6
|
-
margin-left: var(--spacing-xxs);
|
|
7
|
-
`,p=e.span`
|
|
8
|
-
font-weight: var(--font-weight-bold);
|
|
9
|
-
font-size: var(--font-size-lg);
|
|
10
|
-
margin-left: var(--spacing-base);
|
|
11
|
-
`,n=e.span`
|
|
12
|
-
font-size: 0.7em;
|
|
13
|
-
writing-mode: vertical-rl;
|
|
14
|
-
text-orientation: mixed;
|
|
15
|
-
transform: rotate(180deg);
|
|
16
|
-
text-transform: uppercase;
|
|
17
|
-
letter-spacing: 0.5px;
|
|
18
|
-
opacity: 0.9;
|
|
19
|
-
margin-bottom: var(--spacing-xxs);
|
|
20
|
-
position: absolute;
|
|
21
|
-
left: var(--spacing-xxs);
|
|
22
|
-
top: 50%;
|
|
23
|
-
transform: translateY(-50%) rotate(180deg);
|
|
24
|
-
`,c=e.div`
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: var(--spacing-xs);
|
|
28
|
-
background: var(--color-blue-6);
|
|
29
|
-
color: var(--text-color-on-color);
|
|
30
|
-
padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);
|
|
31
|
-
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
32
|
-
font-size: var(--font-size-base);
|
|
33
|
-
box-shadow: var(--bg-raised-shadow);
|
|
34
|
-
min-height: 48px;
|
|
35
|
-
width: 100%;
|
|
36
|
-
min-width: 120px;
|
|
37
|
-
|
|
38
|
-
&:hover {
|
|
39
|
-
filter: brightness(0.85);
|
|
40
|
-
}
|
|
41
|
-
`,g=e.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
align-items: center;
|
|
45
|
-
position: fixed;
|
|
46
|
-
top: calc(var(--navbar-height) + 70px);
|
|
47
|
-
right: 0;
|
|
48
|
-
transform: translateX(calc(100% - 18px));
|
|
49
|
-
transition: all 0.3s ease-in-out;
|
|
50
|
-
z-index: var(--z-index-popover);
|
|
51
|
-
min-width: 120px;
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
transform: translateX(0);
|
|
55
|
-
|
|
56
|
-
${r} {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
${n} {
|
|
61
|
-
opacity: 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`;export{v as PageCounter};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{readEnvVariable as u}from"../server/utils/envs/read-env-variable.js";import{envSchema as c}from"./env-schema.js";function o(){const n=Object.fromEntries(Object.keys(process.env).map(e=>[e,u(e)]));return c.parse(n)}function r(){return o().REDOCLY_ENV??"development"}function i(){const n=process.env.REDOCLY_EXECUTION_MODE;return n==="build"||n==="develop"||n==="runtime"?n:"develop"}function s(){const e=o().REDOCLY_INTERNAL_DEV;return e==="true"||e==="1"}function v(n){switch(n){case"redoclyEnv":return r();case"executionMode":return i();case"isProductionEnv":return r()==="production";case"isPreviewEnv":return r()==="preview";case"isReunite":{const e=r(),t=s();return e==="production"||e==="preview"||e==="development"&&!t}case"isBuildMode":return i()==="build";case"isDevelopMode":return i()==="develop";case"isRuntimeMode":return i()==="runtime";default:return n}}const d=new Set(["redoclyEnv","executionMode","isProductionEnv","isPreviewEnv","isReunite","isBuildMode","isDevelopMode","isRuntimeMode"]),E=Object.freeze(new Proxy({},{get(n,e){if(typeof e!="string")return;const t=e;return d.has(t)?v(t):o()[e]}}));export{E as envConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as o}from"zod";const A=o.object({SQLD_REMOTE_DATABASE_URL:o.string().url().optional(),SQLD_REMOTE_DATABASE_AUTH_TOKEN:o.string().optional()});export{A as databaseSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as o}from"zod";const t=o.object({SEARCH_DEV_REINIT:o.string().optional(),SEARCH_DEV_DEBUG:o.enum(["true","false"]).optional(),TYPESENSE_API_URL:o.string().url().optional(),TYPESENSE_API_KEY:o.string().optional()});export{t as searchSchema};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import l from"styled-components";import*as o from"react";import{RedoclyAsyncAPIDocs as d}from"@redocly/asyncapi-docs";import{withPathPrefix as m}from"@redocly/theme/core/utils";import{usePageSharedData as p}from"../../../../client/app/hooks";import{useCollectMarkdocOptions as f}from"./helpers";function h({pageProps:t}){const a=p("AsyncApiDefinition"),{document:i,apiItems:r,protocol:e,downloadUrls:n}=a,c=m(t?.settings?.baseUrlPath),s=f(t);return o.createElement(u,null,o.createElement(d,{pageProps:t,document:i,apiItems:r,routingBasePath:c,protocol:e,downloadUrls:n,markdocOptions:s}))}const u=l.div`
|
|
2
|
-
a[id],
|
|
3
|
-
a[data-section-id],
|
|
4
|
-
div[data-section-id] {
|
|
5
|
-
scroll-margin-top: calc(
|
|
6
|
-
var(--navbar-height) + var(--banner-height) + var(--panel-gap-vertical)
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
--sidebar-width: 0px;
|
|
11
|
-
`;export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useMemo as t}from"react";import{components as s}from"@redocly-markdoc/components";import{tags as m,components as r}from"@redocly/theme/markdoc/default";import*as n from"../../markdown/markdoc/custom-components/index.js";import*as e from"../../markdown/markdoc/nodes/index.js";import p from"../../markdown/markdoc/tags/index.js";import{parsePartials as a}from"../../openapi-docs/template/helpers.js";function C({markdown:o}){return t(()=>({tags:{...p,...m},nodes:{...e},components:{...n,...r,...s,...globalThis.__LOADER.markdocComponents},...o,partials:a(o?.partials)}),[o])}export{C as useCollectMarkdocOptions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as s from"react";import{loadScriptFromReactAsync as l,loadScriptFromReactSync as i}from"../../../../../client/ScriptLoader";function u(n){let r=!1;const{children:c,src:e,async:o,...t}=n;return typeof document<"u"&&(r=!!(e?document.querySelector(`script[src="${e}"]`):null)),s.useEffect(()=>{r||(e?o?l(e,t):i(e,!1,t):c&&i(c.toString(),!0,t))},[e]),null}export{u as HtmlScript};
|
package/dist/server/plugins/markdown/markdoc/custom-components/openapi/openapi-code-sample.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as o from"react";import{StoreProvider as v,RequestSamples as y,normalizeOptions as E}from"@redocly/openapi-docs";import{ErrorMessage as O,OpenApiComponentWrap as M}from"../styled.elements";import{useStore as b}from"../../hooks/use-store";import{getOperation as C}from"./get-operation/index";import{getMockServerDocsConfig as k}from"../../../../openapi-docs/template/mock-server-config.js";function P(u){const{descriptionFile:d,operationId:a,pointer:m,exampleKey:s,mimeType:l,language:r,requestBody:f,parameters:g,environment:t,environments:n}=u,{store:e,error:S,baseSlug:c}=b(d),i=o.useMemo(()=>({...e?.options,...(r||null)&&{codeSamples:{languages:[{lang:r??""}]},mockServer:k(e?.options?.mockServer,c||"")}}),[r,e?.options,c]),p=o.useMemo(()=>{if(e)return C(e,{operationId:a,pointer:m},E(i),{exampleKey:s,mimeType:l,environments:n,environment:t})},[s,i,l,a,m,e,n,t]);return e?p?o.createElement(M,{"data-testid":"openapi-code-sample"},o.createElement(v,{options:i,definition:e.definition,withState:{environments:n,environment:t,operation:{pointer:p.pointer,state:{requestValues:{body:f,...g}}}}},o.createElement(y,{operation:p,disableFooter:!0}))):o.createElement("pre",{style:{color:"red"}},"Cannot find OpenAPI operation by operationId or pointer"):o.createElement(O,null,S)}export{P as OpenApiCodeSample};
|
package/dist/server/plugins/markdown/markdoc/custom-components/openapi/openapi-response-sample.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{StoreProvider as S,ResponseSamples as v,normalizeOptions as g}from"@redocly/openapi-docs";import{ErrorMessage as b,OpenApiComponentWrap as E}from"../styled.elements";import{useStore as R}from"../../hooks/use-store";import{getOperation as C}from"./get-operation/index";import{getMockServerDocsConfig as O}from"../../../../openapi-docs/template/mock-server-config.js";function x(a){const{descriptionFile:m,operationId:i,pointer:p,exampleKey:t}=a,{store:o,error:c,baseSlug:s}=R(m),[l,f]=e.useState(),r=e.useMemo(()=>({...o?.options,mockServer:O(o?.options?.mockServer,s||"")}),[o?.options,s]),n=e.useMemo(()=>{if(o)return C(o,{operationId:i,pointer:p},g(r),{exampleKey:t})},[t,r,i,p,o]),d=e.useCallback(u=>{f(u)},[]);return o?n?e.createElement(E,{"data-testid":"openapi-response-sample"},e.createElement(S,{options:r,definition:o.definition,withState:{operation:{pointer:n.pointer,state:{activeExampleName:t}}}},e.createElement(v,{operation:n,activeResponseTab:l,onTabChange:d}))):e.createElement("pre",{style:{color:"red"}},"Cannot find OpenAPI operation by operationId or pointer"):e.createElement(b,null,c)}export{x as OpenApiResponseSample};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"react";import{EmbeddedReplay as E,StoreProvider as M}from"@redocly/openapi-docs";import{useLocation as b}from"react-router-dom";import{Admonition as k}from"@redocly/theme/markdoc/components/Admonition/Admonition";import{ErrorMessage as A,OpenApiComponentWrap as I}from"../styled.elements.js";import{useStore as P}from"../../hooks/use-store.js";import{getOperation as x}from"./get-operation/index.js";import{getMockServerDocsConfig as R}from"../../../../openapi-docs/template/mock-server-config.js";const L=y=>{const{descriptionFile:n,operationId:i,pointer:p,exampleKey:d,mimeType:l,requestBody:a,parameters:S,options:m,environment:t,environments:s,hideOtherSecuritySchemes:O}=y,h=b(),{store:e,error:v,baseSlug:u}=P(n),c=o.useMemo(()=>({...e?.options,...m}),[m,e?.options]),f=o.useMemo(()=>{const{mockServer:C,...g}=c;return g},[c]),r=o.useMemo(()=>{if(e)return x(e,{operationId:i,pointer:p},f,{exampleKey:d,mimeType:l,environments:s,environment:t,requestBody:a})},[d,f,l,i,p,e,s,t,a]);return e?r?o.createElement(I,{"data-testid":"replay-openapi"},o.createElement(M,{key:`${h.pathname}-${n}-${i||p}`,options:{...m,disableRouter:!0,routingBasePath:u,mockServer:R(c.mockServer,u)},definition:e.definition,withState:{environments:s,allowedEnvironments:t?[t]:void 0,operation:{pointer:r.pointer,state:{requestValues:{body:a,...S}}}}},o.createElement(E,{activeOperationId:r.operationId||"",fullOpenApi:e.definition,corsProxyUrl:e.options.corsProxyUrl,pointer:r.pointer,hideOtherSecuritySchemes:O}))):o.createElement(k,{type:"danger"},"Cannot find OpenAPI operation by operationId or pointer in ",n):o.createElement(A,null,v)};export{L as ReplayOpenApi};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isPrimitive as n}from"../../../../../utils/guards/is-primitive.js";import{getNodeAttribute as o}from"./get-node-attribute.js";import{getVariable as p}from"./get-variable.js";import{isNode as a}from"./guards/is-node.js";import{isTag as l}from"./guards/is-tag.js";import{isCodeNode as c}from"./guards/is-code-node.js";import{isConditionalNode as d}from"./guards/is-conditional-node.js";import{isExampleNode as u}from"./guards/is-example-node.js";import{isFenceNode as h}from"./guards/is-fence-node.js";import{isTextNode as N}from"./guards/is-text-node.js";import{isFunction as b}from"./guards/is-function.js";import{isVariable as g}from"./guards/is-variable.js";function t(m,r={}){const{isTrim:s=!0}=r,i=[];for(const e of m){if(n(e))i.push(String(e));else if(a(e))if(e.type==="tr"&&i.push(`
|
|
2
|
-
`),N(e)||c(e)||h(e))i.push(t([o(e,"content")],r));else if(u(e))i.push(t(e.children.map(f=>o(f,"content")),r));else{if(d(e)&&r.skipConditionals)continue;i.push(t(e.children,r))}else l(e)&&e.name==="code"?i.push(t(e.children,r)):b(e)&&i.push(t(Object.values(e.parameters),r));g(e)&&i.push(t([p(e,r.variables)],r))}return s?i.map(e=>e.trim()).join(" ").trim():i.join(" ")}export{t as getInnerText};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{readEnvVariable as a}from"../../../../utils/envs/read-env-variable.js";import{getValueDeep as i}from"../../../../../utils/object/get-value-deep.js";function u(t,r){if(t?.path?.[0]==="env")return a(t.path[1])??"";const{value:e}=i(r,t.path);return e??""}export{u as getVariable};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{usePageSharedData as t}from"../../../../../client/providers/page-data/hooks";function n(r){const e=t(r||"");return e?{store:e,error:null,baseSlug:e.baseSlug}:{store:void 0,error:"Incorrect OpenAPI file path"}}export{n as useStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import a from"@markdoc/markdoc";import{isPrimitive as m}from"../../../../../../utils/guards/is-primitive.js";import{isStringNode as s}from"../../helpers/guards/is-string-node.js";import{isTag as u}from"../../helpers/guards/is-tag.js";const g=a.nodes.fence,w={...g,attributes:{...g.attributes,label:{type:String,render:"data-label"},title:{type:String,render:"data-title"},highlight:{type:String,render:"data-highlight"}},transform(r,i){const e=r.transformAttributes(i);let t=r.transformChildren(i);const o=e["data-language"],l=e["data-title"];switch(r.attributes.process===!1&&(t=[r.attributes.content]),o){case"mermaid":return s(t[0])?new a.Tag("Mermaid",{...e,diagramSource:t[0]},t):new a.Tag(r.tag,e,t);default:const c=t.map(n=>m(n)?n.toString():u(n)?n?.attributes?.rawtag:"").join("");return s(t[0])?new a.Tag("CodeBlock",{...e,header:{title:l,controls:{copy:{}}},source:c,lang:o},[]):new a.Tag(r.tag,e,t)}}};export{w as fence};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import s from"@markdoc/markdoc";import{getInnerText as l}from"../helpers/get-inner-text.js";import{slugger as a}from"../../../../utils/slugger.js";const d={children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},__idx:{type:Number}},transform(e,r){const t=e.transformAttributes(r),i=e.transformChildren(r),n=typeof t.id=="string"?t.id:a.slug(l(i),{replaceDots:!0,replaceSlashes:!0});return new s.Tag("Heading",{...t,id:n,level:e.attributes.level},i)}};export{d as heading};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{useMemo as u}from"react";import{components as l}from"@redocly-markdoc/components";import{Ast as f}from"@markdoc/markdoc";import{PageNavigation as d}from"@redocly/theme/components/PageNavigation/PageNavigation";import{tags as g,components as _}from"@redocly/theme/markdoc/default";import{Breadcrumbs as h}from"@redocly/theme/components/Breadcrumbs/Breadcrumbs";import{withPathPrefix as m}from"@redocly/theme/core/utils";import{OPENAPI_DOCS_TEMPLATE_ID as y,ServerRoutes as w}from"../../../../constants/common.js";import{isBrowser as P}from"../../../../utils/env/is-browser.js";import*as S from"../../markdown/markdoc/custom-components/index.js";import*as v from"../../markdown/markdoc/nodes/index.js";import O from"../../markdown/markdoc/tags/index.js";import{usePageData as C,useSidebarSiblingsData as A}from"../../../../client/providers/page-data/hooks";import{telemetry as E}from"../../../../client/app/telemetry/index.js";import{getMockServerDocsConfig as T}from"./mock-server-config";function V(t="",e="",o="/"){return t.endsWith(o)&&(t=t.slice(0,-o.length)),e.startsWith(o)&&(e=e.slice(o.length)),!t||!e?t+e:t+o+e}function b(t){if(t)return Object.entries(t).reduce((e,[o,r])=>(e[o]=f.fromJSON(JSON.stringify(r)),e),{})}function Y(t,{markdown:e,baseSlug:o}){return u(()=>{const n=P();t.options.oAuth2RedirectURI=n?`${window.location.origin}${m(w.REPLAY_OAUTH2_CALLBACK)}`:null,t.options.routingBasePath=m(o),t.options.mockServer=T(t.options.mockServer,o),t.options.scrollYOffset=n?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--navbar-height"),10):0,t.options.markdocOptions={tags:{...O,...g},nodes:{...v},components:{...S,..._,...l,...globalThis.__LOADER.markdocComponents},...e,partials:b(e?.partials)},t.options.unstable_hooks={...t.options.unstable_hooks,MiddlePanelFooter:()=>{const{templateId:i}=C()||{},{nextPage:s,prevPage:a}=A()||{};return i===y?null:d({nextPage:s,prevPage:a})},MiddlePanelHeader:()=>h({})};const p={codeSamplesLanguageSwitch:"samples_language_switch",codeSamplesCopy:"code_samples_copy",panelToggle:"panel_toggle",targetServerSwitch:"target_server_switch",tryItOpen:"try_it_toggle",tryItSent:"try_it_sent"},c={};for(const[i,s]of Object.entries(p)){const a=F(t.options.events?.[i]);c[i]=I(a,s)}return t.options.events=c,t},[t,e,o])}function F(t){if(typeof window>"u")return null;if(typeof t=="function")return t;if(typeof t!="string")return null;try{const e=t.trim();if(!e.match(/^(\([^)]*\)\s*=>\s*.+|[a-zA-Z_$][\w$]*\s*=>\s*.+)$/))throw new Error("Invalid function format. Only arrow functions allowed.");if(["eval","Function","constructor","prototype","__proto__","import","require","process","global","window","document"].some(n=>e.includes(n)))throw new Error("Function contains prohibited keywords");return new Function("event",`
|
|
2
|
-
'use strict';
|
|
3
|
-
const userFn = ${e};
|
|
4
|
-
return userFn(event);
|
|
5
|
-
`)}catch(e){return console.error("Function parsing error:",e),null}}function I(t,e){return o=>{if(t)try{t(o)}catch(r){console.error("User event handler error:",r)}if(e)try{E.sendOpenapiDocsMessage([{object:"openapi_docs",eventType:e,operationHttpVerb:o.operationHttpVerb,operationPath:o.operationPath,lang:"lang"in o?o.lang:void 0,action:o.action,state:"state"in o?o.state:void 0,serverUrl:"serverUrl"in o?o.serverUrl:void 0}])}catch{}}}export{V as joinWithSeparator,I as mergeEvents,b as parsePartials,F as safeParseFunction,Y as usePatchedStore};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { AfterRoutesCreatedActions, AfterRoutesCreatedLifecycleContext } from '../../../types';
|
|
2
|
-
export declare function prepareAiSearchDocuments(actions: AfterRoutesCreatedActions, context: AfterRoutesCreatedLifecycleContext, { aiSearchEnabled, llmstxtEnabled, }: {
|
|
3
|
-
aiSearchEnabled: boolean;
|
|
4
|
-
llmstxtEnabled: boolean;
|
|
5
|
-
}): Promise<void>;
|
|
6
|
-
//# sourceMappingURL=prepare-ai-search-documents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import p from"node:path";import{existsSync as b}from"node:fs";import{writeFile as D,access as v,rm as N,constants as X}from"fs/promises";import{REDOCLY_ROUTE_RBAC as S,REDOCLY_TEAMS_RBAC as R}from"@redocly/config";import $ from"picomatch";import{DEFAULT_LOCALE_PLACEHOLDER as _}from"../../../../constants/common.js";import{AI_INDEX_EXPORT_FOLDER as j}from"../../../constants/plugins/search.js";import{LLMS_TXT_FILE_NAME as k}from"../../../constants/common.js";import{envConfig as B}from"../../../../config/env-config.js";import{logger as a}from"../../../tools/notifiers/logger.js";import{shaHexShort as G}from"../../../utils/crypto/sha-hex-short.js";import{promiseMapLimit as C}from"../../../utils/async/promise-map-limit.js";import{ensureDir as A}from"../../../utils/fs.js";import{isResourcePubliclyAccessible as H,extractTeamsFromScopeItems as U,getRbacTeamsListForResource as Y}from"../../../utils/rbac.js";import{validateLLMsTxtConfig as J,generateLLMsTxt as K,getLLMsTxtMdSlug as V}from"../llmstxt/index.js";const M=20,h="llms.txt:";async function pt(t,i,{aiSearchEnabled:e,llmstxtEnabled:r}){const s=p.join(t.outdir,k);if(!r){try{await v(s,X.W_OK),await N(s)}catch{}if(!e)return}e&&a.info("Preparing AI search documents..."),r&&a.info(`${h} Generating llms.txt files...`);const L=a.startTiming(),c=a.startTiming(),f=t.getGlobalConfig("seo"),l=f?.llmstxt,T=p.resolve(t.outdir,j),u=t.getConfig(),P=u.rbac??{},w=t.getAllRoutes(),F=u?.l10n?.defaultLocale||u?.i18n?.defaultLocale||_,I=(l?.excludeFiles||[]).map(o=>$(o)),d=[];if(await C(w,M,async o=>{if(o.excludeFromSearch)return;const O=await W(o,t),x=await q(o,O,i,t);if(x){if(r)for(const n of await x.getLLMsTxts()){if(I.some(m=>m(n.fsPath)))continue;const g=p.join(t.outdir,V(n.slug));A(g),await D(g,n.content),n.includeInLLMsTxt&&H(o,u)&&d.push(n)}if(e&&B.isBuildMode){const n=await x.getSearchDocuments();if(!n.length)return;const g=z(o,P),m=o.versions?.find(({active:E})=>E),y=m&&{folder:m.folderId,label:m.label,default:m.default};await Q(n,o.fsPath,g,T,F,y)}}}),e&&a.infoTime(c,"AI search documents prepared"),d.length)try{J(l);const o=await K(d,l,{title:f?.title,description:f?.description},i);A(s),await D(s,o),a.infoTime(L,`${h} files generated`)}catch(o){a.error(`${h} Failed to generate llms.txt file. ${o.message}`)}}async function W(t,i){return t.getStaticData?t.getStaticData(t,{...i,contentDir:i.contentDir,parseMarkdoc:(e,r,s)=>i.parseMarkdoc(e,r,s)}):{}}async function q(t,i,e,r){if(t.getAiDocumentsStore)return t.getAiDocumentsStore(t,{...i,[R]:t[R],[S]:t[S]},e,r)}function z(t,i){const e=U(t?.[R]);return e?.length?e:Y(t,i)}async function Q(t,i,e,r,s,L){await C(t,M,async c=>{const f=`${G(i+c.content)}.json`,l=A(p.join(r,f)),T=c.locale===_?s:c.locale;b(l)||await D(l,JSON.stringify({...c,rbacTeams:e||[],version:L,locale:T}),"utf-8")})}export{pt as prepareAiSearchDocuments};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.d.ts
RENAMED
|
File without changes
|
/package/dist/cli/{prepare → build}/analytics/collectors/get-processed-config-stats-usage.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/html-script.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/index.d.ts
RENAMED
|
File without changes
|
/package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/openapi/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/styled.elements.d.ts
RENAMED
|
File without changes
|
/package/dist/{server/plugins/markdown → client/app}/markdoc/custom-components/styled.elements.js
RENAMED
|
File without changes
|