@redocly/redoc 0.130.0 → 0.131.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/bin.js +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/prepare/copy-env-files.js +1 -1
- package/dist/cli/prepare/index.js +1 -1
- 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/Sidebar/helpers/filter-out-versioned-items.js +1 -1
- package/dist/client/app/hooks/useRouteChangeTracker.js +1 -1
- package/dist/client/app/search/useAiSearch.js +1 -1
- package/dist/client/browser-entry.js +5 -5
- package/dist/client/providers/hooks.js +1 -1
- package/dist/client/runtime/loader.js +1 -1
- package/dist/config/env-config.d.ts +17 -0
- package/dist/config/env-config.js +1 -0
- package/dist/config/env-schema.d.ts +242 -0
- package/dist/config/env-schema.js +3 -0
- package/dist/config/env-schemas/api-urls.d.ts +24 -0
- package/dist/config/env-schemas/api-urls.js +1 -0
- package/dist/config/env-schemas/auth.d.ts +42 -0
- package/dist/config/env-schemas/auth.js +1 -0
- package/dist/config/env-schemas/catalog.d.ts +12 -0
- package/dist/config/env-schemas/catalog.js +1 -0
- package/dist/config/env-schemas/database.d.ts +15 -0
- package/dist/config/env-schemas/database.js +1 -0
- package/dist/config/env-schemas/environment-detection.d.ts +24 -0
- package/dist/config/env-schemas/environment-detection.js +1 -0
- package/dist/config/env-schemas/feature-flags.d.ts +24 -0
- package/dist/config/env-schemas/feature-flags.js +1 -0
- package/dist/config/env-schemas/organization-project.d.ts +27 -0
- package/dist/config/env-schemas/organization-project.js +1 -0
- package/dist/config/env-schemas/scorecards.d.ts +12 -0
- package/dist/config/env-schemas/scorecards.js +1 -0
- package/dist/config/env-schemas/search.d.ts +21 -0
- package/dist/config/env-schemas/search.js +1 -0
- package/dist/config/env-schemas/server-config.d.ts +51 -0
- package/dist/config/env-schemas/server-config.js +1 -0
- package/dist/config/env-schemas/site.d.ts +12 -0
- package/dist/config/env-schemas/site.js +1 -0
- package/dist/config/env-schemas/ssr.d.ts +18 -0
- package/dist/config/env-schemas/ssr.js +1 -0
- package/dist/config/env-schemas/telemetry.d.ts +15 -0
- package/dist/config/env-schemas/telemetry.js +1 -0
- package/dist/config/env-schemas/test.d.ts +22 -0
- package/dist/config/env-schemas/test.js +1 -0
- package/dist/constants/common.d.ts +1 -1
- package/dist/constants/common.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/constants/common.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 +2 -2
- 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/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/index.js +1 -1
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.d.ts +4 -52
- package/dist/server/plugins/catalog-entities/database/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/database/mappers/create-entity-db-record.d.ts +1 -0
- 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/repositories/local/catalog-entities-local-read-repository.js +3 -3
- package/dist/server/plugins/catalog-entities/database/repositories/local/catalog-entities-local-repository.d.ts +5 -31
- 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/remote/catalog-entities-remote-repository.d.ts +3 -4
- package/dist/server/plugins/catalog-entities/database/repositories/remote/catalog-entities-remote-repository.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 +2 -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/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/catalog-entities/schemas/read-model-schemas.d.ts +25 -164
- package/dist/server/plugins/catalog-entities/schemas/read-model-schemas.js +0 -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/markdoc/import-user-tags.js +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/render-mermaid.js +1 -1
- package/dist/server/plugins/mcp/auth/auth-handlers.js +1 -1
- package/dist/server/plugins/mcp/handlers/handle-mcp-request.js +1 -1
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/openapi-docs/index.js +1 -1
- package/dist/server/plugins/scorecard-classic/index.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-ai-search-documents.js +1 -1
- 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.js +1 -1
- 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 +8 -8
- package/dist/server/store.d.ts +4 -4
- 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 +6 -6
- package/dist/server/tools/notifiers/terminal-manager.js +4 -4
- package/dist/server/utils/envs/load-env-variables.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/report-all-errors.js +1 -1
- package/dist/server/version.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.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/routes/auth.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/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/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/error.js +1 -1
- 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/workers/worker-pool.js +1 -1
- package/package.json +11 -10
- 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 -8
- package/dist/server/plugins/catalog-entities/entities/validate-entity.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/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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for authentication and authorization variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const authSchema: z.ZodObject<{
|
|
6
|
+
JWT_SECRET_KEY: z.ZodOptional<z.ZodString>;
|
|
7
|
+
AUTH_URL: z.ZodOptional<z.ZodString>;
|
|
8
|
+
BH_API_URL: z.ZodOptional<z.ZodString>;
|
|
9
|
+
ENTITLEMENTS_JWKS_CDN_URL: z.ZodOptional<z.ZodString>;
|
|
10
|
+
OAUTH_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
11
|
+
OAUTH_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
12
|
+
OIDC_CLIENT_ID: z.ZodOptional<z.ZodString>;
|
|
13
|
+
OIDC_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
|
|
14
|
+
OIDC_ISSUER_URL: z.ZodOptional<z.ZodString>;
|
|
15
|
+
LOCALHOST_LOGIN: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
16
|
+
REDOCLY_OAUTH_USE_INTROSPECT: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
JWT_SECRET_KEY?: string | undefined;
|
|
19
|
+
AUTH_URL?: string | undefined;
|
|
20
|
+
BH_API_URL?: string | undefined;
|
|
21
|
+
ENTITLEMENTS_JWKS_CDN_URL?: string | undefined;
|
|
22
|
+
OAUTH_CLIENT_ID?: string | undefined;
|
|
23
|
+
OAUTH_CLIENT_SECRET?: string | undefined;
|
|
24
|
+
OIDC_CLIENT_ID?: string | undefined;
|
|
25
|
+
OIDC_CLIENT_SECRET?: string | undefined;
|
|
26
|
+
OIDC_ISSUER_URL?: string | undefined;
|
|
27
|
+
LOCALHOST_LOGIN?: "true" | "false" | undefined;
|
|
28
|
+
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
JWT_SECRET_KEY?: string | undefined;
|
|
31
|
+
AUTH_URL?: string | undefined;
|
|
32
|
+
BH_API_URL?: string | undefined;
|
|
33
|
+
ENTITLEMENTS_JWKS_CDN_URL?: string | undefined;
|
|
34
|
+
OAUTH_CLIENT_ID?: string | undefined;
|
|
35
|
+
OAUTH_CLIENT_SECRET?: string | undefined;
|
|
36
|
+
OIDC_CLIENT_ID?: string | undefined;
|
|
37
|
+
OIDC_CLIENT_SECRET?: string | undefined;
|
|
38
|
+
OIDC_ISSUER_URL?: string | undefined;
|
|
39
|
+
LOCALHOST_LOGIN?: "true" | "false" | undefined;
|
|
40
|
+
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const n=o.object({JWT_SECRET_KEY:o.string().optional(),AUTH_URL:o.string().url().optional(),BH_API_URL:o.string().url().optional(),ENTITLEMENTS_JWKS_CDN_URL:o.string().url().optional(),OAUTH_CLIENT_ID:o.string().optional(),OAUTH_CLIENT_SECRET:o.string().optional(),OIDC_CLIENT_ID:o.string().optional(),OIDC_CLIENT_SECRET:o.string().optional(),OIDC_ISSUER_URL:o.string().url().optional(),LOCALHOST_LOGIN:o.enum(["true","false"]).optional(),REDOCLY_OAUTH_USE_INTROSPECT:o.string().optional()});export{n as authSchema};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for catalog configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const catalogSchema: z.ZodObject<{
|
|
6
|
+
FORCE_CATALOG_CACHE_REVALIDATE: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: "true" | "false" | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: "true" | "false" | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const e=o.object({FORCE_CATALOG_CACHE_REVALIDATE:o.enum(["true","false"]).optional()});export{e as catalogSchema};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for database configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const databaseSchema: z.ZodObject<{
|
|
6
|
+
SQLD_REMOTE_DATABASE_URL: z.ZodOptional<z.ZodString>;
|
|
7
|
+
SQLD_REMOTE_DATABASE_AUTH_TOKEN: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
10
|
+
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
13
|
+
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for environment detection variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const environmentDetectionSchema: z.ZodObject<{
|
|
6
|
+
NODE_ENV: z.ZodOptional<z.ZodEnum<["development", "production", "test"]>>;
|
|
7
|
+
REDOCLY_ENV: z.ZodOptional<z.ZodEnum<["production", "preview", "development"]>>;
|
|
8
|
+
REDOCLY_EXECUTION_MODE: z.ZodOptional<z.ZodEnum<["build", "develop", "runtime"]>>;
|
|
9
|
+
REDOCLY_INTERNAL_DEV: z.ZodOptional<z.ZodString>;
|
|
10
|
+
CI: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
NODE_ENV?: "development" | "production" | "test" | undefined;
|
|
13
|
+
REDOCLY_ENV?: "development" | "production" | "preview" | undefined;
|
|
14
|
+
REDOCLY_EXECUTION_MODE?: "build" | "runtime" | "develop" | undefined;
|
|
15
|
+
REDOCLY_INTERNAL_DEV?: string | undefined;
|
|
16
|
+
CI?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
NODE_ENV?: "development" | "production" | "test" | undefined;
|
|
19
|
+
REDOCLY_ENV?: "development" | "production" | "preview" | undefined;
|
|
20
|
+
REDOCLY_EXECUTION_MODE?: "build" | "runtime" | "develop" | undefined;
|
|
21
|
+
REDOCLY_INTERNAL_DEV?: string | undefined;
|
|
22
|
+
CI?: string | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=environment-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const e=o.strictObject({NODE_ENV:o.enum(["development","production","test"]).optional(),REDOCLY_ENV:o.enum(["production","preview","development"]).optional(),REDOCLY_EXECUTION_MODE:o.enum(["build","develop","runtime"]).optional(),REDOCLY_INTERNAL_DEV:o.string().optional(),CI:o.string().optional()});export{e as environmentDetectionSchema};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for feature flags.
|
|
4
|
+
*/
|
|
5
|
+
export declare const featureFlagsSchema: z.ZodObject<{
|
|
6
|
+
NEW_CATALOG_ENABLED: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
7
|
+
NEW_SCORECARDS_ENABLED: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
8
|
+
ENABLE_COMMENTS: z.ZodOptional<z.ZodString>;
|
|
9
|
+
ENABLE_SOURCE_MAPS: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
10
|
+
PLAN_GATES: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
NEW_CATALOG_ENABLED?: "true" | "false" | undefined;
|
|
13
|
+
NEW_SCORECARDS_ENABLED?: "true" | "false" | undefined;
|
|
14
|
+
ENABLE_COMMENTS?: string | undefined;
|
|
15
|
+
ENABLE_SOURCE_MAPS?: "true" | "false" | undefined;
|
|
16
|
+
PLAN_GATES?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
NEW_CATALOG_ENABLED?: "true" | "false" | undefined;
|
|
19
|
+
NEW_SCORECARDS_ENABLED?: "true" | "false" | undefined;
|
|
20
|
+
ENABLE_COMMENTS?: string | undefined;
|
|
21
|
+
ENABLE_SOURCE_MAPS?: "true" | "false" | undefined;
|
|
22
|
+
PLAN_GATES?: string | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const e=o.object({NEW_CATALOG_ENABLED:o.enum(["true","false"]).optional(),NEW_SCORECARDS_ENABLED:o.enum(["true","false"]).optional(),ENABLE_COMMENTS:o.string().optional(),ENABLE_SOURCE_MAPS:o.enum(["true","false"]).optional(),PLAN_GATES:o.string().optional()});export{e as featureFlagsSchema};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const organizationProjectSchema: z.ZodObject<{
|
|
3
|
+
ORGANIZATION_ID: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
4
|
+
ORGANIZATION_SLUG: z.ZodOptional<z.ZodString>;
|
|
5
|
+
ORG_SLUG: z.ZodOptional<z.ZodString>;
|
|
6
|
+
PROJECT_ID: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
7
|
+
PROJECT_SLUG: z.ZodOptional<z.ZodString>;
|
|
8
|
+
PROJECT_URL: z.ZodOptional<z.ZodString>;
|
|
9
|
+
PUBLIC_REDOCLY_BRANCH_NAME: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
ORGANIZATION_ID?: string | undefined;
|
|
12
|
+
ORGANIZATION_SLUG?: string | undefined;
|
|
13
|
+
ORG_SLUG?: string | undefined;
|
|
14
|
+
PROJECT_ID?: string | undefined;
|
|
15
|
+
PROJECT_SLUG?: string | undefined;
|
|
16
|
+
PROJECT_URL?: string | undefined;
|
|
17
|
+
PUBLIC_REDOCLY_BRANCH_NAME?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
ORGANIZATION_ID?: string | undefined;
|
|
20
|
+
ORGANIZATION_SLUG?: string | undefined;
|
|
21
|
+
ORG_SLUG?: string | undefined;
|
|
22
|
+
PROJECT_ID?: string | undefined;
|
|
23
|
+
PROJECT_SLUG?: string | undefined;
|
|
24
|
+
PROJECT_URL?: string | undefined;
|
|
25
|
+
PUBLIC_REDOCLY_BRANCH_NAME?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
//# sourceMappingURL=organization-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";const o="org_",n="prj_",s=t.object({ORGANIZATION_ID:t.string().optional().refine(i=>i===void 0||i.startsWith(o),{message:`ORGANIZATION_ID must start with "${o}"`}),ORGANIZATION_SLUG:t.string().optional(),ORG_SLUG:t.string().optional(),PROJECT_ID:t.string().optional().refine(i=>i===void 0||i.startsWith(n),{message:`PROJECT_ID must start with "${n}"`}),PROJECT_SLUG:t.string().optional(),PROJECT_URL:t.string().url().optional(),PUBLIC_REDOCLY_BRANCH_NAME:t.string().optional()});export{s as organizationProjectSchema};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for scorecards configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const scorecardsSchema: z.ZodObject<{
|
|
6
|
+
SCORECARDS_POLLING_INTERVAL_MS: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=scorecards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const r=o.object({SCORECARDS_POLLING_INTERVAL_MS:o.coerce.string().optional()});export{r as scorecardsSchema};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for search configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const searchSchema: z.ZodObject<{
|
|
6
|
+
SEARCH_DEV_REINIT: z.ZodOptional<z.ZodString>;
|
|
7
|
+
SEARCH_DEV_DEBUG: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
8
|
+
TYPESENSE_API_URL: z.ZodOptional<z.ZodString>;
|
|
9
|
+
TYPESENSE_API_KEY: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
SEARCH_DEV_REINIT?: string | undefined;
|
|
12
|
+
SEARCH_DEV_DEBUG?: "true" | "false" | undefined;
|
|
13
|
+
TYPESENSE_API_URL?: string | undefined;
|
|
14
|
+
TYPESENSE_API_KEY?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
SEARCH_DEV_REINIT?: string | undefined;
|
|
17
|
+
SEARCH_DEV_DEBUG?: "true" | "false" | undefined;
|
|
18
|
+
TYPESENSE_API_URL?: string | undefined;
|
|
19
|
+
TYPESENSE_API_KEY?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for server configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const serverConfigSchema: z.ZodObject<{
|
|
6
|
+
PORT: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
PORTAL_LOG_FORMAT: z.ZodOptional<z.ZodString>;
|
|
8
|
+
REDOCLY_LOG_LEVEL: z.ZodOptional<z.ZodString>;
|
|
9
|
+
TERM: z.ZodOptional<z.ZodString>;
|
|
10
|
+
INSPECT_MODE: z.ZodOptional<z.ZodString>;
|
|
11
|
+
REDOCLY_PREFIX_PATHS: z.ZodOptional<z.ZodString>;
|
|
12
|
+
REDOCLY_CONTENT_DIR: z.ZodOptional<z.ZodString>;
|
|
13
|
+
REDOCLY_PORTAL_VERSION: z.ZodOptional<z.ZodString>;
|
|
14
|
+
REDOCLY_TELEMETRY: z.ZodOptional<z.ZodString>;
|
|
15
|
+
REDOCLY_TELEMETRY_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
16
|
+
TELEMETRY_DEV_DEBUG: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
17
|
+
WEB_SERVER_IDLE_TIMEOUT: z.ZodOptional<z.ZodString>;
|
|
18
|
+
REDOCLY_PROBLEMS_OUTPUT_FILE: z.ZodOptional<z.ZodString>;
|
|
19
|
+
REDOCLY_METADATA_OUTPUT_FOLDER: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
PORT?: number | undefined;
|
|
22
|
+
PORTAL_LOG_FORMAT?: string | undefined;
|
|
23
|
+
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
24
|
+
TERM?: string | undefined;
|
|
25
|
+
INSPECT_MODE?: string | undefined;
|
|
26
|
+
REDOCLY_PREFIX_PATHS?: string | undefined;
|
|
27
|
+
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
28
|
+
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
29
|
+
REDOCLY_TELEMETRY?: string | undefined;
|
|
30
|
+
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
31
|
+
TELEMETRY_DEV_DEBUG?: "true" | "false" | undefined;
|
|
32
|
+
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
33
|
+
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
34
|
+
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
PORT?: number | undefined;
|
|
37
|
+
PORTAL_LOG_FORMAT?: string | undefined;
|
|
38
|
+
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
39
|
+
TERM?: string | undefined;
|
|
40
|
+
INSPECT_MODE?: string | undefined;
|
|
41
|
+
REDOCLY_PREFIX_PATHS?: string | undefined;
|
|
42
|
+
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
43
|
+
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
44
|
+
REDOCLY_TELEMETRY?: string | undefined;
|
|
45
|
+
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
46
|
+
TELEMETRY_DEV_DEBUG?: "true" | "false" | undefined;
|
|
47
|
+
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
48
|
+
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
49
|
+
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
//# sourceMappingURL=server-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as E}from"zod";const t=E.object({PORT:E.coerce.number().optional(),PORTAL_LOG_FORMAT:E.string().optional(),REDOCLY_LOG_LEVEL:E.string().optional(),TERM:E.string().optional(),INSPECT_MODE:E.string().optional(),REDOCLY_PREFIX_PATHS:E.string().optional(),REDOCLY_CONTENT_DIR:E.string().optional(),REDOCLY_PORTAL_VERSION:E.string().optional(),REDOCLY_TELEMETRY:E.string().optional(),REDOCLY_TELEMETRY_ENDPOINT:E.string().url().optional(),TELEMETRY_DEV_DEBUG:E.enum(["true","false"]).optional(),WEB_SERVER_IDLE_TIMEOUT:E.string().optional(),REDOCLY_PROBLEMS_OUTPUT_FILE:E.string().optional(),REDOCLY_METADATA_OUTPUT_FOLDER:E.string().optional()});export{t as serverConfigSchema};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for site configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const siteSchema: z.ZodObject<{
|
|
6
|
+
SITE_URL: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
SITE_URL?: string | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
SITE_URL?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const r=o.object({SITE_URL:o.string().url().optional()});export{r as siteSchema};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for SSR (Server-Side Rendering) configuration variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ssrSchema: z.ZodObject<{
|
|
6
|
+
REDOCLY_SSR_RENDER_MODE: z.ZodOptional<z.ZodEnum<["worker", "main"]>>;
|
|
7
|
+
REDOCLY_SSR_WORKERS_MIN: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
REDOCLY_SSR_WORKERS_MAX: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
11
|
+
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
12
|
+
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
15
|
+
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
16
|
+
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=ssr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as o}from"zod";const e=o.object({REDOCLY_SSR_RENDER_MODE:o.enum(["worker","main"]).optional(),REDOCLY_SSR_WORKERS_MIN:o.coerce.number().optional(),REDOCLY_SSR_WORKERS_MAX:o.coerce.number().optional()});export{e as ssrSchema};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for OpenTelemetry and request tracking variables.
|
|
4
|
+
*/
|
|
5
|
+
export declare const telemetrySchema: z.ZodObject<{
|
|
6
|
+
OTEL_TRACES_URL: z.ZodOptional<z.ZodString>;
|
|
7
|
+
REQUEST_ID: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
OTEL_TRACES_URL?: string | undefined;
|
|
10
|
+
REQUEST_ID?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
OTEL_TRACES_URL?: string | undefined;
|
|
13
|
+
REQUEST_ID?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";const r=t.object({OTEL_TRACES_URL:t.string().url().optional(),REQUEST_ID:t.string().optional()});export{r as telemetrySchema};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for test-related environment variables.
|
|
4
|
+
* These are used only in testing scenarios.
|
|
5
|
+
*/
|
|
6
|
+
export declare const testSchema: z.ZodObject<{
|
|
7
|
+
TEST_API_KEY: z.ZodOptional<z.ZodString>;
|
|
8
|
+
TEST_SERVER_URL: z.ZodOptional<z.ZodString>;
|
|
9
|
+
DECORATOR_CONFIG: z.ZodOptional<z.ZodString>;
|
|
10
|
+
SECRET_VALUE: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
TEST_API_KEY?: string | undefined;
|
|
13
|
+
TEST_SERVER_URL?: string | undefined;
|
|
14
|
+
DECORATOR_CONFIG?: string | undefined;
|
|
15
|
+
SECRET_VALUE?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
TEST_API_KEY?: string | undefined;
|
|
18
|
+
TEST_SERVER_URL?: string | undefined;
|
|
19
|
+
DECORATOR_CONFIG?: string | undefined;
|
|
20
|
+
SECRET_VALUE?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";const i=t.object({TEST_API_KEY:t.string().optional(),TEST_SERVER_URL:t.string().url().optional(),DECORATOR_CONFIG:t.string().optional(),SECRET_VALUE:t.string().optional()});export{i as testSchema};
|
|
@@ -74,7 +74,7 @@ export declare const ServerRoutes: {
|
|
|
74
74
|
readonly BFF_CATALOG_RELATED_ENTITIES: "/bff/catalog-related-entities/:entityKey";
|
|
75
75
|
readonly BFF_CATALOG_REVISIONS: "/bff/catalog-revisions/:entityKey";
|
|
76
76
|
readonly MCP_OAUTH_AUTHORIZATION_SERVER: "/.well-known/oauth-authorization-server";
|
|
77
|
-
readonly MCP_OAUTH_PROTECTED_RESOURCE: "/.well-known/oauth-protected-resource
|
|
77
|
+
readonly MCP_OAUTH_PROTECTED_RESOURCE: "/.well-known/oauth-protected-resource";
|
|
78
78
|
readonly MCP_DYNAMIC_CLIENT_REGISTRATION: "/_mcp/register";
|
|
79
79
|
readonly MCP_AUTHORIZATION: "/_mcp/oauth2/auth";
|
|
80
80
|
readonly MCP_TOKEN_PORTAL: "/_mcp/oauth2/token-portal";
|
package/dist/constants/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{envConfig as o}from"../config/env-config.js";const O="openapi_docs",p="asyncapi_docs",i="graphql_docs",R="/_spec-gql",L="markdoc",I="tags",s="*",C={[s]:"read"},l=["openid","email"],S=1440*60,d="anonymous",N="authenticated",P="**",u="Reunite",D="translations.yaml",x="redocly.yaml",h="@redocly/theme",g="@theme",U="/app-data.json",m="/eject-component",r=o.SERVER_EDITOR_APP_URL||"http://127.0.0.1:3000",M=o.REDOCLY_CORS_ORIGINS?o.REDOCLY_CORS_ORIGINS.split(",").map(t=>t.trim()).filter(Boolean).concat(r):[r];var a;(function(t){t.BUILD="build",t.DEVELOP="develop",t.PREPARE="prepare"})(a||(a={}));var _;(function(t){t.RATING="rating",t.SENTIMENT="sentiment",t.COMMENT="comment",t.MOOD="mood",t.PROBLEM="problem",t.SCALE="scale"})(_||(_={}));const e="entityKey",E="entityId",n="entityRelationId",G={INFO:"/_info",EJECT_COMPONENT:"/eject-component/:componentName",SHARED_PAGE_DATA:"/page-data/shared/*",PAGE_DATA:"/page-data/*",APP_DATA:"/app-data.json",AUTHORIZATION:"/authorize",OIDC_CALLBACK:"/_auth/oidc",SAML_CALLBACK:"/_auth/saml2",REDOCLY_CALLBACK:"/_auth/redocly",REPLAY_OAUTH2_CALLBACK:"/_auth/replay-oauth2",REDOCLY_LOGIN_CALLBACK:"/_auth/redocly/redocly-login",REDOCLY_TOKEN_LOGIN:"/_auth/redocly-token-login",SEARCH:"/_search",SEARCH_FACETS:"/_search-facets",LOGOUT:"/logout",POST_LOGOUT:"/post-logout",LOGIN:"/login",IDP_LOGIN:"/_auth/idp-login",INVITE:"/invite/:code",RESOLVE_ROUTE_BY_PATH:"/resolve-route-by-path",RESOLVE_ROUTES_BY_PATHS:"/resolve-routes-by-paths",RESOLVE_ROUTE_BY_SLUG:"/resolve-route-by-slug",GET_ROUTES_BY_LINE:"/get-routes-by-line",FEEDBACK:"/feedback",TELEMETRY:"/_events",OTEL_TRACES:"/_otel/v1/traces",HEALTH:"/_health",ASK_AI:"/_ask-ai",CATALOG_ENTITIES:`/catalog-entities/:${E}?`,CATALOG_ENTITIES_RELATIONS:`/catalog-entities-relations/:${n}?`,BFF_CATALOG_ENTITIES:`/bff/catalog-entities/:${e}?`,BFF_CATALOG_RELATED_ENTITIES:`/bff/catalog-related-entities/:${e}`,BFF_CATALOG_REVISIONS:`/bff/catalog-revisions/:${e}`,MCP_OAUTH_AUTHORIZATION_SERVER:"/.well-known/oauth-authorization-server",MCP_OAUTH_PROTECTED_RESOURCE:"/.well-known/oauth-protected-resource",MCP_DYNAMIC_CLIENT_REGISTRATION:"/_mcp/register",MCP_AUTHORIZATION:"/_mcp/oauth2/auth",MCP_TOKEN_PORTAL:"/_mcp/oauth2/token-portal",MCP_CALLBACK:"/_mcp/oauth/callback",SCORECARDS:"/scorecards"};var c;(function(t){t.AI_SEARCH="aiSearch"})(c||(c={}));const b="/login",F="/invite",H={AUTH0_PASS:"/auth/auth0-pass"},y={NotExist:"ENOENT"},v="default_locale",B="sidebar-",f="PUBLIC_",k="branch.",V=["BROKEN_LINK","MARKDOC","RESOLVE"],Y=["logo","navbar","products","footer","sidebar","scripts","links","feedback","search","aiAssistant","colorMode","navigation","codeSnippet","markdown","openapi","graphql","analytics","userMenu","versionPicker","breadcrumbs","catalog","entitiesCatalog","scorecard","scorecards","scorecardClassic","mcp","banner"],A="redocly_category",K="redocly_product",w="redocly_version",j="redocly_teams",q=A,$={asyncapi:"asyncapi",apiFunctions:"apiFunctions",reactPages:"reactPages",catalog:"catalog",catalogClassic:"catalogClassic",lint:"lint",scorecard:"scorecard",scorecards:"scorecards",l10n:"l10n",openapi:"openapi",graphql:"graphql",markdown:"markdown",devOnboarding:"devOnboarding",seo:"seo",redirects:"redirects",customPlugins:"customPlugins",themeEjecting:"themeEjecting",products:"products",breadcrumbs:"breadcrumbs",mockServer:"mockServer",sso:"sso",rbac:"rbac",analytics:"analytics",removeAttribution:"removeAttribution",advancedSearch:"advancedSearch",soap:"soap",ssoDirect:"ssoDirect",codeWalkthrough:"codeWalkthrough",aiSearchLimit:"aiSearchLimit",mcp:"mcp",banner:"banner"};export{M as ALLOWED_CORS_ORIGINS,p as ASYNC_API_DOCS_TEMPLATE_ID,k as BRANCH_ENV_PREFIX,E as CATALOG_ENTITY_ID,e as CATALOG_ENTITY_KEY,n as CATALOG_ENTITY_RELATION_ID,x as CONFIG_FILE_NAME,L as CUSTOM_MARKDOC_OPTIONS_PATH,I as CUSTOM_MARKDOC_TAGS_PATH,d as DEFAULT_ANONYMOUS_VISITOR_TEAM,N as DEFAULT_AUTHENTICATED_TEAM,S as DEFAULT_COOKIE_EXPIRATION,v as DEFAULT_LOCALE_PLACEHOLDER,P as DEFAULT_RBAC_SCOPE,u as DEFAULT_SSO_IDP_TITLE,h as DEFAULT_THEME_NAME,b as DEV_LOGIN_SLUG,m as EJECT_COMPONENT_URL,H as ExternalRoutes,$ as FEATURE,_ as FEEDBACK_TYPES,y as FsErrors,U as GLOBAL_DATA_URL,R as GRAPHQL_SPEC_SLUG,i as GRAPHQL_TEMPLATE_ID,F as INVITE_SLUG,V as MARKDOC_ERROR_TYPES,O as OPENAPI_DOCS_TEMPLATE_ID,f as PUBLIC_ENV_PREFIX,C as PUBLIC_RBAC_SCOPE_ITEM,s as RBAC_ALL_OTHER_TEAMS,l as REQUIRED_OIDC_SCOPES,c as RbacFeatures,A as SEARCH_CATEGORY_FIELD,q as SEARCH_GROUP_FACET_FIELD,K as SEARCH_PRODUCT_FIELD,j as SEARCH_RBAC_FIELD,w as SEARCH_VERSION_FIELD,r as SERVER_EDITOR_APP_URL,B as SIDEBAR_PREFIX,G as ServerRoutes,D as TRANSLATIONS_FILE_NAME,Y as UI_ACCESSIBLE_CONFIG_PROPS,g as USER_THEME_ALIAS,a as cliCommandNames};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pathToFileURL as
|
|
1
|
+
import{pathToFileURL as t}from"url";import{slash as e}from"../../utils/path/slash.js";import{envConfig as i}from"../../config/env-config.js";async function m(r){return i.isRuntimeMode?await import("@portal/api-request-handlers"):await import(t(`${e(r)}/api-request-handlers-entry.js`)+"?"+new Date)}export{m as importApiRoutesHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as p from"workerpool";import{withPathPrefix as f}from"@redocly/theme/core/utils";import{envConfig as d}from"../../config/env-config.js";import{telemetry as a}from"../telemetry/index.js";import{TimeoutExceededError as E}from"./errors/timeout-exceeded.js";import{serializeRequest as _}from"./helpers/serialize-request.js";import{apiRoutesWorkers as A,API_ROUTES_WORKER_KEY as T}from"../workers/api-routes-worker-pool.js";import{API_FUNCTIONS_REQUEST_HANDLER_ID as m}from"../plugins/api-functions/index.js";const h=1e4,g=15;async function v(e,r,t){a.initialize();const s=r.get("auth"),i=await t.resolveRouteStaticData(e)||{},n=f(e.slug);try{const{status:o,headers:l,body:c}=await A.exec(T,[{serverOutDir:t.serverOutDir,slug:n,requestHandlerId:e.requestHandlerId,maxResponseSizeMB:g,ctxData:{user:{teams:s.teams,email:s.claims.email,claims:s.claims,idpAccessToken:s.idpAccessToken,idpId:s.claims.idpId,isAuthenticated:s.isAuthenticated},config:t.config},staticData:{...i,props:{...i.props,routeSlug:n,outdir:t.outdir}},req:await _(r.req.raw),sqldRemoteDatabaseUrl:d.SQLD_REMOTE_DATABASE_URL,sqldRemoteDatabaseAuthToken:d.SQLD_REMOTE_DATABASE_AUTH_TOKEN}],{timeout:h});R({requestHandlerId:e.requestHandlerId,body:c,headers:l,status:o,ctx:r});const u=c.data?Buffer.from(c.data):null;return new Response(u,{status:o,headers:l})}catch(o){throw M({requestHandlerId:e.requestHandlerId,error:o}),o instanceof p.Promise.TimeoutError?new E("Timeout exceeded"):o}}function R({requestHandlerId:e,body:r,headers:t,status:s,ctx:i}){e.startsWith(m)?a.sendApiFunctionCalledMessage([{object:"api_function",error:null,handler:e,body:r,headers:t,status:s}]):a.sendMockServerCalledMessage([{object:"mock_server",error:null,handler:e,body:r,headers:{"user-agent":i.req.header("user-agent")??""},status:s}])}function M({requestHandlerId:e,error:r}){const t={handler:e,message:r?.message??null,stack:r?.stack??null};e.startsWith(m)?a.sendApiFunctionErrorMessage([{object:"api_function",...t}]):a.sendMockServerErrorMessage([{object:"mock_server",...t}])}export{v as runApiRoutesWorker,M as sendTelemetryErrorMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ServerRoutes as r,USER_THEME_ALIAS as
|
|
1
|
+
import{ServerRoutes as r,USER_THEME_ALIAS as I}from"../../constants/common.js";import{envConfig as E}from"../../config/env-config.js";const O="runtime",D="/assets",N="/_spec",C="/_bundle",x="static",U="redocly:::linkOriginal",M="@",P="default",l=new RegExp("((?!@i18n\\/|@l10n\\/)\\/?@.*?(?=\\/))","g"),i="@redocly/theme/plugin.js",a="styles.css",m=["@theme/plugin.js","@theme/plugin.cjs","@theme/plugin.mjs"],F=E.JWT_SECRET_KEY||"test_secret_key",L="@i18n",c="@l10n",u=[I,L,c],G="https://redocly.com/auth/aud",H="catalog.json",Y="scorecard.json",d="page-count.json",g="sitemap.xml",K="llms.txt",o=E.PROJECT_ID,e=E.PROJECT_SLUG,R=E.ORGANIZATION_ID,n=E.ORG_SLUG,_=E.BH_API_URL,t=_&&n&&e?`${_}/orgs/${n}/projects/${e}`:void 0,s=_&&R&&o?`${_}/orgs/${R}/projects/${o}`:void 0,A=_?`${_}/entitlements/.well-known/jwks`:"https://app.cloud.redocly.com/api/entitlements/.well-known/jwks",B=E.ENTITLEMENTS_JWKS_CDN_URL||A,j=t?`${t}/feedback`:"",J=s?`${s}/ai-agentic-conversations`:"",h=t&&`${t}/registry/apis`,W=t&&`${t}/registry/paths`,$="no-store",y=365*24*60*60,f=E.AUTH_URL,k="Developer Documentation",T=E.REDOCLY_SSR_RENDER_MODE==="worker"?"worker":"main",w=T==="main"?0:E.REDOCLY_SSR_WORKERS_MIN!=null?Number(E.REDOCLY_SSR_WORKERS_MIN):2,V=T==="main"?1:E.REDOCLY_SSR_WORKERS_MAX!=null?Number(E.REDOCLY_SSR_WORKERS_MAX):5,X="-----BEGIN CERTIFICATE-----",v="-----END CERTIFICATE-----",b=E.REDOCLY_TELEMETRY_ENDPOINT||"https://app.cloud.redocly.com/api/telemetry/project",Z=!E.isDevelopMode&&E.REDOCLY_TELEMETRY!=="off"||E.REDOCLY_TELEMETRY==="on",q="http://localhost:4318/v1/traces",z=[r.HEALTH];export{G as ALTERNATIVE_AUD_CLAIM_NAME,J as ASK_AI_API_URL,f as AUTH_URL,X as BEGIN_CERTIFICATE_DELIMITER,t as BH_API_PROJECTS_URL,s as BH_API_PROJECTS_URL_V2,$ as CACHE_CONTROL_NO_CACHE_HEADER_VALUE,H as CATALOG_OUTPUT_FILE_NAME,y as DEFAULT_IMMUTABLE_CACHE_MAX_AGE,m as DEFAULT_PROJECT_PLUGIN_PATHS,i as DEFAULT_THEME_PLUGIN_PATH,k as DEFAULT_TITLE,P as DEFAULT_VERSION_NAME,N as DEPRECATED_PUBLIC_API_DEFINITIONS_FOLDER,v as END_CERTIFICATE_DELIMITER,B as ENTITLEMENTS_JWKS_URL,j as FEEDBACK_API_URL,L as I18N_DIR_NAME,F as JWT_SECRET_KEY,c as L10N_DIR_NAME,U as LINK_ORIGINAL_ATTR_NAME,K as LLMS_TXT_FILE_NAME,R as ORG_ID,n as ORG_SLUG,z as OTEL_EXCLUDED_ROUTES,q as OTEL_TRACES_DEV_URL,d as PAGE_COUNT_OUTPUT_FILE_NAME,o as PROJECT_ID,e as PROJECT_SLUG,C as PUBLIC_API_DEFINITIONS_FOLDER,D as PUBLIC_ASSETS_FOLDER,x as PUBLIC_STATIC_FOLDER,h as REGISTRY_APIS_API_URL,W as REGISTRY_APIS_PATHS_API_URL,u as RESERVED_DIR_NAMES,O as RUNTIME_RESOURCES_DIR,Y as SCORECARD_OUTPUT_FILE_NAME,g as SITEMAP_FILE_NAME,T as SSR_RENDER_MODE,V as SSR_WORKERS_MAX,w as SSR_WORKERS_MIN,a as STYLES_FILE,Z as TELEMETRY_ENABLED,b as TELEMETRY_ENDPOINT,l as VERSIONED_FOLDER_REGEXP_MATCH,M as VERSION_SEPARATOR};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ENTITLEMENTS_JWKS_URL as o}from"../constants/common.js";import{PLAN_GATES_DEFAULTS as c}from"../constants/entitlements.js";import{
|
|
1
|
+
import{ENTITLEMENTS_JWKS_URL as o}from"../constants/common.js";import{PLAN_GATES_DEFAULTS as c}from"../constants/entitlements.js";import{envConfig as s}from"../../config/env-config.js";import{logger as a}from"../tools/notifiers/logger.js";import{reporter as l}from"../tools/notifiers/reporter.js";import*as i from"../web-server/jwt/jwt.js";import{AlgorithmTypes as m}from"../web-server/jwt/types.js";import{PRODUCT_GATES as p}from"../../config/product-gates.js";import{EJECT_IGNORE_CONFIG as f}from"../../config/eject-ignore.js";class r{static#e;#a=null;#t={};constructor(){}static instance(){return r.#e||(r.#e=new r),r.#e}get entitlements(){return this.#a}async init(t={}){this.#t=t;try{await this.#i()}catch(e){a.warn("Failed to process entitlements information: "+e.message),a.verbose(e.message)}}canAccessFeature=t=>t?this.entitlements&&!!this.entitlements[t]:!0;async getPackageEjectIgnore(){let t=[];for(const[e,n]of Object.entries(f))this.canAccessFeature(e)&&(t=[...t,...n]);return t}#n(){return s.PLAN_GATES||""}async#r(){let t;try{t=await fetch(o).then(e=>e.json())}catch(e){return a.warn("Failed to get JWKS information: "+e.message),!1}try{const e=t.keys&&t.keys.length>0?t.keys[0]:null,n=this.#n();return e&&n?await i.verify(n,e,m.RS256,this.#t.ignoreTokenExpiration):!1}catch(e){return a.warn("Failed to verify plan gates token: "+e.message),!1}}async#s(){if(await this.#r()){const{payload:t}=i.decode(this.#n());if(t){if(!s.REDOCLY_ENV&&t.exp){const e=t.exp*1e3,n=new Date(e);a.info(`Entitlements token expires on ${n.toISOString()} (in ${Math.ceil((e-new Date().getTime())/(1440*60*1e3))} days)`)}return t}}await l.panicOnContentError("Plan gates token is not valid or empty.")}async#i(){const t=this.#t.developModePlan&&!this.#n()?c[this.#t.developModePlan]:await this.#s();this.#a={...p,...t}}}export{r as EntitlementsProvider};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as E from"esbuild";import{logger as c}from"../tools/notifiers/logger.js";import{reporter as f}from"../tools/notifiers/reporter.js";import{envConfig as u}from"../../config/env-config.js";import{telemetry as m}from"../../cli/telemetry/index.js";import{stopAllCompilers as M}from"./esbuild.js";import{getCodeframe as w}from"../utils/codeframes/codeframes.js";import{shutdowner as x}from"../tools/shutdowner.js";class N extends Error{errors;warnings;constructor({errors:e=[],warnings:r=[]}){super(),this.errors=e,this.warnings=r}}async function S({errors:n,warnings:e}){const r=await d(n,"error"),s=await d(e,"warning");e.forEach((t,o)=>{c.warn(s[o])}),n.forEach((t,o)=>{const i=t.location?.file||"";i&&i.includes("node_modules/")?(c.error(r[o]),m.sendCliErrorCaughtMessage({message:JSON.stringify(t)})):(c.contentError(r[o]),m.sendCliErrorCaughtMessage({message:JSON.stringify(t),scope:"content"}))}),n.length&&u.isBuildMode&&(await M(),await x.exitWithCode(1))}async function d(n,e){switch(u.PORTAL_LOG_FORMAT){case"JSON":return n.map(r=>JSON.stringify(r));default:return await E.formatMessages(n,{kind:e,color:!1,terminalWidth:0})}}function y(n,e){if(!e?.lineText)return{line:1,column:1,lines:n.split(`
|
|
2
2
|
`),hasMatched:!1};const r=n.split(`
|
|
3
|
-
`),{lineText:s}=e,t=i=>{const a=i.indexOf(s);return a===-1?null:a};if(e.line&&e.line<=r.length&&t(r[e.line-1]))return{line:e.line,column:e.column||1,lines:r,hasMatched:!0};const o=r.findIndex(i=>t(i)!==null);if(o>=0){const i=t(r[o]);return{line:o+1,column:(i??0)+1,lines:r,hasMatched:!0}}return{line:1,column:1,lines:r,hasMatched:!1}}function _(n,e,r,s){const{line:t,column:o,lines:i,hasMatched:a}=y(r,s),{frame:
|
|
3
|
+
`),{lineText:s}=e,t=i=>{const a=i.indexOf(s);return a===-1?null:a};if(e.line&&e.line<=r.length&&t(r[e.line-1]))return{line:e.line,column:e.column||1,lines:r,hasMatched:!0};const o=r.findIndex(i=>t(i)!==null);if(o>=0){const i=t(r[o]);return{line:o+1,column:(i??0)+1,lines:r,hasMatched:!0}}return{line:1,column:1,lines:r,hasMatched:!1}}function _(n,e,r,s){const{line:t,column:o,lines:i,hasMatched:a}=y(r,s),{frame:h,start:p}=w({start:{line:t,character:o},end:{line:t,character:o+(s?.lineText?.length||0)},lines:i},!0),g=`${n}::${e}::${t}`,l={message:n,sourceFileRelativePath:e,sourceFileLocation:p,codeframe:h,hasMatched:a};return f.getCompilationProblem(g)||f.reportCompilationError({type:"ERROR",severity:"ERROR",...l}),l}export{N as EsbuildError,S as esbuildLogger,_ as reportEsbuildError};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{context as m}from"esbuild";import{mkdirSync as j,writeFileSync as b,existsSync as M}from"node:fs";import*as a from"node:path";import{RUNTIME_RESOURCES_DIR as Y,TELEMETRY_ENABLED as k}from"../constants/common.js";import{fromCurrentDir as r}from"../utils/paths.js";import{NodeBrowserPlugin as
|
|
2
|
-
const require = topLevelCreateRequire(import.meta.url);`},platform:"node",define:{"process.env.NODE_ENV":`"${t}"`,"process.env.
|
|
1
|
+
import{context as m}from"esbuild";import{mkdirSync as j,writeFileSync as b,existsSync as M}from"node:fs";import*as a from"node:path";import{RUNTIME_RESOURCES_DIR as Y,TELEMETRY_ENABLED as k}from"../constants/common.js";import{fromCurrentDir as r}from"../utils/paths.js";import{NodeBrowserPlugin as P}from"./plugins/node-browser.js";import{PortalImport as l}from"./plugins/portal-import.js";import{ThemesResolver as u}from"./plugins/themes-resolver.js";import{AssetsResolver as E}from"./plugins/assets-resolver.js";import{EsbuildErrorCollector as _}from"./plugins/esbuild-compile-resolver.js";import{OpenapiDocsModuleReplacer as R}from"./plugins/openapi-docs-module-replacer/index.js";import{ServerPropsResolver as f}from"./plugins/server-props-resolver.js";import{StyledComponentsSSR as v}from"./plugins/styled-components-ssr.js";import{DependencyResolver as d}from"./plugins/dependency-resolver.js";import{YamlLoader as D}from"./plugins/yaml-loader.js";import{ApiRequestHandlersResolver as S}from"./plugins/api-request-handlers-resolver.js";import{MiddlewareResolver as A}from"./plugins/middleware-resolver.js";import{OnRebuild as N}from"./plugins/on-rebuild.js";import{getPublicEnvVariables as V}from"../utils/envs/get-public-env-variables.js";import{PORTAL_VERSION as I}from"../version.js";import{AsyncApiPatch as L}from"./plugins/async-api-patch.js";import{telemetryTraceStep as T}from"../../cli/telemetry/helpers/trace-step.js";const O={bundle:!0,format:"esm",chunkNames:"chunks/[name]-[hash]"};function C(e){const o=a.join(e,"tsconfig.json");return M(o)?o:void 0}const p=new Set;async function ie(){await Promise.all([...p].map(e=>e.dispose())),p.clear()}async function ce(e,o,t="production",n){return await T("build.create_client_compiler",async()=>{const c=V(),i={};Object.entries(c).map(([g,h])=>i[`process.env.${g}`]=JSON.stringify(h));const s=[...n?[N(n)]:[],P({path:"path-browserify",fs:"{}",tty:"tty-browserify",os:"os-browserify",http:"stream-http",https:"stream-http",readline:"{}",crypto:"{}",stream:"{}",zlib:"{}","https-proxy-agent":"{}"}),u(e,e.contentDir),E(e,e.contentDir),_(e,e.contentDir),f(e),d(),l(),D(),L(),v(),R()],w=[r(import.meta.url,"../../client/browser-entry.js"),r(import.meta.url,"../../client/user-tags-entry.js")],y=await m({...O,entryPoints:w,outdir:a.join(o,Y),sourcemap:t!=="production"&&process.env.ENABLE_SOURCE_MAPS==="true",plugins:s,tsconfig:C(e.contentDir),mainFields:["browser","module","main"],metafile:t!=="production",minify:t==="production",splitting:!0,external:["constants","zlib","stream","https","vm","module","worker_threads","child_process","@swc/core"],inject:[process.env.INSPECT_MODE==="true"?r(import.meta.url,"../../client/inspect-mode-hooks.js"):"",r(import.meta.url,"./web-shim.js")].filter(Boolean),define:{...i,"process.env.NODE_ENV":`"${t}"`,"process.env.REDOCLY_INTERNAL_DEV":`"${process.env.REDOCLY_INTERNAL_DEV}"`,"process.env.SERVER_EDITOR_APP_URL":`"${process.env.SERVER_EDITOR_APP_URL}"`,"process.env.ENABLE_COMMENTS":`"${process.env.ENABLE_COMMENTS}"`,"process.env.REDOCLY_TELEMETRY":k?'""':'"off"',"process.env.REDOCLY_PORTAL_VERSION":`"${I}"`,"process.env":`{"NODE_ENV": "${t}"}`,"process.platform":'"browser"',"process.browser":"true","module.hot":"false",global:"{}",...process.env.REDOCLY_PREFIX_PATHS&&{"process.env.REDOCLY_PREFIX_PATHS":`"${process.env.REDOCLY_PREFIX_PATHS}"`},...process.env.INSPECT_MODE==="true"&&{"process.env.INSPECT_MODE":`${process.env.INSPECT_MODE}`},...process.env.MAIN_API_URL&&{"process.env.MAIN_API_URL":`"${process.env.MAIN_API_URL}"`}},logLevel:"silent"});return p.add(y),y})}async function pe(e,o,t="development",n){j(o,{recursive:!0}),b(a.join(o,"package.json"),JSON.stringify({name:"@redocly/portal/server-cache",type:"module"}));const c=[...n?[N(n)]:[],u(e,e.contentDir),E(e,e.contentDir),_(e,e.contentDir),f(e),S(e),A(e),d(),l(),D(),L(),v(),R()],i=[r(import.meta.url,"../../client/server-entry.js"),r(import.meta.url,"../../client/user-tags-entry.js"),r(import.meta.url,"../../client/server-props-entry.js"),r(import.meta.url,"../../client/api-request-handlers-entry.js"),r(import.meta.url,"../../client/middleware-entry.js")],s=await m({...O,entryPoints:i,outdir:o,plugins:c,sourcemap:t!=="production"&&process.env.ENABLE_SOURCE_MAPS==="true",minify:t==="production",tsconfig:C(e.contentDir),mainFields:["module","main"],splitting:!0,external:["react","react-router-dom","@dr.pogodin/react-helmet","@swc/core","pnpapi","canvas"],banner:{js:`import { createRequire as topLevelCreateRequire } from 'module';
|
|
2
|
+
const require = topLevelCreateRequire(import.meta.url);`},platform:"node",define:{"process.env.NODE_ENV":`"${t}"`,"process.env.REDOCLY_INTERNAL_DEV":`"${process.env.REDOCLY_INTERNAL_DEV}"`,"module.hot":"false"},logLevel:"silent"});return p.add(s),s}async function me(e,o,t="production",n){return await T("build.create_server_compiler",async()=>{const c=[...n?[N(n)]:[],P({"node-fetch":"{}",webpack:"{}",swagger2openapi:"{}"}),u(e,e.contentDir),E(e,e.contentDir),_(e,e.contentDir),f(e),S(e),A(e),d(),l(),D(),L(),v(),R()],i=[{in:r(import.meta.url,"../node-bundle-entry.js"),out:"index"},{in:r(import.meta.url,"../../client/user-tags-entry.js"),out:"user-tags-entry"},{in:r(import.meta.url,"../workers/api-routes-worker.js"),out:"api-routes-worker"},{in:r(import.meta.url,"../workers/scorecards-worker.js"),out:"scorecards-worker"},{in:r(import.meta.url,"../workers/mcp-tool-worker.js"),out:"mcp-tool-worker"}],s=await m({...O,entryPoints:i,outExtension:{".js":".mjs"},outdir:o,platform:"node",plugins:c,tsconfig:C(e.contentDir),mainFields:["module","main"],metafile:t!=="production",minify:t==="production",splitting:!1,define:{"process.env.NODE_ENV":`"${t}"`,"process.env.REDOCLY_INTERNAL_DEV":`"${process.env.REDOCLY_INTERNAL_DEV}"`,"process.env.REDOCLY_EXECUTION_MODE":'"runtime"',"process.env.REDOCLY_PORTAL_VERSION":`"${I}"`,"module.hot":"false",...process.env.REDOCLY_PREFIX_PATHS&&{"process.env.REDOCLY_PREFIX_PATHS":`"${process.env.REDOCLY_PREFIX_PATHS}"`}},banner:{js:`import { createRequire as topLevelCreateRequire } from 'module';
|
|
3
3
|
const require = topLevelCreateRequire(import.meta.url);`},logLevel:"silent"});return p.add(s),s})}export{ce as createClientCompiler,me as createNodeBundleCompiler,pe as createServerCompiler,ie as stopAllCompilers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"path";import{existsSync as d,readFileSync as v}from"fs";import{USER_THEME_ALIAS as w}from"../../../constants/common.js";import{setMapValue as m}from"../../../utils/collection/set-map-value.js";import{isLocalLink as S}from"../../../utils/path/is-local-link.js";import{reporter as E}from"../../tools/notifiers/reporter.js";import{
|
|
1
|
+
import*as i from"path";import{existsSync as d,readFileSync as v}from"fs";import{USER_THEME_ALIAS as w}from"../../../constants/common.js";import{setMapValue as m}from"../../../utils/collection/set-map-value.js";import{isLocalLink as S}from"../../../utils/path/is-local-link.js";import{reporter as E}from"../../tools/notifiers/reporter.js";import{envConfig as P}from"../../../config/env-config.js";import{copyStaticFile as x}from"../../utils/index.js";import{reportEsbuildError as y}from"../esbuild-logger.js";const f=/\.(gif|jpe?g|tiff?|png|webp|bmp|eot|otf|woff|woff2|ttf|pdf|svg|mp4|webm)$/i,A=["require-call","dynamic-import"],L=(u,n)=>{const l=i.resolve(n,w),t=new Map,r=new Map;return{name:"esbuild-redocly-custom-assets-resolver",setup:a=>{a.onStart(()=>{r.clear(),E.clearEsbuildProblems()}),a.onResolve({filter:f},async e=>{if(!S(e.path))return{external:!0};const o=i.resolve(e.resolveDir,e.path);if(!d(o)){if(P.isDevelopMode&&!A.includes(e.kind)){r.has(e.importer)||r.set(e.importer,v(e.importer,"utf-8"));const p=r.get(e.importer),h=i.relative(n,e.importer);return y(`Could not resolve asset: ${e.path}`,h,p,{lineText:e.path}),{external:!0}}return}const s=e.kind+":"+o;if(t.has(s))return t.get(s);const c=await x(e.resolveDir,o,u.outdir);if(e.kind==="url-token")return m(t,s,{external:!0,path:c,watchDirs:[l]});{const p=i.relative(n,o);return m(t,s,{namespace:"assets-ns",path:p,pluginData:{assetPath:c},watchDirs:[l]})}}),a.onLoad({filter:f,namespace:"assets-ns"},({pluginData:e})=>({contents:e.assetPath,loader:"text"}))}}};export{L as AssetsResolver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{relative as p,resolve as d}from"node:path";import{readFileSync as E}from"node:fs";import{
|
|
1
|
+
import{relative as p,resolve as d}from"node:path";import{readFileSync as E}from"node:fs";import{envConfig as b}from"../../../config/env-config.js";import{reportEsbuildError as c}from"../esbuild-logger.js";import{babelCache as h}from"../babel-cache.js";const M=(i,r)=>({name:"esbuild-error-collector",setup:a=>{a.onEnd(l=>{if(!b.isDevelopMode)return;const m=l.errors.map(o=>{const e=o?.location?.file||"",t=p(r,e),f=E(e,"utf8"),n=c(o.text,t,f,o?.location);if(!n?.hasMatched){const u=d(r,t),s=h.get(u)?.contents;if(s)return c(o.text,t,s,o?.location)}return n});i.compilationErrors=m})}});export{M as EsbuildErrorCollector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import f from"@babel/core";import h from"node:fs";import
|
|
1
|
+
import f from"@babel/core";import h from"node:fs";import r from"node:path";import d from"babel-plugin-styled-components";import u from"crypto";import{envConfig as m}from"../../../config/env-config.js";import{babelCache as i}from"../babel-cache.js";const A=()=>({name:"styled-components-ssr",setup:c=>{const l=process.cwd();c.onLoad({filter:/\.[tj]sx?$/},async t=>{if(new RegExp(`${r.sep}replay-[A-Za-z0-9_-]+.js$`).test(t.path)||t.path.endsWith(`${r.sep}replay.js`)||t.path.includes(`${r.sep}replay-index-`)&&t.path.endsWith(".js")||t.path.includes(`${r.sep}replay-tauri-path-`)&&t.path.endsWith(".js"))return;let e=t.path.split(".").pop();const s=i.get(t.path);if(s&&t.path.includes("/node_modules/"))return{contents:s.contents,loader:e};let p=["importMeta","topLevelAwait","classProperties","classPrivateProperties","classPrivateMethods","jsx"];(e==="tsx"||e==="ts")&&p.push("typescript");let o=await h.promises.readFile(t.path,"utf8");if(o.indexOf("styled-components")===-1)return{contents:o,loader:e};const a=u.createHash("sha1").update(o).digest("base64");if(s&&s.hash===a)return{contents:s.contents,loader:e};try{const n=(await f.transformAsync(o,{babelrc:!1,configFile:!1,ast:!1,root:l,filename:t.path,parserOpts:{allowAwaitOutsideFunction:!0,plugins:p},generatorOpts:{decoratorsBeforeExport:!0},plugins:[d],sourceMaps:!1}))?.code||void 0;return i.set(t.path,{contents:n,hash:a}),{contents:n,loader:e}}catch(n){if(!m.isDevelopMode)throw n;return{contents:o,loader:e}}})}});export{A as StyledComponentsSSR};
|
|
@@ -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 e}from"../../../config/env-config.js";const r=["is-ignored-inline-loader","graphql-doc","wsdl","content-slugs","markdown-inline-parser","openapi-markdoc-inline-parser","asyncapi-markdoc-inline-parser"];function o(n){return e.isBuildMode?!r.includes(n):!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};
|