@techdocs/cli 1.8.8 → 1.8.9-next.0

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.
@@ -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.27572b1b.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.27572b1b.js"></script><script defer="defer" src="/static/main.27572b1b.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.d92320cd.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.d92320cd.js"></script><script defer="defer" src="/static/main.d92320cd.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1833],{60413:function(F,C,e){e.d(C,{C4:function(){return b},tS:function(){return N}});function t({name:T,attributes:p,resourceType:r}){return r?{type:"resource",name:T,attributes:p,resourceType:r}:{type:"basic",name:T,attributes:p}}const g="catalog-entity",I=t({name:"catalog.entity.read",attributes:{action:"read"},resourceType:g}),b=t({name:"catalog.entity.create",attributes:{action:"create"}}),k=t({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:g}),N=t({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:g}),U=t({name:"catalog.location.read",attributes:{action:"read"}}),P=t({name:"catalog.location.create",attributes:{action:"create"}}),$=t({name:"catalog.location.delete",attributes:{action:"delete"}}),x=[I,b,k,N,U,P,$]},99538:function(F,C,e){e.d(C,{T7:function(){return P},TY:function(){return T},tN:function(){return x}});var t=e(31085),g=e(6820),I=e(25862),b=e(43836),k=e(10602),N=e(14041);const U=(0,b.tK)("entity-context"),P=p=>{const{children:r,entity:m,loading:v,error:u,refresh:h}=p,A={entity:m,loading:v,error:u,refresh:h};return(0,t.jsx)(U.Provider,{value:(0,k.B)({1:A}),children:(0,t.jsx)(I.Ig,{attributes:{...m?{entityRef:(0,g.U2)(m)}:void 0},children:r})})},$=p=>_jsx(P,{entity:p.entity,loading:!p.entity,error:void 0,refresh:void 0,children:p.children});function x(){const p=(0,b.qO)("entity-context");if(!p)throw new Error("Entity context is not available");const r=p.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");if(!r.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:r.entity}}function T(){const p=(0,b.qO)("entity-context");if(!p)throw new Error("Entity context is not available");const r=p.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");const{entity:m,loading:v,error:u,refresh:h}=r;return{entity:m,loading:v,error:u,refresh:h}}},61833:function(F,C,e){e.r(C),e.d(C,{AboutCard:function(){return Ze},AboutContent:function(){return ue},AboutField:function(){return w}});var t=e(31085),g=e(72348),I=e(17736),b=e(6820),k=e(40703),N=e(48653),U=e(45685),P=e(37197),$=e(29365),x=e(58837),T=e(72072),p=e(14041),r=e(53373),m=e.n(r),v=e(86613),u=e(10394),h=e(72501);const A=(0,x.A)(i=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:i.palette.text.secondary,cursor:"default"},primary:{color:i.palette.primary.main},secondary:{color:i.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:i.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function S({color:i="primary",disabled:a=!1,href:o="#",icon:s=(0,t.jsx)(v.A,{}),label:l,onClick:c,title:d}){const f=A();return a?(0,t.jsxs)(u.A,{title:d,className:m()(f.link,f.disabled),children:[s,(0,t.jsx)(h.A,{variant:"caption",component:"span",className:f.label,children:l})]}):(0,t.jsxs)(T.N_,{title:d,className:m()(f.link,f[i]),to:o,onClick:c,children:[s,(0,t.jsx)(h.A,{variant:"caption",component:"span",className:f.label,children:l})]})}const L=(0,x.A)(i=>({links:{margin:i.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:i.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function y(i){const{links:a}=i,o=L();return(0,t.jsx)("nav",{className:o.links,children:a.map((s,l)=>(0,t.jsx)(S,{...s},l+1))})}var K=e(43320),te=e(13660),re=e(82266);const fe=i=>{const{type:a}=i,o=(0,re.n)(),s=te.A;var l;const c=a&&(l=o.getSystemIcon(a))!==null&&l!==void 0?l:s;return(0,t.jsx)(c,{})};var Y=e(72427),ye=e(36017),ge=e(39837),le=e(9222),ce=e(99538),ve=e(7341),de=e(78692);function be(i,a){var o;const s=(o=i.metadata.annotations)===null||o===void 0?void 0:o[I.I4];if(s)try{const l=(0,de.aY)(s),c=a.byUrl(l.target);return{locationTargetUrl:l.target,integrationType:c==null?void 0:c.type}}catch{return}}var pe=e(95203),Q=e(51372),X=e(67871),Z=e(34428),xe=e(67720),me=e(42899),Ae=e(4650),je=e(82442);const Te=(0,x.A)(i=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:i.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(i){const{label:a,value:o,gridSizes:s,children:l}=i,c=Te(),d=(0,je.O)(l,j=>j.getElements()),f=d.length>0?d:(0,t.jsx)(h.A,{variant:"body2",className:c.value,children:o||"unknown"});return(0,t.jsxs)(me.A,{item:!0,...s,children:[(0,t.jsx)(h.A,{variant:"h2",className:c.label,children:a}),f]})}var Le=e(18750);const Ee=(0,x.A)({description:{wordBreak:"break-word"}});function Ce(i,a,o){if(a==="url"||i.includes("://"))return i;const s=o.type==="file"?`file://${o.target}`:o.target;return a==="file"||o.type==="file"?new URL(i,s).href:s}function ue(i){var a,o,s,l,c,d,f,j;const{entity:n}=i,ie=Ee(),q=n.kind.toLocaleLowerCase("en-US")==="system",W=n.kind.toLocaleLowerCase("en-US")==="resource",B=n.kind.toLocaleLowerCase("en-US")==="component",D=n.kind.toLocaleLowerCase("en-US")==="api",G=n.kind.toLocaleLowerCase("en-US")==="template",_=n.kind.toLocaleLowerCase("en-US")==="location",R=n.kind.toLocaleLowerCase("en-US")==="group",M=(0,X.t)(n,Q.jn,{kind:"system"}),O=(0,X.t)(n,Q.jn,{kind:"component"}),z=(0,X.t)(n,Q.jn,{kind:"domain"}),ee=(0,X.t)(n,Q.vv);let J;try{J=(0,de.Cr)(n)}catch{J=void 0}return(0,t.jsxs)(me.A,{container:!0,children:[(0,t.jsx)(w,{label:"Description",gridSizes:{xs:12},children:(0,t.jsx)(Ae.h,{className:ie.description,content:(n==null||(a=n.metadata)===null||a===void 0?void 0:a.description)||"No description"})}),(0,t.jsx)(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:ee.length>0&&(0,t.jsx)(Z.i,{entityRefs:ee,defaultKind:"group"})}),(q||z.length>0)&&(0,t.jsx)(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:z.length>0&&(0,t.jsx)(Z.i,{entityRefs:z,defaultKind:"domain"})}),(D||B||W||M.length>0)&&(0,t.jsx)(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:M.length>0&&(0,t.jsx)(Z.i,{entityRefs:M,defaultKind:"system"})}),B&&O.length>0&&(0,t.jsx)(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,t.jsx)(Z.i,{entityRefs:O,defaultKind:"component"})}),(D||B||W||G||R||_||typeof(n==null||(o=n.spec)===null||o===void 0?void 0:o.type)=="string")&&(0,t.jsx)(w,{label:"Type",value:n==null||(s=n.spec)===null||s===void 0?void 0:s.type,gridSizes:{xs:12,sm:6,lg:4}}),(D||B||typeof(n==null||(l=n.spec)===null||l===void 0?void 0:l.lifecycle)=="string")&&(0,t.jsx)(w,{label:"Lifecycle",value:n==null||(c=n.spec)===null||c===void 0?void 0:c.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,t.jsx)(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:((n==null||(d=n.metadata)===null||d===void 0?void 0:d.tags)||[]).map(E=>(0,t.jsx)(xe.A,{size:"small",label:E},E))}),_&&((n==null||(f=n.spec)===null||f===void 0?void 0:f.targets)||(n==null||(j=n.spec)===null||j===void 0?void 0:j.target))&&(0,t.jsx)(w,{label:"Targets",gridSizes:{xs:12},children:(0,t.jsx)(Le.m,{cols:1,items:(n.spec.targets||[n.spec.target]).map(E=>E).map(E=>{var V;return{text:E,href:Ce(E,(n==null||(V=n.spec)===null||V===void 0?void 0:V.type)||"unknown",J)}})})})]})}var ke=e(74011),Se=e(25534),we=e(82451),Ie=e(75625),Pe=e(11601),Re=e.n(Pe),Oe=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),Ne=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Ue=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$e=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const he=new Map,De=[Ne,Oe,Ue,$e];function Me(i){if(!(i!=null&&i.length))throw new TypeError("Unknown error");const a=i[0];throw new TypeError(`${a.instancePath||"<root>"} ${a.message}${a.params?` - ${Object.entries(a.params).map(([o,s])=>`${o}: ${s}`).join(", ")}`:""}`)}function Be(i,a={}){var o;const s=(o=a==null?void 0:a.disableCache)!==null&&o!==void 0?o:!1,l=s?"":JSON.stringify(i);if(!s){const j=he.get(l);if(j)return j}const c=ze(i),d=new(Re())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});c.length&&d.addSchema(c,void 0,void 0,!0);const f=d.compile(i);return s||he.set(l,f),f}function ze(i){if(typeof i!="object")return[];const a=new Set;i.$id&&a.add(i.$id);const o=new Array,s=[i];for(;s.length;){const l=s.pop();for(const c of Ve(l))if(!a.has(c)){a.add(c);const d=De.find(f=>f.$id===c);d&&(o.push(d),s.push(d))}}return o}function*Ve(i){const a=[i];for(;a.length;){const o=a.pop();if(typeof o=="object"&&o)for(const[s,l]of Object.entries(o))s==="$ref"&&typeof l=="string"?yield l.split("#")[0]:a.push(l)}}function He(i){const a=Be(i);return o=>{var s;if(a(o)===!0)return o;const c=(s=a.errors)===null||s===void 0?void 0:s.filter(d=>["/kind","/apiVersion"].includes(d.instancePath));if(c!=null&&c.length&&c.every(d=>d.keyword==="enum"))return!1;throw Me(a.errors)}}var Ke=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"presentation":{"type":"object","description":"A way to redefine the labels for actionable buttons.","properties":{"backButtonText":{"type":"string","description":"A button which return the user to one step back."},"createButtonText":{"type":"string","description":"A button which start the execution of the template."},"reviewButtonText":{"type":"string","description":"A button which open the review step to verify the input prior to start the execution."}}},"EXPERIMENTAL_recovery":{"type":"object","description":"A task recovery section.","properties":{"EXPERIMENTAL_strategy":{"type":"string","description":"Recovery strategy for your task (none or startOver). By default none"}}},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}');const We=He(Ke),tt={async check(i){return We(i)===i}},Ge=i=>i.apiVersion==="scaffolder.backstage.io/v1beta3"&&i.kind==="Template";var Je=e(36989);function Fe(i){const{entity:a,loading:o,error:s}=(0,ce.TY)(),{allowed:l,loading:c,error:d}=(0,Je.J)({permission:i,resourceRef:a?(0,b.U2)(a):void 0});return o||c?{loading:!0,allowed:!1}:s?{loading:!1,allowed:!1,error:s}:{loading:!1,allowed:l,error:d}}var Ye=e(60413);const Qe="backstage.io/techdocs-ref",ne="backstage.io/techdocs-entity",Xe=(0,x.A)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ze(i){var a,o,s,l,c;const{variant:d}=i,f=(0,re.n)(),j=Xe(),{entity:n}=(0,ce.tN)(),ie=(0,Y.gf)(K.Y),q=(0,Y.gf)(ve.v),W=(0,Y.gf)(ye.k),B=(0,Y.gf)(ge.m),D=(0,le.S)(pe.UJ),G=(0,le.S)(pe.Zg),{allowed:_}=Fe(Ye.tS),R=be(n,ie),M=(a=n.metadata.annotations)===null||a===void 0?void 0:a[g.P];let O;if(!((o=n.metadata.annotations)===null||o===void 0)&&o[ne])try{var z;O=(0,b.KU)((z=n.metadata.annotations)===null||z===void 0?void 0:z[ne])}catch{O=void 0}const ee={label:"View Source",disabled:!R,icon:(0,t.jsx)(fe,{type:R==null?void 0:R.integrationType}),href:R==null?void 0:R.locationTargetUrl},J={label:"View TechDocs",disabled:!(!((s=n.metadata.annotations)===null||s===void 0)&&s[Qe]||!((l=n.metadata.annotations)===null||l===void 0)&&l[ne])||!D,icon:(0,t.jsx)(we.A,{}),href:D&&D(O?{namespace:O.namespace||g.oQ,kind:O.kind,name:O.name}:{namespace:n.metadata.namespace||g.oQ,kind:n.kind,name:n.metadata.name})},E=[ee,J];if(Ge(n)){var V;const se=(V=f.getSystemIcon("scaffolder"))!==null&&V!==void 0?V:Se.A,et={label:"Launch Template",icon:(0,t.jsx)(se,{}),disabled:!G,href:G&&G({templateName:n.metadata.name,namespace:n.metadata.namespace||g.oQ})};E.push(et)}let ae="";d==="gridItem"?ae=j.gridItemCard:d==="fullHeight"&&(ae=j.fullHeightCard);let oe="";d==="gridItem"?oe=j.gridItemCardContent:d==="fullHeight"&&(oe=j.fullHeightCardContent);const H=(c=n.metadata.annotations)===null||c===void 0?void 0:c[I.Eo],qe=(H==null?void 0:H.startsWith("url:"))||(H==null?void 0:H.startsWith("file:")),_e=(0,p.useCallback)(async()=>{try{await q.refreshEntity((0,b.U2)(n)),W.post({message:"Refresh scheduled",severity:"info",display:"transient"})}catch(se){B.post(se)}},[q,W,B,n]);return(0,t.jsxs)(k.A,{className:ae,children:[(0,t.jsx)(U.A,{title:"About",action:(0,t.jsxs)(t.Fragment,{children:[qe&&_&&(0,t.jsx)($.A,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:_e,children:(0,t.jsx)(ke.A,{})}),(0,t.jsx)($.A,{component:T.N_,"aria-label":"Edit",disabled:!M,title:"Edit Metadata",to:M!=null?M:"#",children:(0,t.jsx)(Ie.A,{})})]}),subheader:(0,t.jsx)(y,{links:E})}),(0,t.jsx)(P.A,{}),(0,t.jsx)(N.A,{className:oe,children:(0,t.jsx)(ue,{entity:n})})]})}},18750:function(F,C,e){e.d(C,{m:function(){return v}});var t=e(31085),g=e(24709),I=e(44913),b=e(14041),k=e(10394),N=e(72501),U=e(58837),P=e(23127),$=e(72072);const x=(0,U.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function T(u){const{href:h,text:A,Icon:S}=u,L=x();return(0,t.jsxs)(k.A,{display:"flex",children:[(0,t.jsx)(k.A,{mr:1,className:L.svgIcon,children:(0,t.jsx)(N.A,{component:"div",children:S?(0,t.jsx)(S,{}):(0,t.jsx)(P.A,{})})}),(0,t.jsx)(k.A,{flexGrow:"1",children:(0,t.jsx)($.N_,{to:h,target:"_blank",rel:"noopener",children:A||h})})]})}var p=e(5893);const r={xs:1,sm:1,md:1,lg:2,xl:3};function m(u){const h=[(0,p.A)(y=>y.breakpoints.up("xl"))?"xl":null,(0,p.A)(y=>y.breakpoints.up("lg"))?"lg":null,(0,p.A)(y=>y.breakpoints.up("md"))?"md":null,(0,p.A)(y=>y.breakpoints.up("sm"))?"sm":null,(0,p.A)(y=>y.breakpoints.up("xs"))?"xs":null];let A=1;if(typeof u=="number")A=u;else{var S;const y=(S=h.find(K=>K!==null))!==null&&S!==void 0?S:"xs";var L;A=(L=u==null?void 0:u[y])!==null&&L!==void 0?L:r[y]}return A}function v(u){const{items:h,cols:A=void 0}=u,S=m(A);return(0,t.jsx)(g.A,{rowHeight:"auto",cols:S,children:h.map(({text:L,href:y,Icon:K},te)=>(0,t.jsx)(I.A,{children:(0,t.jsx)(T,{href:y,text:L!=null?L:y,Icon:K})},te))})}},36989:function(F,C,e){e.d(C,{J:function(){return p}});var t=e(72427),g=e(96824);function I(r,m){return r.name===m.name}function b(r,m){return"resourceType"in r?!m||r.resourceType===m:!1}function k(r){return r.attributes.action==="create"}function N(r){return r.attributes.action==="read"}function U(r){return r.attributes.action==="update"}function P(r){return r.attributes.action==="delete"}function $(r){return{authorize:async(m,v)=>await r.authorize(m,v),authorizeConditional(m,v){const u=m;return r.authorize(u,v)}}}var x=e(54241),T=e(68721);function p(r){const m=(0,t.gf)(g.x),{data:v,error:u}=(0,T.Ay)(r,async h=>{if(b(h.permission)&&!h.resourceRef)return x.b.DENY;const{result:A}=await m.authorize(h);return A});return u?{error:u,loading:!1,allowed:!1}:v===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:v===x.b.ALLOW}}}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1833],{60413:function(F,C,e){e.d(C,{C4:function(){return b},tS:function(){return N}});function t({name:T,attributes:p,resourceType:r}){return r?{type:"resource",name:T,attributes:p,resourceType:r}:{type:"basic",name:T,attributes:p}}const g="catalog-entity",I=t({name:"catalog.entity.read",attributes:{action:"read"},resourceType:g}),b=t({name:"catalog.entity.create",attributes:{action:"create"}}),k=t({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:g}),N=t({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:g}),U=t({name:"catalog.location.read",attributes:{action:"read"}}),P=t({name:"catalog.location.create",attributes:{action:"create"}}),$=t({name:"catalog.location.delete",attributes:{action:"delete"}}),x=[I,b,k,N,U,P,$]},99538:function(F,C,e){e.d(C,{T7:function(){return P},TY:function(){return T},tN:function(){return x}});var t=e(31085),g=e(6820),I=e(25862),b=e(43836),k=e(10602),N=e(14041);const U=(0,b.tK)("entity-context"),P=p=>{const{children:r,entity:m,loading:v,error:u,refresh:h}=p,A={entity:m,loading:v,error:u,refresh:h};return(0,t.jsx)(U.Provider,{value:(0,k.B)({1:A}),children:(0,t.jsx)(I.Ig,{attributes:{...m?{entityRef:(0,g.U2)(m)}:void 0},children:r})})},$=p=>_jsx(P,{entity:p.entity,loading:!p.entity,error:void 0,refresh:void 0,children:p.children});function x(){const p=(0,b.qO)("entity-context");if(!p)throw new Error("Entity context is not available");const r=p.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");if(!r.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:r.entity}}function T(){const p=(0,b.qO)("entity-context");if(!p)throw new Error("Entity context is not available");const r=p.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");const{entity:m,loading:v,error:u,refresh:h}=r;return{entity:m,loading:v,error:u,refresh:h}}},61833:function(F,C,e){e.r(C),e.d(C,{AboutCard:function(){return Ze},AboutContent:function(){return ue},AboutField:function(){return w}});var t=e(31085),g=e(72348),I=e(17736),b=e(6820),k=e(40703),N=e(48653),U=e(45685),P=e(37197),$=e(29365),x=e(58837),T=e(72072),p=e(14041),r=e(53373),m=e.n(r),v=e(86613),u=e(10394),h=e(72501);const A=(0,x.A)(i=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:i.palette.text.secondary,cursor:"default"},primary:{color:i.palette.primary.main},secondary:{color:i.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:i.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function S({color:i="primary",disabled:a=!1,href:o="#",icon:s=(0,t.jsx)(v.A,{}),label:l,onClick:c,title:d}){const f=A();return a?(0,t.jsxs)(u.A,{title:d,className:m()(f.link,f.disabled),children:[s,(0,t.jsx)(h.A,{variant:"caption",component:"span",className:f.label,children:l})]}):(0,t.jsxs)(T.N_,{title:d,className:m()(f.link,f[i]),to:o,onClick:c,children:[s,(0,t.jsx)(h.A,{variant:"caption",component:"span",className:f.label,children:l})]})}const L=(0,x.A)(i=>({links:{margin:i.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:i.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function y(i){const{links:a}=i,o=L();return(0,t.jsx)("nav",{className:o.links,children:a.map((s,l)=>(0,t.jsx)(S,{...s},l+1))})}var K=e(41158),te=e(13660),re=e(82266);const fe=i=>{const{type:a}=i,o=(0,re.n)(),s=te.A;var l;const c=a&&(l=o.getSystemIcon(a))!==null&&l!==void 0?l:s;return(0,t.jsx)(c,{})};var Y=e(72427),ye=e(36017),ge=e(39837),le=e(9222),ce=e(99538),ve=e(7341),de=e(78692);function be(i,a){var o;const s=(o=i.metadata.annotations)===null||o===void 0?void 0:o[I.I4];if(s)try{const l=(0,de.aY)(s),c=a.byUrl(l.target);return{locationTargetUrl:l.target,integrationType:c==null?void 0:c.type}}catch{return}}var pe=e(95203),Q=e(51372),X=e(67871),Z=e(34428),xe=e(67720),me=e(42899),Ae=e(4650),je=e(82442);const Te=(0,x.A)(i=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:i.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(i){const{label:a,value:o,gridSizes:s,children:l}=i,c=Te(),d=(0,je.O)(l,j=>j.getElements()),f=d.length>0?d:(0,t.jsx)(h.A,{variant:"body2",className:c.value,children:o||"unknown"});return(0,t.jsxs)(me.A,{item:!0,...s,children:[(0,t.jsx)(h.A,{variant:"h2",className:c.label,children:a}),f]})}var Le=e(18750);const Ee=(0,x.A)({description:{wordBreak:"break-word"}});function Ce(i,a,o){if(a==="url"||i.includes("://"))return i;const s=o.type==="file"?`file://${o.target}`:o.target;return a==="file"||o.type==="file"?new URL(i,s).href:s}function ue(i){var a,o,s,l,c,d,f,j;const{entity:n}=i,ie=Ee(),q=n.kind.toLocaleLowerCase("en-US")==="system",W=n.kind.toLocaleLowerCase("en-US")==="resource",B=n.kind.toLocaleLowerCase("en-US")==="component",D=n.kind.toLocaleLowerCase("en-US")==="api",G=n.kind.toLocaleLowerCase("en-US")==="template",_=n.kind.toLocaleLowerCase("en-US")==="location",R=n.kind.toLocaleLowerCase("en-US")==="group",M=(0,X.t)(n,Q.jn,{kind:"system"}),O=(0,X.t)(n,Q.jn,{kind:"component"}),z=(0,X.t)(n,Q.jn,{kind:"domain"}),ee=(0,X.t)(n,Q.vv);let J;try{J=(0,de.Cr)(n)}catch{J=void 0}return(0,t.jsxs)(me.A,{container:!0,children:[(0,t.jsx)(w,{label:"Description",gridSizes:{xs:12},children:(0,t.jsx)(Ae.h,{className:ie.description,content:(n==null||(a=n.metadata)===null||a===void 0?void 0:a.description)||"No description"})}),(0,t.jsx)(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:ee.length>0&&(0,t.jsx)(Z.i,{entityRefs:ee,defaultKind:"group"})}),(q||z.length>0)&&(0,t.jsx)(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:z.length>0&&(0,t.jsx)(Z.i,{entityRefs:z,defaultKind:"domain"})}),(D||B||W||M.length>0)&&(0,t.jsx)(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:M.length>0&&(0,t.jsx)(Z.i,{entityRefs:M,defaultKind:"system"})}),B&&O.length>0&&(0,t.jsx)(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,t.jsx)(Z.i,{entityRefs:O,defaultKind:"component"})}),(D||B||W||G||R||_||typeof(n==null||(o=n.spec)===null||o===void 0?void 0:o.type)=="string")&&(0,t.jsx)(w,{label:"Type",value:n==null||(s=n.spec)===null||s===void 0?void 0:s.type,gridSizes:{xs:12,sm:6,lg:4}}),(D||B||typeof(n==null||(l=n.spec)===null||l===void 0?void 0:l.lifecycle)=="string")&&(0,t.jsx)(w,{label:"Lifecycle",value:n==null||(c=n.spec)===null||c===void 0?void 0:c.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,t.jsx)(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:((n==null||(d=n.metadata)===null||d===void 0?void 0:d.tags)||[]).map(E=>(0,t.jsx)(xe.A,{size:"small",label:E},E))}),_&&((n==null||(f=n.spec)===null||f===void 0?void 0:f.targets)||(n==null||(j=n.spec)===null||j===void 0?void 0:j.target))&&(0,t.jsx)(w,{label:"Targets",gridSizes:{xs:12},children:(0,t.jsx)(Le.m,{cols:1,items:(n.spec.targets||[n.spec.target]).map(E=>E).map(E=>{var V;return{text:E,href:Ce(E,(n==null||(V=n.spec)===null||V===void 0?void 0:V.type)||"unknown",J)}})})})]})}var ke=e(74011),Se=e(25534),we=e(82451),Ie=e(75625),Pe=e(11601),Re=e.n(Pe),Oe=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),Ne=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Ue=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$e=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const he=new Map,De=[Ne,Oe,Ue,$e];function Me(i){if(!(i!=null&&i.length))throw new TypeError("Unknown error");const a=i[0];throw new TypeError(`${a.instancePath||"<root>"} ${a.message}${a.params?` - ${Object.entries(a.params).map(([o,s])=>`${o}: ${s}`).join(", ")}`:""}`)}function Be(i,a={}){var o;const s=(o=a==null?void 0:a.disableCache)!==null&&o!==void 0?o:!1,l=s?"":JSON.stringify(i);if(!s){const j=he.get(l);if(j)return j}const c=ze(i),d=new(Re())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});c.length&&d.addSchema(c,void 0,void 0,!0);const f=d.compile(i);return s||he.set(l,f),f}function ze(i){if(typeof i!="object")return[];const a=new Set;i.$id&&a.add(i.$id);const o=new Array,s=[i];for(;s.length;){const l=s.pop();for(const c of Ve(l))if(!a.has(c)){a.add(c);const d=De.find(f=>f.$id===c);d&&(o.push(d),s.push(d))}}return o}function*Ve(i){const a=[i];for(;a.length;){const o=a.pop();if(typeof o=="object"&&o)for(const[s,l]of Object.entries(o))s==="$ref"&&typeof l=="string"?yield l.split("#")[0]:a.push(l)}}function He(i){const a=Be(i);return o=>{var s;if(a(o)===!0)return o;const c=(s=a.errors)===null||s===void 0?void 0:s.filter(d=>["/kind","/apiVersion"].includes(d.instancePath));if(c!=null&&c.length&&c.every(d=>d.keyword==="enum"))return!1;throw Me(a.errors)}}var Ke=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"presentation":{"type":"object","description":"A way to redefine the labels for actionable buttons.","properties":{"backButtonText":{"type":"string","description":"A button which return the user to one step back."},"createButtonText":{"type":"string","description":"A button which start the execution of the template."},"reviewButtonText":{"type":"string","description":"A button which open the review step to verify the input prior to start the execution."}}},"EXPERIMENTAL_recovery":{"type":"object","description":"A task recovery section.","properties":{"EXPERIMENTAL_strategy":{"type":"string","description":"Recovery strategy for your task (none or startOver). By default none"}}},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}');const We=He(Ke),tt={async check(i){return We(i)===i}},Ge=i=>i.apiVersion==="scaffolder.backstage.io/v1beta3"&&i.kind==="Template";var Je=e(36989);function Fe(i){const{entity:a,loading:o,error:s}=(0,ce.TY)(),{allowed:l,loading:c,error:d}=(0,Je.J)({permission:i,resourceRef:a?(0,b.U2)(a):void 0});return o||c?{loading:!0,allowed:!1}:s?{loading:!1,allowed:!1,error:s}:{loading:!1,allowed:l,error:d}}var Ye=e(60413);const Qe="backstage.io/techdocs-ref",ne="backstage.io/techdocs-entity",Xe=(0,x.A)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ze(i){var a,o,s,l,c;const{variant:d}=i,f=(0,re.n)(),j=Xe(),{entity:n}=(0,ce.tN)(),ie=(0,Y.gf)(K.Y),q=(0,Y.gf)(ve.v),W=(0,Y.gf)(ye.k),B=(0,Y.gf)(ge.m),D=(0,le.S)(pe.UJ),G=(0,le.S)(pe.Zg),{allowed:_}=Fe(Ye.tS),R=be(n,ie),M=(a=n.metadata.annotations)===null||a===void 0?void 0:a[g.P];let O;if(!((o=n.metadata.annotations)===null||o===void 0)&&o[ne])try{var z;O=(0,b.KU)((z=n.metadata.annotations)===null||z===void 0?void 0:z[ne])}catch{O=void 0}const ee={label:"View Source",disabled:!R,icon:(0,t.jsx)(fe,{type:R==null?void 0:R.integrationType}),href:R==null?void 0:R.locationTargetUrl},J={label:"View TechDocs",disabled:!(!((s=n.metadata.annotations)===null||s===void 0)&&s[Qe]||!((l=n.metadata.annotations)===null||l===void 0)&&l[ne])||!D,icon:(0,t.jsx)(we.A,{}),href:D&&D(O?{namespace:O.namespace||g.oQ,kind:O.kind,name:O.name}:{namespace:n.metadata.namespace||g.oQ,kind:n.kind,name:n.metadata.name})},E=[ee,J];if(Ge(n)){var V;const se=(V=f.getSystemIcon("scaffolder"))!==null&&V!==void 0?V:Se.A,et={label:"Launch Template",icon:(0,t.jsx)(se,{}),disabled:!G,href:G&&G({templateName:n.metadata.name,namespace:n.metadata.namespace||g.oQ})};E.push(et)}let ae="";d==="gridItem"?ae=j.gridItemCard:d==="fullHeight"&&(ae=j.fullHeightCard);let oe="";d==="gridItem"?oe=j.gridItemCardContent:d==="fullHeight"&&(oe=j.fullHeightCardContent);const H=(c=n.metadata.annotations)===null||c===void 0?void 0:c[I.Eo],qe=(H==null?void 0:H.startsWith("url:"))||(H==null?void 0:H.startsWith("file:")),_e=(0,p.useCallback)(async()=>{try{await q.refreshEntity((0,b.U2)(n)),W.post({message:"Refresh scheduled",severity:"info",display:"transient"})}catch(se){B.post(se)}},[q,W,B,n]);return(0,t.jsxs)(k.A,{className:ae,children:[(0,t.jsx)(U.A,{title:"About",action:(0,t.jsxs)(t.Fragment,{children:[qe&&_&&(0,t.jsx)($.A,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:_e,children:(0,t.jsx)(ke.A,{})}),(0,t.jsx)($.A,{component:T.N_,"aria-label":"Edit",disabled:!M,title:"Edit Metadata",to:M!=null?M:"#",children:(0,t.jsx)(Ie.A,{})})]}),subheader:(0,t.jsx)(y,{links:E})}),(0,t.jsx)(P.A,{}),(0,t.jsx)(N.A,{className:oe,children:(0,t.jsx)(ue,{entity:n})})]})}},18750:function(F,C,e){e.d(C,{m:function(){return v}});var t=e(31085),g=e(24709),I=e(44913),b=e(14041),k=e(10394),N=e(72501),U=e(58837),P=e(23127),$=e(72072);const x=(0,U.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function T(u){const{href:h,text:A,Icon:S}=u,L=x();return(0,t.jsxs)(k.A,{display:"flex",children:[(0,t.jsx)(k.A,{mr:1,className:L.svgIcon,children:(0,t.jsx)(N.A,{component:"div",children:S?(0,t.jsx)(S,{}):(0,t.jsx)(P.A,{})})}),(0,t.jsx)(k.A,{flexGrow:"1",children:(0,t.jsx)($.N_,{to:h,target:"_blank",rel:"noopener",children:A||h})})]})}var p=e(5893);const r={xs:1,sm:1,md:1,lg:2,xl:3};function m(u){const h=[(0,p.A)(y=>y.breakpoints.up("xl"))?"xl":null,(0,p.A)(y=>y.breakpoints.up("lg"))?"lg":null,(0,p.A)(y=>y.breakpoints.up("md"))?"md":null,(0,p.A)(y=>y.breakpoints.up("sm"))?"sm":null,(0,p.A)(y=>y.breakpoints.up("xs"))?"xs":null];let A=1;if(typeof u=="number")A=u;else{var S;const y=(S=h.find(K=>K!==null))!==null&&S!==void 0?S:"xs";var L;A=(L=u==null?void 0:u[y])!==null&&L!==void 0?L:r[y]}return A}function v(u){const{items:h,cols:A=void 0}=u,S=m(A);return(0,t.jsx)(g.A,{rowHeight:"auto",cols:S,children:h.map(({text:L,href:y,Icon:K},te)=>(0,t.jsx)(I.A,{children:(0,t.jsx)(T,{href:y,text:L!=null?L:y,Icon:K})},te))})}},36989:function(F,C,e){e.d(C,{J:function(){return p}});var t=e(72427),g=e(96824);function I(r,m){return r.name===m.name}function b(r,m){return"resourceType"in r?!m||r.resourceType===m:!1}function k(r){return r.attributes.action==="create"}function N(r){return r.attributes.action==="read"}function U(r){return r.attributes.action==="update"}function P(r){return r.attributes.action==="delete"}function $(r){return{authorize:async(m,v)=>await r.authorize(m,v),authorizeConditional(m,v){const u=m;return r.authorize(u,v)}}}var x=e(54241),T=e(68721);function p(r){const m=(0,t.gf)(g.x),{data:v,error:u}=(0,T.Ay)(r,async h=>{if(b(h.permission)&&!h.resourceRef)return x.b.DENY;const{result:A}=await m.authorize(h);return A});return u?{error:u,loading:!1,allowed:!1}:v===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:v===x.b.ALLOW}}}}]);})();
2
2
 
3
- //# sourceMappingURL=1833.4c60d008.chunk.js.map
3
+ //# sourceMappingURL=1833.22027501.chunk.js.map