@techdocs/cli 0.0.0-nightly-20230124022523 → 0.0.0-nightly-20230126022736
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 +17 -3
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.f1b97d9e.js → main.8c65d70b.js} +1 -1
- package/dist/embedded-app/static/main.8c65d70b.js.map +1 -0
- package/dist/embedded-app/static/module-octokit.991a0781.js +5 -0
- package/dist/embedded-app/static/module-octokit.991a0781.js.map +1 -0
- package/dist/embedded-app/static/{runtime.f1b97d9e.js → runtime.8c65d70b.js} +1 -1
- package/dist/embedded-app/static/{runtime.f1b97d9e.js.map → runtime.8c65d70b.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.f1b97d9e.js → vendor.8c65d70b.js} +1 -1
- package/dist/embedded-app/static/{vendor.f1b97d9e.js.map → vendor.8c65d70b.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/main.f1b97d9e.js.map +0 -1
- package/dist/embedded-app/static/module-octokit.c67cdf8f.js +0 -5
- package/dist/embedded-app/static/module-octokit.c67cdf8f.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20230126022736
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 6e0b6a0d50: Fixed publish command missing awsBucketRootPath option.
|
|
8
8
|
Fixed publish command having the gcsBucketRootPath option misconfigured, previously returning a boolean vs a string.
|
|
9
9
|
- Updated dependencies
|
|
10
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
11
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
10
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20230126022736
|
|
11
|
+
- @backstage/backend-common@0.0.0-nightly-20230126022736
|
|
12
|
+
- @backstage/catalog-model@0.0.0-nightly-20230126022736
|
|
13
|
+
- @backstage/cli-common@0.1.11
|
|
14
|
+
- @backstage/config@1.0.6
|
|
15
|
+
|
|
16
|
+
## 1.3.2-next.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 6e0b6a0d50: Fixed publish command missing awsBucketRootPath option.
|
|
21
|
+
Fixed publish command having the gcsBucketRootPath option misconfigured, previously returning a boolean vs a string.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @backstage/plugin-techdocs-node@1.4.6-next.0
|
|
24
|
+
- @backstage/catalog-model@1.1.6-next.0
|
|
25
|
+
- @backstage/backend-common@0.18.2-next.0
|
|
12
26
|
|
|
13
27
|
## 1.3.0
|
|
14
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.8c65d70b.js"></script><script defer="defer" src="/static/module-material-ui.8008c157.js"></script><script defer="defer" src="/static/module-lodash.f07e54c1.js"></script><script defer="defer" src="/static/module-date-fns.7dd2cc1f.js"></script><script defer="defer" src="/static/module-yaml.cb32d5ca.js"></script><script defer="defer" src="/static/module-ajv.07e5c2aa.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.9cc2c5ac.js"></script><script defer="defer" src="/static/module-octokit.991a0781.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/module-remix-run.b9acb514.js"></script><script defer="defer" src="/static/vendor.8c65d70b.js"></script><script defer="defer" src="/static/main.8c65d70b.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -500,4 +500,4 @@ ${de.href}
|
|
|
500
500
|
|
|
501
501
|
Feedback:`),lt=(Oe==null?void 0:Oe.type)==="github"?(0,In.BT)(Ce.href,"blob"):Ce.href,ft=Xt()(lt),xt=`/${ft.organization}/${ft.name}`,ct=de.cloneNode();switch(Oe==null?void 0:Oe.type){case"gitlab":ct.href=`${Ce.origin}${xt}/issues/new?issue[title]=${ht}&issue[description]=${jt}`;break;case"github":ct.href=`${Ce.origin}${xt}/issues/new?title=${ht}&body=${jt}`;break;default:return K}return vn.render(r.createElement(Un.Z),ct),ct.style.paddingLeft="5px",ct.title="Leave feedback for this page",ct.id="git-feedback-link",de==null||de.insertAdjacentElement("beforebegin",ct),K};var zn=t(44882);const pn=()=>S=>{const K=S.querySelector('.md-header label[for="__drawer"]'),ge=S.querySelector("article");if(!K||!ge)return S;const de=K.cloneNode();return vn.render(r.createElement(zn.Z),de),de.id="toggle-sidebar",de.title="Toggle Sidebar",de.classList.add("md-content__button"),de.style.setProperty("padding","0 0 0 5px"),de.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),ge==null||ge.prepend(de),S},yn=()=>S=>(((ge,de)=>{Array.from(ge).filter(Ce=>Ce.hasAttribute(de)).forEach(Ce=>{const Oe=Ce.getAttribute(de);if(Oe){Oe.match(/^https?:\/\//i)&&Ce.setAttribute("target","_blank");try{const Me=xn(window.location.href);Ce.setAttribute(de,new URL(Oe,Me).toString())}catch{Ce.replaceWith(Ce.textContent||Oe)}}})})(Array.from(S.getElementsByTagName("a")),"href"),S);function xn(S){const K=new URL(S);return!K.pathname.endsWith("/")&&!K.pathname.endsWith(".html")&&(K.pathname+="/"),K.toString()}const kn=({baseUrl:S,onClick:K})=>ge=>(Array.from(ge.getElementsByTagName("a")).forEach(de=>{de.addEventListener("click",Ce=>{const Me=de.getAttribute("href");!Me||Me.startsWith(S)&&!de.hasAttribute("download")&&(Ce.preventDefault(),K(Ce,Me))})}),ge);var On=t(15459),bn=t(80030),me=t(72379),ee=t(41547);const Re=(0,On.Z)(S=>({tooltip:{fontSize:"inherit",color:S.palette.text.primary,margin:0,padding:S.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(bn.ZP),Ue=()=>(0,h.jsx)(me.Z,{children:(0,h.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),et=({text:S})=>{const[K,ge]=(0,r.useState)(!1),de=(0,r.useCallback)(()=>{window.navigator.clipboard.writeText(S),ge(!0)},[S]),Ce=(0,r.useCallback)(()=>{ge(!1)},[ge]);return(0,h.jsx)(Re,{title:"Copied to clipboard",placement:"left",open:K,onClose:Ce,leaveDelay:1e3,children:(0,h.jsx)(te.Z,{className:"md-clipboard md-icon",onClick:de,children:(0,h.jsx)(Ue,{})})})},wt=S=>K=>{const ge=K.querySelectorAll("pre > code");for(const Ce of ge){var de;const Oe=Ce.textContent||"",Me=document.createElement("div");Ce==null||(de=Ce.parentElement)===null||de===void 0||de.prepend(Me),vn.render((0,h.jsx)(ee.Z,{theme:S,children:(0,h.jsx)(et,{text:Oe})}),Me)}return K},ae=()=>S=>{var K;return(K=S.querySelector(".md-header"))===null||K===void 0||K.remove(),S},O=()=>S=>{var K,ge;return(K=S.querySelector(".md-footer .md-copyright"))===null||K===void 0||K.remove(),(ge=S.querySelector(".md-footer-copyright"))===null||ge===void 0||ge.remove(),S},ue=({onLoading:S,onLoaded:K})=>ge=>(S(),ge.addEventListener(g.Ox,function de(){K(),ge.removeEventListener(g.Ox,de)}),ge),Be=()=>S=>(S.addEventListener(g.Ox,function K(){if(window.location.hash){var ge;const de=window.location.hash.slice(1);(ge=S==null?void 0:S.querySelector(`[id="${de}"]`))===null||ge===void 0||ge.scrollIntoView()}S.removeEventListener(g.Ox,K)}),S),D=()=>S=>(setTimeout(()=>{const K=S==null?void 0:S.querySelectorAll("li.md-nav__item--active");K.length!==0&&(K.forEach(de=>{const Ce=de==null?void 0:de.querySelector("input");Ce!=null&&Ce.checked||Ce==null||Ce.click()}),K[K.length-1].scrollIntoView())},200),S),M=async(S,K)=>{let ge;if(typeof S=="string")ge=new DOMParser().parseFromString(S,"text/html").documentElement;else if(S instanceof Element)ge=S;else throw new Error("dom is not a recognized type");for(const de of K)ge=await de(ge);return ge},he="screen and (max-width: 76.1875em)",fe=S=>{const K=(0,Xe.s0)(),ge=(0,Qe.Z)(),de=(0,_e.Z)(he),Ce=Pe(),Oe=un(),Me=(0,V.z$)(),ht=(0,V.h_)(g.Dl),jt=(0,V.h_)(Ge.q3),{state:lt,path:ft,content:xt}=(0,C.DK)(),[ct,Bt]=(0,r.useState)(null),Mt=(0,g.ux)(ct),zt=(0,r.useCallback)(()=>{if(!ct)return;ct.querySelectorAll(".md-sidebar").forEach(Nt=>{if(de)Nt.style.top="0px";else{const Cn=document==null?void 0:document.querySelector(".techdocs-reader-page");var rn;const wn=(rn=Cn==null?void 0:Cn.getBoundingClientRect().top)!==null&&rn!==void 0?rn:0;var Bn;let Yn=(Bn=ct.getBoundingClientRect().top)!==null&&Bn!==void 0?Bn:0;const fn=ct.querySelector(".md-container > .md-tabs");var Xn;const Rn=(Xn=fn==null?void 0:fn.getBoundingClientRect().height)!==null&&Xn!==void 0?Xn:0;Yn<wn&&(Yn=wn),Nt.style.top=`${Math.max(Yn,0)+Rn}px`}Nt.style.setProperty("opacity","1")})},[ct,de]);(0,r.useEffect)(()=>(window.addEventListener("resize",zt),window.addEventListener("scroll",zt,!0),()=>{window.removeEventListener("resize",zt),window.removeEventListener("scroll",zt,!0)}),[ct,zt]);const qt=(0,r.useCallback)(()=>{if(!ct)return;const Dt=ct.querySelector(".md-footer");Dt&&(Dt.style.width=`${ct.getBoundingClientRect().width}px`)},[ct]);(0,r.useEffect)(()=>(window.addEventListener("resize",qt),()=>{window.removeEventListener("resize",qt)}),[ct,qt]),(0,r.useEffect)(()=>{Mt||(qt(),zt())},[lt,Mt,qt,zt]);const Wn=(0,r.useCallback)((Dt,Nt)=>M(Dt,[Ce,Fn({techdocsStorageApi:ht,entityId:S,path:Nt}),yn(),pn(),ae(),O(),Mn(jt),Oe]),[S,jt,ht,Ce,Oe]),Sn=(0,r.useCallback)(async Dt=>M(Dt,[Be(),D(),wt(ge),kn({baseUrl:window.location.origin,onClick:(Nt,rn)=>{var Bn;const Xn=Nt.ctrlKey||Nt.metaKey,Cn=new URL(rn),wn=`${Cn.pathname}${Cn.search}${Cn.hash}`,Yn=((Bn=Nt.target)===null||Bn===void 0?void 0:Bn.innerText)||rn,fn=rn.replace(window.location.origin,"");if(Me.captureEvent("click",Yn,{attributes:{to:fn}}),Cn.hash)if(Xn)window.open(wn,"_blank");else{var Rn;K(wn),(Rn=Dt==null?void 0:Dt.querySelector(`[id="${Cn.hash.slice(1)}"]`))===null||Rn===void 0||Rn.scrollIntoView()}else Xn?window.open(wn,"_blank"):K(wn)}}),ue({onLoading:()=>{},onLoaded:()=>{var Nt;(Nt=Dt.querySelector(".md-nav__title"))===null||Nt===void 0||Nt.removeAttribute("for")}}),ue({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(rn=>{rn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[ge,K,Me]);return(0,r.useEffect)(()=>{if(!xt)return()=>{};let Dt=!0;return Wn(xt,ft).then(async Nt=>{if(!(Nt!=null&&Nt.innerHTML)||!Dt)return;window.scroll({top:0});const rn=await Sn(Nt);Bt(rn)}),()=>{Dt=!1}},[xt,ft,Wn,Sn]),ct};var be=t(8560);const $e=()=>{const S=(0,g.$L)(),{shadowRoot:K}=(0,g.x1)(),ge=K==null?void 0:K.querySelector('[data-md-component="content"]'),de=K==null?void 0:K.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ce=de==null?void 0:de.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ce||(Ce=document.createElement("div"),Ce.setAttribute("data-techdocs-addons-location","primary sidebar"),de==null||de.prepend(Ce));const Oe=K==null?void 0:K.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Me=Oe==null?void 0:Oe.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Me||(Me=document.createElement("div"),Me.setAttribute("data-techdocs-addons-location","secondary sidebar"),Oe==null||Oe.prepend(Me)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(be.Z,{container:Ce,children:S.renderComponentsByLocation(g.oZ.PrimarySidebar)}),(0,h.jsx)(be.Z,{container:ge,children:S.renderComponentsByLocation(g.oZ.Content)}),(0,h.jsx)(be.Z,{container:Me,children:S.renderComponentsByLocation(g.oZ.SecondarySidebar)})]})},Ae=(0,W.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),We=(0,C.m1)(S=>{var K;const{withSearch:ge=!0,onReady:de}=S,Ce=Ae(),{entityMetadata:{value:Oe,loading:Me},entityRef:ht,setShadowRoot:jt}=(0,g.x1)(),lt=fe(ht),ft=(0,r.useCallback)(xt=>{jt(xt),de instanceof Function&&de()},[jt,de]);return Me===!1&&!Oe?(0,h.jsx)(b.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):lt?(0,h.jsx)(b.VY,{children:(0,h.jsxs)(k.Z,{container:!0,children:[(0,h.jsx)(k.Z,{xs:12,item:!0,children:(0,h.jsx)(Le,{})}),ge&&(0,h.jsx)(k.Z,{className:Ce.search,xs:"auto",item:!0,children:(0,h.jsx)(c.S,{entityId:ht,entityTitle:Oe==null||(K=Oe.metadata)===null||K===void 0?void 0:K.title})}),(0,h.jsx)(k.Z,{xs:12,item:!0,children:(0,h.jsx)(g.VA,{element:lt,onAppend:ft,children:(0,h.jsx)($e,{})})})]})}):(0,h.jsx)(b.VY,{children:(0,h.jsx)(k.Z,{container:!0,children:(0,h.jsx)(k.Z,{xs:12,item:!0,children:(0,h.jsx)(Le,{})})})})}),st=null},93225:function(At,Fe,t){"use strict";t.d(Fe,{S:function(){return ce}});var h=t(52322),r=t(2784),W=t(18671),k=t(60905),g=t(98069),b=t(73250),c=t(61886),P=t(56941),te=t(25271),_=t(93414),X=t(25248),U=t(76635),F=t(95573);const Y=(0,h.jsx)(g.Z,{animation:"wave",variant:"text",height:40}),ce=se=>{const{children:T}=se,R=(0,c.$L)(),V=(0,X.h_)(X.Ds),{title:A,setTitle:C,subtitle:z,setSubtitle:Le,entityRef:Xe,metadata:{value:Qe,loading:_e},entityMetadata:{value:Ge,loading:mt}}=(0,c.x1)();(0,r.useEffect)(()=>{!Qe||(C(Qe.site_name),Le(()=>{let{site_description:ne}=Qe;return(!ne||ne==="None")&&(ne=""),ne}))},[Qe,C,Le]);const Ee=V.getOptional("app.title")||"Backstage",Ke=[A,z,Ee].filter(Boolean).join(" | "),{locationMetadata:at,spec:vt}=Ge||{},it=vt==null?void 0:vt.lifecycle,gt=Ge?(0,P.hF)(Ge,te.S4):[],nt=(0,X.tg)(F._Z)(),Lt=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(_.i9,{label:(0,U.capitalize)((Ge==null?void 0:Ge.kind)||"entity"),value:(0,h.jsx)(P.dx,{color:"inherit",entityRef:Xe,title:Ge==null?void 0:Ge.metadata.title,defaultKind:"Component"})}),gt.length>0&&(0,h.jsx)(_.i9,{label:"Owner",value:(0,h.jsx)(P.rI,{color:"inherit",entityRefs:gt,defaultKind:"group"})}),it?(0,h.jsx)(_.i9,{label:"Lifecycle",value:it}):null,at&&at.type!=="dir"&&at.type!=="file"?(0,h.jsx)(_.i9,{label:"",value:(0,h.jsxs)(k.Z,{container:!0,direction:"column",alignItems:"center",style:{color:"#fff"},children:[(0,h.jsx)(k.Z,{style:{padding:0},item:!0,children:(0,h.jsx)(b.Z,{style:{marginTop:"-25px"}})}),(0,h.jsx)(k.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:at.target}):null]});return!mt&&Ge===void 0||!_e&&Qe===void 0?null:(0,h.jsxs)(_.h4,{type:"Documentation",typeLink:nt,title:A||Y,subtitle:z===""?void 0:z||Y,children:[(0,h.jsx)(W.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:Ke})}),Lt,T,R.renderComponentsByLocation(c.oZ.Header)]})}},65124:function(At,Fe,t){"use strict";t.d(Fe,{b:function(){return U}});var h=t(52322),r=t(2784),W=t(79692),k=t(15223),g=t(95544),b=t(80030),c=t(61837),P=t(48348),te=t(47603),_=t(61886);const X=(0,W.Z)(F=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:F.spacing(3,3,0)}})),U=F=>{const Y=X(),[ce,se]=(0,r.useState)(null),T=(0,r.useCallback)(Xe=>{se(Xe.currentTarget)},[]),R=(0,r.useCallback)(()=>{se(null)},[]),{entityMetadata:{value:V,loading:A}}=(0,_.x1)(),C=(0,_.$L)(),z=C.renderComponentsByLocation(_.oZ.Subheader),Le=C.renderComponentsByLocation(_.oZ.Settings);return!z&&!Le||A===!1&&!V?null:(0,h.jsx)(k.Z,{classes:Y,...F.toolbarProps,children:(0,h.jsxs)(g.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[z,Le?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(b.ZP,{title:"Settings",children:(0,h.jsx)(c.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:T,children:(0,h.jsx)(te.Z,{})})}),(0,h.jsx)(P.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:ce,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(ce),onClose:R,keepMounted:!0,children:Le})]}):null]})})}},95481:function(At,Fe,t){"use strict";t.d(Fe,{DK:function(){return U},m1:function(){return Y}});var h=t(52322),r=t(2784),W=t(79635),k=t(61886),g=t(25248),b=t(64279),c=t(77446);function P({contentLoading:ce,content:se,activeSyncState:T}){return ce||T==="BUILD_READY_RELOAD"||!se&&T==="CHECKING"?"CHECKING":!se&&T==="BUILDING"?"INITIAL_BUILD":se?T==="BUILDING"?"CONTENT_STALE_REFRESHING":T==="BUILD_READY"?"CONTENT_STALE_READY":T==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function te(ce,se){const T={...ce};switch(se.type){case"sync":se.state==="CHECKING"&&(T.buildLog=[]),T.activeSyncState=se.state,T.syncError=se.syncError;break;case"contentLoading":T.contentLoading=!0,T.contentError=void 0;break;case"content":typeof se.path=="string"&&(T.path=se.path),T.contentLoading=!1,T.content=se.content,T.contentError=se.contentError;break;case"buildLog":T.buildLog=T.buildLog.concat(se.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(T.activeSyncState)&&["contentLoading","content"].includes(se.type)&&(T.activeSyncState="UP_TO_DATE",T.buildLog=[]),T}function _(ce,se,T,R){var V,A;const[C,z]=(0,r.useReducer)(te,{activeSyncState:"CHECKING",path:R,contentLoading:!0,buildLog:[]}),Le=(0,g.h_)(k.Dl),{retry:Xe}=(0,c.Z)(async()=>{z({type:"contentLoading"});try{const Ge=await Le.getEntityDocs({kind:ce,namespace:se,name:T},R);return z({type:"content",content:Ge,path:R}),Ge}catch(Ge){z({type:"content",contentError:Ge,path:R})}},[Le,ce,se,T,R]),Qe=(0,r.useRef)({content:void 0,reload:()=>{}});return Qe.current={content:C.content,reload:Xe},(0,b.default)(async()=>{z({type:"sync",state:"CHECKING"});const Ge=setTimeout(()=>{z({type:"sync",state:"BUILDING"})},1e3);try{switch(await Le.syncEntityDocs({kind:ce,namespace:se,name:T},Ee=>{z({type:"buildLog",log:Ee})})){case"updated":Qe.current.content?z({type:"sync",state:"BUILD_READY"}):(Qe.current.reload(),z({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":z({type:"sync",state:"UP_TO_DATE"});break;default:z({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(mt){z({type:"sync",state:"ERROR",syncError:mt})}finally{clearTimeout(Ge)}},[ce,T,se,Le,z,Qe]),{state:(0,r.useMemo)(()=>P({activeSyncState:C.activeSyncState,contentLoading:C.contentLoading,content:C.content}),[C.activeSyncState,C.content,C.contentLoading]),contentReload:Xe,path:C.path,content:C.content,contentErrorMessage:(V=C.contentError)===null||V===void 0?void 0:V.toString(),syncErrorMessage:(A=C.syncError)===null||A===void 0?void 0:A.toString(),buildLog:C.buildLog}}const X=(0,r.createContext)({}),U=()=>(0,r.useContext)(X),F=({children:ce})=>{const{"*":se=""}=(0,W.UO)(),{entityRef:T}=(0,k.x1)(),{kind:R,namespace:V,name:A}=T,C=_(R,V,A,se);return(0,h.jsx)(X.Provider,{value:C,children:ce instanceof Function?ce(C):ce})},Y=ce=>se=>(0,h.jsx)(F,{children:(0,h.jsx)(ce,{...se})})},95573:function(At,Fe,t){"use strict";t.d(Fe,{Fw:function(){return W},_Z:function(){return r},pd:function(){return k}});var h=t(25248);const r=(0,h.NT)({id:"techdocs:index-page"}),W=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),k=(0,h.NT)({id:"techdocs:catalog-reader-view"})},17339:function(At,Fe,t){"use strict";t.d(Fe,{S:function(){return V}});var h=t(52322),r=t(2784),W=t(79692),k=t(49378),g=t(38402),b=t(86136),c=t(85256),P=t(90436),te=t(93414),_=t(25248),X=t(65826);const U=(0,W.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),F=A=>{const{result:C,highlight:z,rank:Le,lineClamp:Xe=5,asListItem:Qe=!0,asLink:_e=!0,title:Ge,icon:mt}=A,Ee=U(),Ke=(0,_.z$)(),at=()=>{Ke.captureEvent("discover",C.title,{attributes:{to:C.location},value:Le})},vt=({children:nt})=>_e?(0,h.jsx)(te.rU,{noTrack:!0,to:C.location,onClick:at,children:nt}):(0,h.jsx)(h.Fragment,{children:nt}),it=()=>{const nt=z!=null&&z.fields.title?(0,h.jsx)(X.FA,{text:z.fields.title,preTag:z.preTag,postTag:z.postTag}):C.title,Lt=z!=null&&z.fields.entityTitle?(0,h.jsx)(X.FA,{text:z.fields.entityTitle,preTag:z.preTag,postTag:z.postTag}):C.entityTitle,bt=z!=null&&z.fields.name?(0,h.jsx)(X.FA,{text:z.fields.name,preTag:z.preTag,postTag:z.postTag}):C.name;return(0,h.jsx)(k.Z,{className:Ee.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,h.jsx)(vt,{children:Ge||(0,h.jsxs)(h.Fragment,{children:[nt," | ",Lt!=null?Lt:bt," docs"]})}),secondary:(0,h.jsx)(P.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Xe,overflow:"hidden"},children:z!=null&&z.fields.text?(0,h.jsx)(X.FA,{text:z.fields.text,preTag:z.preTag,postTag:z.postTag}):C.text})})},gt=({children:nt})=>Qe?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(g.Z,{alignItems:"flex-start",children:[mt&&(0,h.jsx)(b.Z,{children:mt}),(0,h.jsx)("div",{className:Ee.flexContainer,children:nt})]}),(0,h.jsx)(c.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:nt});return(0,h.jsx)(gt,{children:(0,h.jsx)(it,{})})};var Y=t(27556),ce=t(79635);const se=(0,W.Z)(A=>({root:{width:"100%"},bar:{padding:A.spacing(1)}})),T=A=>A==null?void 0:A.document,R=A=>{const{entityId:C,entityTitle:z,debounceTime:Le=150}=A,[Xe,Qe]=(0,r.useState)(!1),_e=(0,ce.s0)(),{setFilters:Ge,result:{loading:mt,value:Ee}}=(0,X.Rx)(),Ke=se(),[at,vt]=(0,r.useState)([]);(0,r.useEffect)(()=>{let bt=!0;if(bt&&Ee){const ze=Ee.results.slice(0,10);vt(ze)}return()=>{bt=!1}},[mt,Ee]);const{kind:it,name:gt,namespace:nt}=C;(0,r.useEffect)(()=>{Ge(bt=>({...bt,kind:it,namespace:nt,name:gt}))},[it,nt,gt,Ge]);const Lt=(bt,ze)=>{if(T(ze)){const{location:ne}=ze.document;_e(ne)}};return(0,h.jsx)(Y.Z,{className:Ke.bar,variant:"outlined",children:(0,h.jsx)(X.qO,{classes:{root:Ke.root},"data-testid":"techdocs-search-bar",size:"small",open:Xe,getOptionLabel:()=>"",filterOptions:bt=>bt,onClose:()=>{Qe(!1)},onFocus:()=>{Qe(!0)},onChange:Lt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:at,renderOption:({document:bt,highlight:ze})=>(0,h.jsx)(F,{result:bt,lineClamp:3,asListItem:!1,asLink:!1,title:bt.title,highlight:ze}),loading:mt,inputDebounceTime:Le,inputPlaceholder:`Search ${z||C.name} docs`,freeSolo:!1})})},V=A=>{const C={term:"",types:["techdocs"],pageCursor:"",filters:A.entityId};return(0,h.jsx)(X.Nd,{initialState:C,children:(0,h.jsx)(R,{...A})})}},53260:function(){}},function(At){var Fe=function(h){return At(At.s=h)};At.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,5924,4736],function(){return Fe(51102)});var t=At.O()}]);})();
|
|
502
502
|
|
|
503
|
-
//# sourceMappingURL=main.
|
|
503
|
+
//# sourceMappingURL=main.8c65d70b.js.map
|