@redocly/redoc 0.131.0-next.0 → 0.131.0-next.1
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 +13 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +1 -1
- package/dist/config/env-schemas/environment-detection.d.ts +2 -2
- package/dist/server/plugins/default-theme/index.js +1 -1
- package/dist/server/utils/lifecycle-hooks.js +1 -1
- package/dist/server/utils/set-execution-mode.d.ts +5 -0
- package/dist/server/utils/set-execution-mode.js +1 -0
- package/dist/server/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @redocly/redoc
|
|
2
2
|
|
|
3
|
+
## 0.131.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 713994c780: Fixed an issue where the execution environment wasn't recognized correctly causing build failures.
|
|
8
|
+
- 1fa1e85405: Fixed an issue where the login button was not displayed when a default identity provider was configured.
|
|
9
|
+
|
|
10
|
+
## 0.130.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 69f13ea40c: Fixed an issue where the login button was not displayed when a default identity provider was configured.
|
|
15
|
+
|
|
3
16
|
## 0.131.0-next.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/bin.d.ts
CHANGED
package/dist/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./cli/utils/node-version-check.js";import o from"mri";import*as r from"node:path";import{tmpdir as A}from"node:os";import*as x from"node:fs";import"./server/node-fetch-polyfill.js";import{cliCommandNames as g}from"./constants/common.js";import{initPlugins as T}from"./server/plugins/lifecycle.js";import{loadEnvVariables as y}from"./server/utils/envs/load-env-variables.js";import{PORTAL_VERSION as k}from"./server/version.js";import{logger as p}from"./server/tools/notifiers/logger.js";import{reporter as t}from"./server/tools/notifiers/reporter.js";import{sha as R}from"./server/utils/crypto/sha.js";import{envConfig as S}from"./config/env-config.js";import{develop as V}from"./cli/develop.js";import{eject as I}from"./cli/eject/index.js";import{beforeCommand as w}from"./server/utils/lifecycle-hooks.js";import{Store as C}from"./server/store.js";import{prepare as L}from"./cli/prepare/index.js";import{fromCurrentDir as _}from"./server/utils/paths.js";import{translationsCliOpts as M}from"./cli/translations/options.js";import{generateTranslations as N}from"./cli/translations/index.js";import{EntitlementsProvider as F}from"./server/entitlements/entitlements-provider.js";import{isValidPlan as U}from"./server/entitlements/is-valid-plan.js";import{stopAllCompilers as $}from"./server/esbuild/esbuild.js";import{copyLibsqlPrebuiltBinary as q}from"./cli/prepare/libsql/copy-prebuilt-binary.js";import{telemetry as d}from"./cli/telemetry/index.js";import{stats as B}from"./cli/stats/index.js";import{statsCliOpts as G}from"./cli/stats/options.js";const n=process.argv[2];let i;const f={alias:{d:"project-dir",p:"port"},default:{"project-dir":S.REDOCLY_CONTENT_DIR||process.cwd(),outdir:"public"}},Y={alias:f.alias,default:{...f.default,plan:"enterprise"}},z={alias:{d:"prepareDir"},default:{prepareDir:"public"}},H={boolean:["force"],alias:{f:"force",d:"project-dir"},default:{"project-dir":process.cwd()}};process.on("uncaughtException",async function(e){e?.code==="ERR_INVALID_STATE"?console.log("Ignore premature close error"):(p.error("Uncaught exception occurred. Stopping compilers."),await $(),p.error("Exiting due to uncaught exception"),await t.panic(e))});try{n||await t.panicOnContentError("Command not specified.");const e=F.instance();switch(["prepare","serve","stats"].includes(n)&&await e.init(),["eject","translate"].includes(n)&&await e.init({developModePlan:"enterprise"}),n){case"develop":case"preview":const a=o(process.argv.slice(3),Y),E=r.resolve(a["project-dir"]),j=r.join(A(),"redocly-public-"+R(E)),l=a.plan.toLowerCase();U(l)||await t.panicOnContentError(`Invalid --plan argument value '${l}'.`),await e.init({developModePlan:l}),i=new C({contentDir:r.resolve(a["project-dir"]),outdir:j,serverOutDir:_(import.meta.url,"./server/esbuild/cache/server")}),await w(g.DEVELOP,a,i),await V(a,i);break;case"prepare":const s=o(process.argv.slice(3),f),u=r.resolve(r.join(s.outdir,"server"));i=new C({contentDir:r.resolve(s["project-dir"]),outdir:r.resolve(s.outdir,"client"),serverOutDir:u}),await w(g.PREPARE,s,i),q(u),await L(s,i);break;case"serve":await y();const b=o(process.argv.slice(3),z),O=r.resolve(b.prepareDir);d.sendServeCliCommandExecutedMessage();const v=r.join(O,"server","index.mjs");x.existsSync(v)||await t.panic("Server not found. Please run `realm prepare` first"),import(v).catch(async c=>{await t.panic("Failed to load server",c)});break;case"eject":e.canAccessFeature("themeEjecting")||await t.panicOnContentError('The "eject" command is not available for this project');const m=o(process.argv.slice(3),H),{lifecycleContext:{getConfig:h,fs:D}}=await T({outdir:"",contentDir:r.resolve(m["project-dir"]),setGlobalConfig:()=>null});D.dispose(),d.sendCliCommandEjectExecutedMessage([{object:"cli_command",arguments:m}]),await I({...m,config:await h()}),p.clearAllTimeouts();break;case"translate":if(e.canAccessFeature("l10n")){const c=o(process.argv.slice(3),M);d.sendCliCommandTranslateExecutedMessage({arguments:c}),await N(c)}else await t.panicOnContentError('The "translate" command is not available for this project');break;case"stats":const P=o(process.argv.slice(3),G);await B(P);break;case"--version":console.log(k);break;default:await t.panicOnContentError(`Unknown command "${n}"`)}}catch(e){p.error("Exiting due to uncaught exception"),await t.panic(e)}
|
|
2
|
+
import"./server/utils/set-execution-mode.js";import"./cli/utils/node-version-check.js";import o from"mri";import*as r from"node:path";import{tmpdir as A}from"node:os";import*as x from"node:fs";import"./server/node-fetch-polyfill.js";import{cliCommandNames as g}from"./constants/common.js";import{initPlugins as T}from"./server/plugins/lifecycle.js";import{loadEnvVariables as y}from"./server/utils/envs/load-env-variables.js";import{PORTAL_VERSION as k}from"./server/version.js";import{logger as p}from"./server/tools/notifiers/logger.js";import{reporter as t}from"./server/tools/notifiers/reporter.js";import{sha as R}from"./server/utils/crypto/sha.js";import{envConfig as S}from"./config/env-config.js";import{develop as V}from"./cli/develop.js";import{eject as I}from"./cli/eject/index.js";import{beforeCommand as w}from"./server/utils/lifecycle-hooks.js";import{Store as C}from"./server/store.js";import{prepare as L}from"./cli/prepare/index.js";import{fromCurrentDir as _}from"./server/utils/paths.js";import{translationsCliOpts as M}from"./cli/translations/options.js";import{generateTranslations as N}from"./cli/translations/index.js";import{EntitlementsProvider as F}from"./server/entitlements/entitlements-provider.js";import{isValidPlan as U}from"./server/entitlements/is-valid-plan.js";import{stopAllCompilers as $}from"./server/esbuild/esbuild.js";import{copyLibsqlPrebuiltBinary as q}from"./cli/prepare/libsql/copy-prebuilt-binary.js";import{telemetry as d}from"./cli/telemetry/index.js";import{stats as B}from"./cli/stats/index.js";import{statsCliOpts as G}from"./cli/stats/options.js";const n=process.argv[2];let i;const f={alias:{d:"project-dir",p:"port"},default:{"project-dir":S.REDOCLY_CONTENT_DIR||process.cwd(),outdir:"public"}},Y={alias:f.alias,default:{...f.default,plan:"enterprise"}},z={alias:{d:"prepareDir"},default:{prepareDir:"public"}},H={boolean:["force"],alias:{f:"force",d:"project-dir"},default:{"project-dir":process.cwd()}};process.on("uncaughtException",async function(e){e?.code==="ERR_INVALID_STATE"?console.log("Ignore premature close error"):(p.error("Uncaught exception occurred. Stopping compilers."),await $(),p.error("Exiting due to uncaught exception"),await t.panic(e))});try{n||await t.panicOnContentError("Command not specified.");const e=F.instance();switch(["prepare","serve","stats"].includes(n)&&await e.init(),["eject","translate"].includes(n)&&await e.init({developModePlan:"enterprise"}),n){case"develop":case"preview":const a=o(process.argv.slice(3),Y),E=r.resolve(a["project-dir"]),j=r.join(A(),"redocly-public-"+R(E)),l=a.plan.toLowerCase();U(l)||await t.panicOnContentError(`Invalid --plan argument value '${l}'.`),await e.init({developModePlan:l}),i=new C({contentDir:r.resolve(a["project-dir"]),outdir:j,serverOutDir:_(import.meta.url,"./server/esbuild/cache/server")}),await w(g.DEVELOP,a,i),await V(a,i);break;case"prepare":const s=o(process.argv.slice(3),f),u=r.resolve(r.join(s.outdir,"server"));i=new C({contentDir:r.resolve(s["project-dir"]),outdir:r.resolve(s.outdir,"client"),serverOutDir:u}),await w(g.PREPARE,s,i),q(u),await L(s,i);break;case"serve":await y();const b=o(process.argv.slice(3),z),O=r.resolve(b.prepareDir);d.sendServeCliCommandExecutedMessage();const v=r.join(O,"server","index.mjs");x.existsSync(v)||await t.panic("Server not found. Please run `realm prepare` first"),import(v).catch(async c=>{await t.panic("Failed to load server",c)});break;case"eject":e.canAccessFeature("themeEjecting")||await t.panicOnContentError('The "eject" command is not available for this project');const m=o(process.argv.slice(3),H),{lifecycleContext:{getConfig:h,fs:D}}=await T({outdir:"",contentDir:r.resolve(m["project-dir"]),setGlobalConfig:()=>null});D.dispose(),d.sendCliCommandEjectExecutedMessage([{object:"cli_command",arguments:m}]),await I({...m,config:await h()}),p.clearAllTimeouts();break;case"translate":if(e.canAccessFeature("l10n")){const c=o(process.argv.slice(3),M);d.sendCliCommandTranslateExecutedMessage({arguments:c}),await N(c)}else await t.panicOnContentError('The "translate" command is not available for this project');break;case"stats":const P=o(process.argv.slice(3),G);await B(P);break;case"--version":console.log(k);break;default:await t.panicOnContentError(`Unknown command "${n}"`)}}catch(e){p.error("Exiting due to uncaught exception"),await t.panic(e)}
|
|
@@ -9,15 +9,15 @@ export declare const environmentDetectionSchema: z.ZodObject<{
|
|
|
9
9
|
REDOCLY_INTERNAL_DEV: z.ZodOptional<z.ZodString>;
|
|
10
10
|
CI: z.ZodOptional<z.ZodString>;
|
|
11
11
|
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
12
13
|
NODE_ENV?: "development" | "production" | "test" | undefined;
|
|
13
14
|
REDOCLY_ENV?: "development" | "production" | "preview" | undefined;
|
|
14
|
-
REDOCLY_EXECUTION_MODE?: "build" | "runtime" | "develop" | undefined;
|
|
15
15
|
REDOCLY_INTERNAL_DEV?: string | undefined;
|
|
16
16
|
CI?: string | undefined;
|
|
17
17
|
}, {
|
|
18
|
+
REDOCLY_EXECUTION_MODE?: "build" | "develop" | "runtime" | undefined;
|
|
18
19
|
NODE_ENV?: "development" | "production" | "test" | undefined;
|
|
19
20
|
REDOCLY_ENV?: "development" | "production" | "preview" | undefined;
|
|
20
|
-
REDOCLY_EXECUTION_MODE?: "build" | "runtime" | "develop" | undefined;
|
|
21
21
|
REDOCLY_INTERNAL_DEV?: string | undefined;
|
|
22
22
|
CI?: string | undefined;
|
|
23
23
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_TEAMS_RBAC as c}from"@redocly/config";import{DEV_LOGIN_SLUG as g,INVITE_SLUG as
|
|
1
|
+
import{REDOCLY_TEAMS_RBAC as c}from"@redocly/config";import{DEV_LOGIN_SLUG as g,INVITE_SLUG as h,PUBLIC_RBAC_SCOPE_ITEM as m,UI_ACCESSIBLE_CONFIG_PROPS as P,CONFIG_FILE_NAME as n,DEFAULT_SSO_IDP_TITLE as _}from"../../../constants/common.js";import{envConfig as T}from"../../../config/env-config.js";import{getTemplatePath as s}from"./get-template-path.js";import{resolveLinksFromConfig as p}from"../nav-utils.js";import{resolveLogoConfig as F}from"./resolve-logo.js";import{extractTeamNames as E}from"./extract-team-names.js";import{resolveProductsConfig as O}from"./resolve-products-config.js";import{getExcludedFromLinkCheckerPatterns as y}from"../sidebars/utils.js";import{resolveEntitiesCatalogConfig as A}from"./resolve-catalog-entities.js";import{telemetryTraceStep as j}from"../../../cli/telemetry/helpers/trace-step.js";async function q(r){return{id:"Default Theme",async processContent(e){await j("build.plugin.default_theme",async()=>{const t=v(e),o=Object.keys(e.getConfig()?.ssoDirect||{}).length>0,a=e.createTemplate("invite",s("../../../../dist/client/app/pages/Invite/Invite.js"));if(e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,excludeFromSearch:!0,slug:h,[c]:m,fsPath:h,templateId:a}),r.devLogin&&o){const i={frontmatter:{},seo:{title:"Login page"},authIdps:S(t),rbac:{teams:E(e.getConfig().rbac)}},l=e.createTemplate("dev-login",s("../../../../dist/client/app/pages/DevLogin/DevLogin.js"));e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,excludeFromSearch:!0,slug:g,[c]:m,fsPath:g,templateId:l,getStaticData:async()=>({props:i})})}else if(t.length>1){const i={frontmatter:{},seo:{title:"Login page"},authIdps:S(t)},l=e.createTemplate("login",s("../../../../dist/client/app/pages/Login/Login.js"));e.addRoute({duplicateInAllLocales:!0,excludeFromSidebar:!0,slug:g,[c]:m,fsPath:g,templateId:l,getStaticData:async()=>({props:i})})}e.createTemplate("404",s("../../../../dist/client/app/pages/404/404.js")),e.createTemplate("403",s("../../../../dist/client/app/pages/403/403.js")),e.createTemplate("403OIDC",s("../../../../dist/client/app/pages/403/403OIDC.js")),T.isDevelopMode&&e.createTemplate("compilation-error",s("../../../../dist/client/app/pages/CompilationError/CompilationError.js"))})},async afterRoutesCreated(e,t){const{contentDir:o,outdir:a}=e,i=e.getConfig(),{navbar:l,footer:D,userMenu:u,search:f,breadcrumbs:I,products:b}=i,C=Object.keys(i?.ssoDirect||{}).length>0,d=y(i),L={navFile:n,excludedFromLinkCheckerPatterns:d};e.setGlobalData({...k(i),navbar:await p(l,o,e,t,L),footer:await p(D,o,e,t,L),breadcrumbs:{...I,prefixItems:await p(I?.prefixItems||[],o,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},userMenu:{...u,hide:u?.hide??!C,menu:await p(u?.items,o,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},logo:await F(i.logo,n,a,t.fs),auth:{idpsInfo:v(e),devLogin:r.devLogin&&C},products:await O(b,e,t),search:{...f,suggestedPages:await p(f?.suggestedPages,o,e,t,{navFile:n,excludedFromLinkCheckerPatterns:d})},entitiesCatalog:await A(i.entitiesCatalog,n,a,t.fs),headScriptTags:void 0,linkTags:void 0,postBodyScriptTags:void 0,preBodyScriptTags:void 0})}}}function v(r){const e=r.getConfig().ssoDirect;return Object.entries(e||{}).map(([o,a])=>({idpId:o,type:a.type,title:a.title}))}function S(r){return T.LOCALHOST_LOGIN==="true"?r:r.filter(t=>t.title!==_)}function k(r){const e={};for(const t of P)r[t]&&(e[t]=r[t]);return e}export{q as defaultThemePlugin,k as pickUiAccessibleConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"path";import{cliCommandNames as
|
|
1
|
+
import*as i from"path";import{cliCommandNames as r}from"../../constants/common.js";import{PUBLIC_STATIC_FOLDER as t}from"../constants/common.js";import{logger as n}from"../tools/notifiers/logger.js";import{blue as a,gray as c}from"../tools/notifiers/helpers/colors.js";import{loadEnvVariables as f}from"./envs/load-env-variables.js";import{copyFolderRecursiveSync as l}from"./fs.js";import{validateInstalledVersion as s}from"./validate-installed-version.js";import{PACKAGE_NAME as E}from"../../config/product-gates.js";import{PORTAL_VERSION as P}from"../version.js";function u(e){return e?"true":"false"}function v(e){e["log-level"]&&(process.env.REDOCLY_LOG_LEVEL=String(e["log-level"])),process.env.INSPECT_MODE="inspect"in e?u(e.inspect):"false",e.pathPrefix&&(process.env.REDOCLY_PREFIX_PATHS=e.pathPrefix)}function L({contentDir:e,outdir:o}){l(i.join(e,t),i.join(o,t))}async function h(e,o,m){await f(o["project-dir"]);const p=e===r.DEVELOP?" Previewing with":"Building with";switch(n.logInFooter("product",`${p} ${a(`${E}@${P}`)}`),n.logInFooter("server",` \u{1F310} Preview URL: ${c("server starting...")}`),e){case r.DEVELOP:case r.BUILD:case r.PREPARE:v(o);break;default:break}await s(),L(m)}export{h as beforeCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=process.argv[2];e==="prepare"||e==="build"?process.env.REDOCLY_EXECUTION_MODE="build":e==="develop"&&(process.env.REDOCLY_EXECUTION_MODE="develop");
|
package/dist/server/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as o}from"module";import{envConfig as
|
|
1
|
+
import{createRequire as o}from"module";import{envConfig as r}from"../config/env-config.js";const i=r.REDOCLY_INTERNAL_DEV==="true"?"local":o(import.meta.url)("../../package.json").version;export{i as PORTAL_VERSION};
|