@janus-idp/backstage-plugin-jfrog-artifactory
Version:
The Jfrog Artifactory plugin displays information about your container images within the Jfrog Artifactory registry.
2 lines • 10.2 kB
JavaScript
;(self.webpackChunkjanus_idp_backstage_plugin_jfrog_artifactory=self.webpackChunkjanus_idp_backstage_plugin_jfrog_artifactory||[]).push([[1638],{11638:(e,t,n)=>{n.r(t),n.d(t,{AnalyticsContext:()=>l,FeatureFlagState:()=>i.F,SessionState:()=>i.S,alertApiRef:()=>i.l,analyticsApiRef:()=>i.a,appThemeApiRef:()=>i.n,atlassianAuthApiRef:()=>i.k,attachComponentData:()=>b,bitbucketAuthApiRef:()=>i.i,bitbucketServerAuthApiRef:()=>i.j,configApiRef:()=>i.p,createApiFactory:()=>p,createApiRef:()=>i.c,createComponentExtension:()=>B,createExternalRouteRef:()=>G,createPlugin:()=>H,createReactExtension:()=>T,createRoutableExtension:()=>z,createRouteRef:()=>C,createSubRouteRef:()=>P,discoveryApiRef:()=>i.q,errorApiRef:()=>i.r,featureFlagsApiRef:()=>i.f,fetchApiRef:()=>i.s,getComponentData:()=>y,githubAuthApiRef:()=>i.d,gitlabAuthApiRef:()=>i.e,googleAuthApiRef:()=>i.g,identityApiRef:()=>i.t,microsoftAuthApiRef:()=>i.m,oauthRequestApiRef:()=>i.x,oktaAuthApiRef:()=>i.o,oneloginAuthApiRef:()=>i.h,storageApiRef:()=>i.y,useAnalytics:()=>m,useApi:()=>i.u,useApiHolder:()=>i.b,useApp:()=>g,useElementFilter:()=>U,useRouteRef:()=>O,useRouteRefParams:()=>D,vmwareCloudAuthApiRef:()=>i.v,withApis:()=>i.w});var r=n(64218),o=n(95478),a=n.n(o),i=n(5124),s=n(42469);const u=(0,r.createVersionedContext)("analytics-context"),c=()=>{const e=(0,o.useContext)(u);if(void 0===e)return{routeRef:"unknown",pluginId:"root",extension:"App"};const t=e.atVersion(1);if(void 0===t)throw new Error("No context found for version 1.");return t},l=e=>{const{attributes:t,children:n}=e,o={...c(),...t},i=(0,r.createVersionedValueMap)({1:o});return a().createElement(u.Provider,{value:i},n)};function p(e,t){return"id"in e?{api:e,deps:{},factory:()=>t}:e}const f=(0,r.getOrCreateGlobalSingleton)("core-plugin-api:analytics-tracker-events",(()=>({mostRecentGatheredNavigation:void 0,mostRecentRoutableExtensionRender:void 0,beforeUnloadRegistered:!1}))),h="_ROUTABLE-EXTENSION-RENDERED";class d{constructor(e,t={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=e,this.context=t,f.beforeUnloadRegistered||(addEventListener("beforeunload",(()=>{f.mostRecentGatheredNavigation&&(this.analyticsApi.captureEvent({...f.mostRecentGatheredNavigation,...f.mostRecentRoutableExtensionRender}),f.mostRecentGatheredNavigation=void 0,f.mostRecentRoutableExtensionRender=void 0)}),{once:!0,passive:!0}),f.beforeUnloadRegistered=!0)}setContext(e){this.context=e}captureEvent(e,t,{value:n,attributes:r}={}){const{_routeNodeType:o,...a}=this.context;if(e!==h){if(f.mostRecentGatheredNavigation){try{this.analyticsApi.captureEvent({...f.mostRecentGatheredNavigation,...f.mostRecentRoutableExtensionRender})}catch(e){console.warn("Error during analytics event capture. %o",e)}f.mostRecentGatheredNavigation=void 0,f.mostRecentRoutableExtensionRender=void 0}if("navigate"!==e||"gathered"!==o||"root"!==a.pluginId)try{this.analyticsApi.captureEvent({action:e,subject:t,value:n,attributes:r,context:a})}catch(e){console.warn("Error during analytics event capture. %o",e)}else f.mostRecentGatheredNavigation={action:e,subject:t,value:n,attributes:r,context:a}}else f.mostRecentGatheredNavigation&&(f.mostRecentRoutableExtensionRender={context:{...a,extension:"App"}})}}function m(){const e=(0,o.useRef)(null),t=c(),n=function(){try{return(0,i.u)(i.a)}catch{return{captureEvent:()=>{}}}}(),r=(null===e.current&&(e.current=new d(n)),e.current);return r.setContext(t),r}const g=()=>{const e=(0,r.useVersionedContext)("app-context");if(!e)throw new Error("App context is not available");const t=e.atVersion(1);if(!t)throw new Error("AppContext v1 not available");return t},R=(0,r.getOrCreateGlobalSingleton)("component-data-store",(()=>new WeakMap)),v="__backstage_data";function b(e,t,n){var r;const o=e;let a=null!=(r=o[v])?r:R.get(e);if(a||(a={map:new Map},Object.defineProperty(o,v,{enumerable:!1,configurable:!0,writable:!1,value:a}),R.set(e,a)),a.map.has(t)){const n=e.displayName||e.name;throw new Error(`Attempted to attach duplicate data "${t}" to component "${n}"`)}a.map.set(t,n)}function y(e,t){var n;if(!e)return;const r=e.type;if(!r)return;const o=null!=(n=r[v])?n:R.get(r);return o?o.map.get(t):void 0}const E=(0,r.getOrCreateGlobalSingleton)("route-ref-type",(()=>Symbol("route-ref-type")));var w,A=Object.defineProperty;class x{constructor(e,t){var n;this.id=e,this.params=t,((e,t,n)=>{t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(this,"symbol"!=typeof(n=w)?n+"":n,"absolute")}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}function C(e){var t;return new x(e.id,null!=(t=e.params)?t:[])}w=E;var S,k=Object.defineProperty;const N=/^\w+$/;class F{constructor(e,t,n,r){var o;this.id=e,this.path=t,this.parent=n,this.params=r,((e,t,n)=>{t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(this,"symbol"!=typeof(o=S)?o+"":o,"sub")}toString(){return`routeRef{type=sub,id=${this.id}}`}}function P(e){const{id:t,path:n,parent:r}=e,o=n.split("/").filter((e=>e.startsWith(":"))).map((e=>e.substring(1))),a=[...r.params,...o];if(r.params.some((e=>o.includes(e))))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!n.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${n}'`);if(n.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${n}'`);for(const e of o)if(!N.test(e))throw new Error(`SubRouteRef path has invalid param, got '${e}'`);return new F(t,n,r,a)}S=E;var _,j=Object.defineProperty;class ${constructor(e,t,n){var r;this.id=e,this.params=t,this.optional=n,((e,t,n)=>{t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(this,"symbol"!=typeof(r=_)?r+"":r,"external")}toString(){return`routeRef{type=external,id=${this.id}}`}}function G(e){var t;return new $(e.id,null!=(t=e.params)?t:[],Boolean(e.optional))}function O(e){const{pathname:t}=(0,s.useLocation)(),n=(0,r.useVersionedContext)("routing-context");if(!n)throw new Error("Routing context is not available");const a=n.atVersion(1),i=(0,o.useMemo)((()=>a&&a.resolve(e,{pathname:t})),[a,e,t]);if(!n)throw new Error("useRouteRef used outside of routing context");if(!a)throw new Error("RoutingContext v1 not available");const u="optional"in e&&e.optional;if(!i&&!u)throw new Error(`No path for ${e}`);return i}function D(e){return(0,s.useParams)()}_=E;var V=Object.defineProperty,I=(e,t,n)=>(((e,t,n)=>{t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class M extends a().Component{constructor(){super(...arguments),I(this,"state",{error:void 0}),I(this,"handleErrorReset",(()=>{this.setState({error:void 0})}))}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state,{app:t,plugin:n}=this.props,{ErrorBoundaryFallback:r}=t.getComponents();return e?a().createElement(r,{error:e,resetError:this.handleErrorReset,plugin:n}):this.props.children}}function z(e){const{component:t,mountPoint:n,name:r}=e;return T({component:{lazy:()=>t().then((e=>{const t=t=>{const r=m();try{O(n)}catch(e){if("object"==typeof e&&null!==e){const{message:t}=e;if("string"==typeof t&&t.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${n} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw e}return(0,o.useEffect)((()=>{r.captureEvent(h,"")}),[r]),a().createElement(e,{...t})},i=r||e.displayName||e.name||"LazyComponent";return t.displayName=`RoutableExtension(${i})`,t}),(e=>t=>{const n=g(),{BootErrorPage:r}=n.getComponents();return a().createElement(r,{step:"load-chunk",error:e})}))},data:{"core.mountPoint":n},name:r})}function B(e){const{component:t,name:n}=e;return T({component:t,name:n})}function T(e){const{data:t={},name:n}=e;let r;if(n||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name."),"lazy"in e.component){const t=e.component.lazy;r=(0,o.lazy)((()=>t().then((e=>({default:e})))))}else r=e.component.sync;const i=n||r.displayName||r.name||"Component";return{expose(e){const s=i=>{const s=g(),{Progress:u}=s.getComponents(),c=null==t?void 0:t["core.mountPoint"];return a().createElement(o.Suspense,{fallback:a().createElement(u,null)},a().createElement(M,{app:s,plugin:e},a().createElement(l,{attributes:{pluginId:e.getId(),...n&&{extension:n},...c&&{routeRef:c.id}}},a().createElement(r,{...i}))))};b(s,"core.plugin",e),b(s,"core.extensionName",n);for(const[e,n]of Object.entries(t))b(s,e,n);return s.displayName=`Extension(${i})`,s}}}function W(e,t,n,r){return o.Children.toArray(e).flatMap((e=>{if(!(0,o.isValidElement)(e))return[];if(e.type===o.Fragment)return W(e.props.children,t,n,r);if(y(e,"core.featureFlagged")){const o=e.props;return("with"in o?t.isActive(o.with):!t.isActive(o.without))?W(e.props.children,t,n,r):[]}if(void 0===n||n(e))return[e];if(r)throw new Error(r);return W(e.props.children,t,n,r)}))}class L{constructor(e,t){this.node=e,this.featureFlagsApi=t}selectByComponentData(e){const t=W(this.node,this.featureFlagsApi,(t=>void 0!==y(t,e.key)),e.withStrictError);return new L(t,this.featureFlagsApi)}findComponentData(e){return W(this.node,this.featureFlagsApi,(t=>void 0!==y(t,e.key))).map((t=>y(t,e.key))).filter((e=>void 0!==e))}getElements(){return W(this.node,this.featureFlagsApi)}}function U(e,t,n=[]){const r=(0,i.u)(i.f),a=new L(e,r);return(0,o.useMemo)((()=>t(a)),[e,...n])}class q{constructor(e){this.config=e}getId(){return this.config.id}getApis(){var e;return null!=(e=this.config.apis)?e:[]}getFeatureFlags(){var e,t;return null!=(t=null==(e=this.config.featureFlags)?void 0:e.slice())?t:[]}get routes(){var e;return null!=(e=this.config.routes)?e:{}}get externalRoutes(){var e;return null!=(e=this.config.externalRoutes)?e:{}}provide(e){return e.expose(this)}toString(){return`plugin{${this.config.id}}`}}function H(e){return new q(e)}}}]);
//# sourceMappingURL=1638.b704b4c3.chunk.js.map