@redocly/redoc-revel 0.138.0-next.0 → 0.138.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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # @redocly/redoc-revel
2
2
 
3
+ ## 0.138.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 4f85f31942f: Added the ejectable `ReplaySecuritySchemeActions` component, which renders inside the security scheme card in the **Try it** console.
8
+ Eject `ReplaySecuritySchemeActions` to offer users a way to obtain a credential and write it into the request.
9
+
10
+ ### Patch Changes
11
+
12
+ - 7f611536d82: Fixed an issue where the the **Copy**, **Expand all**, and **Collapse all** buttons were missing from AsyncAPI binding panels.
13
+ - 4bc012cafa9: Fixed divider color in button groups, such as the page actions split button, to match custom theme button colors.
14
+ - 215ed7fc7fa: Updated the tooltip arrow to render as a compact 16px pointer with a softly rounded tip.
15
+ - 4bc012cafa9: Fixed the split button so the menu toggle and divider use the same `danger` tone as the main button.
16
+ - 215ed7fc7fa: Fixed an issue where the tooltip arrows failed to render in browsers that didn't support CSS anchor positioning.
17
+ - 8dcd600ebe8: Fixed an issue in the **Try it** console where query parameters with `allowReserved` caused reserved characters such as `/`, `:`, and `,` to be percent-encoded.
18
+ - Updated dependencies [7f611536d82]
19
+ - Updated dependencies [4bc012cafa9]
20
+ - Updated dependencies [215ed7fc7fa]
21
+ - Updated dependencies [4bc012cafa9]
22
+ - Updated dependencies [215ed7fc7fa]
23
+ - Updated dependencies [8dcd600ebe8]
24
+ - Updated dependencies [4f85f31942f]
25
+ - @redocly/api-docs@0.3.0-next.1
26
+ - @redocly/theme@0.70.0-next.1
27
+
3
28
  ## 0.138.0-next.0
4
29
 
5
30
  ### Minor Changes
@@ -1 +1 @@
1
- import*as c from"path";import{DEFAULT_THEME_NAME as i,USER_THEME_ALIAS as k}from"../../constants/common.js";import{logger as y}from"../../server/tools/notifiers/logger.js";import{reporter as T}from"../../server/tools/notifiers/reporter.js";import{resolveTheme as A}from"./resolveTheme.js";import{EntitlementsProvider as F}from"../../server/entitlements/entitlements-provider.js";const L=["markdoc/attributes/code-walkthrough-filesets.ts","markdoc/attributes/code-walkthrough-filters.ts","markdoc/components/CodeWalkthrough/**","markdoc/tags/code-step.ts","markdoc/tags/code-toggle.ts","markdoc/tags/code-walkthrough.ts"],m=["./core/**","./markdoc/**/default.*","**/__mocks__/**","**/index.*","**/utils/**/*","**/__tests__/**/*","**/__snapshots__/**/*","**/*.stories.*","**/variables.*",...L],v=["./components/CatalogClassic/CatalogClassicCard.*","./components/ColorModeSwitcher/**","./components/ReplayGate/**","./components/ReplayTopBarActions/**","./components/Feedback/**","./components/Filter/**","./components/Footer/**","./components/LanguagePicker/**","./components/Menu/**","./components/Navbar/**","./components/PageNavigation/**","./components/Product/**","./components/Search/**","./components/UserMenu/**","./layouts/RootLayout.*","./layouts/NotFound.*","./layouts/Forbidden.*","./layouts/DocumentationLayoutTop.*","./layouts/DocumentationLayoutBottom.*","./icons/**","./markdoc/**","./ext/**"];async function C(t){const[p,r]=t._,{theme:l,force:d,onSuccess:u,onError:g,onOverride:h,config:E}=t,_=F.instance(),s=c.resolve(t["project-dir"]);let o=l;o||(o=i);const n=await A(s,E.plugins||[],o,r);n||await T.panicOnContentError(`Theme ${o} not found. Skipping eject.`);const e=n?.config.ejectIgnore;e&&!Array.isArray(e)&&y.warn("'ejectIgnore' must be of type Array. Skipping.");const a=await _.getPackageEjectIgnore(),f={force:d,onSuccess:u,onError:g,onOverride:h,onlyFiles:o===i?v:void 0,ignoreFiles:Array.isArray(e)?[...e,...a,...m]:[...a,...m]};return{objectType:p,pathToThemeFolder:n?.pluginDirAbsolutePath,pathToPortalCustomThemeFolder:c.resolve(s,k),componentToEject:r,theme:o,options:f}}export{m as DEFAULT_IGNORED_FILES,v as EJECTABLE_FILES,C as default};
1
+ import*as c from"path";import{DEFAULT_THEME_NAME as i,USER_THEME_ALIAS as f}from"../../constants/common.js";import{logger as k}from"../../server/tools/notifiers/logger.js";import{reporter as T}from"../../server/tools/notifiers/reporter.js";import{resolveTheme as A}from"./resolveTheme.js";import{EntitlementsProvider as F}from"../../server/entitlements/entitlements-provider.js";const L=["markdoc/attributes/code-walkthrough-filesets.ts","markdoc/attributes/code-walkthrough-filters.ts","markdoc/components/CodeWalkthrough/**","markdoc/tags/code-step.ts","markdoc/tags/code-toggle.ts","markdoc/tags/code-walkthrough.ts"],m=["./core/**","./markdoc/**/default.*","**/__mocks__/**","**/index.*","**/utils/**/*","**/__tests__/**/*","**/__snapshots__/**/*","**/*.stories.*","**/variables.*",...L],S=["./components/CatalogClassic/CatalogClassicCard.*","./components/ColorModeSwitcher/**","./components/ReplayGate/**","./components/ReplaySecuritySchemeActions/**","./components/ReplayTopBarActions/**","./components/Feedback/**","./components/Filter/**","./components/Footer/**","./components/LanguagePicker/**","./components/Menu/**","./components/Navbar/**","./components/PageNavigation/**","./components/Product/**","./components/Search/**","./components/UserMenu/**","./layouts/RootLayout.*","./layouts/NotFound.*","./layouts/Forbidden.*","./layouts/DocumentationLayoutTop.*","./layouts/DocumentationLayoutBottom.*","./icons/**","./markdoc/**","./ext/**"];async function v(t){const[p,r]=t._,{theme:l,force:u,onSuccess:d,onError:g,onOverride:h,config:E}=t,_=F.instance(),s=c.resolve(t["project-dir"]);let o=l;o||(o=i);const n=await A(s,E.plugins||[],o,r);n||await T.panicOnContentError(`Theme ${o} not found. Skipping eject.`);const e=n?.config.ejectIgnore;e&&!Array.isArray(e)&&k.warn("'ejectIgnore' must be of type Array. Skipping.");const a=await _.getPackageEjectIgnore(),y={force:u,onSuccess:d,onError:g,onOverride:h,onlyFiles:o===i?S:void 0,ignoreFiles:Array.isArray(e)?[...e,...a,...m]:[...a,...m]};return{objectType:p,pathToThemeFolder:n?.pluginDirAbsolutePath,pathToPortalCustomThemeFolder:c.resolve(s,f),componentToEject:r,theme:o,options:y}}export{m as DEFAULT_IGNORED_FILES,S as EJECTABLE_FILES,v as default};
@@ -1 +1 @@
1
- import e from"react";import{BrowserRouter as o}from"react-router";import{ThemeDataContext as n,SearchSessionProvider as i}from"@redocly/theme/core/contexts";import u from"@redocly/theme/core/templates/Markdown";import{useAnchorPositioning as m,useBreadcrumbs as d,useBanner as l,useCatalogClassic as c,useCurrentProduct as p,useGlobalData as g,useI18n as h,useI18nConfig as f,useL10n as T,useL10nConfig as b,usePageData as C,usePageSharedData as k,usePageVersions as v,usePreloadHistory as P,useProducts as w,useUserMenu as y,useSubmitFeedback as S,useTranslate as D,useTranslationKeys as $,useSidebarSiblingsData as E,usePageProps as I,useUserTeams as L,useMarkdownText as M,useMarkdocRenderer as x,useCodeHighlight as F,useLoadAndNavigate as H,useCatalog as R,useCatalogSort as A,useCatalogSearch as B,useFetchCatalogEntities as G,useFetchCatalogEntitiesRelations as O,useTelemetry as r,useMcpData as U,useFetchCatalogEntityRevisions as K}from"./app/hooks";import{Link as N}from"./app/Link";import{useFacetQuery as Q,useSearch as V,useAiSearch as j}from"./app/search";import{useSidebarItems as q}from"./app/Sidebar/useSidebarItems";import{PageDataContext as z}from"./providers/page-data/PageDataContext";const s={Template:({pageProps:a,children:t})=>e.createElement(u,{pageProps:{...a,metadata:{...a.metadata,markdoc:{tagList:[]}}}},t),templateId:"markdown",isPublic:!0,props:{seo:{title:"Test"},ast:{$$mdtype:"Tag",name:"div",children:[{$$mdtype:"Tag",name:"Heading",attributes:{id:"github-flavored-markdown",level:1},children:["GitHub-flavored markdown"]},{$$mdtype:"Tag",name:"p",attributes:{},children:["These exercises assume you have",{$$mdtype:"Tag",name:"a",attributes:{href:"https://docs.redoc.ly/"},children:["basic markdown knowledge"]},"."]},{$$mdtype:"Tag",name:"Heading",attributes:{id:"create-a-new-plain-markdown-page",level:2},children:["Create a new plain markdown page"]}]},lastModified:new Date("2022-01-01").toISOString()},slug:"",userData:{isAuthenticated:!1,name:"test name",picture:""},sidebar:null,sharedData:{},sharedDataIds:{}},J={useAnchorPositioning:m,useBreadcrumbs:d,useBanner:l,useCatalog:R,useCatalogSort:A,useCatalogSearch:B,useFetchCatalogEntities:G,useFetchCatalogEntitiesRelations:O,useFetchCatalogEntityRevisions:K,useCatalogClassic:c,useCurrentProduct:p,useGlobalData:g,useSearch:V,useAiSearch:j,useFacetQuery:Q,useI18n:h,useI18nConfig:f,useL10n:T,useL10nConfig:b,usePageData:C,usePageSharedData:k,usePageVersions:v,usePreloadHistory:P,useProducts:w,useUserMenu:y,useSidebarItems:q,useSidebarSiblingsData:E,useSubmitFeedback:S,useTranslate:D,useTranslationKeys:$,useUserTeams:L,usePageProps:I,useMarkdownText:M,useMarkdocRenderer:x,useCodeHighlight:F,useLoadAndNavigate:H,useTelemetry:r,useOtelTelemetry:r,useMcpData:U},W={LinkComponent:N},X={hooks:J,components:W,config:{}};function ne({children:a,customPageData:t}){return e.createElement(o,null,e.createElement(i,null,e.createElement(z.Provider,{value:{...s,...t,props:{...s.props,...t?.props}}},e.createElement(n.Provider,{value:X},a))))}export{ne as TestProvider};
1
+ import e from"react";import{BrowserRouter as o}from"react-router";import{ThemeDataContext as n,SearchSessionProvider as i}from"@redocly/theme/core/contexts";import u from"@redocly/theme/core/templates/Markdown";import{useBreadcrumbs as m,useBanner as d,useCatalogClassic as l,useCurrentProduct as c,useGlobalData as p,useI18n as g,useI18nConfig as h,useL10n as f,useL10nConfig as T,usePageData as b,usePageSharedData as C,usePageVersions as k,usePreloadHistory as v,useProducts as w,useUserMenu as y,useSubmitFeedback as P,useTranslate as S,useTranslationKeys as D,useSidebarSiblingsData as $,usePageProps as E,useUserTeams as I,useMarkdownText as L,useMarkdocRenderer as M,useCodeHighlight as x,useLoadAndNavigate as F,useCatalog as H,useCatalogSort as R,useCatalogSearch as A,useFetchCatalogEntities as B,useFetchCatalogEntitiesRelations as G,useTelemetry as r,useMcpData as O,useFetchCatalogEntityRevisions as U}from"./app/hooks";import{Link as K}from"./app/Link";import{useFacetQuery as N,useSearch as Q,useAiSearch as V}from"./app/search";import{useSidebarItems as j}from"./app/Sidebar/useSidebarItems";import{PageDataContext as q}from"./providers/page-data/PageDataContext";const s={Template:({pageProps:a,children:t})=>e.createElement(u,{pageProps:{...a,metadata:{...a.metadata,markdoc:{tagList:[]}}}},t),templateId:"markdown",isPublic:!0,props:{seo:{title:"Test"},ast:{$$mdtype:"Tag",name:"div",children:[{$$mdtype:"Tag",name:"Heading",attributes:{id:"github-flavored-markdown",level:1},children:["GitHub-flavored markdown"]},{$$mdtype:"Tag",name:"p",attributes:{},children:["These exercises assume you have",{$$mdtype:"Tag",name:"a",attributes:{href:"https://docs.redoc.ly/"},children:["basic markdown knowledge"]},"."]},{$$mdtype:"Tag",name:"Heading",attributes:{id:"create-a-new-plain-markdown-page",level:2},children:["Create a new plain markdown page"]}]},lastModified:new Date("2022-01-01").toISOString()},slug:"",userData:{isAuthenticated:!1,name:"test name",picture:""},sidebar:null,sharedData:{},sharedDataIds:{}},z={useBreadcrumbs:m,useBanner:d,useCatalog:H,useCatalogSort:R,useCatalogSearch:A,useFetchCatalogEntities:B,useFetchCatalogEntitiesRelations:G,useFetchCatalogEntityRevisions:U,useCatalogClassic:l,useCurrentProduct:c,useGlobalData:p,useSearch:Q,useAiSearch:V,useFacetQuery:N,useI18n:g,useI18nConfig:h,useL10n:f,useL10nConfig:T,usePageData:b,usePageSharedData:C,usePageVersions:k,usePreloadHistory:v,useProducts:w,useUserMenu:y,useSidebarItems:j,useSidebarSiblingsData:$,useSubmitFeedback:P,useTranslate:S,useTranslationKeys:D,useUserTeams:I,usePageProps:E,useMarkdownText:L,useMarkdocRenderer:M,useCodeHighlight:x,useLoadAndNavigate:F,useTelemetry:r,useOtelTelemetry:r,useMcpData:O},J={LinkComponent:K},W={hooks:z,components:J,config:{}};function oe({children:a,customPageData:t}){return e.createElement(o,null,e.createElement(i,null,e.createElement(q.Provider,{value:{...s,...t,props:{...s.props,...t?.props}}},e.createElement(n.Provider,{value:W},a))))}export{oe as TestProvider};
@@ -1,3 +1,3 @@
1
- /** @ts-ignore autogenerated module, @see src/server/esbuild/plugins/api-request-handlers-resolver.ts **/
1
+ /** @ts-expect-error autogenerated module, @see src/server/esbuild/plugins/api-request-handlers-resolver.ts **/
2
2
  export { requestHandlers } from '@portal/api-request-handlers';
3
3
  //# sourceMappingURL=api-request-handlers-entry.d.ts.map
@@ -31,5 +31,4 @@ export { useCodeHighlight } from './codeHighlight/useCodeHighlight';
31
31
  export { useLoadAndNavigate } from './useLoadAndNavigate';
32
32
  export { useUserClaims } from './useUserClaims';
33
33
  export { useMcpData } from './useMcpData';
34
- export { useAnchorPositioning } from './useAnchorPositioning';
35
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export*from"../../providers/page-data/hooks";import{usePageSharedData as t}from"../../providers/hooks";import{useLoginUrl as a}from"./useLoginUrl";import{useGlobalData as f}from"../useGlobalData";import{useL10n as p}from"../l10n/hooks";import{useL10nConfig as n}from"./useL10nConfig";import{useL10n as l}from"../l10n/hooks";import{useTranslate as C}from"../l10n/hooks";import{useTranslationKeys as d}from"../l10n/hooks";import{useL10nConfig as L}from"./useL10nConfig";export*from"./useCurrentUserTeams";export*from"./products";import{usePageVersions as F}from"../../providers/page-data/hooks";import{useUserMenu as P}from"../UserMenu/useUserMenu";import{useSubmitFeedback as U}from"../Feedback/useSubmitFeedback";import{usePreloadHistory as D}from"../usePreloadHistory";import{useBreadcrumbs as R}from"../Sidebar/useBreadcrumbs";import{useBanner as A}from"./useBanner";import{useCatalog as H}from"./catalog/useCatalog";import{useCatalogSort as w}from"./catalog/useCatalogSort";import{useCatalogSearch as K}from"./catalog/useCatalogSearch";import{useFetchCatalogEntities as V}from"./catalog/useFetchCatalogEntities";import{useFetchCatalogEntitiesRelations as q}from"./catalog/useFetchCatalogEntitiesRelations";import{useFetchCatalogEntityRevisions as J}from"./catalog/useFetchCatalogEntityRevisions";import{useCatalogClassic as Q}from"./catalog/useCatalogClassic";import{useTelemetry as X}from"./useTelemetry";import{useUserTeams as Z}from"./useUserTeams";import{useMarkdownText as $}from"./markdown/useMarkdownText";import{useMarkdocRenderer as oe}from"./markdown/useMarkdocRenderer";import{useCodeHighlight as te}from"./codeHighlight/useCodeHighlight";import{useLoadAndNavigate as ae}from"./useLoadAndNavigate";import{useUserClaims as fe}from"./useUserClaims";import{useMcpData as pe}from"./useMcpData";import{useAnchorPositioning as ne}from"./useAnchorPositioning";export{ne as useAnchorPositioning,A as useBanner,R as useBreadcrumbs,H as useCatalog,Q as useCatalogClassic,K as useCatalogSearch,w as useCatalogSort,te as useCodeHighlight,V as useFetchCatalogEntities,q as useFetchCatalogEntitiesRelations,J as useFetchCatalogEntityRevisions,f as useGlobalData,p as useI18n,n as useI18nConfig,l as useL10n,L as useL10nConfig,ae as useLoadAndNavigate,a as useLoginUrl,oe as useMarkdocRenderer,$ as useMarkdownText,pe as useMcpData,t as usePageSharedData,F as usePageVersions,D as usePreloadHistory,U as useSubmitFeedback,X as useTelemetry,C as useTranslate,d as useTranslationKeys,fe as useUserClaims,P as useUserMenu,Z as useUserTeams};
1
+ export*from"../../providers/page-data/hooks";import{usePageSharedData as t}from"../../providers/hooks";import{useLoginUrl as a}from"./useLoginUrl";import{useGlobalData as f}from"../useGlobalData";import{useL10n as p}from"../l10n/hooks";import{useL10nConfig as n}from"./useL10nConfig";import{useL10n as l}from"../l10n/hooks";import{useTranslate as C}from"../l10n/hooks";import{useTranslationKeys as c}from"../l10n/hooks";import{useL10nConfig as L}from"./useL10nConfig";export*from"./useCurrentUserTeams";export*from"./products";import{usePageVersions as F}from"../../providers/page-data/hooks";import{useUserMenu as S}from"../UserMenu/useUserMenu";import{useSubmitFeedback as k}from"../Feedback/useSubmitFeedback";import{usePreloadHistory as E}from"../usePreloadHistory";import{useBreadcrumbs as R}from"../Sidebar/useBreadcrumbs";import{useBanner as B}from"./useBanner";import{useCatalog as I}from"./catalog/useCatalog";import{useCatalogSort as A}from"./catalog/useCatalogSort";import{useCatalogSearch as K}from"./catalog/useCatalogSearch";import{useFetchCatalogEntities as V}from"./catalog/useFetchCatalogEntities";import{useFetchCatalogEntitiesRelations as q}from"./catalog/useFetchCatalogEntitiesRelations";import{useFetchCatalogEntityRevisions as J}from"./catalog/useFetchCatalogEntityRevisions";import{useCatalogClassic as Q}from"./catalog/useCatalogClassic";import{useTelemetry as X}from"./useTelemetry";import{useUserTeams as Z}from"./useUserTeams";import{useMarkdownText as $}from"./markdown/useMarkdownText";import{useMarkdocRenderer as oe}from"./markdown/useMarkdocRenderer";import{useCodeHighlight as te}from"./codeHighlight/useCodeHighlight";import{useLoadAndNavigate as ae}from"./useLoadAndNavigate";import{useUserClaims as fe}from"./useUserClaims";import{useMcpData as pe}from"./useMcpData";export{B as useBanner,R as useBreadcrumbs,I as useCatalog,Q as useCatalogClassic,K as useCatalogSearch,A as useCatalogSort,te as useCodeHighlight,V as useFetchCatalogEntities,q as useFetchCatalogEntitiesRelations,J as useFetchCatalogEntityRevisions,f as useGlobalData,p as useI18n,n as useI18nConfig,l as useL10n,L as useL10nConfig,ae as useLoadAndNavigate,a as useLoginUrl,oe as useMarkdocRenderer,$ as useMarkdownText,pe as useMcpData,t as usePageSharedData,F as usePageVersions,E as usePreloadHistory,k as useSubmitFeedback,X as useTelemetry,C as useTranslate,c as useTranslationKeys,fe as useUserClaims,S as useUserMenu,Z as useUserTeams};
@@ -1,3 +1,3 @@
1
- /** @ts-ignore autogenerated module, @see src/server/esbuild/plugins/mcp-tool-handlers-resolver.ts **/
1
+ /** @ts-expect-error autogenerated module, @see src/server/esbuild/plugins/mcp-tool-handlers-resolver.ts **/
2
2
  export { mcpToolHandlers } from '@portal/mcp-tool-handlers';
3
3
  //# sourceMappingURL=mcp-tool-handlers-entry.d.ts.map
@@ -1,3 +1,3 @@
1
- /** @ts-ignore autogenerated module, @see src/server/esbuild/plugins/api-request-handlers-resolver.ts **/
1
+ /** @ts-expect-error autogenerated module, @see src/server/esbuild/plugins/api-request-handlers-resolver.ts **/
2
2
  export { middleware } from '@portal/middleware';
3
3
  //# sourceMappingURL=middleware-entry.d.ts.map
@@ -1 +1 @@
1
- import e from"react";import{ThemeDataContext as m,SearchSessionProvider as d}from"@redocly/theme/core/contexts";import{useAnchorPositioning as g,useBreadcrumbs as p,useBanner as b,useCatalogClassic as f,useCurrentProduct as h,useGlobalData as s,useI18n as C,useI18nConfig as P,useL10n as S,useL10nConfig as T,usePageData as r,usePageSharedData as D,usePageVersions as M,usePreloadHistory as k,useProducts as v,useUserMenu as F,useSubmitFeedback as y,useTranslate as E,useTranslationKeys as L,useSidebarSiblingsData as R,usePageProps as O,useUserTeams as A,useMarkdownText as w,useMarkdocRenderer as x,useCodeHighlight as I,useLoadAndNavigate as j,useCatalog as B,useCatalogSort as H,useCatalogSearch as N,useFetchCatalogEntities as U,useFetchCatalogEntitiesRelations as _,useFetchCatalogEntityRevisions as G,useTelemetry as n,useMcpData as K}from"../../app/hooks";import{Link as Q}from"../../app/Link";import{useFacetQuery as V,useSearch as W,useAiSearch as q}from"../../app/search";import{useSidebarItems as z}from"../../app/Sidebar/useSidebarItems";import{deepMerge as J}from"../../../utils/object/deep-merge";import{allowlistObject as X}from"../../../utils/object/allowlist-object";const Y=["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation"],Z={useAnchorPositioning:g,useBreadcrumbs:p,useBanner:b,useCatalog:B,useCatalogSort:H,useCatalogSearch:N,useFetchCatalogEntities:U,useFetchCatalogEntitiesRelations:_,useFetchCatalogEntityRevisions:G,useCatalogClassic:f,useCurrentProduct:h,useGlobalData:s,useSearch:W,useAiSearch:q,useFacetQuery:V,useI18n:C,useI18nConfig:P,useL10n:S,useL10nConfig:T,usePageData:r,usePageSharedData:D,usePageVersions:M,usePreloadHistory:k,useProducts:v,useUserMenu:F,useSidebarItems:z,useSidebarSiblingsData:R,useSubmitFeedback:y,useTranslate:E,useTranslationKeys:L,useUserTeams:A,usePageProps:O,useMarkdownText:w,useMarkdocRenderer:x,useCodeHighlight:I,useLoadAndNavigate:j,useTelemetry:n,useOtelTelemetry:n,useMcpData:K},$={LinkComponent:Q};function ie({children:u}){const{props:t}=r()||{},a=s(),o=e.useMemo(()=>a||{},[a]),i=e.useMemo(()=>{const l=X(t?.frontmatter||{},Y);return J(o,l)},[o,t?.frontmatter]),c={hooks:Z,components:$,config:i};return e.createElement(d,null,e.createElement(m.Provider,{value:c},u))}export{ie as ThemeDataProvider};
1
+ import e from"react";import{ThemeDataContext as m,SearchSessionProvider as d}from"@redocly/theme/core/contexts";import{useBreadcrumbs as g,useBanner as p,useCatalogClassic as b,useCurrentProduct as f,useGlobalData as s,useI18n as C,useI18nConfig as h,useL10n as S,useL10nConfig as P,usePageData as r,usePageSharedData as T,usePageVersions as D,usePreloadHistory as M,useProducts as k,useUserMenu as v,useSubmitFeedback as F,useTranslate as y,useTranslationKeys as E,useSidebarSiblingsData as L,usePageProps as R,useUserTeams as O,useMarkdownText as w,useMarkdocRenderer as x,useCodeHighlight as A,useLoadAndNavigate as I,useCatalog as j,useCatalogSort as B,useCatalogSearch as H,useFetchCatalogEntities as N,useFetchCatalogEntitiesRelations as U,useFetchCatalogEntityRevisions as _,useTelemetry as n,useMcpData as G}from"../../app/hooks";import{Link as K}from"../../app/Link";import{useFacetQuery as Q,useSearch as V,useAiSearch as W}from"../../app/search";import{useSidebarItems as q}from"../../app/Sidebar/useSidebarItems";import{deepMerge as z}from"../../../utils/object/deep-merge";import{allowlistObject as J}from"../../../utils/object/allowlist-object";const X=["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation"],Y={useBreadcrumbs:g,useBanner:p,useCatalog:j,useCatalogSort:B,useCatalogSearch:H,useFetchCatalogEntities:N,useFetchCatalogEntitiesRelations:U,useFetchCatalogEntityRevisions:_,useCatalogClassic:b,useCurrentProduct:f,useGlobalData:s,useSearch:V,useAiSearch:W,useFacetQuery:Q,useI18n:C,useI18nConfig:h,useL10n:S,useL10nConfig:P,usePageData:r,usePageSharedData:T,usePageVersions:D,usePreloadHistory:M,useProducts:k,useUserMenu:v,useSidebarItems:q,useSidebarSiblingsData:L,useSubmitFeedback:F,useTranslate:y,useTranslationKeys:E,useUserTeams:O,usePageProps:R,useMarkdownText:w,useMarkdocRenderer:x,useCodeHighlight:A,useLoadAndNavigate:I,useTelemetry:n,useOtelTelemetry:n,useMcpData:G},Z={LinkComponent:K};function ue({children:u}){const{props:t}=r()||{},a=s(),o=e.useMemo(()=>a||{},[a]),i=e.useMemo(()=>{const l=J(t?.frontmatter||{},X);return z(o,l)},[o,t?.frontmatter]),c={hooks:Y,components:Z,config:i};return e.createElement(d,null,e.createElement(m.Provider,{value:c},u))}export{ue as ThemeDataProvider};
@@ -1,3 +1,3 @@
1
- /** @ts-ignore autogenerated module, @see src/server/esbuild/plugins/server-props-resolver.ts **/
1
+ /** @ts-expect-error autogenerated module, @see src/server/esbuild/plugins/server-props-resolver.ts **/
2
2
  export { serverProps } from '@portal/server-props';
3
3
  //# sourceMappingURL=server-props-entry.d.ts.map
@@ -1 +1 @@
1
- import u from"node:path";import{removeLeadingSlash as w}from"@redocly/theme/core/utils";import{toKebabCase as f}from"../../../../../../utils/string/to-kebab-case.js";import{promiseMapLimit as g}from"../../../../../utils/async/promise-map-limit.js";import{removeMarkdocTags as v}from"../../../../../../markdoc/helpers/remove-markdoc-tags.js";import{BaseApiEntitiesExtractor as E}from"./base.js";const d=15;class K extends E{constructor(t){super("arazzo",t)}mapApiDescriptionToEntity(t,o){const a=w(t.realRelativePath),c=t.document.info.title,e=this.resolveEntityKey({realRelativePath:t.realRelativePath,customKey:t.document["x-redocly-catalog-key"]});return{type:this.type,key:e,title:c,summary:t.document.info.description?v(t.document.info.description):null,tags:["arazzo"],metadata:{specType:this.specType,descriptionFile:a},version:o}}async loadApiDescriptions(){return(await this.context.cache.load(".","arazzo-docs")).data}async processApiDescription(t,o,a,c){if(!this.#t(t))throw new Error("Arazzo description has no source descriptions");const e=this.getRbacTeamsForDefinition(t.relativePath),i=this.mapApiDescriptionToEntity(t,a);await this.catalogEntitiesService.createEntity({entity:{...i},revision:o,sourceFile:t.realRelativePath,fileHash:t.hash,isRootEntity:!0,rbacTeams:e,source:"file"}),c.delete(`${i.key}:${a}`),await this.#e(t,i.key,i.version,a,o,c,e);const l=t.document.sourceDescriptions||[];await g(l,d,async r=>{if(!(r.type!=="openapi"||!r.url))try{const n=this.resolveSourceDescriptionUrl(r.url,t.realRelativePath);if(!n){!r.url.startsWith("http://")&&!r.url.startsWith("https://")&&this.context.logger.warn(`Could not resolve URL to local path: ${r.url}`);return}const s=((await this.context.cache.load(n,"api-doc")).data??[]).filter(m=>m.type==="openapi");if(s.length===0){this.context.logger.warn(`No OpenAPI definition found at path: ${n}`);return}const p=s[0],y=this.resolveEntityKey({realRelativePath:p.realRelativePath,customKey:p.document["x-redocly-catalog-key"]});await this.catalogEntitiesService.createEntityRelation({sourceKey:i.key,type:"relatesTo",targetKey:y,sourceFile:t.realRelativePath,fileHash:t.hash}),await this.#r(t,r.name,p,i.key,y,i.version,o)}catch(n){this.context.logger.warn(`Failed to create relation to OpenAPI source "${r.url}": ${n instanceof Error?n.message:"Unknown error"}`)}})}#t=t=>!!t?.document?.sourceDescriptions&&t.document.sourceDescriptions.length>0;#e=async(t,o,a,c,e,i,l)=>{try{const r=t.document.components?.inputs,n=r?Object.entries(r):[],h=[];for(const[s,p]of n)h.push(async()=>{const y=`${o}-${f(s)}`,m=await this.#a({schemaName:s,schema:p,description:t,parentKey:o,parentVersion:a,parentRevision:e,rbacTeams:l});i.delete(`${y}:${c}`),m&&await this.catalogEntitiesService.createEntityRelation({sourceKey:o,type:"uses",targetKey:m.key,sourceFile:t.realRelativePath,fileHash:t.hash,sourceVersion:a,targetVersion:a,sourceRevision:e,targetRevision:e})});if(h.length===0)return;await g(h,d,s=>s())}catch(r){this.context.logger.warn(`Failed to create data schema entities for Arazzo description: ${r instanceof Error?r.message:"Unknown error"}`)}};#a=async({schemaName:t,schema:o,description:a,parentKey:c,parentVersion:e,parentRevision:i,rbacTeams:l})=>{const r={type:"data-schema",key:`${c}-${f(t)}`,title:t,summary:o.description||o.title||null,tags:["arazzo"],metadata:{specType:this.specType,descriptionFile:a.realRelativePath,schema:"{}"},version:e};try{return await this.catalogEntitiesService.createEntity({entity:r,sourceFile:a.realRelativePath,fileHash:a.hash,rbacTeams:l,source:"file",revision:i})}catch(n){return this.context.logger.warn(`Failed to create data schema entity for ${t}: ${n instanceof Error?n.message:"Unknown error"}`),null}};#r=async(t,o,a,c,e,i,l)=>{const r=t.document.workflows||[];if(r.length===0)return;const n=new Set;for(const h of r)for(const s of h.steps||[]){if(!s.operationId)continue;const p=s.operationId.startsWith(`${o}.`)?s.operationId.substring(`${o}.`.length):s.operationId;p&&n.add(p)}n.size!==0&&await g(Array.from(n),d,async h=>{try{const s=`${e}-${f(h)}`;await this.catalogEntitiesService.createEntityRelation({sourceKey:c,type:"uses",targetKey:s,sourceFile:t.realRelativePath,fileHash:t.hash,sourceVersion:i,targetVersion:i,sourceRevision:l,targetRevision:l})}catch(s){this.context.logger.warn(`Failed to create relation to operation "${h}": ${s instanceof Error?s.message:"Unknown error"}`)}})};resolveSourceDescriptionUrl(t,o){try{const a=t.trim(),c=a.startsWith("@")?a.slice(1):a,[e]=c.split("#");if(e.startsWith("http://")||e.startsWith("https://"))return null;if(e.startsWith("/"))return w(u.posix.normalize(e));const i=u.posix.dirname(o);return e.startsWith(i+"/")?u.posix.normalize(e):u.posix.normalize(u.posix.join(i,e))}catch{return this.context.logger.warn(`Failed to resolve URL: ${t}`),null}}}export{K as ArazzoEntitiesExtractor};
1
+ import u from"node:path";import{removeLeadingSlash as w}from"@redocly/theme/core/utils";import{toKebabCase as f}from"../../../../../../utils/string/to-kebab-case.js";import{promiseMapLimit as g}from"../../../../../utils/async/promise-map-limit.js";import{removeMarkdocTags as v}from"../../../../../../markdoc/helpers/remove-markdoc-tags.js";import{BaseApiEntitiesExtractor as E}from"./base.js";const d=15;class K extends E{constructor(t){super("arazzo",t)}mapApiDescriptionToEntity(t,o){const r=w(t.realRelativePath),c=t.document.info.title,e=this.resolveEntityKey({realRelativePath:t.realRelativePath,customKey:t.document["x-redocly-catalog-key"]});return{type:this.type,key:e,title:c,summary:t.document.info.description?v(t.document.info.description):null,tags:["arazzo"],metadata:{specType:this.specType,descriptionFile:r},version:o}}async loadApiDescriptions(){return(await this.context.cache.load(".","arazzo-docs")).data}async processApiDescription(t,o,r,c){if(!this.#t(t))throw new Error("Arazzo description has no source descriptions");const e=this.getRbacTeamsForDefinition(t.relativePath),i=this.mapApiDescriptionToEntity(t,r);await this.catalogEntitiesService.createEntity({entity:{...i},revision:o,sourceFile:t.realRelativePath,fileHash:t.hash,isRootEntity:!0,rbacTeams:e,source:"file"}),c.delete(`${i.key}:${r}`),await this.#e(t,i.key,i.version,r,o,c,e);const l=t.document.sourceDescriptions||[];await g(l,d,async a=>{if(!(a.type!=="openapi"||!a.url))try{const n=this.resolveSourceDescriptionUrl(a.url,t.realRelativePath);if(!n){!a.url.startsWith("http://")&&!a.url.startsWith("https://")&&this.context.logger.warn(`Could not resolve URL to local path: ${a.url}`);return}const s=((await this.context.cache.load(n,"api-doc")).data??[]).filter(m=>m.type==="openapi");if(s.length===0){this.context.logger.warn(`No OpenAPI definition found at path: ${n}`);return}const p=s[0],y=this.resolveEntityKey({realRelativePath:p.realRelativePath,customKey:p.document["x-redocly-catalog-key"]});await this.catalogEntitiesService.createEntityRelation({sourceKey:i.key,type:"relatesTo",targetKey:y,sourceFile:t.realRelativePath,fileHash:t.hash}),await this.#r(t,a.name,p,i.key,y,i.version,o)}catch(n){this.context.logger.warn(`Failed to create relation to OpenAPI source "${a.url}": ${n instanceof Error?n.message:"Unknown error"}`)}})}#t=t=>!!t?.document?.sourceDescriptions&&t.document.sourceDescriptions.length>0;#e=async(t,o,r,c,e,i,l)=>{try{const a=t.document.components?.inputs,n=a?Object.entries(a):[],h=[];for(const[s,p]of n)h.push(async()=>{const y=`${o}-${f(s)}`,m=await this.#a({schemaName:s,schema:p,description:t,parentKey:o,parentVersion:r,parentRevision:e,rbacTeams:l});i.delete(`${y}:${c}`),m&&await this.catalogEntitiesService.createEntityRelation({sourceKey:o,type:"uses",targetKey:m.key,sourceFile:t.realRelativePath,fileHash:t.hash,sourceVersion:r,targetVersion:r,sourceRevision:e,targetRevision:e})});if(h.length===0)return;await g(h,d,s=>s())}catch(a){this.context.logger.warn(`Failed to create data schema entities for Arazzo description: ${a instanceof Error?a.message:"Unknown error"}`)}};#a=async({schemaName:t,schema:o,description:r,parentKey:c,parentVersion:e,parentRevision:i,rbacTeams:l})=>{const a={type:"data-schema",key:`${c}-${f(t)}`,title:t,summary:o.description||o.title||null,tags:["arazzo"],metadata:{specType:this.specType,descriptionFile:r.realRelativePath,schema:"{}"},version:e};try{return await this.catalogEntitiesService.createEntity({entity:a,sourceFile:r.realRelativePath,fileHash:r.hash,rbacTeams:l,source:"file",revision:i})}catch(n){return this.context.logger.warn(`Failed to create data schema entity for ${t}: ${n instanceof Error?n.message:"Unknown error"}`),null}};#r=async(t,o,r,c,e,i,l)=>{const a=t.document.workflows||[];if(a.length===0)return;const n=new Set;for(const h of a)for(const s of h.steps||[]){if(!s.operationId)continue;const p=s.operationId.startsWith(`${o}.`)?s.operationId.substring(`${o}.`.length):s.operationId;p&&n.add(p)}n.size!==0&&await g(Array.from(n),d,async h=>{try{const s=`${e}-${f(h)}`;await this.catalogEntitiesService.createEntityRelation({sourceKey:c,type:"uses",targetKey:s,sourceFile:t.realRelativePath,fileHash:t.hash,sourceVersion:i,targetVersion:i,sourceRevision:l,targetRevision:l})}catch(s){this.context.logger.warn(`Failed to create relation to operation "${h}": ${s instanceof Error?s.message:"Unknown error"}`)}})};resolveSourceDescriptionUrl(t,o){try{const r=t.trim(),c=r.startsWith("@")?r.slice(1):r,[e]=c.split("#");if(e.startsWith("http://")||e.startsWith("https://"))return null;if(e.startsWith("/"))return w(u.posix.normalize(e));const i=u.posix.dirname(o);return e.startsWith(i+"/")?u.posix.normalize(e):u.posix.normalize(u.posix.join(i,e))}catch{return this.context.logger.warn(`Failed to resolve URL: ${t}`),null}}}export{K as ArazzoEntitiesExtractor};
@@ -1,2 +1,2 @@
1
- import{isObject as k}from"../../../../../utils/guards/is-object.js";import{reporter as a}from"../../../../tools/notifiers/reporter.js";async function C(u,s){const h=u.split(`
2
- `),c=[],n=[],l={steps:[]},d=/chunk\s*\{(.*)\}/,g=/(?:^|\s)@chunk-end(?!\S)/;for(let e=0;e<h.length;e++){const r=h[e],p=r.match(d);if(p){let t,i=p[1];try{t=JSON.parse(`{${i}}`)}catch{try{i=i.replace(/\}\s*\*\/$/,""),t=JSON.parse(`{${i}}`)}catch(f){await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. It should be a valid JSON object. ${f}`),t={steps:[]}}}k(t)||(await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. It should be a valid JSON object.`),t={steps:[]}),t.steps&&!Array.isArray(t.steps)&&(await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. "steps" should be an array of strings.`),t={...t,steps:[]}),t.steps?l.steps.push(...t.steps):t.steps=[];const o={start:e,condition:t,children:[]};n.length>0?n[n.length-1].children.push(o):c.push(o),n.push(o)}else g.test(r)?n.length>0?n.pop():await a.panicOnBuildContentError(`Unmatched closing tag '@chunk-end' at line ${e+1} in ${s}`):n.length>0?n[n.length-1].children.push(r):c.push(r)}if(n.length>0){let e;for(;e=n.pop();)await a.panicOnBuildContentError(`Unmatched opening tag '@chunk' at line ${e.start+1} in ${s}`)}return{root:c,metadata:l}}export{C as parseFileChunks};
1
+ import{isObject as k}from"../../../../../utils/guards/is-object.js";import{reporter as a}from"../../../../tools/notifiers/reporter.js";async function O(u,s){const h=u.split(`
2
+ `),c=[],n=[],l={steps:[]},d=/chunk\s*\{(.*)\}/,g=/(?:^|\s)@chunk-end(?!\S)/;for(let e=0;e<h.length;e++){const i=h[e],p=i.match(d);if(p){let t,r=p[1];try{t=JSON.parse(`{${r}}`)}catch{try{r=r.replace(/\}\s*\*\/$/,""),t=JSON.parse(`{${r}}`)}catch(f){await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. It should be a valid JSON object. ${f}`),t={steps:[]}}}k(t)||(await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. It should be a valid JSON object.`),t={steps:[]}),t.steps&&!Array.isArray(t.steps)&&(await a.panicOnBuildContentError(`Invalid format of the @chunk tag at ${e+1} in ${s}. "steps" should be an array of strings.`),t={...t,steps:[]}),t.steps?l.steps.push(...t.steps):t.steps=[];const o={start:e,condition:t,children:[]};n.length>0?n[n.length-1].children.push(o):c.push(o),n.push(o)}else g.test(i)?n.length>0?n.pop():await a.panicOnBuildContentError(`Unmatched closing tag '@chunk-end' at line ${e+1} in ${s}`):n.length>0?n[n.length-1].children.push(i):c.push(i)}if(n.length>0){let e;for(;e=n.pop();)await a.panicOnBuildContentError(`Unmatched opening tag '@chunk' at line ${e.start+1} in ${s}`)}return{root:c,metadata:l}}export{O as parseFileChunks};
@@ -1 +1 @@
1
- import{and as g,eq as v,gt as c,lt as a,or as b,sql as p}from"drizzle-orm";import{decodeCursor as q}from"./utils/decode-cursor.js";const G=e=>{if(e===null||typeof e!="object")return!1;const r=e;return typeof r.value=="string"&&typeof r.id=="string"},M=e=>{if(e===null||typeof e!="object")return!1;const r=e;return Array.isArray(r.values)&&r.values.every(f=>typeof f=="string")&&typeof r.id=="string"};function k(e,r,f){if(e.length!==r.length)return p`0`;const h=[];for(let t=0;t<e.length;t++){const C=p.identifier(e[t].field),y=r[t],m=e[t].order==="ASC",d=f==="after"&&m||f==="before"&&!m?c(C,y):a(C,y);if(t===0)h.push(d);else{const o=e.slice(0,t).map((i,S)=>v(p.identifier(i.field),r[S]));h.push(g(g(...o),d))}}return b(...h)}const N=(e,r)=>{const{after:f,before:h}=r;if(!f&&!h)return{sqlBuilder:e,whereCondition:null};const t=q(f),C=q(h),y=t!=null,m=C!=null&&!y,l=r.sort&&r.sort.length>0?r.sort:[{field:"id",order:"ASC"}],d=l[0],o=p.identifier(d.field),i=p.identifier("id");let S=null;function j(B,A){if(!B)return null;try{const n=JSON.parse(B);if(M(n)){const F=l[l.length-1]?.field==="id",I=n.id!=null,w=l.length===n.values.length+1&&F&&I,T=!F&&I&&l.length===n.values.length,x=T?[...l,{field:"id",order:l[0]?.order??"ASC"}]:l,E=w||T?[...n.values,n.id]:n.values;return k(x,E,A)}if(!G(n))return null;const s=String(n.value),u=String(n.id);return d.field==="id"?d.order==="ASC"?A==="after"?c(i,u):a(i,u):A==="after"?a(i,u):c(i,u):d.order==="ASC"?A==="after"?b(c(o,s),g(v(o,s),c(i,u))):b(a(o,s),g(v(o,s),a(i,u))):A==="after"?b(a(o,s),g(v(o,s),a(i,u))):b(c(o,s),g(v(o,s),c(i,u)))}catch{return null}}return y?S=j(t,"after"):m&&(S=j(C,"before")),{sqlBuilder:e,whereCondition:S}};export{N as applyAfterAndBefore};
1
+ import{and as g,eq as v,gt as c,lt as a,or as b,sql as p}from"drizzle-orm";import{decodeCursor as q}from"./utils/decode-cursor.js";const G=e=>{if(e===null||typeof e!="object")return!1;const r=e;return typeof r.value=="string"&&typeof r.id=="string"},M=e=>{if(e===null||typeof e!="object")return!1;const r=e;return Array.isArray(r.values)&&r.values.every(f=>typeof f=="string")&&typeof r.id=="string"};function k(e,r,f){if(e.length!==r.length)return p`0`;const h=[];for(let t=0;t<e.length;t++){const C=p.identifier(e[t].field),y=r[t],m=e[t].order==="ASC",d=f==="after"&&m||f==="before"&&!m?c(C,y):a(C,y);if(t===0)h.push(d);else{const n=e.slice(0,t).map((o,S)=>v(p.identifier(o.field),r[S]));h.push(g(g(...n),d))}}return b(...h)}const N=(e,r)=>{const{after:f,before:h}=r;if(!f&&!h)return{sqlBuilder:e,whereCondition:null};const t=q(f),C=q(h),y=t!=null,m=C!=null&&!y,l=r.sort&&r.sort.length>0?r.sort:[{field:"id",order:"ASC"}],d=l[0],n=p.identifier(d.field),o=p.identifier("id");let S=null;function j(B,A){if(!B)return null;try{const i=JSON.parse(B);if(M(i)){const F=l[l.length-1]?.field==="id",I=i.id!=null,w=l.length===i.values.length+1&&F&&I,T=!F&&I&&l.length===i.values.length,x=T?[...l,{field:"id",order:l[0]?.order??"ASC"}]:l,E=w||T?[...i.values,i.id]:i.values;return k(x,E,A)}if(!G(i))return null;const s=String(i.value),u=String(i.id);return d.field==="id"?d.order==="ASC"?A==="after"?c(o,u):a(o,u):A==="after"?a(o,u):c(o,u):d.order==="ASC"?A==="after"?b(c(n,s),g(v(n,s),c(o,u))):b(a(n,s),g(v(n,s),a(o,u))):A==="after"?b(a(n,s),g(v(n,s),a(o,u))):b(c(n,s),g(v(n,s),c(o,u)))}catch{return null}}return y?S=j(t,"after"):m&&(S=j(C,"before")),{sqlBuilder:e,whereCondition:S}};export{N as applyAfterAndBefore};
@@ -1 +1 @@
1
- import{isBase64 as r}from"./is-base-64.js";function n(e){if(!e)return e;if(r(e))try{return Buffer.from(e,"base64url").toString()}catch{return e}return e}export{n as decodeCursor};
1
+ import{isBase64 as e}from"./is-base-64.js";function f(t){if(!t)return t;if(e(t))try{return Buffer.from(t,"base64url").toString()}catch{return t}return t}export{f as decodeCursor};
@@ -1 +1 @@
1
- function t(r){try{return Buffer.from(r,"base64").toString("base64")===r}catch{return!1}}export{t as isBase64};
1
+ function r(e){try{return Buffer.from(e,"base64").toString("base64")===e}catch{return!1}}export{r as isBase64};
@@ -1 +1 @@
1
- import{isString as n}from"../../../../../utils/string/is-string.js";import{removePii as e}from"./remove-pii.js";function m(r){if(!n(r))return r;try{const t=new URL(r,"http://example.com");for(const[i,s]of t.searchParams.entries()){const a=String(e(s));t.searchParams.set(i,a)}return r.startsWith("http://")||r.startsWith("https://")?t.toString():t.pathname+t.search+t.hash}catch{return String(e(r))}}export{m as removePiiFromUrl};
1
+ import{isString as n}from"../../../../../utils/string/is-string.js";import{removePii as e}from"./remove-pii.js";function m(t){if(!n(t))return t;try{const r=new URL(t,"http://example.com");for(const[i,s]of r.searchParams.entries()){const a=String(e(s));r.searchParams.set(i,a)}return t.startsWith("http://")||t.startsWith("https://")?r.toString():r.pathname+r.search+r.hash}catch{return String(e(t))}}export{m as removePiiFromUrl};
@@ -1 +1 @@
1
- import{envConfig as s}from"../../config/env-config.js";import{fetchWithClient as a}from"../../utils/fetch-with-client.js";const d=(r,e)=>r.secureMethods?.includes(e)??!1;function u(r={}){return async(e,i)=>{const t=e.req.method;if(!d(r,t))return await i();const n=e.req.header("apiKey");if(!n)return e.json({message:"API key is required"},401);try{if(!s.BH_API_URL)return e.json({message:"API key validation service not configured"},500);const o=new URL("api-keys-verify",s.BH_API_URL).toString();if(!(await a(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:n})})).ok)return e.json({message:"Invalid API key"},401);await i()}catch{return e.json({message:"API key validation failed"},400)}}}export{u as apiKeyMiddleware};
1
+ import{envConfig as o}from"../../config/env-config.js";import{fetchWithClient as a}from"../../utils/fetch-with-client.js";const d=(i,e)=>i.secureMethods?.includes(e)??!1;function u(i={}){return async(e,r)=>{const s=e.req.method;if(!d(i,s))return await r();const n=e.req.header("apiKey");if(!n)return e.json({message:"API key is required"},401);try{if(!o.BH_API_URL)return e.json({message:"API key validation service not configured"},500);const t=new URL("api-keys-verify",o.BH_API_URL).toString();if(!(await a(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:n})})).ok)return e.json({message:"Invalid API key"},401);await r()}catch{return e.json({message:"API key validation failed"},400)}}}export{u as apiKeyMiddleware};
@@ -1 +1 @@
1
- import{KvService as l}from"../../persistence/kv/services/kv-service.js";import{DEFAULT_AUTHENTICATED_TEAM as h}from"../../../constants/common.js";import{envConfig as s}from"../../config/env-config.js";import{fetchWithClient as T}from"../../utils/fetch-with-client.js";import{CACHE_CONTROL_NO_STORE_HEADER_VALUE as y,JWT_SECRET_KEY as p}from"../../constants/common.js";import*as m from"../jwt/jwt.js";import{AlgorithmTypes as I}from"../jwt/types.js";const f=60,E=e=>["POST","PUT","DELETE","PATCH"].includes(e),_=e=>["GET"].includes(e);function S({serverOutDir:e,protectReadMethods:t=!0}){return async(r,a)=>await w(r,a,e,t)}const w=async(e,t,r,a=!0)=>{e.header("Cache-Control",y);const n=e.req.method,i=E(n)||_(n)&&a,o=e.req.header("apiKey");if(o)return await C(e,t,o,r);const u=e.req.header("authorization")?.replace("Bearer ","");return u?await g(e,t,u):i?e.json({message:"API key is required"},401):await t()},C=async(e,t,r,a)=>{if(!s.BH_API_URL||!s.ORGANIZATION_ID)return e.json({message:"API key validation service not configured"},500);try{const n=await l.getInstance({baseDbDir:a});let i=await v(n,r);if(i)return e.set("apiKeyTeams",i.teams),await t();const o=new URL(`/api/orgs/${s.ORGANIZATION_ID}/session`,s.BH_API_URL).toString(),c=await T(o,{method:"GET",headers:{Authorization:`Bearer ${r}`}});if(!c.ok)return e.json({message:"Invalid API key"},401);const A=(await c.json())?.user?.teams?.[s.ORGANIZATION_ID]??[],d=[h,...A];return e.set("apiKeyTeams",d),await n.set(["api-keys","reunite",r],{valid:!0,teams:d},{ttlInSeconds:f}),await t()}catch{return e.json({message:"API key validation failed"},400)}},g=async(e,t,r)=>{try{const a=await m.verify(r,p,I.HS256),n=m.decode(r).payload.isInternalConnection;return!a||!n?e.json({message:"API key is required"},401):await t()}catch{return e.json({message:"API key validation failed"},400)}},v=async(e,t)=>{try{return await e.get(["api-keys","reunite",t])}catch{return null}};export{S as catalogAuthMiddleware};
1
+ import{KvService as l}from"../../persistence/kv/services/kv-service.js";import{DEFAULT_AUTHENTICATED_TEAM as h}from"../../../constants/common.js";import{envConfig as s}from"../../config/env-config.js";import{fetchWithClient as T}from"../../utils/fetch-with-client.js";import{CACHE_CONTROL_NO_STORE_HEADER_VALUE as y,JWT_SECRET_KEY as p}from"../../constants/common.js";import*as m from"../jwt/jwt.js";import{AlgorithmTypes as I}from"../jwt/types.js";const f=60,E=e=>["POST","PUT","DELETE","PATCH"].includes(e),_=e=>["GET"].includes(e);function S({serverOutDir:e,protectReadMethods:t=!0}){return async(a,r)=>await w(a,r,e,t)}const w=async(e,t,a,r=!0)=>{e.header("Cache-Control",y);const n=e.req.method,i=E(n)||_(n)&&r,o=e.req.header("apiKey");if(o)return await C(e,t,o,a);const u=e.req.header("authorization")?.replace("Bearer ","");return u?await g(e,t,u):i?e.json({message:"API key is required"},401):await t()},C=async(e,t,a,r)=>{if(!s.BH_API_URL||!s.ORGANIZATION_ID)return e.json({message:"API key validation service not configured"},500);try{const n=await l.getInstance({baseDbDir:r});let i=await v(n,a);if(i)return e.set("apiKeyTeams",i.teams),await t();const o=new URL(`/api/orgs/${s.ORGANIZATION_ID}/session`,s.BH_API_URL).toString(),c=await T(o,{method:"GET",headers:{Authorization:`Bearer ${a}`}});if(!c.ok)return e.json({message:"Invalid API key"},401);const A=(await c.json())?.user?.teams?.[s.ORGANIZATION_ID]??[],d=[h,...A];return e.set("apiKeyTeams",d),await n.set(["api-keys","reunite",a],{valid:!0,teams:d},{ttlInSeconds:f}),await t()}catch{return e.json({message:"API key validation failed"},400)}},g=async(e,t,a)=>{try{const r=await m.verify(a,p,I.HS256),n=m.decode(a).payload.isInternalConnection;return!r||!n?e.json({message:"API key is required"},401):await t()}catch{return e.json({message:"API key validation failed"},400)}},v=async(e,t)=>{try{return await e.get(["api-keys","reunite",t])}catch{return null}};export{S as catalogAuthMiddleware};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/redoc-revel",
3
- "version": "0.138.0-next.0",
3
+ "version": "0.138.0-next.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,13 +33,13 @@
33
33
  "@opentelemetry/sdk-trace-web": "2.8.0",
34
34
  "@opentelemetry/semantic-conventions": "1.40.0",
35
35
  "@redocly/ajv": "8.18.0",
36
- "@redocly/api-docs": "0.3.0-next.0",
37
- "@redocly/config": "0.56.0",
36
+ "@redocly/api-docs": "0.3.0-next.1",
37
+ "@redocly/config": "0.57.0",
38
38
  "@redocly/openapi-core": "2.53.0",
39
39
  "@redocly/portal-legacy-ui": "0.19.0",
40
40
  "@redocly/portal-plugin-mock-server": "0.22.0",
41
41
  "@redocly/realm-asyncapi-sdk": "0.16.0-next.0",
42
- "@redocly/theme": "0.70.0-next.0",
42
+ "@redocly/theme": "0.70.0-next.1",
43
43
  "@shikijs/transformers": "3.21.0",
44
44
  "@tanstack/react-query": "5.62.3",
45
45
  "@tanstack/react-table": "8.21.3",
@@ -71,7 +71,7 @@
71
71
  "mri": "1.2.0",
72
72
  "nanoid": "5.1.16",
73
73
  "nprogress": "0.2.0",
74
- "openapi-sampler": "^1.7.5",
74
+ "openapi-sampler": "^1.7.6",
75
75
  "os-browserify": "0.3.0",
76
76
  "path-browserify": "1.0.1",
77
77
  "picomatch": "2.3.2",
@@ -1,6 +0,0 @@
1
- type AnchorPositioningResult = {
2
- isSupported: boolean;
3
- };
4
- export declare const useAnchorPositioning: () => AnchorPositioningResult;
5
- export {};
6
- //# sourceMappingURL=useAnchorPositioning.d.ts.map
@@ -1 +0,0 @@
1
- import{useState as n,useEffect as s}from"react";const e=()=>{const[o,t]=n(!1);return s(()=>{t(p())},[]),{isSupported:o}};function p(){return typeof CSS>"u"||typeof CSS.supports!="function"?!1:CSS.supports("anchor-name: --a")&&CSS.supports("position-anchor: --a")&&CSS.supports("top: anchor(top)")}export{e as useAnchorPositioning};