@techdocs/cli 0.0.0-nightly-20231029021439 → 0.0.0-nightly-20231031021349

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,12 +1,12 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20231029021439
3
+ ## 0.0.0-nightly-20231031021349
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20231029021439
9
- - @backstage/backend-common@0.0.0-nightly-20231029021439
8
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20231031021349
9
+ - @backstage/backend-common@0.0.0-nightly-20231031021349
10
10
  - @backstage/catalog-model@1.4.3
11
11
  - @backstage/cli-common@0.1.13
12
12
  - @backstage/config@1.1.1
@@ -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="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.f5fb7c99.js"></script><script defer="defer" src="/static/module-material-ui.263ce9b5.js"></script><script defer="defer" src="/static/module-lodash.fa492ce2.js"></script><script defer="defer" src="/static/module-date-fns.b8b6c380.js"></script><script defer="defer" src="/static/module-material-table.3c68edc1.js"></script><script defer="defer" src="/static/module-react-dom.f7ae1c8b.js"></script><script defer="defer" src="/static/module-react-router.05179f87.js"></script><script defer="defer" src="/static/module-react-router-dom.8eff32d7.js"></script><script defer="defer" src="/static/module-zod.9e0f365e.js"></script><script defer="defer" src="/static/module-i18next.db8a27ed.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.0ca788d0.js"></script><script defer="defer" src="/static/vendor.f5fb7c99.js"></script><script defer="defer" src="/static/main.f5fb7c99.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
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="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.f8ffa716.js"></script><script defer="defer" src="/static/module-material-ui.263ce9b5.js"></script><script defer="defer" src="/static/module-lodash.fa492ce2.js"></script><script defer="defer" src="/static/module-date-fns.b8b6c380.js"></script><script defer="defer" src="/static/module-material-table.3c68edc1.js"></script><script defer="defer" src="/static/module-react-dom.f7ae1c8b.js"></script><script defer="defer" src="/static/module-react-router.05179f87.js"></script><script defer="defer" src="/static/module-react-router-dom.8eff32d7.js"></script><script defer="defer" src="/static/module-zod.9e0f365e.js"></script><script defer="defer" src="/static/module-i18next.db8a27ed.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.0ca788d0.js"></script><script defer="defer" src="/static/vendor.f8ffa716.js"></script><script defer="defer" src="/static/main.f8ffa716.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -484,4 +484,4 @@ ${k.href}
484
484
 
485
485
  Feedback:`),Bt=(nt==null?void 0:nt.type)==="github"?(0,Zn.B)(tt.href,"blob"):tt.href,Nt=kn()(Bt),Ht=`/${Nt.organization}/${Nt.name}`,Rt=k.cloneNode();switch(nt==null?void 0:nt.type){case"gitlab":Rt.href=`${tt.origin}${Ht}/issues/new?issue[title]=${Ot}&issue[description]=${Dt}`;break;case"github":Rt.href=`${tt.origin}${Ht}/issues/new?title=${Ot}&body=${Dt}`;break;default:return O}return yn(i.createElement(To.Z),Rt),Rt.style.paddingLeft="5px",Rt.title="Leave feedback for this page",Rt.id="git-feedback-link",k==null||k.insertAdjacentElement("beforebegin",Rt),O},Do=()=>h=>(setTimeout(()=>{const O=h==null?void 0:h.querySelectorAll("li.md-nav__item--active");O.length!==0&&(O.forEach(k=>{const tt=k==null?void 0:k.querySelector("input");tt!=null&&tt.checked||tt==null||tt.click()}),O[O.length-1].scrollIntoView())},200),h);var En=t(15459),xn=t(80030),Lo=t(72379),Mo=t(41547),jo=t(95074);const Bo=(0,En.Z)(h=>({tooltip:{fontSize:"inherit",color:h.palette.text.primary,margin:0,padding:h.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(xn.ZP),Uo=()=>(0,o.jsx)(Lo.Z,{children:(0,o.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"})}),$o=({text:h})=>{const[O,D]=(0,i.useState)(!1),[,k]=(0,jo.Z)(),tt=(0,i.useCallback)(()=>{k(h),D(!0)},[h,k]),nt=(0,i.useCallback)(()=>{D(!1)},[D]);return(0,o.jsx)(Bo,{title:"Copied to clipboard",placement:"left",open:O,onClose:nt,leaveDelay:1e3,children:(0,o.jsx)(Z.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:tt,children:(0,o.jsx)(Uo,{})})})},Fo=h=>O=>{const D=O.querySelectorAll("pre > code");for(const tt of D){var k;const nt=tt.textContent||"",it=document.createElement("div");tt==null||(k=tt.parentElement)===null||k===void 0||k.prepend(it),yn((0,o.jsx)(Mo.Z,{theme:h,children:(0,o.jsx)($o,{text:nt})}),it)}return O},No=({baseUrl:h,onClick:O})=>D=>(Array.from(D.getElementsByTagName("a")).forEach(k=>{k.addEventListener("click",tt=>{const it=k.getAttribute("href");it&&it.startsWith(h)&&!k.hasAttribute("download")&&(tt.preventDefault(),O(tt,it))})}),D),Kn=({onLoading:h,onLoaded:O})=>D=>(h(),D.addEventListener(C,function k(){O(),D.removeEventListener(C,k)}),D);function Wo(h,O){const D=new URL(O),k=`${D.origin}${D.pathname.replace(/\/$/,"")}`,tt=h.replace(k,"").replace(/^\/+/,""),nt=new URL(`http://localhost/${tt}`);return`${nt.pathname}${nt.search}${nt.hash}`}function Zo(){const h=(0,Ft.s0)(),D=(0,z.h_)(ot.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(tt=>{let nt=tt;if(D)try{nt=Wo(tt,D)}catch{}h(nt)},[h,D])}const Hn="screen and (max-width: 76.1875em)",Gn=h=>{const O=Zo(),D=(0,Mt.Z)(),k=(0,Lt.Z)(Hn),tt=tn(),nt=mn(),it=(0,gt.z)(),Ot=(0,z.h_)(Fe.D),Dt=(0,z.h_)(le.q),{state:Bt,path:Nt,content:Ht}=rt(),[Rt,pe]=(0,i.useState)(null),ne=x(Rt),Wt=(0,i.useCallback)(()=>{if(!Rt)return;Rt.querySelectorAll(".md-sidebar").forEach(Gt=>{if(k)Gt.style.top="0px";else{var qt;const ke=(qt=document)===null||qt===void 0?void 0:qt.querySelector(".techdocs-reader-page");var ye;const $e=(ye=ke==null?void 0:ke.getBoundingClientRect().top)!==null&&ye!==void 0?ye:0;var we;let oe=(we=Rt.getBoundingClientRect().top)!==null&&we!==void 0?we:0;const ln=Rt.querySelector(".md-container > .md-tabs");var ue;const Cn=(ue=ln==null?void 0:ln.getBoundingClientRect().height)!==null&&ue!==void 0?ue:0;oe<$e&&(oe=$e),Gt.style.top=`${Math.max(oe,0)+Cn}px`}Gt.style.setProperty("opacity","1")})},[Rt,k]);(0,i.useEffect)(()=>(window.addEventListener("resize",Wt),window.addEventListener("scroll",Wt,!0),()=>{window.removeEventListener("resize",Wt),window.removeEventListener("scroll",Wt,!0)}),[Rt,Wt]);const Zt=(0,i.useCallback)(()=>{if(!Rt)return;const Ut=Rt.querySelector(".md-footer");Ut&&(Ut.style.width=`${Rt.getBoundingClientRect().width}px`)},[Rt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Zt),()=>{window.removeEventListener("resize",Zt)}),[Rt,Zt]),(0,i.useEffect)(()=>{ne||(Zt(),Wt())},[Bt,ne,Zt,Wt]);const ie=(0,i.useCallback)((Ut,Gt)=>Fn(Ut,[tt,Ao({techdocsStorageApi:Ot,entityId:h,path:Gt}),So(),Po(),Ro(),wo(),zn(Dt),nt]),[h,Dt,Ot,tt,nt]),Jt=(0,i.useCallback)(async Ut=>Fn(Ut,[Do(),Fo(D),No({baseUrl:window.location.origin,onClick:(Gt,qt)=>{var ye;const we=Gt.ctrlKey||Gt.metaKey,ue=new URL(qt),ke=((ye=Gt.target)===null||ye===void 0?void 0:ye.innerText)||qt,$e=qt.replace(window.location.origin,"");if(it.captureEvent("click",ke,{attributes:{to:$e}}),ue.hash)if(we)window.open(qt,"_blank");else{var oe;O(qt),Ut==null||(oe=Ut.querySelector(`[id="${ue.hash.slice(1)}"]`))===null||oe===void 0||oe.scrollIntoView()}else we?window.open(qt,"_blank"):O(qt)}}),Kn({onLoading:()=>{},onLoaded:()=>{var Gt;(Gt=Ut.querySelector(".md-nav__title"))===null||Gt===void 0||Gt.removeAttribute("for")}}),Kn({onLoading:()=>{Array.from(Ut.querySelectorAll(".md-sidebar")).forEach(qt=>{qt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[D,O,it]);return(0,i.useEffect)(()=>{if(!Ht)return()=>{};let Ut=!0;return ie(Ht,Nt).then(async Gt=>{if(!(Gt!=null&&Gt.innerHTML)||!Ut)return;window.scroll({top:0});const qt=await Jt(Gt);pe(qt)}),()=>{Ut=!1}},[Ht,Nt,ie,Jt]),Rt};var Pt=t(8560),de=t(2296),re=t(57058);const ko=()=>{const h=(0,de.$L)(),{shadowRoot:O}=(0,y.x)(),D=O==null?void 0:O.querySelector('[data-md-component="content"]'),k=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let tt=k==null?void 0:k.querySelector('[data-techdocs-addons-location="primary sidebar"]');tt||(tt=document.createElement("div"),tt.setAttribute("data-techdocs-addons-location","primary sidebar"),k==null||k.prepend(tt));const nt=O==null?void 0:O.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let it=nt==null?void 0:nt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return it||(it=document.createElement("div"),it.setAttribute("data-techdocs-addons-location","secondary sidebar"),nt==null||nt.prepend(it)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pt.Z,{container:tt,children:h.renderComponentsByLocation(re.o.PrimarySidebar)}),(0,o.jsx)(Pt.Z,{container:D,children:h.renderComponentsByLocation(re.o.Content)}),(0,o.jsx)(Pt.Z,{container:it,children:h.renderComponentsByLocation(re.o.SecondarySidebar)})]})},zo=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Le=bt(h=>{var O;const{withSearch:D=!0,onReady:k}=h,tt=zo(),{entityMetadata:{value:nt,loading:it},entityRef:Ot,setShadowRoot:Dt}=(0,y.x)(),Bt=Gn(Ot),Nt=window.location.pathname,Ht=window.location.hash,Rt=x(Bt),[pe]=$([`[id="${Ht.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!Rt)if(Ht)pe&&pe.scrollIntoView();else{var Wt,Zt;(Zt=document)===null||Zt===void 0||(Wt=Zt.querySelector("header"))===null||Wt===void 0||Wt.scrollIntoView()}},[Nt,Ht,pe,Rt]);const ne=(0,i.useCallback)(Wt=>{Dt(Wt),k instanceof Function&&k()},[Dt,k]);return it===!1&&!nt?(0,o.jsx)(T.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):Bt?(0,o.jsx)(u.V,{children:(0,o.jsxs)(S.Z,{container:!0,children:[(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(zt,{})}),D&&(0,o.jsx)(S.Z,{className:tt.search,xs:"auto",item:!0,children:(0,o.jsx)(Xe,{entityId:Ot,entityTitle:nt==null||(O=nt.metadata)===null||O===void 0?void 0:O.title})}),(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(A,{element:Bt,onAppend:ne,children:(0,o.jsx)(ko,{})})})]})}):(0,o.jsx)(u.V,{children:(0,o.jsx)(S.Z,{container:!0,children:(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(zt,{})})})})}),Ue=null},65386:function(X,P,t){"use strict";t.d(P,{S:function(){return ht}});var o=t(52322),i=t(2784),d=t(18671),S=t(60905),y=t(98069),p=t(60364),l=t(73250),g=t(2296),b=t(68979),C=t(57058),R=t(75435),x=t(84719),A=t(51194),E=t(8709),B=t(79692),$=t(41128),w=t(90436),j=t(98864);const T=(0,B.Z)(ut=>({root:{textAlign:"left"},label:{color:ut.page.fontColor,fontWeight:ut.typography.fontWeightBold,letterSpacing:0,fontSize:ut.typography.fontSize,marginBottom:ut.spacing(1)/2,lineHeight:1},value:{color:(0,$.Fq)(ut.page.fontColor,.8),fontSize:ut.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),u=({value:ut,className:mt})=>(0,o.jsx)(w.Z,{component:typeof ut=="string"?"p":"span",className:mt,children:ut});function K(ut){const{label:mt,value:ft,url:lt}=ut,yt=T(),Y=(0,o.jsx)(u,{className:yt.value,value:ft||"<Unknown>"});return(0,o.jsx)(S.Z,{item:!0,children:(0,o.jsxs)(w.Z,{component:"span",className:yt.root,children:[(0,o.jsx)(w.Z,{className:yt.label,children:mt}),lt?(0,o.jsx)(j.rU,{to:lt,children:Y}):Y]})})}var _=t(48037),J=t(44394),H=t(6542),G=t(37321),z=t(76635),V=t(95573);const ot=(0,o.jsx)(y.Z,{animation:"wave",variant:"text",height:40}),ht=ut=>{const{palette:{common:{white:mt}}}=(0,p.Z)(),{children:ft}=ut,lt=(0,g.$L)(),yt=(0,J.h_)(H.D),{title:Y,setTitle:U,subtitle:Q,setSubtitle:q,entityRef:at,metadata:{value:dt,loading:F},entityMetadata:{value:Z,loading:Ct}}=(0,b.x)();(0,i.useEffect)(()=>{dt&&(U(dt.site_name),q(()=>{let{site_description:kt}=dt;return(!kt||kt==="None")&&(kt=""),kt}))},[dt,U,q]);const At=yt.getOptional("app.title")||"Backstage",ct=[Y,Q,At].filter(Boolean).join(" | "),{locationMetadata:xt,spec:gt}=Z||{},wt=gt==null?void 0:gt.lifecycle,It=Z?(0,R.h)(Z,E.S4):[],Tt=(0,G.t)(V._Z)(),ae=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K,{label:(0,z.capitalize)((Z==null?void 0:Z.kind)||"entity"),value:(0,o.jsx)(x.d,{color:"inherit",entityRef:at,title:Z==null?void 0:Z.metadata.title,defaultKind:"Component"})}),It.length>0&&(0,o.jsx)(K,{label:"Owner",value:(0,o.jsx)(A.r,{color:"inherit",entityRefs:It,defaultKind:"group"})}),wt?(0,o.jsx)(K,{label:"Lifecycle",value:String(wt)}):null,xt&&xt.type!=="dir"&&xt.type!=="file"?(0,o.jsx)(K,{label:"",value:(0,o.jsxs)(S.Z,{container:!0,direction:"column",alignItems:"center",style:{color:mt},children:[(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:(0,o.jsx)(l.Z,{style:{marginTop:"-25px"}})}),(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:xt.target}):null]});return!Ct&&Z===void 0||!F&&dt===void 0?null:(0,o.jsxs)(_.h,{type:"Documentation",typeLink:Tt,title:Y||ot,subtitle:Q===""?void 0:Q||ot,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:ct})}),ae,ft,lt.renderComponentsByLocation(C.o.Header)]})}},95573:function(X,P,t){"use strict";t.d(P,{Fw:function(){return d},_Z:function(){return i},pd:function(){return S}});var o=t(30283);const i=(0,o.N)({id:"techdocs:index-page"}),d=(0,o.N)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),S=(0,o.N)({id:"techdocs:catalog-reader-view"})},55511:function(X,P,t){"use strict";t.r(P),t.d(P,{TechDocsSearchResultListItem:function(){return C}});var o=t(52322),i=t(2784),d=t(79692),S=t(49378),y=t(86136),p=t(90436),l=t(98864),g=t(76079);const b=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),C=R=>{const{result:x,highlight:A,lineClamp:E=5,asListItem:B=!0,asLink:$=!0,title:w,icon:j}=R,T=b(),u=({children:J})=>$?(0,o.jsx)(l.rU,{noTrack:!0,to:x.location,children:J}):(0,o.jsx)(o.Fragment,{children:J}),K=()=>{const J=A!=null&&A.fields.title?(0,o.jsx)(g.F,{text:A.fields.title,preTag:A.preTag,postTag:A.postTag}):x.title,H=A!=null&&A.fields.entityTitle?(0,o.jsx)(g.F,{text:A.fields.entityTitle,preTag:A.preTag,postTag:A.postTag}):x.entityTitle,G=A!=null&&A.fields.name?(0,o.jsx)(g.F,{text:A.fields.name,preTag:A.preTag,postTag:A.postTag}):x.name;return x?(0,o.jsx)(S.Z,{className:T.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(u,{children:w||(0,o.jsxs)(o.Fragment,{children:[J," | ",H!=null?H:G," docs"]})}),secondary:(0,o.jsx)(p.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:E,overflow:"hidden"},color:"textSecondary",variant:"body2",children:A!=null&&A.fields.text?(0,o.jsx)(g.F,{text:A.fields.text,preTag:A.preTag,postTag:A.postTag}):x.text})}):null},_=({children:J})=>B?(0,o.jsxs)(o.Fragment,{children:[j&&(0,o.jsx)(y.Z,{children:typeof j=="function"?j(x):j}),(0,o.jsx)("div",{className:T.flexContainer,children:J})]}):(0,o.jsx)(o.Fragment,{children:J});return(0,o.jsx)(_,{children:(0,o.jsx)(K,{})})}},53260:function(){}},function(X){var P=function(o){return X(X.s=o)};X.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return P(99329)});var t=X.O()}]);})();
486
486
 
487
- //# sourceMappingURL=main.f5fb7c99.js.map
487
+ //# sourceMappingURL=main.f8ffa716.js.map