@techdocs/cli 0.0.0-nightly-20220512024113 → 0.0.0-nightly-20220513024945
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 +6 -6
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.5cc31a3e.js → main.554ddc63.js} +1 -1
- package/dist/embedded-app/static/{main.5cc31a3e.js.map → main.554ddc63.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.5cc31a3e.js → runtime.554ddc63.js} +1 -1
- package/dist/embedded-app/static/{runtime.5cc31a3e.js.map → runtime.554ddc63.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.5cc31a3e.js → vendor.554ddc63.js} +27 -27
- package/dist/embedded-app/static/vendor.554ddc63.js.map +1 -0
- package/package.json +7 -7
- package/dist/embedded-app/static/vendor.5cc31a3e.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220513024945
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 344ea56acc: Bump `commander` to version 9.1.0
|
|
8
8
|
- 52fddad92d: The TechDocs CLI's embedded app now imports all API refs from the `@backstage/plugin-techdocs-react` package.
|
|
9
9
|
- Updated dependencies
|
|
10
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
11
|
-
- @backstage/cli-common@0.0.0-nightly-
|
|
12
|
-
- @backstage/config@0.0.0-nightly-
|
|
13
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
14
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
10
|
+
- @backstage/backend-common@0.0.0-nightly-20220513024945
|
|
11
|
+
- @backstage/cli-common@0.0.0-nightly-20220513024945
|
|
12
|
+
- @backstage/config@0.0.0-nightly-20220513024945
|
|
13
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20220513024945
|
|
14
|
+
- @backstage/catalog-model@0.0.0-nightly-20220513024945
|
|
15
15
|
|
|
16
16
|
## 1.1.1-next.2
|
|
17
17
|
|
|
@@ -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.554ddc63.js"></script><script defer="defer" src="/static/module-material-ui.2f7d5af1.js"></script><script defer="defer" src="/static/module-lodash.055be129.js"></script><script defer="defer" src="/static/module-date-fns.5015b34b.js"></script><script defer="defer" src="/static/module-ajv.d6f6d109.js"></script><script defer="defer" src="/static/module-material-table.fcca9670.js"></script><script defer="defer" src="/static/module-yaml.57b26e04.js"></script><script defer="defer" src="/static/module-hot-loader.7c7a4226.js"></script><script defer="defer" src="/static/module-jss.cb0efade.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.a9014a2e.js"></script><script defer="defer" src="/static/vendor.554ddc63.js"></script><script defer="defer" src="/static/main.554ddc63.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -473,4 +473,4 @@ Feedback:`),Xe=(ie==null?void 0:ie.type)==="github"?(0,ke.Pb)(V.href,"blob"):V.h
|
|
|
473
473
|
}
|
|
474
474
|
`})]),[We,Xe,Re,ie,ge,V,R,Ke,nn]),cn=(0,r.useCallback)(async xt=>Vt(xt,[Lt(),se(R),et({baseUrl:window.location.origin,onClick:(dt,Et)=>{var Zt;const At=dt.ctrlKey||dt.metaKey,Rt=new URL(Et);Rt.hash?At?window.open(`${Rt.pathname}${Rt.hash}`,"_blank"):(U(`${Rt.pathname}${Rt.hash}`),(Zt=xt==null?void 0:xt.querySelector(`#${Rt.hash.slice(1)}`))==null||Zt.scrollIntoView()):At?window.open(Rt.pathname,"_blank"):U(Rt.pathname)}}),fe({docStorageUrl:await V.getApiOrigin(),onLoading:dt=>{dt.style.setProperty("opacity","0")},onLoaded:dt=>{var Et;dt.style.removeProperty("opacity"),(Et=dt.querySelector(".md-nav__title"))==null||Et.removeAttribute("for"),qe(Array.from(dt.querySelectorAll(".md-sidebar")))}})]),[R,U,V]);return(0,r.useEffect)(()=>{if(!ht)return()=>{};let xt=!0;return rn(ht,gt).then(async dt=>{if(!(dt!=null&&dt.innerHTML)||!xt)return;window.scroll({top:0});const Et=await cn(dt);qt(Et)}),()=>{xt=!1}},[ht,gt,rn,cn]),ut},dn=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),bt=(0,ce.m1)(oe=>{const{withSearch:U=!0,onReady:R}=oe,V=dn(),ie=(0,i.$L)(),{entityMetadata:{value:ge,loading:Re},entityRef:We,shadowRoot:Xe,setShadowRoot:ct}=(0,i.x1)(),gt=hn(We),[ht,Ke]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),Ot=(0,r.useCallback)(yt=>{var cn;if(!gt||!yt)return;Ke((0,t.Ue)({...(0,m.Z)(),insertionPoint:gt.querySelector("head")||void 0}));const rn=(cn=yt.shadowRoot)!=null?cn:yt.attachShadow({mode:"open"});rn.innerHTML="",rn.appendChild(gt),ct(rn),R instanceof Function&&R()},[gt,ct,R]),qe=Xe==null?void 0:Xe.querySelector('[data-md-component="content"]'),ut=Xe==null?void 0:Xe.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),qt=Xe==null?void 0:Xe.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),nn=document.createElement("div");ut==null||ut.prepend(nn);const pt=document.createElement("div");return qt==null||qt.prepend(pt),Re===!1&&!ge?r.createElement(u.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):gt?r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(xe,null)),U&&r.createElement(f.Z,{className:V.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:We})),r.createElement(f.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:ht,sheetsManager:new Map},r.createElement("div",{ref:Ot,"data-testid":"techdocs-native-shadowroot"}),r.createElement(S.Z,{container:nn},ie.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(S.Z,{container:qe},ie.renderComponentsByLocation(i.oZ.Content)),r.createElement(S.Z,{container:pt},ie.renderComponentsByLocation(i.oZ.SecondarySidebar)))))):r.createElement(u.Content,null,r.createElement(f.Z,{container:!0},r.createElement(f.Z,{xs:12,item:!0},r.createElement(xe,null))))}),Je=null},99954:function(ee,s,e){"use strict";e.d(s,{S:function(){return v}});var r=e(2784),t=e(18671),c=e(98069),f=e(73250),S=e(47955),m=e(53479),a=e(48023),i=e(53492),u=e(36964),y=e(68725);const g=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),v=b=>{const{children:L}=b,D=(0,S.$L)(),W=(0,u.useApi)(u.configApiRef),{title:M,setTitle:P,subtitle:B,setSubtitle:F,entityRef:$,metadata:{value:G,loading:Q},entityMetadata:{value:ce,loading:we}}=(0,S.x1)();(0,r.useEffect)(()=>{!G||(P(Be=>{const{site_name:je}=G;return Be||je}),F(Be=>{let{site_description:je}=G;return(!je||je==="None")&&(je="Home"),Be||je}))},[G,P,F]);const xe=W.getOptional("app.title")||"Backstage",de=[B,M,xe].filter(Boolean).join(" | "),{locationMetadata:Ue,spec:re}=ce||{},Se=re==null?void 0:re.lifecycle,Ne=ce?(0,m.getEntityRelations)(ce,a.S4):[],ze=(0,u.useRouteRef)(y._Z)(),ke=r.createElement(r.Fragment,null,r.createElement(i.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:$,defaultKind:"Component"})}),Ne.length>0&&r.createElement(i.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Ne,defaultKind:"group"})}),Se?r.createElement(i.HeaderLabel,{label:"Lifecycle",value:Se}):null,Ue&&Ue.type!=="dir"&&Ue.type!=="file"?r.createElement(i.HeaderLabel,{label:"",value:r.createElement("a",{href:Ue.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(f.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!we&&ce===void 0||!Q&&G===void 0?null:r.createElement(i.Header,{type:"Documentation",typeLink:ze,title:M||g,subtitle:B||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,de)),ke,L,D.renderComponentsByLocation(S.oZ.Header))}},16172:function(ee,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),c=e(15223),f=e(95544),S=e(80030),m=e(61837),a=e(48348),i=e(47603),u=e(47955);const y=(0,t.Z)(v=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:v.spacing(3,3,0)}})),g=({toolbarProps:v})=>{const b=y(),[L,D]=(0,r.useState)(null),W=(0,r.useCallback)(Q=>{D(Q.currentTarget)},[]),M=(0,r.useCallback)(()=>{D(null)},[]),{entityMetadata:{value:P,loading:B}}=(0,u.x1)(),F=(0,u.$L)(),$=F.renderComponentsByLocation(u.oZ.Subheader),G=F.renderComponentsByLocation(u.oZ.Settings);return!$&&!G||B===!1&&!P?null:r.createElement(c.Z,{classes:b,...v},r.createElement(f.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},$,G?r.createElement(r.Fragment,null,r.createElement(S.ZP,{title:"Settings"},r.createElement(m.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:W},r.createElement(i.Z,null))),r.createElement(a.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(L),onClose:M,keepMounted:!0},G)):null))}},2263:function(ee,s,e){"use strict";e.d(s,{DK:function(){return g},m1:function(){return b}});var r=e(2784),t=e(10289),c=e(47955),f=e(36964),S=e(64279),m=e(77446);function a({contentLoading:L,content:D,activeSyncState:W}){return L||W==="BUILD_READY_RELOAD"||!D&&W==="CHECKING"?"CHECKING":!D&&W==="BUILDING"?"INITIAL_BUILD":D?W==="BUILDING"?"CONTENT_STALE_REFRESHING":W==="BUILD_READY"?"CONTENT_STALE_READY":W==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function i(L,D){const W={...L};switch(D.type){case"sync":D.state==="CHECKING"&&(W.buildLog=[]),W.activeSyncState=D.state,W.syncError=D.syncError;break;case"contentLoading":W.contentLoading=!0,W.contentError=void 0;break;case"content":typeof D.path=="string"&&(W.path=D.path),W.contentLoading=!1,W.content=D.content,W.contentError=D.contentError;break;case"buildLog":W.buildLog=W.buildLog.concat(D.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(W.activeSyncState)&&["contentLoading","content"].includes(D.type)&&(W.activeSyncState="UP_TO_DATE",W.buildLog=[]),W}function u(L,D,W,M){var ce,we;const[P,B]=(0,r.useReducer)(i,{activeSyncState:"CHECKING",path:M,contentLoading:!0,buildLog:[]}),F=(0,f.useApi)(c.Dl),{retry:$}=(0,m.Z)(async()=>{B({type:"contentLoading"});try{const xe=await F.getEntityDocs({kind:L,namespace:D,name:W},M);return B({type:"content",content:xe,path:M}),xe}catch(xe){B({type:"content",contentError:xe,path:M})}},[F,L,D,W,M]),G=(0,r.useRef)({content:void 0,reload:()=>{}});return G.current={content:P.content,reload:$},(0,S.default)(async()=>{B({type:"sync",state:"CHECKING"});const xe=setTimeout(()=>{B({type:"sync",state:"BUILDING"})},1e3);try{switch(await F.syncEntityDocs({kind:L,namespace:D,name:W},Ue=>{B({type:"buildLog",log:Ue})})){case"updated":G.current.content?B({type:"sync",state:"BUILD_READY"}):(G.current.reload(),B({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":B({type:"sync",state:"UP_TO_DATE"});break;default:B({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(de){B({type:"sync",state:"ERROR",syncError:de})}finally{clearTimeout(xe)}},[L,W,D,F,B,G]),{state:(0,r.useMemo)(()=>a({activeSyncState:P.activeSyncState,contentLoading:P.contentLoading,content:P.content}),[P.activeSyncState,P.content,P.contentLoading]),contentReload:$,path:P.path,content:P.content,contentErrorMessage:(ce=P.contentError)==null?void 0:ce.toString(),syncErrorMessage:(we=P.syncError)==null?void 0:we.toString(),buildLog:P.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),v=({children:L})=>{const{"*":D=""}=(0,t.UO)(),{entityRef:W}=(0,c.x1)(),{kind:M,namespace:P,name:B}=W,F=u(M,P,B,D);return r.createElement(y.Provider,{value:F},L instanceof Function?L(F):L)},b=L=>D=>r.createElement(v,null,r.createElement(L,{...D}))},96393:function(ee,s,e){"use strict";e.d(s,{Fq:function(){return f.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),f=e(74581),S=e(16172)},68725:function(ee,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return f}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),f=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ee,s,e){"use strict";e.d(s,{S:function(){return F}});var r=e(2784),t=e(79692),c=e(49378),f=e(38402),S=e(85256),m=e(53492),a=e(73624);const i=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),u=$=>{const{result:G,highlight:Q,lineClamp:ce=5,asListItem:we=!0,asLink:xe=!0,title:de}=$,Ue=i(),re=()=>{const ze=Q!=null&&Q.fields.title?r.createElement(a.FA,{text:Q.fields.title,preTag:Q.preTag,postTag:Q.postTag}):G.title,ke=Q!=null&&Q.fields.entityTitle?r.createElement(a.FA,{text:Q.fields.entityTitle,preTag:Q.preTag,postTag:Q.postTag}):G.entityTitle,ve=Q!=null&&Q.fields.name?r.createElement(a.FA,{text:Q.fields.name,preTag:Q.preTag,postTag:Q.postTag}):G.name;return r.createElement(c.Z,{className:Ue.itemText,primaryTypographyProps:{variant:"h6"},primary:de||r.createElement(r.Fragment,null,ze," | ",ke!=null?ke:ve," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ce,overflow:"hidden"}},Q!=null&&Q.fields.text?r.createElement(a.FA,{text:Q.fields.text,preTag:Q.preTag,postTag:Q.postTag}):G.text)})},Se=({children:ze})=>xe?r.createElement(m.Link,{to:G.location},ze):r.createElement(r.Fragment,null,ze),Ne=({children:ze})=>we?r.createElement(r.Fragment,null,r.createElement(f.Z,{alignItems:"flex-start",className:Ue.flexContainer},ze),r.createElement(S.Z,{component:"li"})):r.createElement(r.Fragment,null,ze);return r.createElement(Se,null,r.createElement(Ne,null,r.createElement(re,null)))};var y=e(86619),g=e(50581),v=e(61837),b=e(4614),L=e(21853),D=e(88013),W=e(10289),M=e(48760);const P=(0,t.Z)({root:{width:"100%"}}),B=$=>{const{entityId:G,debounceTime:Q=150}=$,[ce,we]=(0,r.useState)(!1),xe=(0,W.s0)(),{term:de,setTerm:Ue,setFilters:re,result:{loading:Se,value:Ne}}=(0,a.Rx)(),ze=P(),[ke,ve]=(0,r.useState)([]);(0,r.useEffect)(()=>{let Qe=!0;if(Qe&&Ne){const et=Ne.results.slice(0,10);ve(et)}return()=>{Qe=!1}},[Se,Ne]);const[Ie,Be]=(0,r.useState)(de);(0,M.Z)(()=>Ue(Ie),Q,[Ie]);const{kind:je,name:at,namespace:Tt}=G;(0,r.useEffect)(()=>{re(Qe=>({...Qe,kind:je,namespace:Tt,name:at}))},[je,Tt,at,re]);const _e=Qe=>{ce||we(!0),Be(Qe.target.value)},st=(Qe,et)=>{if(et!=null&&et.document){const{location:$t}=et.document;xe($t)}};return r.createElement(D.ZP,{classes:{root:ze.root},"data-testid":"techdocs-search-bar",size:"small",open:ce,getOptionLabel:()=>"",filterOptions:Qe=>Qe,onClose:()=>{we(!1)},onFocus:()=>{we(!0)},onChange:st,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ke,renderOption:({document:Qe,highlight:et})=>r.createElement(u,{result:Qe,lineClamp:3,asListItem:!1,asLink:!1,title:Qe.title,highlight:et}),loading:Se,renderInput:Qe=>r.createElement(y.Z,{...Qe,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${G.name} docs`,value:Ie,onChange:_e,InputProps:{...Qe.InputProps,startAdornment:r.createElement(g.Z,{position:"start"},r.createElement(v.Z,{"aria-label":"Query",disabled:!0},r.createElement(L.Z,null))),endAdornment:r.createElement(r.Fragment,null,Se?r.createElement(b.Z,{color:"inherit",size:20}):null,Qe.InputProps.endAdornment)}})})},F=$=>{const G={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return r.createElement(a.Nd,{initialState:G},r.createElement(B,{...$}))}},98157:function(){},53260:function(){}},function(ee){var s=function(r){return ee(ee.s=r)};ee.O(0,[2370,6202,9284,2126,7012,9035,4983,3222,5218,4736],function(){return s(88649),s(46054)});var e=ee.O()}]);})();
|
|
475
475
|
|
|
476
|
-
//# sourceMappingURL=main.
|
|
476
|
+
//# sourceMappingURL=main.554ddc63.js.map
|