@redocly/realm 0.129.0-next.4 → 0.129.0-next.5
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 +11 -0
- package/dist/server/plugins/markdown/index.js +1 -1
- package/dist/server/plugins/pages/index.js +1 -1
- package/dist/server/plugins/pages/search/search-resolver.js +1 -1
- package/dist/server/plugins/scorecard-classic/index.js +1 -1
- package/dist/server/utils/entitlements/can-access-feature.d.ts +6 -0
- package/dist/server/utils/entitlements/can-access-feature.js +1 -0
- package/dist/server/web-server/middleware/catalogAuthMiddleware.d.ts +1 -1
- package/dist/server/web-server/middleware/catalogAuthMiddleware.js +1 -1
- package/dist/server/web-server/middleware/ensureSearchData.js +1 -1
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/utils/object/deep-equal.d.ts +32 -0
- package/dist/utils/object/deep-equal.js +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @redocly/realm
|
|
2
2
|
|
|
3
|
+
## 0.129.0-next.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 77452207bf: Fixed an issue where a trailing slash was automatically added to URLs in the **Servers** section of API docs.
|
|
8
|
+
- 49ac84d0cb: Fixed a bug that prevented `scorecard` configurations from applying in development mode.
|
|
9
|
+
- Updated dependencies [77452207bf]
|
|
10
|
+
- @redocly/openapi-docs@3.17.0-next.5
|
|
11
|
+
- @redocly/asyncapi-docs@1.6.0-next.5
|
|
12
|
+
- @redocly/portal-plugin-mock-server@0.14.0-next.5
|
|
13
|
+
|
|
3
14
|
## 0.129.0-next.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import g from"path";import{REDOCLY_TEAMS_RBAC as v}from"@redocly/config";import{MARKDOC_PARTIALS_DATA_KEY as y}from"../../store.js";import{reporter as D}from"../../tools/notifiers/reporter.js";import{canAccessFeature as R}from"../../utils/entitlements/can-access-feature.js";import{extractMdFirstHeading as A,getAst as C}from"./compiler.js";import{getTemplatePath as w}from"./get-template-path.js";import{prepareMarkdocPartials as M}from"./markdoc/partials.js";import{searchResolver as T}from"./search/search-resolver.js";import{markdownStaticDataLoader as E}from"./markdown-static-data-loader.js";import{makeErrorRoute as I}from"../error-route.js";import{validateRbacConfig as O}from"../validate-rbac-config.js";import{findFrontmatterSlugs as _,getSidebarSharedDataId as G,resolveFrontmatterSlugs as L}from"../utils.js";import{isPartial as j}from"./is-partial.js";import{markdownFrontmatterLoader as z}from"./markdown-frontmatter-loader.js";import{resolveRawPartials as B}from"./markdoc/resolve-raw-partials.js";import{getAiDocumentsStore as K}from"./search/get-ai-search-documents.js";import{registerPageProps as N}from"../register-page-props.js";import{sanitizeMalformedMdContent as W}from"./utils/sanitize-malformed-md-content.js";import{telemetryTraceStep as Y}from"../../../cli/telemetry/helpers/trace-step.js";async function le(h){return{id:"markdoc",requiredEntitlements:["markdown"],loaders:{"markdown-frontmatter":z,"markdown-ast":async(t,r)=>{const i=await r.fs.read(t),n=await r.getConfig(),d=await B(i,t,n?.markdown?.partialsFolders,r),l=W(d);return C(t,l)}},processContent:async(t,r)=>{await Y("build.plugin.markdown",async i=>{const{markdown:n}=await r.getConfig();i?.setAttribute("config",JSON.stringify(n||{}));const d=n?.partialsFolders??[],l=t.createTemplate("markdown","@redocly/theme/core/templates/Markdown"),S=t.registerServerPropsGetter("markdown",w("./get-server-props.js"));t.createTemplate("error",w("../../../client/app/Error/ErrorDetails.js"));for(const o of r.fs.scan(/\.md$/))if(!await r.isPathIgnored(o.relativePath)&&!j(o.relativePath,d))try{await k(o)}catch(a){t.addRoute(I(o.relativePath,a)),i?.error(a),await D.panicOnBuild("Failed to create route for markdown file: %s",a.message)}async function k(o){const{relativePath:a,realRelativePath:P}=o,{data:{frontmatter:e}}=await r.cache.load(a,"markdown-frontmatter"),F=e?.metadata||{},b=await _(a,"markdown-frontmatter",e,r),p=L(b,a);let c=null;e?.sidebar&&(c=await G(e.sidebar,a,r.fs));let u=l;if(e?.template){const f=e.template.startsWith("./")||e.template.startsWith("../");let m=e.template;if(f){const s=g.posix.dirname(P);m=g.resolve(h.contentDir,s,e.template)}u=t.createTemplate(e.template,m)}e?.rbac&&(R("rbac")?O({content:{[a]:e.rbac}}):e.rbac=void 0),await N(o,r.fs,t),(p.length?p.reverse():[void 0]).forEach(f=>{t.addRoute({excludeFromSearch:e?.excludeFromSearch||!1,slug:f,fsPath:a,templateId:u,sharedData:c?[{id:c,key:"sidebar"}]:void 0,redirectFrom:Object.entries(e.redirects||{}).map(([m,{type:s}])=>({type:s||301,from:m})),[v]:e?.rbac,getNavText:async()=>(e?.seo?.title||await A(a,r)||"").toString(),metadata:{type:"markdown",...F},async getStaticData(m,s){return E(o,m,r,e,s)},getSearchDocuments:T(e,a,t.getSearchFacets,t.setSearchFacets),getAiDocumentsStore:K(t.getSearchFacets,e),serverPropsGetterIds:[S]})})}})},afterRoutesCreated:async(t,r)=>{const i=await M(r,t);t.setGlobalConfig({[y]:i})}}}export{le as markdownPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import g from"node:path";import{REDOCLY_TEAMS_RBAC as h}from"@redocly/config";import{slash as S}from"../../../utils/path/slash.js";import{staticDataLoader as y}from"./loaders/static-data-loader.js";import{findFrontmatterSlugs as
|
|
1
|
+
import g from"node:path";import{REDOCLY_TEAMS_RBAC as h}from"@redocly/config";import{slash as S}from"../../../utils/path/slash.js";import{canAccessFeature as b}from"../../utils/entitlements/can-access-feature.js";import{staticDataLoader as y}from"./loaders/static-data-loader.js";import{findFrontmatterSlugs as F,getSidebarSharedDataId as P,resolveFrontmatterSlugs as w}from"../utils.js";import{reactFrontmatterLoader as v}from"./loaders/react-frontmatter-loader.js";import{registerPageProps as D}from"../register-page-props.js";import{telemetryTraceStep as R}from"../../../cli/telemetry/helpers/trace-step.js";import{searchResolver as E}from"./search/search-resolver.js";async function x(){return{loaders:{"react-frontmatter":v},id:"react-pages",requiredEntitlements:["reactPages"],processContent:async(r,a)=>{await R("build.plugin.pages",async()=>{const{fs:o,cache:f}=a;for(const d of o.scan(/\.page\.tsx?$/)){const{relativePath:e,realRelativePath:l}=d;if(await a.isPathIgnored(e))continue;const p=r.createTemplate(S(e),g.resolve(o.cwd,l));await D(d,o,r);const{data:t}=await f.load(e,"react-frontmatter"),u=await F(e,"react-frontmatter",t,a),s=w(u,e);let c=null;t?.sidebar&&(c=await P(t.sidebar,e,a.fs)),(s.length?s.reverse():[void 0]).forEach(i=>{r.addRoute({excludeFromSearch:t?.excludeFromSearch||!1,slug:i,templateId:p,fsPath:e,sharedData:c?[{id:c,key:"sidebar"}]:void 0,[h]:b("rbac")?t?.rbac:void 0,getNavText:async()=>t?.seo?.title,getStaticData:async(m,n)=>({props:await y({frontmatter:t,relativePath:e},a,n)}),getSearchDocuments:E(t,e,r.getSearchFacets,r.setSearchFacets)})});for(const[i,{to:m,type:n}]of Object.entries(t?.redirects||{}))r.addRedirect(i,{to:m||s[0],type:n||301})}})}}}export{x as customPagesPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{REDOCLY_ROUTE_RBAC as l,REDOCLY_TEAMS_RBAC as
|
|
1
|
+
import{REDOCLY_ROUTE_RBAC as l,REDOCLY_TEAMS_RBAC as m}from"@redocly/config";import{SEARCH_DOCUMENT_METADATA_KEY as _}from"../../../constants/plugins/search.js";import{canAccessFeature as A}from"../../../utils/entitlements/can-access-feature.js";import{normalizeFrontmatterKeywords as E}from"../../helpers/normalize-frontmatter-keywords.js";import{extractDocumentSearchFacets as x,setDocumentSearchFacets as F}from"./search-facets.js";function O(e,r,i,h){return async(s,R,C)=>{if(!e||e?.excludeFromSearch)return[];const o=e.search?.title||e.seo?.title||e.title,a=e.search?.description||e.seo?.description||e.description;if(!o&&!a)return[];const n=s.slug||r,{result:c}=E(e?.search?.keywords),p=s.metadata||{},d=x(p,i);F(d,i,h);const D=A("rbac")?e?.rbac:void 0,u={id:n,url:n,title:o||r,text:a||"",path:[],facets:d,[m]:D||s[m],[l]:s[l]};if(c){const t={curated:!0};c.includes&&(t.includes=c.includes),c.excludes&&(t.excludes=c.excludes),u[_]=t}return[u]}}export{O as searchResolver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{writeFileSync as
|
|
1
|
+
import{writeFileSync as h}from"node:fs";import D from"path";import{SCORECARD_OUTPUT_FILE_NAME as b}from"../../constants/common.js";import{mapObject as T}from"../../../utils/object/map-object.js";import{readEnvVariable as w}from"../../utils/envs/read-env-variable.js";import{removeLeadingSlash as A}from"../../../utils/url/remove-leading-slash.js";import{combineUrls as O}from"@redocly/theme/core/utils";import{logger as j}from"../../tools/notifiers/logger.js";import{getRouteSlugToCatalogSlugMap as F}from"../../utils/catalog-classic/get-route-slug-to-catalog-slug-map.js";import{deepEqual as I}from"../../../utils/object/deep-equal.js";import{ensureDir as N}from"../../utils/index.js";import{getTemplatePath as U}from"./get-template-path.js";import{getAllRuleNames as q}from"./lint.js";import{getScorecardConfig as L}from"./get-scorecard-config.js";import{CUSTOM_FIELDS_SERVER_PROPS_GETTER_ID as M}from"../catalog-classic/index.js";import{getScorecardSlug as k}from"./shared-utils.js";import{scorecardConfigLoader as W}from"./loaders/scorecard-config.js";import{scorecardLoader as B}from"./loaders/scorecard.js";import{computeScorecard as J}from"./compute-scorecard.js";import{telemetryTraceStep as $}from"../../../cli/telemetry/helpers/trace-step.js";const G="scorecardClassic";let u={},R={};async function ue({id:P,requiredEntitlements:_,loadersPrefix:v=""}){let p=null,y=null,E=!1;return{id:P??"scorecardClassic",requiredEntitlements:_??["scorecard"],loaders:{[`${v}scorecard-config`]:W,[`${v}scorecard`]:B},async processContent(r,l){await $("build.plugin.scorecard_classic",async S=>{const a=r.createTemplate(G,U("./template/index.js")),g=await l.getConfig(),m=L(g),f=g?.reunite??{},i=[()=>p===null,()=>!I(u,m),()=>!I(R,f)].some(e=>e());u=m,S?.setAttribute("config",JSON.stringify(u||{})),R=f;const n=g.catalogClassic??{},c=u.levels||[];if(c.length<1)throw Error("Invalid configuration of levels config");i&&(p=await J({actions:r,context:l,scorecardConfig:u,reuniteConfig:R}));const{data:{configs:t}}=await l.cache.load("",`${v}scorecard-config`),{perLevel:d,all:s}=q(t);y={levelNames:c.map(e=>e.name),rules:s,rulesPerLevel:d};for(const[e,o]of Object.entries(n)){const C=O(o.slug,"scorecard/");r.addRoute({duplicateInAllLocales:!0,slug:C,fsPath:O(o.slug,"scorecard/"),templateId:a,hasClientRoutes:!0,excludeFromSidebar:!0,serverPropsGetterIds:[M],sharedData:[{id:"scorecard",key:"scorecard"},{key:"catalog",id:"catalog-"+e}],getNavText:()=>Promise.resolve(o.title||"API design scorecard"),getStaticData:async()=>({props:{catalogId:e,catalogConfig:{...o,items:void 0},scorecardConfig:u,scorecardInfo:y}})})}})},afterRoutesCreated:async(r,l)=>{const S=await l.getConfig(),a=S.catalogClassic??{},g=L(S);if(Object.keys(a).length){const i=Object.keys(a).length>1?await F(r,l,a):null,n={};for(const[c,t]of Object.entries(p||{})){const d=r.getRouteByFsPath(c),s=d?.slug;if(s){if(d&&!g.ignoreMetadata){const e=i?i.get(s)??Object.values(a)[0].slug:Object.values(a)[0].slug,o=O(e,"scorecard/");d.metadata={...d.metadata,scorecardStatus:t.status,scorecardLevel:t.scorecardLevel,scorecardLevelIdx:t.scorecardLevelIdx,scorecardLevels:T(t.levels,C=>({uniqueErrors:C.uniqueErrors,uniqueWarnings:C.uniqueWarnings})),scoreCardSlug:o+"apis/"+encodeURIComponent(A(s))}}if(n[s]={...t,levels:T(t.levels,e=>({...e,problems:e.problems.map(o=>({ruleId:o.ruleId,severity:o.severity}))}))},!E){const e=D.resolve(r.outdir,"_scorecard",k(s));h(N(e),JSON.stringify(t))}}}await r.createSharedData("scorecard",n)}const m={};for(const[i,n]of Object.entries(p||{})){const c=r.getRouteByFsPath(i)?.slug;c&&(m[c]=n)}const f=w("REDOCLY_METADATA_OUTPUT_FOLDER");!E&&f&&(j.info("Writing scorecard data..."),h(D.join(f,b),JSON.stringify({scorecardData:m,...y}))),E=!0}}}export{ue as scorecardClassicPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EntitlementsProvider as t}from"../../entitlements/entitlements-provider.js";function r(e){return!!t.instance().canAccessFeature(e)}export{r as canAccessFeature};
|
|
@@ -3,6 +3,6 @@ import type { HttpMethod } from '../../../types/http.js';
|
|
|
3
3
|
type CatalogAuthMiddlewareOptions = {
|
|
4
4
|
secureMethods?: HttpMethod[];
|
|
5
5
|
};
|
|
6
|
-
export declare function catalogAuthMiddleware(options?: CatalogAuthMiddlewareOptions): (ctx: Context, next: Next) => Promise<Response | void>;
|
|
6
|
+
export declare function catalogAuthMiddleware(serverOutDir: string, options?: CatalogAuthMiddlewareOptions): (ctx: Context, next: Next) => Promise<Response | void>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=catalogAuthMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{JWT_SECRET_KEY as
|
|
1
|
+
import{KvService as c}from"../../persistence/kv/services/kv-service.js";import{JWT_SECRET_KEY as d}from"../../constants/common.js";import*as s from"../jwt/jwt.js";const u=1440*60,y=(e,a)=>e.secureMethods?.includes(a)??!1;function w(e,a={}){return async(r,t)=>{const n=r.req.method;return y(a,n)?await l(r,t,e):await t()}}const l=async(e,a,r)=>{const t=e.req.header("apiKey");if(t)return await p(e,a,t,r);const i=e.req.header("authorization")?.replace("Bearer ","");return i?await f(e,a,i):e.json({message:"API key is required"},401)},p=async(e,a,r,t)=>{if(!process.env.BH_API_URL)return e.json({message:"API key validation service not configured"},500);try{const n=await c.getInstance({baseDbDir:t});if(await n.get(["api-keys","reunite",r]))return await a();const o=new URL("/api/api-keys-verify",process.env.BH_API_URL).toString();return(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:r})})).ok?(await n.set(["api-keys","reunite",r],{valid:!0},{ttlInSeconds:u}),await a()):e.json({message:"Invalid API key"},401)}catch{return e.json({message:"API key validation failed"},400)}},f=async(e,a,r)=>{try{const t=await s.verify(r,d),n=s.decode(r).payload.isInternalConnection;return!t||!n?e.json({message:"API key is required"},401):await a()}catch{return e.json({message:"API key validation failed"},400)}};export{w as catalogAuthMiddleware};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SEARCH_ENGINE as r}from"../../constants/plugins/search.js";import{logger as e}from"../../tools/notifiers/logger.js";import{SearchEngine as t}from"../../plugins/search/engines/search-engine.js";function
|
|
1
|
+
import{DEFAULT_SEARCH_ENGINE as r}from"../../constants/plugins/search.js";import{logger as e}from"../../tools/notifiers/logger.js";import{SearchEngine as t}from"../../plugins/search/engines/search-engine.js";function E(a){return async(o,i)=>{if(!a.searchEngine&&!a.config?.search?.hide){e.info("Loading search data...");const c=a.config?.search?.engine??r,n=new t(c,a.globalData.l10n);await n.initIndexSchema(a.searchFacets),await n.import(a.outdir),a.setSearchEngine(n),e.info("Search data loaded")}await i()}}export{E as ensureSearchData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{serveStatic as f}from"hono/serve-static";import{withPathPrefix as e,withoutPathPrefix as s}from"@redocly/theme/core/utils";import{ServerRoutes as i}from"../../../constants/common.js";import{PUBLIC_STATIC_FOLDER as R}from"../../constants/common.js";import{authMiddleware as c}from"../middleware/authMiddleware.js";import{ensureSearchData as g}from"../middleware/ensureSearchData.js";import{dynamicMiddleware as S}from"../middleware/dynamic-middleware/dynamic-middleware.js";import{installRoutes as
|
|
1
|
+
import{serveStatic as f}from"hono/serve-static";import{withPathPrefix as e,withoutPathPrefix as s}from"@redocly/theme/core/utils";import{ServerRoutes as i}from"../../../constants/common.js";import{PUBLIC_STATIC_FOLDER as R}from"../../constants/common.js";import{authMiddleware as c}from"../middleware/authMiddleware.js";import{ensureSearchData as g}from"../middleware/ensureSearchData.js";import{dynamicMiddleware as S}from"../middleware/dynamic-middleware/dynamic-middleware.js";import{installRoutes as r}from"../../plugins/dev-onboarding/api/routes/index.js";import{authorizeHandler as I,oidcCallbackHandler as P,logoutHandler as T,idpLoginHandler as h,redoclyLoginCallbackHandler as D,samlCallbackHandler as N,redoclyTokenLoginHandler as M,inviteHandler as B}from"./auth.js";import{appDataHandler as U}from"./app-data.js";import{searchFacetsHandler as G,searchHandler as w}from"./search.js";import{dynamicRouteHandler as F}from"./dynamic-route.js";import{pageDataHandler as v,sharedPageDataHandler as K}from"./page-data.js";import{pathPrefixRedirectHandler as y}from"./path-prefix-redirect.js";import{getRoutesByLineHandler as E,resolvePathHandler as o,resolvePathsHandler as k,resolveSlugHandler as p}from"./resolve-route.js";import{feedbackHandler as Y}from"./feedback.js";import{loggerMiddleware as b}from"../middleware/loggerMiddleware.js";import{responseHeadersMiddleware as V}from"../middleware/responseHeadersMiddleware.js";import{idleTimeoutMiddleware as x}from"../middleware/idleTimeoutMiddleware.js";import{otelTracesHandler as z}from"./otel/otel.js";import{healthCheckHandler as Z}from"./health.js";import{askAiHandler as $}from"./ask-ai.js";import{replayOauth2RedirectCallbackHandler as q}from"./replay-oauth2-redirect.js";import{mcpOAuthProtectedResourceHandler as W,mcpOAuthAuthorizationServerHandler as j,mcpDynamicClientRegistrationHandler as J,mcpAuthorizationHandler as Q,mcpTokenPortalHandler as X,mcpCallbackHandler as _}from"./mcp-oauth.js";import{corsMiddleware as O}from"../middleware/corsMiddleware.js";import{installApiRoutes as u}from"./api-routes/api-routes.js";import{cookieMiddleware as aa}from"../middleware/cookieMiddleware.js";import{staticContentHandler as ea}from"../routes/static-content.js";import{infoHandler as C}from"./info.js";import{catalogHandler as ia}from"./catalog/catalog.js";import{catalogRelationsHandler as la}from"./catalog/catalog-relations.js";import{bffCatalogHandler as ma}from"./catalog/bff-catalog.js";import{bffCatalogRevisionsHandler as ta}from"./catalog/bff-catalog-revisions.js";import{bffCatalogRelatedEntitiesHandler as na}from"./catalog/bff-catalog-related-entities.js";import{catalogAuthMiddleware as L}from"../middleware/catalogAuthMiddleware.js";import{telemetryMiddleware as Aa}from"../middleware/telemetry-middleware.js";import{errorHandler as da}from"./error.js";function qa(a,l,m){const{resolveRouteData:n,readStaticAsset:A}=m;a.use("*",x()),a.use("*",aa()),a.use("*",S(l)),a.use("*",c(l)),a.use("*",b()),a.use("*",V(l)),a.use("*",Aa()),a.use(e("*"),f({root:`./${R}`,getContent:(t,H)=>ea(t,H,l,A),rewriteRequestPath:t=>s(t)})),a.use(e(i.FEEDBACK),O({allowMethods:["POST"]})),a.use(e(i.ASK_AI),O({allowMethods:["POST"]})),a.use("*",Ta(l));const d=g(l);a.use(e(i.INFO),C()),process.env.NEW_CATALOG_ENABLED==="true"&&(a.use(e(i.CATALOG_ENTITIES),L(l.serverOutDir,{secureMethods:["POST","PUT","DELETE","PATCH"]})),a.use(e(i.CATALOG_ENTITIES_RELATIONS),L(l.serverOutDir,{secureMethods:["POST","PUT","DELETE","PATCH"]})),a.use(e(i.CATALOG_ENTITIES),ia(l)),a.use(e(i.CATALOG_ENTITIES_RELATIONS),la(l)),a.get(e(i.BFF_CATALOG_ENTITIES),ma(l)),a.get(e(i.BFF_CATALOG_RELATED_ENTITIES),na(l)),a.get(e(i.BFF_CATALOG_REVISIONS),ta(l))),a.get(e(i.SHARED_PAGE_DATA),K(l)),a.get(e(i.PAGE_DATA),v(l,n)),a.get(e(i.APP_DATA),U(l)),a.post(e(i.SEARCH),d,w(l)),a.post(e(i.SEARCH_FACETS),d,G(l)),a.post(e(i.AUTHORIZATION),I),a.post(e(i.LOGOUT),T(l)),a.get(e(i.LOGOUT),T(l)),a.get(e(i.OIDC_CALLBACK),P(l)),a.get(e(i.REDOCLY_TOKEN_LOGIN),M(l)),a.get(e(i.REDOCLY_LOGIN_CALLBACK),D()),a.get(e(i.IDP_LOGIN),h(l)),a.post(e(i.SAML_CALLBACK),N(l)),a.get(e(i.INVITE),B(l)),a.get(e(i.HEALTH),Z),a.get(e(i.MCP_OAUTH_PROTECTED_RESOURCE),W()),a.get(e(i.MCP_OAUTH_AUTHORIZATION_SERVER),j()),a.post(e(i.MCP_DYNAMIC_CLIENT_REGISTRATION),J()),a.get(e(i.MCP_AUTHORIZATION),Q()),a.post(e(i.MCP_TOKEN_PORTAL),X()),a.get(e(i.MCP_CALLBACK),_()),a.get(e(`${i.MCP_CALLBACK}/*`),_()),r(a,l),u(a,l),a.post(e(i.FEEDBACK),Y(l)),a.post(e(i.RESOLVE_ROUTE_BY_PATH),o(l)),a.post(e(i.RESOLVE_ROUTES_BY_PATHS),k(l)),a.post(e(i.RESOLVE_ROUTE_BY_SLUG),p(l)),a.post(e(i.ASK_AI),$(l)),a.get(e(i.GET_ROUTES_BY_LINE),E(l)),a.post(e(i.OTEL_TRACES),z),a.get(e(i.REPLAY_OAUTH2_CALLBACK),q),a.all(e("/*"),F(l,n,A)),a.get("*",y),a.onError(da)}function Ta(a){return async(l,m)=>{await a.waitForPluginsLifecycle(),await m()}}function Wa(a,l){a.get(e(i.INFO),C()),a.post(e(i.RESOLVE_ROUTE_BY_PATH),o(l)),a.post(e(i.RESOLVE_ROUTE_BY_SLUG),p(l)),a.get(e(i.GET_ROUTES_BY_LINE),E(l))}export{Wa as installDevRoutes,qa as installProdRoutes,Ta as waitForPluginsLifecycle};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs a deep equality comparison between two values.
|
|
3
|
+
*
|
|
4
|
+
* Recursively compares values, handling:
|
|
5
|
+
* - Primitives (strict equality)
|
|
6
|
+
* - Arrays (element-by-element comparison)
|
|
7
|
+
* - Map (size and key-value comparison)
|
|
8
|
+
* - Set (size and entry comparison)
|
|
9
|
+
* - TypedArrays (ArrayBuffer views like Int8Array, Uint8Array, etc.)
|
|
10
|
+
* - RegExp (source and flags comparison)
|
|
11
|
+
* - Objects with custom valueOf/toString methods
|
|
12
|
+
* - Plain objects (key-by-key comparison)
|
|
13
|
+
* - NaN values (considered equal to each other)
|
|
14
|
+
*
|
|
15
|
+
* @param a - The first value to compare.
|
|
16
|
+
* @param b - The second value to compare.
|
|
17
|
+
* @returns True if the values are deeply equal, otherwise false.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* deepEqual(1, 1); // true
|
|
22
|
+
* deepEqual({ a: 1 }, { a: 1 }); // true
|
|
23
|
+
* deepEqual([1, 2], [1, 2]); // true
|
|
24
|
+
* deepEqual({ a: { b: 1 } }, { a: { b: 1 } }); // true
|
|
25
|
+
* deepEqual(NaN, NaN); // true
|
|
26
|
+
* deepEqual(new Map([['a', 1]]), new Map([['a', 1]])); // true
|
|
27
|
+
* deepEqual(new Set([1, 2]), new Set([1, 2])); // true
|
|
28
|
+
* deepEqual({ a: 1 }, { a: 2 }); // false
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function deepEqual(a: unknown, b: unknown): boolean;
|
|
32
|
+
//# sourceMappingURL=deep-equal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t)){const r=e.length;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!u(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r]of e.entries())if(!t.has(r))return!1;for(const[r,n]of e.entries())if(!u(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e,n=t,c=r.length;if(c!==n.length)return!1;for(let i=c;i--!==0;)if(r[i]!==n[i])return!1;return!0}if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const l=e,f=t,s=Object.keys(l),o=s.length;if(o!==Object.keys(f).length)return!1;for(let r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(f,s[r]))return!1;for(let r=o;r--!==0;){const n=s[r];if(!u(l[n],f[n]))return!1}return!0}return e!==e&&t!==t}export{u as deepEqual};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/realm",
|
|
3
|
-
"version": "0.129.0-next.
|
|
3
|
+
"version": "0.129.0-next.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"xml-crypto": "6.0.1",
|
|
94
94
|
"xpath": "0.0.34",
|
|
95
95
|
"yaml-ast-parser": "0.0.43",
|
|
96
|
-
"@redocly/asyncapi-docs": "1.6.0-next.
|
|
96
|
+
"@redocly/asyncapi-docs": "1.6.0-next.5",
|
|
97
97
|
"@redocly/config": "0.41.1",
|
|
98
98
|
"@redocly/graphql-docs": "1.6.0-next.0",
|
|
99
|
-
"@redocly/openapi-docs": "3.17.0-next.
|
|
99
|
+
"@redocly/openapi-docs": "3.17.0-next.5",
|
|
100
100
|
"@redocly/portal-legacy-ui": "0.12.0-next.0",
|
|
101
|
-
"@redocly/portal-plugin-mock-server": "0.14.0-next.
|
|
101
|
+
"@redocly/portal-plugin-mock-server": "0.14.0-next.5",
|
|
102
102
|
"@redocly/realm-asyncapi-sdk": "0.7.0-next.1",
|
|
103
103
|
"@redocly/theme": "0.61.0-next.3"
|
|
104
104
|
},
|