@techdocs/cli 0.0.0-nightly-20231005021327 → 0.0.0-nightly-20231006021145

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,15 +1,15 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20231005021327
3
+ ## 0.0.0-nightly-20231006021145
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - de42eebaafc5: Bumped dev dependencies `@types/node` and `mock-fs`.
8
8
  - 2b6e5720515c: Restructured tests.
9
9
  - Updated dependencies
10
- - @backstage/backend-common@0.0.0-nightly-20231005021327
11
- - @backstage/cli-common@0.0.0-nightly-20231005021327
12
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20231005021327
10
+ - @backstage/backend-common@0.0.0-nightly-20231006021145
11
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20231006021145
12
+ - @backstage/cli-common@0.0.0-nightly-20231006021145
13
13
  - @backstage/config@1.1.0
14
14
  - @backstage/catalog-model@1.4.2
15
15
 
@@ -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.7a6e02d5.js"></script><script defer="defer" src="/static/module-material-ui.bdbd8daa.js"></script><script defer="defer" src="/static/module-lodash.adfd55fe.js"></script><script defer="defer" src="/static/module-date-fns.b8b6c380.js"></script><script defer="defer" src="/static/module-material-table.0f5635dd.js"></script><script defer="defer" src="/static/module-react-dom.07625e59.js"></script><script defer="defer" src="/static/module-react-router.8e9755f1.js"></script><script defer="defer" src="/static/module-react-router-dom.a0f835fd.js"></script><script defer="defer" src="/static/module-zod.8dc814cc.js"></script><script defer="defer" src="/static/module-i18next.db8a27ed.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.62627182.js"></script><script defer="defer" src="/static/vendor.7a6e02d5.js"></script><script defer="defer" src="/static/main.7a6e02d5.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.215b5b0f.js"></script><script defer="defer" src="/static/module-material-ui.bdbd8daa.js"></script><script defer="defer" src="/static/module-lodash.adfd55fe.js"></script><script defer="defer" src="/static/module-date-fns.b8b6c380.js"></script><script defer="defer" src="/static/module-material-table.0f5635dd.js"></script><script defer="defer" src="/static/module-react-dom.07625e59.js"></script><script defer="defer" src="/static/module-react-router.8e9755f1.js"></script><script defer="defer" src="/static/module-react-router-dom.a0f835fd.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.62627182.js"></script><script defer="defer" src="/static/vendor.215b5b0f.js"></script><script defer="defer" src="/static/main.215b5b0f.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 @@ ${Z.href}
484
484
 
485
485
  Feedback:`),Lt=(Q==null?void 0:Q.type)==="github"?(0,go.B)(V.href,"blob"):V.href,Bt=mo()(Lt),Vt=`/${Bt.organization}/${Bt.name}`,Pt=Z.cloneNode();switch(Q==null?void 0:Q.type){case"gitlab":Pt.href=`${V.origin}${Vt}/issues/new?issue[title]=${St}&issue[description]=${wt}`;break;case"github":Pt.href=`${V.origin}${Vt}/issues/new?title=${St}&body=${wt}`;break;default:return b}return un.render(i.createElement(po.Z),Pt),Pt.style.paddingLeft="5px",Pt.title="Leave feedback for this page",Pt.id="git-feedback-link",Z==null||Z.insertAdjacentElement("beforebegin",Pt),b},Eo=()=>h=>(h.addEventListener(A,function b(){if(window.location.hash){var j;const Z=window.location.hash.slice(1);h==null||(j=h.querySelector(`[id="${Z}"]`))===null||j===void 0||j.scrollIntoView()}h.removeEventListener(A,b)}),h),xo=()=>h=>(setTimeout(()=>{const b=h==null?void 0:h.querySelectorAll("li.md-nav__item--active");b.length!==0&&(b.forEach(Z=>{const V=Z==null?void 0:Z.querySelector("input");V!=null&&V.checked||V==null||V.click()}),b[b.length-1].scrollIntoView())},200),h);var Co=t(15459),Ao=t(80030),So=t(72379),Oo=t(41547),bo=t(95074);const Po=(0,Co.Z)(h=>({tooltip:{fontSize:"inherit",color:h.palette.text.primary,margin:0,padding:h.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Ao.ZP),Mn=()=>(0,o.jsx)(So.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"})}),Ln=({text:h})=>{const[b,j]=(0,i.useState)(!1),[,Z]=(0,bo.Z)(),V=(0,i.useCallback)(()=>{Z(h),j(!0)},[h,Z]),Q=(0,i.useCallback)(()=>{j(!1)},[j]);return(0,o.jsx)(Po,{title:"Copied to clipboard",placement:"left",open:b,onClose:Q,leaveDelay:1e3,children:(0,o.jsx)(_.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:V,children:(0,o.jsx)(Mn,{})})})},Ro=h=>b=>{const j=b.querySelectorAll("pre > code");for(const V of j){var Z;const Q=V.textContent||"",J=document.createElement("div");V==null||(Z=V.parentElement)===null||Z===void 0||Z.prepend(J),un.render((0,o.jsx)(Oo.Z,{theme:h,children:(0,o.jsx)(Ln,{text:Q})}),J)}return b},To=({baseUrl:h,onClick:b})=>j=>(Array.from(j.getElementsByTagName("a")).forEach(Z=>{Z.addEventListener("click",V=>{const J=Z.getAttribute("href");J&&J.startsWith(h)&&!Z.hasAttribute("download")&&(V.preventDefault(),b(V,J))})}),j),jn=({onLoading:h,onLoaded:b})=>j=>(h(),j.addEventListener(A,function Z(){b(),j.removeEventListener(A,Z)}),j);function wo(h,b){const j=new URL(b),Z=`${j.origin}${j.pathname.replace(/\/$/,"")}`,V=h.replace(Z,"").replace(/^\/+/,""),Q=new URL(`http://localhost/${V}`);return`${Q.pathname}${Q.search}${Q.hash}`}function Io(){const h=(0,Nt.s0)(),j=(0,k.h_)(X.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(V=>{let Q=V;if(j)try{Q=wo(V,j)}catch{}h(Q)},[h,j])}const Do="screen and (max-width: 76.1875em)",Mo=h=>{const b=Io(),j=(0,B.Z)(),Z=(0,nt.Z)(Do),V=se(),Q=De(),J=(0,K.z)(),St=(0,k.h_)(Qe.D),wt=(0,k.h_)(ut.q),{state:Lt,path:Bt,content:Vt}=je(),[Pt,ve]=(0,i.useState)(null),ce=C(Pt),Qt=(0,i.useCallback)(()=>{if(!Pt)return;Pt.querySelectorAll(".md-sidebar").forEach(Ut=>{if(Z)Ut.style.top="0px";else{var Jt;const $e=(Jt=document)===null||Jt===void 0?void 0:Jt.querySelector(".techdocs-reader-page");var ue;const he=(ue=$e==null?void 0:$e.getBoundingClientRect().top)!==null&&ue!==void 0?ue:0;var Pe;let Fe=(Pe=Pt.getBoundingClientRect().top)!==null&&Pe!==void 0?Pe:0;const gn=Pt.querySelector(".md-container > .md-tabs");var ae;const Bo=(ae=gn==null?void 0:gn.getBoundingClientRect().height)!==null&&ae!==void 0?ae:0;Fe<he&&(Fe=he),Ut.style.top=`${Math.max(Fe,0)+Bo}px`}Ut.style.setProperty("opacity","1")})},[Pt,Z]);(0,i.useEffect)(()=>(window.addEventListener("resize",Qt),window.addEventListener("scroll",Qt,!0),()=>{window.removeEventListener("resize",Qt),window.removeEventListener("scroll",Qt,!0)}),[Pt,Qt]);const _t=(0,i.useCallback)(()=>{if(!Pt)return;const Wt=Pt.querySelector(".md-footer");Wt&&(Wt.style.width=`${Pt.getBoundingClientRect().width}px`)},[Pt]);(0,i.useEffect)(()=>(window.addEventListener("resize",_t),()=>{window.removeEventListener("resize",_t)}),[Pt,_t]),(0,i.useEffect)(()=>{ce||(_t(),Qt())},[Lt,ce,_t,Qt]);const ne=(0,i.useCallback)((Wt,Ut)=>Xe(Wt,[V,ao({techdocsStorageApi:St,entityId:h,path:Ut}),lo(),uo(),ho(),fo(),yo(wt),Q]),[h,wt,St,V,Q]),te=(0,i.useCallback)(async Wt=>Xe(Wt,[Eo(),xo(),Ro(j),To({baseUrl:window.location.origin,onClick:(Ut,Jt)=>{var ue;const Pe=Ut.ctrlKey||Ut.metaKey,ae=new URL(Jt),$e=((ue=Ut.target)===null||ue===void 0?void 0:ue.innerText)||Jt,he=Jt.replace(window.location.origin,"");if(J.captureEvent("click",$e,{attributes:{to:he}}),ae.hash)if(Pe)window.open(Jt,"_blank");else{var Fe;b(Jt),Wt==null||(Fe=Wt.querySelector(`[id="${ae.hash.slice(1)}"]`))===null||Fe===void 0||Fe.scrollIntoView()}else Pe?window.open(Jt,"_blank"):b(Jt)}}),jn({onLoading:()=>{},onLoaded:()=>{var Ut;(Ut=Wt.querySelector(".md-nav__title"))===null||Ut===void 0||Ut.removeAttribute("for")}}),jn({onLoading:()=>{Array.from(Wt.querySelectorAll(".md-sidebar")).forEach(Jt=>{Jt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[j,b,J]);return(0,i.useEffect)(()=>{if(!Vt)return()=>{};let Wt=!0;return ne(Vt,Bt).then(async Ut=>{if(!(Ut!=null&&Ut.innerHTML)||!Wt)return;window.scroll({top:0});const Jt=await te(Ut);ve(Jt)}),()=>{Wt=!1}},[Vt,Bt,ne,te]),Pt};var hn=t(8560),Lo=t(2296),fn=t(57058);const jo=()=>{const h=(0,Lo.$L)(),{shadowRoot:b}=(0,p.x)(),j=b==null?void 0:b.querySelector('[data-md-component="content"]'),Z=b==null?void 0:b.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let V=Z==null?void 0:Z.querySelector('[data-techdocs-addons-location="primary sidebar"]');V||(V=document.createElement("div"),V.setAttribute("data-techdocs-addons-location","primary sidebar"),Z==null||Z.prepend(V));const Q=b==null?void 0:b.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let J=Q==null?void 0:Q.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return J||(J=document.createElement("div"),J.setAttribute("data-techdocs-addons-location","secondary sidebar"),Q==null||Q.prepend(J)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(hn.Z,{container:V,children:h.renderComponentsByLocation(fn.o.PrimarySidebar)}),(0,o.jsx)(hn.Z,{container:j,children:h.renderComponentsByLocation(fn.o.Content)}),(0,o.jsx)(hn.Z,{container:J,children:h.renderComponentsByLocation(fn.o.SecondarySidebar)})]})},Bn=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Un=L(h=>{var b;const{withSearch:j=!0,onReady:Z}=h,V=Bn(),{entityMetadata:{value:Q,loading:J},entityRef:St,setShadowRoot:wt}=(0,p.x)(),Lt=Mo(St),Bt=(0,i.useCallback)(Vt=>{wt(Vt),Z instanceof Function&&Z()},[wt,Z]);return J===!1&&!Q?(0,o.jsx)(E.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):Lt?(0,o.jsx)(I.V,{children:(0,o.jsxs)(S.Z,{container:!0,children:[(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(D,{})}),j&&(0,o.jsx)(S.Z,{className:V.search,xs:"auto",item:!0,children:(0,o.jsx)(Ft,{entityId:St,entityTitle:Q==null||(b=Q.metadata)===null||b===void 0?void 0:b.title})}),(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(x,{element:Lt,onAppend:Bt,children:(0,o.jsx)(jo,{})})})]})}):(0,o.jsx)(I.V,{children:(0,o.jsx)(S.Z,{container:!0,children:(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(D,{})})})})}),Mt=null},65386:function(Y,T,t){"use strict";t.d(T,{S:function(){return Ct}});var o=t(52322),i=t(2784),d=t(18671),S=t(60905),p=t(98069),f=t(60364),l=t(73250),g=t(2296),O=t(68979),A=t(57058),P=t(75435),C=t(41748),x=t(68138),E=t(8709),I=t(79692),R=t(41128),M=t(90436),F=t(98864);const N=(0,I.Z)(xt=>({root:{textAlign:"left"},label:{color:xt.page.fontColor,fontWeight:xt.typography.fontWeightBold,letterSpacing:0,fontSize:xt.typography.fontSize,marginBottom:xt.spacing(1)/2,lineHeight:1},value:{color:(0,R.Fq)(xt.page.fontColor,.8),fontSize:xt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),v=({value:xt,className:dt})=>(0,o.jsx)(M.Z,{component:typeof xt=="string"?"p":"span",className:dt,children:xt});function k(xt){const{label:dt,value:Ot,url:At}=xt,bt=N(),st=(0,o.jsx)(v,{className:bt.value,value:Ot||"<Unknown>"});return(0,o.jsx)(S.Z,{item:!0,children:(0,o.jsxs)(M.Z,{component:"span",className:bt.root,children:[(0,o.jsx)(M.Z,{className:bt.label,children:dt}),At?(0,o.jsx)(F.rU,{to:At,children:st}):st]})})}var ot=t(48037),X=t(44394),H=t(6542),z=t(37321),G=t(76635),tt=t(95573);const rt=(0,o.jsx)(p.Z,{animation:"wave",variant:"text",height:40}),Ct=xt=>{const{palette:{common:{white:dt}}}=(0,f.Z)(),{children:Ot}=xt,At=(0,g.$L)(),bt=(0,X.h_)(H.D),{title:st,setTitle:$,subtitle:_,setSubtitle:et,entityRef:at,metadata:{value:ct,loading:W},entityMetadata:{value:K,loading:pt}}=(0,O.x)();(0,i.useEffect)(()=>{ct&&($(ct.site_name),et(()=>{let{site_description:Zt}=ct;return(!Zt||Zt==="None")&&(Zt=""),Zt}))},[ct,$,et]);const Et=bt.getOptional("app.title")||"Backstage",ht=[st,_,Et].filter(Boolean).join(" | "),{locationMetadata:ft,spec:lt}=K||{},Rt=lt==null?void 0:lt.lifecycle,Tt=K?(0,P.h)(K,E.S4):[],It=(0,z.t)(tt._Z)(),Nt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k,{label:(0,G.capitalize)((K==null?void 0:K.kind)||"entity"),value:(0,o.jsx)(C.d,{color:"inherit",entityRef:at,title:K==null?void 0:K.metadata.title,defaultKind:"Component"})}),Tt.length>0&&(0,o.jsx)(k,{label:"Owner",value:(0,o.jsx)(x.r,{color:"inherit",entityRefs:Tt,defaultKind:"group"})}),Rt?(0,o.jsx)(k,{label:"Lifecycle",value:Rt}):null,ft&&ft.type!=="dir"&&ft.type!=="file"?(0,o.jsx)(k,{label:"",value:(0,o.jsxs)(S.Z,{container:!0,direction:"column",alignItems:"center",style:{color:dt},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:ft.target}):null]});return!pt&&K===void 0||!W&&ct===void 0?null:(0,o.jsxs)(ot.h,{type:"Documentation",typeLink:It,title:st||rt,subtitle:_===""?void 0:_||rt,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:ht})}),Nt,Ot,At.renderComponentsByLocation(A.o.Header)]})}},95573:function(Y,T,t){"use strict";t.d(T,{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(Y,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return A}});var o=t(52322),i=t(2784),d=t(79692),S=t(49378),p=t(86136),f=t(90436),l=t(98864),g=t(76079);const O=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),A=P=>{const{result:C,highlight:x,lineClamp:E=5,asListItem:I=!0,asLink:R=!0,title:M,icon:F}=P,N=O(),v=({children:X})=>R?(0,o.jsx)(l.rU,{noTrack:!0,to:C.location,children:X}):(0,o.jsx)(o.Fragment,{children:X}),k=()=>{const X=x!=null&&x.fields.title?(0,o.jsx)(g.F,{text:x.fields.title,preTag:x.preTag,postTag:x.postTag}):C.title,H=x!=null&&x.fields.entityTitle?(0,o.jsx)(g.F,{text:x.fields.entityTitle,preTag:x.preTag,postTag:x.postTag}):C.entityTitle,z=x!=null&&x.fields.name?(0,o.jsx)(g.F,{text:x.fields.name,preTag:x.preTag,postTag:x.postTag}):C.name;return C?(0,o.jsx)(S.Z,{className:N.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(v,{children:M||(0,o.jsxs)(o.Fragment,{children:[X," | ",H!=null?H:z," docs"]})}),secondary:(0,o.jsx)(f.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:E,overflow:"hidden"},color:"textSecondary",variant:"body2",children:x!=null&&x.fields.text?(0,o.jsx)(g.F,{text:x.fields.text,preTag:x.preTag,postTag:x.postTag}):C.text})}):null},ot=({children:X})=>I?(0,o.jsxs)(o.Fragment,{children:[F&&(0,o.jsx)(p.Z,{children:typeof F=="function"?F(C):F}),(0,o.jsx)("div",{className:N.flexContainer,children:X})]}):(0,o.jsx)(o.Fragment,{children:X});return(0,o.jsx)(ot,{children:(0,o.jsx)(k,{})})}},53260:function(){}},function(Y){var T=function(o){return Y(Y.s=o)};Y.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return T(81025)});var t=Y.O()}]);})();
486
486
 
487
- //# sourceMappingURL=main.7a6e02d5.js.map
487
+ //# sourceMappingURL=main.215b5b0f.js.map