@techdocs/cli 1.8.1-next.0 → 1.8.1-next.2

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,24 @@
1
1
  # @techdocs/cli
2
2
 
3
+ ## 1.8.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-common@0.20.1-next.2
9
+ - @backstage/plugin-techdocs-node@1.11.1-next.2
10
+
11
+ ## 1.8.1-next.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @backstage/backend-common@0.20.1-next.1
17
+ - @backstage/config@1.1.1
18
+ - @backstage/plugin-techdocs-node@1.11.1-next.1
19
+ - @backstage/catalog-model@1.4.3
20
+ - @backstage/cli-common@0.1.13
21
+
3
22
  ## 1.8.1-next.0
4
23
 
5
24
  ### Patch Changes
@@ -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.ead3a23c.js"></script><script defer="defer" src="/static/module-material-ui.c8f92ef8.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.b510f85c.js"></script><script defer="defer" src="/static/module-react-dom.c3454ade.js"></script><script defer="defer" src="/static/module-react-router.e7f42b6c.js"></script><script defer="defer" src="/static/module-react-router-dom.81a9f610.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.1f1d9332.js"></script><script defer="defer" src="/static/vendor.ead3a23c.js"></script><script defer="defer" src="/static/main.ead3a23c.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.f231fd80.js"></script><script defer="defer" src="/static/module-material-ui.c8f92ef8.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.b510f85c.js"></script><script defer="defer" src="/static/module-react-dom.c3454ade.js"></script><script defer="defer" src="/static/module-react-router.e7f42b6c.js"></script><script defer="defer" src="/static/module-react-router-dom.81a9f610.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.1f1d9332.js"></script><script defer="defer" src="/static/vendor.f231fd80.js"></script><script defer="defer" src="/static/main.f231fd80.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -488,4 +488,4 @@ ${F.href}
488
488
 
489
489
  Feedback:`),$t=(ot==null?void 0:ot.type)==="github"?(0,Ro.B)(tt.href,"blob"):tt.href,Yt=Do()($t),Ft=`/${Yt.organization}/${Yt.name}`,Pt=F.cloneNode();switch(ot==null?void 0:ot.type){case"gitlab":Pt.href=`${tt.origin}${Ft}/issues/new?issue[title]=${Ct}&issue[description]=${It}`;break;case"github":Pt.href=`${tt.origin}${Ft}/issues/new?title=${Ct}&body=${It}`;break;default:return P}return Cn(i.createElement(Io.Z),Pt),Pt.style.paddingLeft="5px",Pt.title="Leave feedback for this page",Pt.id="git-feedback-link",F==null||F.insertAdjacentElement("beforebegin",Pt),P},Kn=()=>f=>(setTimeout(()=>{const P=f==null?void 0:f.querySelectorAll("li.md-nav__item--active");P.length!==0&&(P.forEach(F=>{const tt=F==null?void 0:F.querySelector("input");tt!=null&&tt.checked||tt==null||tt.click()}),P[P.length-1].scrollIntoView())},200),f);var Hn=t(15459),Lo=t(80030),An=t(72379),Sn=t(41547),jo=t(95074);const Gn=(0,Hn.Z)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Lo.ZP),Mo=()=>(0,o.jsx)(An.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"})}),Bo=({text:f})=>{const[P,B]=(0,i.useState)(!1),[,F]=(0,jo.Z)(),tt=(0,i.useCallback)(()=>{F(f),B(!0)},[f,F]),ot=(0,i.useCallback)(()=>{B(!1)},[B]);return(0,o.jsx)(Gn,{title:"Copied to clipboard",placement:"left",open:P,onClose:ot,leaveDelay:1e3,children:(0,o.jsx)(St.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:tt,children:(0,o.jsx)(Mo,{})})})},Uo=f=>P=>{const B=P.querySelectorAll("pre > code");for(const tt of B){var F;const ot=tt.textContent||"",ft=document.createElement("div");tt==null||(F=tt.parentElement)===null||F===void 0||F.prepend(ft),Cn((0,o.jsx)(Sn.Z,{theme:f,children:(0,o.jsx)(Bo,{text:ot})}),ft)}return P},$o=({baseUrl:f,onClick:P})=>B=>(Array.from(B.getElementsByTagName("a")).forEach(F=>{F.addEventListener("click",tt=>{const ft=F.getAttribute("href");ft&&ft.startsWith(f)&&!F.hasAttribute("download")&&(tt.preventDefault(),P(tt,ft))})}),B),Vn=({onLoading:f,onLoaded:P})=>B=>(f(),B.addEventListener(x,function F(){P(),B.removeEventListener(x,F)}),B);function Fo(f,P){const B=new URL(P),F=`${B.origin}${B.pathname.replace(/\/$/,"")}`,tt=f.replace(F,"").replace(/^\/+/,""),ot=new URL(`http://localhost/${tt}`);return`${ot.pathname}${ot.search}${ot.hash}`}function No(){const f=(0,Mt.s0)(),B=(0,k.h_)(dt.D).getOptionalString("app.baseUrl");return(0,i.useCallback)(tt=>{let ot=tt;if(B)try{ot=Fo(tt,B)}catch{}f(ot)},[f,B])}const Wo="screen and (max-width: 76.1875em)",Zo=f=>{const P=No(),B=(0,ct.Z)(),F=(0,Ot.Z)(Wo),tt=Un(),ot=Ao(),ft=(0,_.z)(),Ct=(0,k.h_)(ae.D),It=(0,k.h_)(Rt.q),{state:$t,path:Yt,content:Ft}=Fe(),[Pt,ce]=(0,i.useState)(null),me=m(Pt),Qt=(0,i.useCallback)(()=>{if(!Pt)return;Pt.querySelectorAll(".md-sidebar").forEach(zt=>{if(F)zt.style.top="0px";else{var Xt;const pe=(Xt=document)===null||Xt===void 0?void 0:Xt.querySelector(".techdocs-reader-page");var Ce;const Re=(Ce=pe==null?void 0:pe.getBoundingClientRect().top)!==null&&Ce!==void 0?Ce:0;var Te;let ee=(Te=Pt.getBoundingClientRect().top)!==null&&Te!==void 0?Te:0;const Je=Pt.querySelector(".md-container > .md-tabs");var Ne;const dn=(Ne=Je==null?void 0:Je.getBoundingClientRect().height)!==null&&Ne!==void 0?Ne:0;ee<Re&&(ee=Re),zt.style.top=`${Math.max(ee,0)+dn}px`}zt.style.setProperty("opacity","1")})},[Pt,F]);(0,i.useEffect)(()=>(window.addEventListener("resize",Qt),window.addEventListener("scroll",Qt,!0),()=>{window.removeEventListener("resize",Qt),window.removeEventListener("scroll",Qt,!0)}),[Pt,Qt]);const Bt=(0,i.useCallback)(()=>{if(!Pt)return;const Dt=Pt.querySelector(".md-footer");Dt&&(Dt.style.width=`${Pt.getBoundingClientRect().width}px`)},[Pt]);(0,i.useEffect)(()=>(window.addEventListener("resize",Bt),()=>{window.removeEventListener("resize",Bt)}),[Pt,Bt]),(0,i.useEffect)(()=>{me||(Bt(),Qt())},[$t,me,Bt,Qt]);const re=(0,i.useCallback)((Dt,zt)=>Nn(Dt,[tt,So({techdocsStorageApi:Ct,entityId:f,path:zt}),Wn(),wo(),Po(),To(),zn(It),ot]),[f,It,Ct,tt,ot]),ye=(0,i.useCallback)(async Dt=>Nn(Dt,[Kn(),Uo(B),$o({baseUrl:window.location.origin,onClick:(zt,Xt)=>{var Ce;const Te=zt.ctrlKey||zt.metaKey,Ne=new URL(Xt),pe=((Ce=zt.target)===null||Ce===void 0?void 0:Ce.innerText)||Xt,Re=Xt.replace(window.location.origin,"");if(ft.captureEvent("click",pe,{attributes:{to:Re}}),Ne.hash)if(Te)window.open(Xt,"_blank");else{var ee;P(Xt),Dt==null||(ee=Dt.querySelector(`[id="${Ne.hash.slice(1)}"]`))===null||ee===void 0||ee.scrollIntoView()}else Te?window.open(Xt,"_blank"):P(Xt)}}),Vn({onLoading:()=>{},onLoaded:()=>{var zt;(zt=Dt.querySelector(".md-nav__title"))===null||zt===void 0||zt.removeAttribute("for")}}),Vn({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(Xt=>{Xt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[B,P,ft]);return(0,i.useEffect)(()=>{if(!Ft)return()=>{};let Dt=!0;return re(Ft,Yt).then(async zt=>{if(!(zt!=null&&zt.innerHTML)||!Dt)return;window.scroll({top:0});const Xt=await ye(zt);ce(Xt)}),()=>{Dt=!1}},[Ft,Yt,re,ye]),Pt};var cn=t(8560),Yn=t(2296),wt=t(57058);const he=()=>{const f=(0,Yn.$L)(),{shadowRoot:P}=(0,v.x)(),B=P==null?void 0:P.querySelector('[data-md-component="content"]'),F=P==null?void 0:P.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let tt=F==null?void 0:F.querySelector('[data-techdocs-addons-location="primary sidebar"]');tt||(tt=document.createElement("div"),tt.setAttribute("data-techdocs-addons-location","primary sidebar"),F==null||F.prepend(tt));const ot=P==null?void 0:P.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ft=ot==null?void 0:ot.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ft||(ft=document.createElement("div"),ft.setAttribute("data-techdocs-addons-location","secondary sidebar"),ot==null||ot.prepend(ft)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cn.Z,{container:tt,children:f.renderComponentsByLocation(wt.o.PrimarySidebar)}),(0,o.jsx)(cn.Z,{container:B,children:f.renderComponentsByLocation(wt.o.Content)}),(0,o.jsx)(cn.Z,{container:ft,children:f.renderComponentsByLocation(wt.o.SecondarySidebar)})]})},fe=(0,d.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),ko=h(f=>{var P;const{withSearch:B=!0,onReady:F}=f,tt=fe(),{entityMetadata:{value:ot,loading:ft},entityRef:Ct,setShadowRoot:It}=(0,v.x)(),$t=Zo(Ct),Yt=window.location.pathname,Ft=window.location.hash,Pt=m($t),[ce]=R([`[id="${Ft.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!Pt)if(Ft)ce&&ce.scrollIntoView();else{var Qt,Bt;(Bt=document)===null||Bt===void 0||(Qt=Bt.querySelector("header"))===null||Qt===void 0||Qt.scrollIntoView()}},[Yt,Ft,ce,Pt]);const me=(0,i.useCallback)(Qt=>{It(Qt),F instanceof Function&&F()},[It,F]);return ft===!1&&!ot?(0,o.jsx)(L.m,{status:"404",statusMessage:"PAGE NOT FOUND"}):$t?(0,o.jsx)(y.V,{children:(0,o.jsxs)(S.Z,{container:!0,children:[(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})}),B&&(0,o.jsx)(S.Z,{className:tt.search,xs:"auto",item:!0,children:(0,o.jsx)(qt,{entityId:Ct,entityTitle:ot==null||(P=ot.metadata)===null||P===void 0?void 0:P.title})}),(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(b,{element:$t,onAppend:me,children:(0,o.jsx)(he,{})})})]})}):(0,o.jsx)(y.V,{children:(0,o.jsx)(S.Z,{container:!0,children:(0,o.jsx)(S.Z,{xs:12,item:!0,children:(0,o.jsx)(W,{})})})})}),cr=null},65386:function(Q,w,t){"use strict";t.d(w,{S:function(){return dt}});var o=t(52322),i=t(2784),d=t(18671),S=t(60905),v=t(98069),p=t(60364),c=t(73250),u=t(2296),A=t(68979),x=t(57058),O=t(75435),m=t(84719),b=t(51194),g=t(8709),M=t(79692),R=t(41128),T=t(90436),$=t(98864);const L=(0,M.Z)(vt=>({root:{textAlign:"left"},label:{color:vt.page.fontColor,fontWeight:vt.typography.fontWeightBold,letterSpacing:0,fontSize:vt.typography.fontSize,marginBottom:vt.spacing(1)/2,lineHeight:1},value:{color:(0,R.Fq)(vt.page.fontColor,.8),fontSize:vt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),y=({value:vt,className:Et,typographyRootComponent:Tt})=>(0,o.jsx)(T.Z,{component:Tt!=null?Tt:typeof vt=="string"?"p":"span",className:Et,children:vt});function Z(vt){const{label:Et,value:Tt,url:gt,contentTypograpyRootComponent:xt}=vt,J=L(),j=(0,o.jsx)(y,{className:J.value,value:Tt||"<Unknown>",typographyRootComponent:xt});return(0,o.jsx)(S.Z,{item:!0,children:(0,o.jsxs)(T.Z,{component:"span",className:J.root,children:[(0,o.jsx)(T.Z,{className:J.label,children:Et}),gt?(0,o.jsx)($.rU,{to:gt,children:j}):j]})})}var V=t(48037),et=t(44394),Y=t(6542),K=t(37321),k=t(76635),_=t(95573);const rt=(0,o.jsx)(v.Z,{animation:"wave",variant:"text",height:40}),dt=vt=>{const{palette:{common:{white:Et}}}=(0,p.Z)(),{children:Tt}=vt,gt=(0,u.$L)(),xt=(0,et.h_)(Y.D),{title:J,setTitle:j,subtitle:z,setSubtitle:q,entityRef:st,metadata:{value:it,loading:at},entityMetadata:{value:nt,loading:St}}=(0,A.x)();(0,i.useEffect)(()=>{it&&(j(it.site_name),q(()=>{let{site_description:Lt}=it;return(!Lt||Lt==="None")&&(Lt=""),Lt}))},[it,j,q]);const G=xt.getOptional("app.title")||"Backstage",H=[J,z,G].filter(Boolean).join(" | "),{locationMetadata:ut,spec:ht}=nt||{},mt=ht==null?void 0:ht.lifecycle,bt=nt?(0,O.h)(nt,g.S4):[],jt=(0,K.t)(_._Z)(),Jt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Z,{label:(0,k.capitalize)((nt==null?void 0:nt.kind)||"entity"),value:(0,o.jsx)(m.d,{color:"inherit",entityRef:st,title:nt==null?void 0:nt.metadata.title,defaultKind:"Component"})}),bt.length>0&&(0,o.jsx)(Z,{label:"Owner",value:(0,o.jsx)(b.r,{color:"inherit",entityRefs:bt,defaultKind:"group"})}),mt?(0,o.jsx)(Z,{label:"Lifecycle",value:String(mt)}):null,ut&&ut.type!=="dir"&&ut.type!=="file"?(0,o.jsx)(Z,{label:"",value:(0,o.jsxs)(S.Z,{container:!0,direction:"column",alignItems:"center",style:{color:Et},children:[(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:(0,o.jsx)(c.Z,{style:{marginTop:"-25px"}})}),(0,o.jsx)(S.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:ut.target}):null]});return!St&&nt===void 0||!at&&it===void 0?null:(0,o.jsxs)(V.h,{type:"Documentation",typeLink:jt,title:J||rt,subtitle:z===""?void 0:z||rt,children:[(0,o.jsx)(d.Z,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:H})}),Jt,Tt,gt.renderComponentsByLocation(x.o.Header)]})}},95573:function(Q,w,t){"use strict";t.d(w,{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(Q,w,t){"use strict";t.r(w),t.d(w,{TechDocsSearchResultListItem:function(){return x}});var o=t(52322),i=t(2784),d=t(79692),S=t(49378),v=t(86136),p=t(90436),c=t(98864),u=t(76079);const A=(0,d.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),x=O=>{const{result:m,highlight:b,lineClamp:g=5,asListItem:M=!0,asLink:R=!0,title:T,icon:$}=O,L=A(),y=({children:et})=>R?(0,o.jsx)(c.rU,{noTrack:!0,to:m.location,children:et}):(0,o.jsx)(o.Fragment,{children:et}),Z=()=>{const et=b!=null&&b.fields.title?(0,o.jsx)(u.F,{text:b.fields.title,preTag:b.preTag,postTag:b.postTag}):m.title,Y=b!=null&&b.fields.entityTitle?(0,o.jsx)(u.F,{text:b.fields.entityTitle,preTag:b.preTag,postTag:b.postTag}):m.entityTitle,K=b!=null&&b.fields.name?(0,o.jsx)(u.F,{text:b.fields.name,preTag:b.preTag,postTag:b.postTag}):m.name;return m?(0,o.jsx)(S.Z,{className:L.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(y,{children:T||(0,o.jsxs)(o.Fragment,{children:[et," | ",Y!=null?Y:K," docs"]})}),secondary:(0,o.jsx)(p.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:g,overflow:"hidden"},color:"textSecondary",variant:"body2",children:b!=null&&b.fields.text?(0,o.jsx)(u.F,{text:b.fields.text,preTag:b.preTag,postTag:b.postTag}):m.text})}):null},V=({children:et})=>M?(0,o.jsxs)(o.Fragment,{children:[$&&(0,o.jsx)(v.Z,{children:typeof $=="function"?$(m):$}),(0,o.jsx)("div",{className:L.flexContainer,children:et})]}):(0,o.jsx)(o.Fragment,{children:et});return(0,o.jsx)(V,{children:(0,o.jsx)(Z,{})})}},53260:function(){}},function(Q){var w=function(o){return Q(Q.s=o)};Q.O(0,[2370,6202,9284,7012,427,242,5109,6816,1213,5218,4736],function(){return w(51280)});var t=Q.O()}]);})();
490
490
 
491
- //# sourceMappingURL=main.ead3a23c.js.map
491
+ //# sourceMappingURL=main.f231fd80.js.map