@redocly/redoc 0.132.0 → 0.133.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 +31 -6
- package/dist/cli/build/copy-env-files.js +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/telemetry/index.js +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntityRevisions.js +1 -1
- package/dist/constants/common.d.ts +2 -1
- package/dist/constants/common.js +1 -1
- package/dist/server/config/env-config.d.ts +157 -8
- package/dist/server/config/env-config.js +1 -1
- package/dist/server/config/env-schema.d.ts +148 -185
- package/dist/server/config/env-schema.js +1 -3
- package/dist/server/config/env-schemas/auth.d.ts +4 -4
- package/dist/server/config/env-schemas/auth.js +1 -1
- package/dist/server/config/env-schemas/catalog.d.ts +2 -2
- package/dist/server/config/env-schemas/catalog.js +1 -1
- package/dist/server/config/env-schemas/environment-detection.d.ts +13 -13
- package/dist/server/config/env-schemas/environment-detection.js +1 -1
- package/dist/server/config/env-schemas/feature-flags.d.ts +9 -6
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/config/env-schemas/search.d.ts +1 -1
- package/dist/server/config/env-schemas/search.js +1 -1
- package/dist/server/config/env-schemas/server-config.d.ts +2 -2
- package/dist/server/config/env-schemas/server-config.js +1 -1
- package/dist/server/constants/entitlements.js +1 -1
- package/dist/server/esbuild/esbuild-logger.js +3 -3
- package/dist/server/esbuild/esbuild.js +2 -2
- package/dist/server/persistence/kv/repositories/kv-remote-repository.d.ts +2 -0
- package/dist/server/persistence/kv/repositories/kv-remote-repository.js +2 -2
- package/dist/server/persistence/kv/services/kv-service.js +1 -1
- 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/base.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/extractors/fs-entities-extractor.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/enforce-login/index.js +1 -1
- package/dist/server/plugins/entitlements/utils/get-billed-catalog-build-pages-count.js +1 -1
- package/dist/server/plugins/lifecycle.js +1 -1
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +26 -26
- package/dist/server/plugins/scorecards/plugin.js +1 -1
- package/dist/server/providers/database/base-repository.d.ts +1 -0
- package/dist/server/providers/database/base-repository.js +5 -1
- package/dist/server/providers/database/database-preconnect-service.js +1 -1
- package/dist/server/providers/database/pagination/utils/extract-equal-filter-clause-value.d.ts +6 -0
- package/dist/server/providers/database/pagination/utils/extract-equal-filter-clause-value.js +1 -0
- package/dist/server/providers/database/pagination/utils/index.d.ts +1 -0
- package/dist/server/providers/database/pagination/utils/index.js +1 -1
- package/dist/server/providers/database/utils/storage-limit-validator.d.ts +13 -0
- package/dist/server/providers/database/utils/storage-limit-validator.js +1 -0
- 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/utils/envs/env-boolean-string.d.ts +12 -0
- package/dist/server/utils/envs/env-boolean-string.js +1 -0
- 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/version.js +1 -1
- package/dist/server/web-server/routes/catalog/bff-catalog-revisions.js +1 -1
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/feedback.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/otel/otel.d.ts +2 -16
- package/dist/server/web-server/routes/otel/otel.js +1 -1
- package/dist/server/web-server/routes/otel/otlp.d.ts +4 -1
- package/dist/server/web-server/routes/otel/otlp.js +1 -1
- package/dist/server/web-server/routes/static-content.js +1 -1
- package/dist/server/web-server/utils/content-type.d.ts +2 -0
- package/dist/server/web-server/utils/content-type.js +1 -0
- package/dist/types/entitlements.d.ts +1 -0
- package/package.json +12 -12
- package/dist/server/config/env-schemas/test.d.ts +0 -22
- package/dist/server/config/env-schemas/test.js +0 -1
- package/dist/server/utils/envs/write-env-variable.d.ts +0 -18
- package/dist/server/utils/envs/write-env-variable.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,40 @@
|
|
|
1
1
|
# @redocly/redoc
|
|
2
2
|
|
|
3
|
+
## 0.133.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 36c67eafc25: Fixed rendering of non-Latin characters by enforcing UTF-8 encoding.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 8a1e45e9493: Fixed security vulnerability `GHSA-39q2-94rc-95cp` by upgrading `dompurify` to version `3.4.0`.
|
|
12
|
+
- 27cc506931d: Updated `@redocly/openapi-core` to version `2.29.0`.
|
|
13
|
+
- 39f8473e10e: Updated `@redocly/openapi-core` to version `2.27.1`.
|
|
14
|
+
- db587e909d6: Fixed security vulnerability `CVE-2026-39356` by upgrading `drizzle-orm` to version `0.45.2`.
|
|
15
|
+
- a1bb760b292: Fixed an issue where the tooltips in API docs and Replay might partially render outside the viewport.
|
|
16
|
+
- b90d4351949: Fixed multiple moderate security vulnerabilities in `hono` dependency by upgrading it to version `4.12.14`.
|
|
17
|
+
- d1c6eadeb44: Enter prerelease mode.
|
|
18
|
+
- Updated dependencies [8a1e45e9493]
|
|
19
|
+
- Updated dependencies [36c67eafc25]
|
|
20
|
+
- Updated dependencies [27cc506931d]
|
|
21
|
+
- Updated dependencies [f2a18386e51]
|
|
22
|
+
- Updated dependencies [39f8473e10e]
|
|
23
|
+
- Updated dependencies [a1bb760b292]
|
|
24
|
+
- Updated dependencies [d1c6eadeb44]
|
|
25
|
+
- Updated dependencies [4002f20f63b]
|
|
26
|
+
- @redocly/openapi-docs@3.21.0-next.0
|
|
27
|
+
- @redocly/theme@0.65.0-next.0
|
|
28
|
+
- @redocly/realm-asyncapi-sdk@0.11.0-next.0
|
|
29
|
+
- @redocly/portal-plugin-mock-server@0.18.0-next.0
|
|
30
|
+
- @redocly/portal-legacy-ui@0.16.0-next.0
|
|
31
|
+
- @redocly/asyncapi-docs@1.10.0-next.0
|
|
32
|
+
- @redocly/graphql-docs@1.10.0-next.0
|
|
33
|
+
|
|
3
34
|
## 0.132.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
|
6
37
|
|
|
7
|
-
- e756f2aad5: Added a `palette` configuration option that applies one of built-in color palettes to the project.
|
|
8
38
|
- ae3272861b: Added support for `x-badges` in OpenAPI and AsyncAPI parameters and schema properties.
|
|
9
39
|
Badges can now be rendered before and after field names.
|
|
10
40
|
- ce5a165177: Added support for `or` functions in RBAC conditions within Markdoc content.
|
|
@@ -118,13 +148,8 @@
|
|
|
118
148
|
|
|
119
149
|
## 0.132.0-next.6
|
|
120
150
|
|
|
121
|
-
### Minor Changes
|
|
122
|
-
|
|
123
|
-
- e756f2aad58: Added a `palette` configuration option that applies one of built-in color palettes to the project.
|
|
124
|
-
|
|
125
151
|
### Patch Changes
|
|
126
152
|
|
|
127
|
-
- e4e8c9f42d4: Updated legacy palette styles.
|
|
128
153
|
- c336f96cb65: Updated `@redocly/openapi-core` to version `2.25.2`.
|
|
129
154
|
- d419330f279: Fixed an issue where the build crashed during the search preparation step.
|
|
130
155
|
- 76b78a806c7: Improved keyboard navigation across Replay's input components for more consistent and predictable focus behavior.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"node:path";import{copyFileSync as v,existsSync as s,mkdirSync as u}from"node:fs";import{envConfig as c}from"../../server/config/env-config.js";import{logger as
|
|
1
|
+
import t from"node:path";import{copyFileSync as v,existsSync as s,mkdirSync as u}from"node:fs";import{envConfig as c}from"../../server/config/env-config.js";import{logger as a}from"../../server/tools/notifiers/logger.js";import{sanitizeBranchName as l}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&&a.info(`Env files included in bundle: ${e.map(()=>"%rp").join(", ")}`,...e)},f=()=>{const n=c.REDOCLY_ENV,i=c.PUBLIC_REDOCLY_BRANCH_NAME,e=[".env"];switch(i&&e.push(`.env.branch.${l(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};
|
package/dist/cli/develop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as c}from"../server/tools/notifiers/reporter.js";import{green as v}from"../server/tools/notifiers/helpers/colors.js";import{envConfig as m}from"../server/config/env-config.js";import{resolveCache as w}from"../server/esbuild/plugins/themes-resolver.js";import{getBilledPagesCount as p}from"../server/utils/index.js";import{createClientCompiler as C,createServerCompiler as h}from"../server/esbuild/esbuild.js";import{initPlugins as S,runPlugins as f,writeClientEntries as E}from"../server/plugins/lifecycle.js";import{startDevServer as R}from"../server/web-server/dev-server.js";import{validateAllMarkdowns as b}from"../server/plugins/markdown/compiler.js";import{reportAllErrors as g}from"../server/utils/report-all-errors.js";import{copyMigrationsFolder as y}from"../server/providers/database/copy-migrations.js";import{listenStdin as L}from"./utils/listen-stdin.js";async function J(i,e){t.info("Starting project preview mode."),E(e),t.startTiming("initial-js"),await D(e),t.infoTime("initial-js","JavaScript compiled");const{pluginInstances:a,lifecycleContext:n}=await S({contentDir:e.contentDir,outdir:e.outdir,serverOutDir:void 0,devLogin:i["dev-login"]!==!1,setGlobalConfig:e.setGlobalConfig});e.lifecycleContext=n,y(e),await f(a,e,n,{failFast:!0});const d=async()=>{const r=performance.now();c.clearErrors(),await f(a,e,n),m.REDOCLY_EXP_DISABLE_MD_VALIDATION
|
|
1
|
+
import{logger as t}from"../server/tools/notifiers/logger.js";import{reporter as c}from"../server/tools/notifiers/reporter.js";import{green as v}from"../server/tools/notifiers/helpers/colors.js";import{envConfig as m}from"../server/config/env-config.js";import{resolveCache as w}from"../server/esbuild/plugins/themes-resolver.js";import{getBilledPagesCount as p}from"../server/utils/index.js";import{createClientCompiler as C,createServerCompiler as h}from"../server/esbuild/esbuild.js";import{initPlugins as S,runPlugins as f,writeClientEntries as E}from"../server/plugins/lifecycle.js";import{startDevServer as R}from"../server/web-server/dev-server.js";import{validateAllMarkdowns as b}from"../server/plugins/markdown/compiler.js";import{reportAllErrors as g}from"../server/utils/report-all-errors.js";import{copyMigrationsFolder as y}from"../server/providers/database/copy-migrations.js";import{listenStdin as L}from"./utils/listen-stdin.js";async function J(i,e){t.info("Starting project preview mode."),E(e),t.startTiming("initial-js"),await D(e),t.infoTime("initial-js","JavaScript compiled");const{pluginInstances:a,lifecycleContext:n}=await S({contentDir:e.contentDir,outdir:e.outdir,serverOutDir:void 0,devLogin:i["dev-login"]!==!1,setGlobalConfig:e.setGlobalConfig});e.lifecycleContext=n,y(e),await f(a,e,n,{failFast:!0});const d=async()=>{const r=performance.now();c.clearErrors(),await f(a,e,n),m.REDOCLY_EXP_DISABLE_MD_VALIDATION?t.info("Skipping markdown validation step"):await b(e,n),P().then(async()=>{await g(n);const l=p(e.getAllRoutes()),o=c.summary(` \u{1F440} Last change processed in ${v(Math.round(performance.now()-r)+"ms")}`,l);e.runListeners("errors-updated",void 0,o),e.runListeners("pages-updated",void 0,l),e.runListeners("routes-updated")})};m.REDOCLY_EXP_DISABLE_MD_VALIDATION?t.info("Skipping markdown validation step"):await b(e,n),await g(n);const s=p(e.getAllRoutes());c.summary(" \u{1F440} Watching for changes...",s),e.runListeners("pages-updated",void 0,s),n.fs.watch(async()=>{w.clear(),await d()}),t.verbose("Starting development server."),await R(e,n,{port:Number(i.port||4e3)}),L()}async function D(i){let e=!0,a=!0;const n=r=>{r==="client"?e=!0:a=!0,i.runListeners("build-started"),e!=a&&(i.startEsbuildRun(),t.startTiming("rebuild"))},d=async r=>{r==="client"?e=!1:a=!1,!(e||a)&&(i.finishEsbuildRun(),i.buildRevision++,t.infoTime("rebuild","JavaScript re-compiled"),await i.reloadMarkdocOptions(),i.markUserCodeReady(),i.runListeners("build-updated"),i.lifecycleContext&&i.buildRevision>1&&i.lifecycleContext.fs.emitCodeUpdated())},s=[new Promise((r,l)=>{const o={label:"client",buildStart(){t.verbose("Start compiling client code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Client compiled"),r(!0)},rebuildStart:()=>n("client"),rebuildEnd:()=>d("client")};C(i,i.outdir,"development",o).then(u=>u.watch()).catch(l)}),new Promise((r,l)=>{const o={label:"server",buildStart(){t.verbose("Start compiling server code."),t.startTiming(this.label)},buildEnd(){t.verboseTime(this.label,"Server compiled"),r(!0)},rebuildStart:()=>n("server"),rebuildEnd:()=>d("server")};h(i,i.serverOutDir,"development",o).then(u=>u.watch()).catch(l)})];await Promise.all(s),await i.reloadMarkdocOptions()}function P(){return new Promise(i=>{setTimeout(i,0)})}export{J as develop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AsyncApiRealmCLI as c}from"@redocly/realm-asyncapi-sdk";import{ulid as l}from"ulid";import{TELEMETRY_ENABLED as i}from"../../server/constants/common.js";import{shutdowner as s}from"../../server/tools/shutdowner.js";import{envConfig as r}from"../../server/config/env-config.js";import{PACKAGE_NAME as n}from"../../config/product-gates.js";class d extends c.Telemetry{#e=new Map;constructor(){super(),this.updateCloudEventData(()=>({organizationId:r.ORGANIZATION_ID||"",organizationSlug:r.ORGANIZATION_SLUG||"",projectId:r.PROJECT_ID||"",projectSlug:r.PROJECT_SLUG||"",origin:"realmCli",actor:{id:`ann_${l()}`,object:"user",uri:""},source:"cli",env:r.
|
|
1
|
+
import{AsyncApiRealmCLI as c}from"@redocly/realm-asyncapi-sdk";import{ulid as l}from"ulid";import{TELEMETRY_ENABLED as i}from"../../server/constants/common.js";import{shutdowner as s}from"../../server/tools/shutdowner.js";import{envConfig as r}from"../../server/config/env-config.js";import{PACKAGE_NAME as n}from"../../config/product-gates.js";class d extends c.Telemetry{#e=new Map;constructor(){super(),this.updateCloudEventData(()=>({organizationId:r.ORGANIZATION_ID||"",organizationSlug:r.ORGANIZATION_SLUG||"",projectId:r.PROJECT_ID||"",projectSlug:r.PROJECT_SLUG||"",origin:"realmCli",actor:{id:`ann_${l()}`,object:"user",uri:""},source:"cli",env:r.REDOCLY_ENV}))}initialize(e,t,o){const a=t!==void 0?!(t&&i):!i;this.init({otel:{serviceName:"realm-cli",serviceVersion:`${n}@${e}`,collectorTraceUrl:r.OTEL_TRACES_URL||"https://otel.cloud.redocly.com/v1/traces",isProd:r.isProductionEnv,version:"1.0",tracerName:"cli-telemetry"},disabled:a,verbose:o}),s.registerShutdownCallback(this.#r.bind(this))}addTraceStepCallbacks(e,{error:t,end:o}){this.#e.set(e,{error:t,end:o})}removeTraceStepCallbacks(e){this.#e.delete(e)}async#r(e){for(const[,{error:t,end:o}]of this.#e)e&&t(e),o();this.#e.clear(),await this.forceFlush(),await this.shutdown()}}const m=new d,A=m.tracer;export{m as telemetry,A as telemetryTracer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useQuery as
|
|
1
|
+
import{useQuery as a}from"@tanstack/react-query";import{useMemo as c}from"react";import{withPathPrefix as u}from"@redocly/theme/core/utils";function f(t){return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t:`"${t}"`}function l({entityKey:t,version:e}){const r=a({queryFn:async()=>{const o=new URLSearchParams;o.append("filter",`catalogEntityKey:${f(t)}`),e&&o.append("version",e);const n=new URL(u("/bff/catalog-revisions"),window.location.origin);n.search=o.toString();const i=await fetch(n.toString());if(!i.ok)throw new Error(`Failed to fetch catalog entity revisions from ${n.pathname}`);return i.json()},queryKey:["bff/catalog-revisions",{entityKey:t,version:e}],refetchOnMount:!0}),s=c(()=>r.data?.items??[],[r.data?.items]);return{query:r,items:s}}export{l as useFetchCatalogEntityRevisions};
|
|
@@ -72,7 +72,7 @@ export declare const ServerRoutes: {
|
|
|
72
72
|
readonly CATALOG_ENTITIES_RELATIONS: "/catalog-entities-relations/:entityRelationId?";
|
|
73
73
|
readonly BFF_CATALOG_ENTITIES: "/bff/catalog-entities/:entityKey?";
|
|
74
74
|
readonly BFF_CATALOG_RELATED_ENTITIES: "/bff/catalog-related-entities/:entityKey";
|
|
75
|
-
readonly BFF_CATALOG_REVISIONS: "/bff/catalog-revisions
|
|
75
|
+
readonly BFF_CATALOG_REVISIONS: "/bff/catalog-revisions";
|
|
76
76
|
readonly MCP_OAUTH_AUTHORIZATION_SERVER: "/.well-known/oauth-authorization-server";
|
|
77
77
|
readonly MCP_OAUTH_PROTECTED_RESOURCE: "/.well-known/oauth-protected-resource";
|
|
78
78
|
readonly MCP_DYNAMIC_CLIENT_REGISTRATION: "/_mcp/register";
|
|
@@ -133,6 +133,7 @@ export declare const FEATURE: {
|
|
|
133
133
|
readonly ssoDirect: "ssoDirect";
|
|
134
134
|
readonly codeWalkthrough: "codeWalkthrough";
|
|
135
135
|
readonly aiSearchLimit: "aiSearchLimit";
|
|
136
|
+
readonly kvStorageLimit: "kvStorageLimit";
|
|
136
137
|
readonly mcp: "mcp";
|
|
137
138
|
readonly banner: "banner";
|
|
138
139
|
};
|
package/dist/constants/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const E="openapi_docs",n="asyncapi_docs",A="graphql_docs",T="/_spec-gql",
|
|
1
|
+
const E="openapi_docs",n="asyncapi_docs",A="graphql_docs",T="/_spec-gql",i="markdoc",O="tags",p="*",L={"*":"read"},C=["openid","email"],R=1440*60,I="anonymous",l="authenticated",S="**",d="Reunite",N="translations.yaml",u="redocly.yaml",P="@redocly/theme",D="@theme",h="/app-data.json",g="/eject-component";var o;(function(t){t.BUILD="build",t.DEVELOP="develop",t.PREPARE="prepare"})(o||(o={}));var e;(function(t){t.RATING="rating",t.SENTIMENT="sentiment",t.COMMENT="comment",t.MOOD="mood",t.PROBLEM="problem",t.SCALE="scale"})(e||(e={}));const a="entityKey",_="entityId",c="entityRelationId",x={CORS_PROXY:"/_api/cors",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",SEMANTIC_SEARCH:"/_semantic-search",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/:${_}?`,CATALOG_ENTITIES_RELATIONS:`/catalog-entities-relations/:${c}?`,BFF_CATALOG_ENTITIES:`/bff/catalog-entities/:${a}?`,BFF_CATALOG_RELATED_ENTITIES:`/bff/catalog-related-entities/:${a}`,BFF_CATALOG_REVISIONS:"/bff/catalog-revisions",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 r;(function(t){t.AI_SEARCH="aiSearch"})(r||(r={}));const m="/login",U="/invite",M={AUTH0_PASS:"/auth/auth0-pass"},b={NotExist:"ENOENT"},G="default_locale",H="sidebar-",F="PUBLIC_",y="branch.",v=["BROKEN_LINK","MARKDOC","RESOLVE"],B=["logo","navbar","products","footer","sidebar","scripts","links","feedback","search","aiAssistant","colorMode","palette","navigation","codeSnippet","markdown","openapi","graphql","analytics","userMenu","versionPicker","breadcrumbs","catalog","entitiesCatalog","scorecard","scorecards","scorecardClassic","mcp","banner"],s="redocly_category",k="redocly_product",f="redocly_version",K="redocly_teams",Y=s,V={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",kvStorageLimit:"kvStorageLimit",mcp:"mcp",banner:"banner"};export{n as ASYNC_API_DOCS_TEMPLATE_ID,y as BRANCH_ENV_PREFIX,_ as CATALOG_ENTITY_ID,a as CATALOG_ENTITY_KEY,c as CATALOG_ENTITY_RELATION_ID,u as CONFIG_FILE_NAME,i as CUSTOM_MARKDOC_OPTIONS_PATH,O as CUSTOM_MARKDOC_TAGS_PATH,I as DEFAULT_ANONYMOUS_VISITOR_TEAM,l as DEFAULT_AUTHENTICATED_TEAM,R as DEFAULT_COOKIE_EXPIRATION,G as DEFAULT_LOCALE_PLACEHOLDER,S as DEFAULT_RBAC_SCOPE,d as DEFAULT_SSO_IDP_TITLE,P as DEFAULT_THEME_NAME,m as DEV_LOGIN_SLUG,g as EJECT_COMPONENT_URL,M as ExternalRoutes,V as FEATURE,e as FEEDBACK_TYPES,b as FsErrors,h as GLOBAL_DATA_URL,T as GRAPHQL_SPEC_SLUG,A as GRAPHQL_TEMPLATE_ID,U as INVITE_SLUG,v as MARKDOC_ERROR_TYPES,E as OPENAPI_DOCS_TEMPLATE_ID,F as PUBLIC_ENV_PREFIX,L as PUBLIC_RBAC_SCOPE_ITEM,p as RBAC_ALL_OTHER_TEAMS,C as REQUIRED_OIDC_SCOPES,r as RbacFeatures,s as SEARCH_CATEGORY_FIELD,Y as SEARCH_GROUP_FACET_FIELD,k as SEARCH_PRODUCT_FIELD,K as SEARCH_RBAC_FIELD,f as SEARCH_VERSION_FIELD,H as SIDEBAR_PREFIX,x as ServerRoutes,N as TRANSLATIONS_FILE_NAME,B as UI_ACCESSIBLE_CONFIG_PROPS,D as USER_THEME_ALIAS,o as cliCommandNames};
|
|
@@ -1,18 +1,167 @@
|
|
|
1
1
|
import type { EnvConfig } from './env-schema.js';
|
|
2
2
|
export type { EnvConfig };
|
|
3
|
-
|
|
4
|
-
export type RedoclyExecutionMode = 'build' | 'develop' | 'runtime';
|
|
5
|
-
export type EnvConfigDerived = {
|
|
6
|
-
redoclyEnv: RedoclyEnv;
|
|
7
|
-
executionMode: RedoclyExecutionMode;
|
|
3
|
+
declare function loadEnvConfig(): {
|
|
8
4
|
isProductionEnv: boolean;
|
|
9
5
|
isPreviewEnv: boolean;
|
|
10
6
|
isReunite: boolean;
|
|
11
7
|
isBuildMode: boolean;
|
|
12
8
|
isDevelopMode: boolean;
|
|
13
9
|
isRuntimeMode: boolean;
|
|
14
|
-
|
|
10
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
11
|
+
REDOCLY_ENV: "development" | "production" | "preview";
|
|
12
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
13
|
+
NODE_ENV?: "development" | "production" | undefined;
|
|
14
|
+
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
15
|
+
CI?: boolean | undefined;
|
|
16
|
+
PORT?: number | undefined;
|
|
17
|
+
REDOCLY_LOG_FORMAT?: string | undefined;
|
|
18
|
+
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
19
|
+
TERM?: string | undefined;
|
|
20
|
+
INSPECT_MODE?: string | undefined;
|
|
21
|
+
REDOCLY_PREFIX_PATHS?: string | undefined;
|
|
22
|
+
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
23
|
+
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
24
|
+
REDOCLY_TELEMETRY?: string | undefined;
|
|
25
|
+
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
26
|
+
TELEMETRY_DEV_DEBUG?: boolean | undefined;
|
|
27
|
+
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
28
|
+
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
29
|
+
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
30
|
+
ORGANIZATION_ID?: string | undefined;
|
|
31
|
+
ORGANIZATION_SLUG?: string | undefined;
|
|
32
|
+
ORG_SLUG?: string | undefined;
|
|
33
|
+
PROJECT_ID?: string | undefined;
|
|
34
|
+
PROJECT_SLUG?: string | undefined;
|
|
35
|
+
PROJECT_URL?: string | undefined;
|
|
36
|
+
PROJECT_BUILD_ID?: string | undefined;
|
|
37
|
+
PUBLIC_REDOCLY_BRANCH_NAME?: string | undefined;
|
|
38
|
+
JWT_SECRET_KEY?: string | undefined;
|
|
39
|
+
AUTH_URL?: string | undefined;
|
|
40
|
+
BH_API_URL?: string | undefined;
|
|
41
|
+
ENTITLEMENTS_JWKS_CDN_URL?: string | undefined;
|
|
42
|
+
OAUTH_CLIENT_ID?: string | undefined;
|
|
43
|
+
OAUTH_CLIENT_SECRET?: string | undefined;
|
|
44
|
+
OIDC_CLIENT_ID?: string | undefined;
|
|
45
|
+
OIDC_CLIENT_SECRET?: string | undefined;
|
|
46
|
+
OIDC_ISSUER_URL?: string | undefined;
|
|
47
|
+
LOCALHOST_LOGIN?: boolean | undefined;
|
|
48
|
+
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
49
|
+
REDOCLY_ENFORCE_LOGIN?: boolean | undefined;
|
|
50
|
+
REDOCLY_ENFORCE_RESIDENCY?: string | undefined;
|
|
51
|
+
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
52
|
+
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
53
|
+
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
54
|
+
NEW_CATALOG_ENABLED?: boolean | undefined;
|
|
55
|
+
NEW_SCORECARDS_ENABLED?: boolean | undefined;
|
|
56
|
+
ENABLE_COMMENTS?: string | undefined;
|
|
57
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION?: boolean | undefined;
|
|
58
|
+
ENABLE_SOURCE_MAPS?: boolean | undefined;
|
|
59
|
+
PLAN_GATES?: string | undefined;
|
|
60
|
+
SEARCH_DEV_REINIT?: string | undefined;
|
|
61
|
+
TYPESENSE_API_URL?: string | undefined;
|
|
62
|
+
TYPESENSE_API_KEY?: string | undefined;
|
|
63
|
+
MAIN_API_URL?: string | undefined;
|
|
64
|
+
SERVER_EDITOR_APP_URL?: string | undefined;
|
|
65
|
+
REDOCLY_PUBLIC_URL?: string | undefined;
|
|
66
|
+
REDOCLY_DIAGRAM_MICROSERVICE_URL?: string | undefined;
|
|
67
|
+
REDOCLY_CORS_ORIGINS?: string | undefined;
|
|
68
|
+
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
69
|
+
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
70
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: boolean | undefined;
|
|
71
|
+
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
72
|
+
OTEL_TRACES_URL?: string | undefined;
|
|
73
|
+
REQUEST_ID?: string | undefined;
|
|
74
|
+
SITE_URL?: string | undefined;
|
|
15
75
|
};
|
|
16
|
-
export type EnvConfigWithDerived =
|
|
17
|
-
|
|
76
|
+
export type EnvConfigWithDerived = ReturnType<typeof loadEnvConfig> & {
|
|
77
|
+
[K: string]: never;
|
|
78
|
+
};
|
|
79
|
+
export declare const envConfig: {
|
|
80
|
+
isProductionEnv: boolean;
|
|
81
|
+
isPreviewEnv: boolean;
|
|
82
|
+
isReunite: boolean;
|
|
83
|
+
isBuildMode: boolean;
|
|
84
|
+
isDevelopMode: boolean;
|
|
85
|
+
isRuntimeMode: boolean;
|
|
86
|
+
REDOCLY_EXECUTION_MODE: "build" | "develop" | "runtime";
|
|
87
|
+
REDOCLY_ENV: "development" | "production" | "preview";
|
|
88
|
+
SEARCH_DEV_DEBUG: boolean;
|
|
89
|
+
NODE_ENV?: "development" | "production" | undefined;
|
|
90
|
+
REDOCLY_INTERNAL_DEV?: boolean | undefined;
|
|
91
|
+
CI?: boolean | undefined;
|
|
92
|
+
PORT?: number | undefined;
|
|
93
|
+
REDOCLY_LOG_FORMAT?: string | undefined;
|
|
94
|
+
REDOCLY_LOG_LEVEL?: string | undefined;
|
|
95
|
+
TERM?: string | undefined;
|
|
96
|
+
INSPECT_MODE?: string | undefined;
|
|
97
|
+
REDOCLY_PREFIX_PATHS?: string | undefined;
|
|
98
|
+
REDOCLY_CONTENT_DIR?: string | undefined;
|
|
99
|
+
REDOCLY_PORTAL_VERSION?: string | undefined;
|
|
100
|
+
REDOCLY_TELEMETRY?: string | undefined;
|
|
101
|
+
REDOCLY_TELEMETRY_ENDPOINT?: string | undefined;
|
|
102
|
+
TELEMETRY_DEV_DEBUG?: boolean | undefined;
|
|
103
|
+
WEB_SERVER_IDLE_TIMEOUT?: string | undefined;
|
|
104
|
+
REDOCLY_PROBLEMS_OUTPUT_FILE?: string | undefined;
|
|
105
|
+
REDOCLY_METADATA_OUTPUT_FOLDER?: string | undefined;
|
|
106
|
+
ORGANIZATION_ID?: string | undefined;
|
|
107
|
+
ORGANIZATION_SLUG?: string | undefined;
|
|
108
|
+
ORG_SLUG?: string | undefined;
|
|
109
|
+
PROJECT_ID?: string | undefined;
|
|
110
|
+
PROJECT_SLUG?: string | undefined;
|
|
111
|
+
PROJECT_URL?: string | undefined;
|
|
112
|
+
PROJECT_BUILD_ID?: string | undefined;
|
|
113
|
+
PUBLIC_REDOCLY_BRANCH_NAME?: string | undefined;
|
|
114
|
+
JWT_SECRET_KEY?: string | undefined;
|
|
115
|
+
AUTH_URL?: string | undefined;
|
|
116
|
+
BH_API_URL?: string | undefined;
|
|
117
|
+
ENTITLEMENTS_JWKS_CDN_URL?: string | undefined;
|
|
118
|
+
OAUTH_CLIENT_ID?: string | undefined;
|
|
119
|
+
OAUTH_CLIENT_SECRET?: string | undefined;
|
|
120
|
+
OIDC_CLIENT_ID?: string | undefined;
|
|
121
|
+
OIDC_CLIENT_SECRET?: string | undefined;
|
|
122
|
+
OIDC_ISSUER_URL?: string | undefined;
|
|
123
|
+
LOCALHOST_LOGIN?: boolean | undefined;
|
|
124
|
+
REDOCLY_OAUTH_USE_INTROSPECT?: string | undefined;
|
|
125
|
+
REDOCLY_ENFORCE_LOGIN?: boolean | undefined;
|
|
126
|
+
REDOCLY_ENFORCE_RESIDENCY?: string | undefined;
|
|
127
|
+
REDOCLY_SSR_RENDER_MODE?: "main" | "worker" | undefined;
|
|
128
|
+
REDOCLY_SSR_WORKERS_MIN?: number | undefined;
|
|
129
|
+
REDOCLY_SSR_WORKERS_MAX?: number | undefined;
|
|
130
|
+
NEW_CATALOG_ENABLED?: boolean | undefined;
|
|
131
|
+
NEW_SCORECARDS_ENABLED?: boolean | undefined;
|
|
132
|
+
ENABLE_COMMENTS?: string | undefined;
|
|
133
|
+
REDOCLY_EXP_DISABLE_MD_VALIDATION?: boolean | undefined;
|
|
134
|
+
ENABLE_SOURCE_MAPS?: boolean | undefined;
|
|
135
|
+
PLAN_GATES?: string | undefined;
|
|
136
|
+
SEARCH_DEV_REINIT?: string | undefined;
|
|
137
|
+
TYPESENSE_API_URL?: string | undefined;
|
|
138
|
+
TYPESENSE_API_KEY?: string | undefined;
|
|
139
|
+
MAIN_API_URL?: string | undefined;
|
|
140
|
+
SERVER_EDITOR_APP_URL?: string | undefined;
|
|
141
|
+
REDOCLY_PUBLIC_URL?: string | undefined;
|
|
142
|
+
REDOCLY_DIAGRAM_MICROSERVICE_URL?: string | undefined;
|
|
143
|
+
REDOCLY_CORS_ORIGINS?: string | undefined;
|
|
144
|
+
SQLD_REMOTE_DATABASE_URL?: string | undefined;
|
|
145
|
+
SQLD_REMOTE_DATABASE_AUTH_TOKEN?: string | undefined;
|
|
146
|
+
FORCE_CATALOG_CACHE_REVALIDATE?: boolean | undefined;
|
|
147
|
+
SCORECARDS_POLLING_INTERVAL_MS?: string | undefined;
|
|
148
|
+
OTEL_TRACES_URL?: string | undefined;
|
|
149
|
+
REQUEST_ID?: string | undefined;
|
|
150
|
+
SITE_URL?: string | undefined;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Re-parses environment variables from `process.env` into {@link envConfig}.
|
|
154
|
+
* Call after loading `.env` files (e.g. from dotenv) or mutating `process.env` so reads stay in sync.
|
|
155
|
+
* Replaces the object contents entirely (no merging with stale keys).
|
|
156
|
+
*/
|
|
157
|
+
export declare function reloadEnvConfig(): void;
|
|
158
|
+
/**
|
|
159
|
+
* Sets one or more environment variables on `process.env` and reloads {@link envConfig}.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* setEnv('MY_VAR', 'value');
|
|
163
|
+
* setEnv({ MY_VAR: 'value', OTHER_VAR: 'other' });
|
|
164
|
+
*/
|
|
165
|
+
export declare function setEnv(key: string, value: string | undefined): void;
|
|
166
|
+
export declare function setEnv(entries: Record<string, string | undefined>): void;
|
|
18
167
|
//# sourceMappingURL=env-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readEnvVariable as
|
|
1
|
+
import{readEnvVariable as i}from"../utils/envs/read-env-variable.js";import{envSchema as r}from"./env-schema.js";function O(){const o=Object.fromEntries(Object.keys(process.env).map(n=>[n,i(n)]));o.REDOCLY_EXECUTION_MODE=process.env.REDOCLY_EXECUTION_MODE,o.REDOCLY_INTERNAL_DEV=process.env.REDOCLY_INTERNAL_DEV,o.REDOCLY_PORTAL_VERSION=process.env.REDOCLY_PORTAL_VERSION;const e=r.parse(o);return{...e,isProductionEnv:e.REDOCLY_ENV==="production",isPreviewEnv:e.REDOCLY_ENV==="preview",isReunite:["production","preview"].includes(e.REDOCLY_ENV)||e.REDOCLY_ENV==="development"&&!e.REDOCLY_INTERNAL_DEV&&!!e.ORGANIZATION_ID,isBuildMode:e.REDOCLY_EXECUTION_MODE==="build",isDevelopMode:e.REDOCLY_EXECUTION_MODE==="develop",isRuntimeMode:e.REDOCLY_EXECUTION_MODE==="runtime"}}const E=O();function c(){const o=O();for(const e of Object.keys(E))delete E[e];Object.assign(E,o)}function R(o,e){const n=typeof o=="string"?{[o]:e}:o;for(const[s,t]of Object.entries(n))t==null?delete process.env[s]:process.env[s]=t;c()}export{E as envConfig,c as reloadEnvConfig,R as setEnv};
|