@techdocs/cli 0.0.0-nightly-20240321021124 → 0.0.0-nightly-20240322021005

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-20240321021124
3
+ ## 0.0.0-nightly-20240322021005
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/backend-common@0.0.0-nightly-20240321021124
9
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20240321021124
8
+ - @backstage/backend-common@0.0.0-nightly-20240322021005
9
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20240322021005
10
10
  - @backstage/catalog-model@1.4.5
11
11
  - @backstage/cli-common@0.1.13
12
12
  - @backstage/config@1.2.0
@@ -961,28 +961,6 @@
961
961
  "$schema": "http://json-schema.org/draft-07/schema#"
962
962
  }
963
963
  },
964
- {
965
- "path": "../../plugins/stackstorm/config.d.ts",
966
- "value": {
967
- "type": "object",
968
- "properties": {
969
- "stackstorm": {
970
- "type": "object",
971
- "properties": {
972
- "webUrl": {
973
- "description": "StackStorm Web UI url\nUsed in links to StackStorm web UI",
974
- "visibility": "frontend",
975
- "type": "string"
976
- }
977
- },
978
- "required": [
979
- "webUrl"
980
- ]
981
- }
982
- },
983
- "$schema": "http://json-schema.org/draft-07/schema#"
984
- }
985
- },
986
964
  {
987
965
  "path": "../../node_modules/@oriflame/backstage-plugin-score-card/config.d.ts",
988
966
  "value": {
@@ -1011,6 +989,28 @@
1011
989
  "$schema": "http://json-schema.org/draft-07/schema#"
1012
990
  }
1013
991
  },
992
+ {
993
+ "path": "../../plugins/stackstorm/config.d.ts",
994
+ "value": {
995
+ "type": "object",
996
+ "properties": {
997
+ "stackstorm": {
998
+ "type": "object",
999
+ "properties": {
1000
+ "webUrl": {
1001
+ "description": "StackStorm Web UI url\nUsed in links to StackStorm web UI",
1002
+ "visibility": "frontend",
1003
+ "type": "string"
1004
+ }
1005
+ },
1006
+ "required": [
1007
+ "webUrl"
1008
+ ]
1009
+ }
1010
+ },
1011
+ "$schema": "http://json-schema.org/draft-07/schema#"
1012
+ }
1013
+ },
1014
1014
  {
1015
1015
  "path": "../backend-common/config.d.ts",
1016
1016
  "value": {
@@ -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 source framework 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.7a610fd3.js"></script><script defer="defer" src="/static/module-material-ui.033f9fa6.js"></script><script defer="defer" src="/static/module-material-table.145eb704.js"></script><script defer="defer" src="/static/module-lodash.1a2b8e11.js"></script><script defer="defer" src="/static/module-react-dom.3e65b8bc.js"></script><script defer="defer" src="/static/module-react-router.07ec2a81.js"></script><script defer="defer" src="/static/module-react-router-dom.ba9d01bf.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.8a51ed97.js"></script><script defer="defer" src="/static/module-zod.955be94f.js"></script><script defer="defer" src="/static/module-i18next.40b7c233.js"></script><script defer="defer" src="/static/vendor.7a610fd3.js"></script><script defer="defer" src="/static/main.7a610fd3.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 source framework 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.c3e74303.js"></script><script defer="defer" src="/static/module-material-ui.033f9fa6.js"></script><script defer="defer" src="/static/module-material-table.145eb704.js"></script><script defer="defer" src="/static/module-lodash.1a2b8e11.js"></script><script defer="defer" src="/static/module-react-dom.3e65b8bc.js"></script><script defer="defer" src="/static/module-react-router.07ec2a81.js"></script><script defer="defer" src="/static/module-react-router-dom.ba9d01bf.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.8a51ed97.js"></script><script defer="defer" src="/static/module-zod.955be94f.js"></script><script defer="defer" src="/static/module-i18next.40b7c233.js"></script><script defer="defer" src="/static/vendor.c3e74303.js"></script><script defer="defer" src="/static/main.c3e74303.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -494,4 +494,4 @@ ${$.href}
494
494
 
495
495
  Feedback:`),Nt=(J==null?void 0:J.type)==="github"?(0,Bo.F)(Q.href,"blob"):Q.href,Gt=$o()(Nt),Wt=`/${Gt.organization}/${Gt.name}`,It=$.cloneNode();switch(J==null?void 0:J.type){case"gitlab":It.href=`${Q.origin}${Wt}/issues/new?issue[title]=${St}&issue[description]=${jt}`;break;case"github":It.href=`${Q.origin}${Wt}/issues/new?title=${St}&body=${jt}`;break;default:return I}return bn(i.createElement(Uo.A),It),It.style.paddingLeft="5px",It.title="Leave feedback for this page",It.id="git-feedback-link",$==null||$.insertAdjacentElement("beforebegin",It),I},Qn=()=>h=>(setTimeout(()=>{const I=h==null?void 0:h.querySelectorAll("li.md-nav__item--active");I.length!==0&&(I.forEach($=>{const Q=$==null?void 0:$.querySelector("input");Q!=null&&Q.checked||Q==null||Q.click()}),I[I.length-1].scrollIntoView())},200),h);var Wo=t(50868),ko=t(10437),Zn=t(71677),Jn=t(87051),Ko=t(36338);const On=(0,Jn.A)(h=>({tooltip:{fontSize:"inherit",color:h.palette.text.primary,margin:0,padding:h.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Zn.Ay),wn=()=>(0,o.jsx)(ko.A,{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"})}),zo=({text:h})=>{const[I,U]=(0,i.useState)(!1),[,$]=(0,Ko.A)(),Q=(0,i.useCallback)(()=>{$(h),U(!0)},[h,$]),J=(0,i.useCallback)(()=>{U(!1)},[U]);return(0,o.jsx)(On,{title:"Copied to clipboard",placement:"left",open:I,onClose:J,leaveDelay:1e3,children:(0,o.jsx)(ft.A,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:Q,children:(0,o.jsx)(wn,{})})})},Xn=h=>I=>{const U=I.querySelectorAll("pre > code");for(const Q of U){var $;const J=Q.textContent||"",ct=document.createElement("div");Q==null||($=Q.parentElement)===null||$===void 0||$.prepend(ct),bn((0,o.jsx)(Wo.A,{theme:h,children:(0,o.jsx)(zo,{text:J})}),ct)}return I},_n=({baseUrl:h,onClick:I})=>U=>(Array.from(U.getElementsByTagName("a")).forEach($=>{$.addEventListener("click",Q=>{const ct=$.getAttribute("href");ct&&ct.startsWith(h)&&!$.hasAttribute("download")&&(Q.preventDefault(),I(Q,ct))})}),U),qn=({onLoading:h,onLoaded:I})=>U=>(h(),U.addEventListener(E,function $(){I(),U.removeEventListener(E,$)}),U);function Ho(h,I){const U=new URL(I),$=`${U.origin}${U.pathname.replace(/\/$/,"")}`,Q=h.replace($,"").replace(/^\/+/,""),J=new URL(`http://localhost/${Q}`);return`${J.pathname}${J.search}${J.hash}`}function Vo(){const h=(0,Ft.Zp)(),U=(0,X.gf)(it.U).getOptionalString("app.baseUrl");return(0,i.useCallback)(Q=>{let J=Q;if(U)try{J=Ho(Q,U)}catch{}h(J)},[h,U])}const Go="screen and (max-width: 76.1875em)",Yo=h=>{const I=Vo(),U=(0,tt.A)(),$=(0,lt.A)(Go),Q=Kn(),J=un(),ct=(0,H.s)(),St=(0,X.gf)(Fe.s),jt=(0,X.gf)(Dt.Y),{state:Nt,path:Gt,content:Wt}=Se(),[It,de]=(0,i.useState)(null),ye=p(It),Jt=(0,i.useCallback)(()=>{if(!It)return;It.querySelectorAll(".md-sidebar").forEach(Kt=>{if($)Kt.style.top="0px";else{var te;const Be=(te=document)===null||te===void 0?void 0:te.querySelector(".techdocs-reader-page");var Ae;const re=(Ae=Be==null?void 0:Be.getBoundingClientRect().top)!==null&&Ae!==void 0?Ae:0;var je;let Rn=(je=It.getBoundingClientRect().top)!==null&&je!==void 0?je:0;const In=It.querySelector(".md-container > .md-tabs");var $e;const Dn=($e=In==null?void 0:In.getBoundingClientRect().height)!==null&&$e!==void 0?$e:0;Rn<re&&(Rn=re);const no=Math.max(Rn,0)+Dn;Kt.style.top=`${no}px`;const en=It.querySelector(".md-container > .md-footer");var ge;const hn=(ge=en==null?void 0:en.getBoundingClientRect().top)!==null&&ge!==void 0?ge:window.innerHeight;Kt.style.height=`${hn-no}px`}Kt.style.setProperty("opacity","1")})},[It,$]);(0,i.useEffect)(()=>(window.addEventListener("resize",Jt),window.addEventListener("scroll",Jt,!0),()=>{window.removeEventListener("resize",Jt),window.removeEventListener("scroll",Jt,!0)}),[It,Jt]);const kt=(0,i.useCallback)(()=>{if(!It)return;const Mt=It.querySelector(".md-footer");Mt&&(Mt.style.width=`${It.getBoundingClientRect().width}px`)},[It]);(0,i.useEffect)(()=>(window.addEventListener("resize",kt),()=>{window.removeEventListener("resize",kt)}),[It,kt]),(0,i.useEffect)(()=>{ye||(kt(),Jt())},[Nt,ye,kt,Jt]);const ae=(0,i.useCallback)((Mt,Kt)=>Gn(Mt,[Q,Io({techdocsStorageApi:St,entityId:h,path:Kt}),Do(),Yn(),Mo(),jo(),No(jt),J]),[h,jt,St,Q,J]),Ee=(0,i.useCallback)(async Mt=>Gn(Mt,[Qn(),Xn(U),_n({baseUrl:window.location.origin,onClick:(Kt,te)=>{var Ae;const je=Kt.ctrlKey||Kt.metaKey,$e=new URL(te),ge=((Ae=Kt.target)===null||Ae===void 0?void 0:Ae.innerText)||te,Be=te.replace(window.location.origin,"");if(ct.captureEvent("click",ge,{attributes:{to:Be}}),$e.hash)if(je)window.open(te,"_blank");else{var re;I(te),Mt==null||(re=Mt.querySelector(`[id="${$e.hash.slice(1)}"]`))===null||re===void 0||re.scrollIntoView()}else je?window.open(te,"_blank"):I(te)}}),qn({onLoading:()=>{},onLoaded:()=>{var Kt;(Kt=Mt.querySelector(".md-nav__title"))===null||Kt===void 0||Kt.removeAttribute("for")}}),qn({onLoading:()=>{Array.from(Mt.querySelectorAll(".md-sidebar")).forEach(te=>{te.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[U,I,ct]);return(0,i.useEffect)(()=>{if(!Wt)return()=>{};let Mt=!0;return ae(Wt,Gt).then(async Kt=>{if(!(Kt!=null&&Kt.innerHTML)||!Mt)return;window.scroll({top:0});const te=await Ee(Kt);de(te)}),()=>{Mt=!1}},[Wt,Gt,ae,Ee]),It};var Pn=t(41883),Qo=t(72020),Tn=t(99730);const to=()=>{const h=(0,Qo.YR)(),{shadowRoot:I}=(0,m.V)(),U=I==null?void 0:I.querySelector('[data-md-component="content"]'),$=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Q=$==null?void 0:$.querySelector('[data-techdocs-addons-location="primary sidebar"]');Q||(Q=document.createElement("div"),Q.setAttribute("data-techdocs-addons-location","primary sidebar"),$==null||$.prepend(Q));const J=I==null?void 0:I.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let ct=J==null?void 0:J.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return ct||(ct=document.createElement("div"),ct.setAttribute("data-techdocs-addons-location","secondary sidebar"),J==null||J.prepend(ct)),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pn.A,{container:Q,children:h.renderComponentsByLocation(Tn.e.PrimarySidebar)}),(0,o.jsx)(Pn.A,{container:U,children:h.renderComponentsByLocation(Tn.e.Content)}),(0,o.jsx)(Pn.A,{container:ct,children:h.renderComponentsByLocation(Tn.e.SecondarySidebar)})]})},eo=(0,b.A)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"},"@media print":{display:"none"}}}),Lt=v(h=>{var I;const{withSearch:U=!0,onReady:$}=h,Q=eo(),{entityMetadata:{value:J,loading:ct},entityRef:St,setShadowRoot:jt}=(0,m.V)(),Nt=Yo(St),Gt=window.location.pathname,Wt=window.location.hash,It=p(Nt),[de]=P([`[id="${Wt.slice(1)}"]`]);(0,i.useEffect)(()=>{if(!It)if(Wt)de&&de.scrollIntoView();else{var Jt,kt;(kt=document)===null||kt===void 0||(Jt=kt.querySelector("header"))===null||Jt===void 0||Jt.scrollIntoView()}},[Gt,Wt,de,It]);const ye=(0,i.useCallback)(Jt=>{jt(Jt),$ instanceof Function&&$()},[jt,$]);return ct===!1&&!J?(0,o.jsx)(D.M,{status:"404",statusMessage:"PAGE NOT FOUND"}):Nt?(0,o.jsx)(S.U,{children:(0,o.jsxs)(u.A,{container:!0,children:[(0,o.jsx)(u.A,{xs:12,item:!0,children:(0,o.jsx)(F,{})}),U&&(0,o.jsx)(u.A,{className:Q.search,xs:"auto",item:!0,children:(0,o.jsx)(_t,{entityId:St,entityTitle:J==null||(I=J.metadata)===null||I===void 0?void 0:I.title})}),(0,o.jsx)(u.A,{xs:12,item:!0,children:(0,o.jsx)(x,{element:Nt,onAppend:ye,children:(0,o.jsx)(to,{})})})]})}):(0,o.jsx)(S.U,{children:(0,o.jsx)(u.A,{container:!0,children:(0,o.jsx)(u.A,{xs:12,item:!0,children:(0,o.jsx)(F,{})})})})}),fe=null},45061:function(Y,T,t){"use strict";t.d(T,{T:function(){return it}});var o=t(31085),i=t(14041),u=t(93285),b=t(42899),m=t(4387),g=t(54917),c=t(13660),d=t(72020),y=t(86892),E=t(99730),O=t(67871),p=t(8859),x=t(34428),f=t(51372),R=t(58837),P=t(268),w=t(72501),M=t(72072);const D=(0,R.A)(gt=>({root:{textAlign:"left"},label:{color:gt.page.fontColor,fontWeight:gt.typography.fontWeightBold,letterSpacing:0,fontSize:gt.typography.fontSize,marginBottom:gt.spacing(1)/2,lineHeight:1},value:{color:(0,P.X4)(gt.page.fontColor,.8),fontSize:gt.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),S=({value:gt,className:ut,typographyRootComponent:bt})=>(0,o.jsx)(w.A,{component:bt!=null?bt:typeof gt=="string"?"p":"span",className:ut,children:gt});function z(gt){const{label:ut,value:bt,url:st,contentTypograpyRootComponent:yt}=gt,dt=D(),at=(0,o.jsx)(S,{className:dt.value,value:bt||"<Unknown>",typographyRootComponent:yt});return(0,o.jsx)(b.A,{item:!0,children:(0,o.jsxs)(w.A,{component:"span",className:dt.root,children:[(0,o.jsx)(w.A,{className:dt.label,children:ut}),st?(0,o.jsx)(M.N_,{to:st,children:at}):at]})})}var G=t(69814),q=t(72427),K=t(65461),W=t(9222),X=t(45250),H=t(82779);const _=(0,o.jsx)(m.A,{animation:"wave",variant:"text",height:40}),it=gt=>{const{palette:{common:{white:ut}}}=(0,g.A)(),{children:bt}=gt,st=(0,d.YR)(),yt=(0,q.gf)(K.U),{title:dt,setTitle:at,subtitle:vt,setSubtitle:et,entityRef:Ct,metadata:{value:Et,loading:nt},entityMetadata:{value:ot,loading:ft}}=(0,y.V)();(0,i.useEffect)(()=>{Et&&(at(Et.site_name),et(()=>{let{site_description:wt}=Et;return(!wt||wt==="None")&&(wt=""),wt}))},[Et,at,et]);const Pt=yt.getOptional("app.title")||"Backstage",At=[dt,vt,Pt].filter(Boolean).join(" | "),{locationMetadata:N,spec:V}=ot||{},pt=V==null?void 0:V.lifecycle,xt=ot?(0,O.t)(ot,f.vv):[],Bt=(0,W.S)(H.rQ)(),Rt=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z,{label:(0,X.capitalize)((ot==null?void 0:ot.kind)||"entity"),value:(0,o.jsx)(p.z,{color:"inherit",entityRef:Ct,title:ot==null?void 0:ot.metadata.title,defaultKind:"Component"})}),xt.length>0&&(0,o.jsx)(z,{label:"Owner",value:(0,o.jsx)(x.i,{color:"inherit",entityRefs:xt,defaultKind:"group"})}),pt?(0,o.jsx)(z,{label:"Lifecycle",value:String(pt)}):null,N&&N.type!=="dir"&&N.type!=="file"?(0,o.jsx)(z,{label:"",value:(0,o.jsxs)(b.A,{container:!0,direction:"column",alignItems:"center",style:{color:ut},children:[(0,o.jsx)(b.A,{style:{padding:0},item:!0,children:(0,o.jsx)(c.A,{style:{marginTop:"-25px"}})}),(0,o.jsx)(b.A,{style:{padding:0},item:!0,children:"Source"})]}),url:N.target}):null]});return!ft&&ot===void 0||!nt&&Et===void 0?null:(0,o.jsxs)(G.Y,{type:"Documentation",typeLink:Bt,title:dt||_,subtitle:vt===""?void 0:vt||_,children:[(0,o.jsx)(u.A,{titleTemplate:"%s",children:(0,o.jsx)("title",{children:At})}),Rt,bt,st.renderComponentsByLocation(E.e.Header)]})}},82779:function(Y,T,t){"use strict";t.d(T,{Oc:function(){return u},Ri:function(){return b},rQ:function(){return i}});var o=t(34569);const i=(0,o.H)({id:"techdocs:index-page"}),u=(0,o.H)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),b=(0,o.H)({id:"techdocs:catalog-reader-view"})},27698:function(Y,T,t){"use strict";t.r(T),t.d(T,{TechDocsSearchResultListItem:function(){return E}});var o=t(31085),i=t(14041),u=t(46423),b=t(5951),m=t(58837),g=t(72501),c=t(72072),d=t(70734);const y=(0,m.A)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),E=O=>{const{result:p,highlight:x,lineClamp:f=5,asListItem:R=!0,asLink:P=!0,title:w,icon:M}=O,D=y(),S=({children:q})=>P?(0,o.jsx)(c.N_,{noTrack:!0,to:p.location,children:q}):(0,o.jsx)(o.Fragment,{children:q}),z=()=>{const q=x!=null&&x.fields.title?(0,o.jsx)(d.e,{text:x.fields.title,preTag:x.preTag,postTag:x.postTag}):p.title,K=x!=null&&x.fields.entityTitle?(0,o.jsx)(d.e,{text:x.fields.entityTitle,preTag:x.preTag,postTag:x.postTag}):p.entityTitle,W=x!=null&&x.fields.name?(0,o.jsx)(d.e,{text:x.fields.name,preTag:x.preTag,postTag:x.postTag}):p.name;return p?(0,o.jsx)(b.A,{className:D.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,o.jsx)(S,{children:w||(0,o.jsxs)(o.Fragment,{children:[q," | ",K!=null?K:W," docs"]})}),secondary:(0,o.jsx)(g.A,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:f,overflow:"hidden"},color:"textSecondary",variant:"body2",children:x!=null&&x.fields.text?(0,o.jsx)(d.e,{text:x.fields.text,preTag:x.preTag,postTag:x.postTag}):p.text})}):null},G=({children:q})=>R?(0,o.jsxs)(o.Fragment,{children:[M&&(0,o.jsx)(u.A,{children:typeof M=="function"?M(p):M}),(0,o.jsx)("div",{className:D.flexContainer,children:q})]}):(0,o.jsx)(o.Fragment,{children:q});return(0,o.jsx)(G,{children:(0,o.jsx)(z,{})})}},86973:function(){}},function(Y){var T=function(o){return Y(Y.s=o)};Y.O(0,[1751,235,1888,6587,2754,9669,1975,5042,7400,4121],function(){return T(56041)});var t=Y.O()}]);})();
496
496
 
497
- //# sourceMappingURL=main.7a610fd3.js.map
497
+ //# sourceMappingURL=main.c3e74303.js.map