UNPKG

@fntio/infra-client

Version:

Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.

2 lines (1 loc) • 1.52 kB
import{a as m}from"./chunk-2DD7CZB4.js";import{a as l}from"./chunk-BG475WXG.js";import{a as f}from"./chunk-KCJ5HNXP.js";import{Nb as t,Pb as d,R as s,Rb as p,g as n,h as u,p as a}from"./chunk-FYA6QUPZ.js";import{e as c}from"./chunk-WFIHWVQO.js";function w(e){return{ensure(){},label:r=>e[r]??r}}function j(e={}){return{ensure(){},colorOf:(r,o)=>e[`${r}#${o}`]??null}}function V(){return{success(){},error(){},dismiss(){}}}function h(e={}){let r=t(e);return{provide:d,useValue:{queryParamMap:n(r),paramMap:n(t({})),snapshot:{queryParamMap:r,paramMap:t({})}}}}function D(){return{provide:p,useValue:{navigate:()=>c(null,null,function*(){return!0})}}}function M(e,r={}){let o={load(){}};for(let[i,g]of Object.entries(e))o[i]=s(g);return Object.assign(o,r)}function I(e=90){return{provide:f,useValue:{config:{branding:{projectName:"Infra Client"},personalAccessTokens:{enabled:!0,maxLifetimeDays:e}},branding:s({projectName:"Infra Client"})}}}function P(e={}){let r=(o,i)=>e.error?u(()=>({error:{message:e.error}})):o===null?a:n(o??i);return{provide:m,useValue:{list:()=>r(e.mine,[]),adminList:()=>r(e.all,[]),create:()=>e.created?n(e.created):a,revoke:()=>n(void 0),adminRevoke:()=>n(void 0),expiryFeed:()=>n({expiring:[],expired:[]}),markExpirySeen:()=>n(0)}}}function E(e={}){return{provide:l,useValue:{info:()=>n({enabled:!0,controlUrl:null,sites:e.sites??[]}),devices:()=>n({devices:e.devices??[],unreachable:[]}),removeDevice:()=>n(void 0)}}}export{w as a,j as b,V as c,h as d,D as e,M as f,I as g,P as h,E as i};