@redocly/redoc 0.132.0-next.9 → 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 +130 -5
- 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/Link.js +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntityRevisions.js +1 -1
- package/dist/client/app/search/message-handlers.js +1 -1
- package/dist/client/types/ai-search.d.ts +6 -2
- 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/mcp/auth/auth-handlers.d.ts +1 -0
- package/dist/server/plugins/mcp/auth/auth-handlers.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/search.js +2 -2
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/types.d.ts +1 -0
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/openapi-docs/search/get-ai-search-documents.js +26 -26
- package/dist/server/plugins/openapi-docs/utils.js +1 -1
- 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/cors-proxy.d.ts +2 -1
- package/dist/server/web-server/routes/cors-proxy.js +2 -2
- package/dist/server/web-server/routes/dynamic-route.js +1 -1
- package/dist/server/web-server/routes/feedback.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/mcp-oauth.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 +13 -13
- 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,5 +1,123 @@
|
|
|
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
|
+
|
|
34
|
+
## 0.132.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- ae3272861b: Added support for `x-badges` in OpenAPI and AsyncAPI parameters and schema properties.
|
|
39
|
+
Badges can now be rendered before and after field names.
|
|
40
|
+
- ce5a165177: Added support for `or` functions in RBAC conditions within Markdoc content.
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 65bdca2d07: Fixed an issue where `Typesense` search ignored OpenAPI paths.
|
|
45
|
+
- ce5a165177: Fixed a bug where Markdoc content wrapped in an RBAC condition did not appear in search results for users with access.
|
|
46
|
+
- 60b9b77bc3: Fixed a bug that caused search result highlighting to break in Flexsearch when the query contained duplicate words.
|
|
47
|
+
- a09344768f: Fixed an issue where pressing the `Q` key in the terminal in preview mode would not stop the preview.
|
|
48
|
+
- 2cc0ed2399: Fixed an issue where images referenced by the `img` Markdoc tag appeared broken after changing `src` and moving the file, requiring a manual page reload.
|
|
49
|
+
- 2bb8cf6c82: Fixed an issue where URLs starting with the same characters as API reference, AsyncAPI, Scorecards, Catalog, or Developer Onboarding page slugs served data for those pages instead of showing a 404.
|
|
50
|
+
- 86a3b76a9b: Fixed an issue where files with identical names but different extensions in the same folder resolved to a single URL, causing pages to be missing from the deployed project.
|
|
51
|
+
- b3e65a364b: Fixed out-of-memory error in the search indexer that occurred when indexing deeply nested schemas.
|
|
52
|
+
- c336f96cb6: Updated `@redocly/openapi-core` to version `2.25.2`.
|
|
53
|
+
- e5f1e611f7: Fixed an issue where badges in `sidebars.yaml` were not rendering on API reference pages.
|
|
54
|
+
- 76b78a806c: Improved keyboard navigation across Replay's input components for more consistent and predictable focus behavior.
|
|
55
|
+
- 15ab3dcb39: Fixed incorrect RBAC validation that caused authenticated MCP tool calls to be handled improperly.
|
|
56
|
+
- 849199c430: Fixed an issue where complex AI search queries might have resulted with an error.
|
|
57
|
+
- a09344768f: Fixed an issue where the process did not terminate after certain short-lived CLI commands were executed.
|
|
58
|
+
- 3ad1692502: Fixed an issue where clicking asset download links redirected to a 404 page.
|
|
59
|
+
- d54ca044f0: Fixed an issue where filters on code walkthrough pages overlapped the **Search** dialog.
|
|
60
|
+
- 1f95c1a87f: Improved performance when building AI search documents for Markdown.
|
|
61
|
+
- 87a9752112: Fixed an issue where `partial` Markdoc tags in OpenAPI and AsyncAPI `description` fields did not resolve when Windows-style path separators were used.
|
|
62
|
+
- f156e27486: Fixed an issue where navigating to a page through an anchor link from another page occasionally failed to scroll to the anchor.
|
|
63
|
+
- Updated dependencies [623eb1bd10]
|
|
64
|
+
- Updated dependencies [933422fcd9]
|
|
65
|
+
- Updated dependencies [e897bbb1ea]
|
|
66
|
+
- Updated dependencies [2bc33c6758]
|
|
67
|
+
- Updated dependencies [8f8430a807]
|
|
68
|
+
- Updated dependencies [f69e101a44]
|
|
69
|
+
- Updated dependencies [c336f96cb6]
|
|
70
|
+
- Updated dependencies [ed553fa138]
|
|
71
|
+
- Updated dependencies [8710b00b3e]
|
|
72
|
+
- Updated dependencies [037535441a]
|
|
73
|
+
- Updated dependencies [e88064ce2d]
|
|
74
|
+
- Updated dependencies [e756f2aad5]
|
|
75
|
+
- Updated dependencies [ae3272861b]
|
|
76
|
+
- Updated dependencies [849199c430]
|
|
77
|
+
- Updated dependencies [c3d4cd955d]
|
|
78
|
+
- Updated dependencies [d54ca044f0]
|
|
79
|
+
- Updated dependencies [87a9752112]
|
|
80
|
+
- Updated dependencies [b24ffd4d9f]
|
|
81
|
+
- @redocly/openapi-docs@3.20.0
|
|
82
|
+
- @redocly/realm-asyncapi-sdk@0.10.0
|
|
83
|
+
- @redocly/theme@0.64.0
|
|
84
|
+
- @redocly/asyncapi-docs@1.9.0
|
|
85
|
+
- @redocly/graphql-docs@1.9.0
|
|
86
|
+
- @redocly/portal-plugin-mock-server@0.17.0
|
|
87
|
+
- @redocly/portal-legacy-ui@0.15.0
|
|
88
|
+
|
|
89
|
+
## 0.132.0-next.11
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- e5f1e611f7f: Fixed an issue where badges in `sidebars.yaml` were not rendering on API reference pages.
|
|
94
|
+
- 3ad1692502c: Fixed an issue where clicking asset download links redirected to a 404 page.
|
|
95
|
+
- Updated dependencies [623eb1bd109]
|
|
96
|
+
- Updated dependencies [e897bbb1ea8]
|
|
97
|
+
- Updated dependencies [c3d4cd955d1]
|
|
98
|
+
- @redocly/openapi-docs@3.20.0-next.8
|
|
99
|
+
- @redocly/realm-asyncapi-sdk@0.10.0-next.3
|
|
100
|
+
- @redocly/theme@0.64.0-next.6
|
|
101
|
+
- @redocly/asyncapi-docs@1.9.0-next.8
|
|
102
|
+
- @redocly/graphql-docs@1.9.0-next.8
|
|
103
|
+
- @redocly/portal-plugin-mock-server@0.17.0-next.8
|
|
104
|
+
|
|
105
|
+
## 0.132.0-next.10
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- 907e21434dc: Improved CORS proxy security by injecting `X-Content-Type-Options: no-sniff` into proxied responses.
|
|
110
|
+
- 15ab3dcb393: Fixed incorrect RBAC validation that caused authenticated MCP tool calls to be handled improperly.
|
|
111
|
+
- 849199c4300: Fixed an issue where complex AI search queries might have resulted with an error.
|
|
112
|
+
- Updated dependencies [2bc33c6758e]
|
|
113
|
+
- Updated dependencies [849199c4300]
|
|
114
|
+
- @redocly/realm-asyncapi-sdk@0.10.0-next.2
|
|
115
|
+
- @redocly/theme@0.64.0-next.5
|
|
116
|
+
- @redocly/asyncapi-docs@1.9.0-next.7
|
|
117
|
+
- @redocly/graphql-docs@1.9.0-next.7
|
|
118
|
+
- @redocly/openapi-docs@3.20.0-next.7
|
|
119
|
+
- @redocly/portal-plugin-mock-server@0.17.0-next.7
|
|
120
|
+
|
|
3
121
|
## 0.132.0-next.9
|
|
4
122
|
|
|
5
123
|
### Patch Changes
|
|
@@ -30,13 +148,8 @@
|
|
|
30
148
|
|
|
31
149
|
## 0.132.0-next.6
|
|
32
150
|
|
|
33
|
-
### Minor Changes
|
|
34
|
-
|
|
35
|
-
- e756f2aad58: Added a `palette` configuration option that applies one of built-in color palettes to the project.
|
|
36
|
-
|
|
37
151
|
### Patch Changes
|
|
38
152
|
|
|
39
|
-
- e4e8c9f42d4: Updated legacy palette styles.
|
|
40
153
|
- c336f96cb65: Updated `@redocly/openapi-core` to version `2.25.2`.
|
|
41
154
|
- d419330f279: Fixed an issue where the build crashed during the search preparation step.
|
|
42
155
|
- 76b78a806c7: Improved keyboard navigation across Replay's input components for more consistent and predictable focus behavior.
|
|
@@ -147,6 +260,18 @@
|
|
|
147
260
|
- @redocly/openapi-docs@3.20.0-next.0
|
|
148
261
|
- @redocly/theme@0.64.0-next.0
|
|
149
262
|
|
|
263
|
+
## 0.131.4
|
|
264
|
+
|
|
265
|
+
### Patch Changes
|
|
266
|
+
|
|
267
|
+
- a0b5d17c1f: Improved CORS proxy security by injecting `X-Content-Type-Options: no-sniff` into proxied responses.
|
|
268
|
+
|
|
269
|
+
## 0.131.3
|
|
270
|
+
|
|
271
|
+
### Patch Changes
|
|
272
|
+
|
|
273
|
+
- 4afca06580: Fixed a Realm CORS proxy security issue that could allow requests to private network addresses and unsafe direct navigation to proxied HTML or JavaScript content.
|
|
274
|
+
|
|
150
275
|
## 0.131.2
|
|
151
276
|
|
|
152
277
|
### Patch Changes
|
|
@@ -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};
|
package/dist/client/app/Link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as s from"react";import p from"path";import{Link as A,useNavigate as b,useLocation as O}from"react-router-dom";import{getPathnameForLocale as U,withPathPrefix as z}from"@redocly/theme/core/utils";import{removeTrailingSlash as D}from"../../utils/url/remove-trailing-slash";import{normalizeRouteSlug as h}from"../../utils/path/normalize-route-slug";import{isAbsoluteUrl as F}from"../../utils/url/is-absolute-url";import{isAssetsLink as M}from"../../utils/path/is-assets-link";import{useL10nConfig as S}from"./hooks/index.js";import{loadAndNavigate as W}from"./utils/loadAndNavigate.js";import{isForcedNavigationLinkClick as I}from"../utils/utils.js";async function g(r,t){if(F(r))return;await(typeof window<"u"?window:global).__LOADER.tryLoad(r,void 0,t)}function Y(r){const{to:t,children:l,className:L,style:a,innerRef:i,target:w,external:c,languageInsensitive:v,onClick:m,active:T,rel:y,...k}=r,P=w||(c?"_blank":"_self"),R=c||t.match(/^(https?:\/\/|mailto:)/),f=y||(R?"noreferrer":void 0),n={className:L,children:l,target:P,...f&&{rel:f},onClick:m,...k},{defaultLocale:C,locales:E,currentLocale:N}=S(),_=O();let e=t;e.startsWith(".")&&(e=p.resolve(p.dirname(h(_.pathname)),h(t))),e=e.startsWith("#")?e:z(v?e:U(e,C,N,E));const o=e!=="/"?D(e):e,x=b(),d=typeof window<"u"?new URL(o,window.location.origin+window.location.pathname).search:void 0;return typeof t=="string"&&t.match(/^(https?:\/\/|mailto:)/)?s.createElement("a",{...n,ref:i,style:a,href:t,onMouseOver:async()=>g(t,d)}):M(o)?s.createElement("a",{...n,ref:i,style:a,href:o}):s.createElement(A,{...n,ref:i,style:a,to:o,onClick:u=>{m?.(),!I(u,n.target)&&(u.preventDefault(),W({navigate:x,to:o}))},onMouseOver:async()=>g(o,d)})}export{Y as Link};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AiSearchConversationRole as o,AiSearchError as
|
|
1
|
+
import{AiSearchConversationRole as o,AiSearchError as i}from"@redocly/theme/core/constants";import{SSE_EVENTS as s,MAX_DISPLAYED_RESOURCES as a}from"../../constants";function l(e,n){if(e.length===0)return e;const t=e[e.length-1];return t.role===o.ASSISTANT&&!t.messageId?[...e.slice(0,-1),{...t,messageId:n}]:e}function S(e,n){if(e.length===0)return e;const t=e.findIndex(u=>u.id===n.toolCallId);if(t===-1)return e;const r=[...e];return r[t]={...r[t],result:n},r}function d(e,n){return e.type!==s.MESSAGE_ID?{}:(n.setConversation(t=>l(t,e.messageId)),{messageId:e.messageId})}function f(e,n){if(e.type!==s.SOURCES)return{};const t=e.sources.slice(0,a).map(({url:r,title:u})=>({url:r,title:u}));return n.setState(r=>r.status==="loading"?{...r,resources:t}:r),{resources:t}}function c(e,n){if(e.type!==s.ANSWER)return{};const t=n.accumulatedResponse+e.answer;return n.setState(r=>r.status==="loading"?{...r,response:t}:r),{accumulatedResponse:t}}function E(e,n){return e.type!==s.TOOL_CALL?{}:(n.setToolCalls(t=>[...t,{...e.toolCall,position:n.accumulatedResponse.length}]),{})}function R(e,n){return e.type!==s.TOOL_RESULT?{}:(n.setToolCalls(t=>S(t,e.result)),{})}function A(e,n){return e.type!==s.ERROR?{}:(n.setState(t=>t.status==="loading"?{status:"error",question:t.question,error:i.ErrorProcessingResponse}:t),{})}const h={[s.MESSAGE_ID]:d,[s.SOURCES]:f,[s.ANSWER]:c,[s.TOOL_CALL]:E,[s.TOOL_RESULT]:R,[s.ERROR]:A};function T(e,n){const t=h[e.type];return t?t(e,n):{}}export{T as handleSSEMessage};
|
|
@@ -24,6 +24,7 @@ export type SSEAnswer = {
|
|
|
24
24
|
export type SSEToolCall = {
|
|
25
25
|
type: typeof SSE_EVENTS.TOOL_CALL;
|
|
26
26
|
toolCall: {
|
|
27
|
+
id: string;
|
|
27
28
|
name: string;
|
|
28
29
|
args: unknown;
|
|
29
30
|
};
|
|
@@ -33,7 +34,8 @@ export type SSEToolResult = {
|
|
|
33
34
|
toolName: string;
|
|
34
35
|
args: unknown;
|
|
35
36
|
result: {
|
|
36
|
-
|
|
37
|
+
toolCallId: string;
|
|
38
|
+
documentCount?: number;
|
|
37
39
|
};
|
|
38
40
|
};
|
|
39
41
|
export type SSEError = {
|
|
@@ -44,11 +46,13 @@ export type SSEError = {
|
|
|
44
46
|
};
|
|
45
47
|
export type SSEMessage = SSEMessageId | SSESources | SSEAnswer | SSEToolCall | SSEToolResult | SSEError;
|
|
46
48
|
export type ToolCallState = {
|
|
49
|
+
id: string;
|
|
47
50
|
name: string;
|
|
48
51
|
args: unknown;
|
|
49
52
|
position: number;
|
|
50
53
|
result?: {
|
|
51
|
-
|
|
54
|
+
toolCallId: string;
|
|
55
|
+
documentCount?: number;
|
|
52
56
|
};
|
|
53
57
|
};
|
|
54
58
|
export type AiSearchOptions = {
|
|
@@ -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};
|