gemi 0.9.2 → 0.10.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.
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gemi.js +35394 -0
- package/dist/bin/gemi.js.map +94 -0
- package/dist/broadcasting/index.js +1 -1
- package/dist/chunk-0gr0rj7r.js +4 -0
- package/dist/{chunk-b8d5htph.js.map → chunk-0gr0rj7r.js.map} +2 -2
- package/dist/chunk-18anmejw.js +13 -0
- package/dist/{chunk-t6h32cqw.js.map → chunk-18anmejw.js.map} +4 -4
- package/dist/chunk-35zcs0pk.js +4 -0
- package/dist/{chunk-d1jvc299.js.map → chunk-35zcs0pk.js.map} +5 -5
- package/dist/chunk-3hb4j4tb.js +11 -0
- package/dist/{chunk-t0br3jky.js.map → chunk-3hb4j4tb.js.map} +2 -2
- package/dist/chunk-3vm1nb1w.js +11 -0
- package/dist/{chunk-avqfpn5v.js.map → chunk-3vm1nb1w.js.map} +5 -5
- package/dist/{chunk-vvdgy5ba.js → chunk-5f0rzak7.js} +3 -3
- package/dist/{chunk-vvdgy5ba.js.map → chunk-5f0rzak7.js.map} +1 -1
- package/dist/{chunk-wrtx683g.js → chunk-63hxfm31.js} +3 -3
- package/dist/{chunk-wrtx683g.js.map → chunk-63hxfm31.js.map} +1 -1
- package/dist/chunk-767yrc2c.js +4 -0
- package/dist/{chunk-vqpqea57.js.map → chunk-767yrc2c.js.map} +2 -2
- package/dist/chunk-as0ze3hk.js +5 -0
- package/dist/{chunk-6g1mntab.js.map → chunk-as0ze3hk.js.map} +6 -6
- package/dist/chunk-cn143fca.js +6 -0
- package/dist/{chunk-x46drz7r.js.map → chunk-cn143fca.js.map} +2 -2
- package/dist/chunk-e077ya3j.js +22 -0
- package/dist/{chunk-vress81a.js.map → chunk-e077ya3j.js.map} +2 -2
- package/dist/chunk-e21gmk4a.js +4 -0
- package/dist/{chunk-5yex263y.js.map → chunk-e21gmk4a.js.map} +2 -2
- package/dist/{chunk-2myc2s6w.js → chunk-gkzrn1xy.js} +3 -3
- package/dist/{chunk-2myc2s6w.js.map → chunk-gkzrn1xy.js.map} +1 -1
- package/dist/chunk-gzc58n6z.js +4 -0
- package/dist/{chunk-hwaaf04e.js.map → chunk-gzc58n6z.js.map} +2 -2
- package/dist/chunk-hcxp20gw.js +4 -0
- package/dist/{chunk-641dtrzq.js.map → chunk-hcxp20gw.js.map} +2 -2
- package/dist/{chunk-k9katf2f.js → chunk-j61ayndh.js} +2 -2
- package/dist/{chunk-k9katf2f.js.map → chunk-j61ayndh.js.map} +1 -1
- package/dist/chunk-jbnkc3n4.js +4 -0
- package/dist/{chunk-qbvhdtxt.js.map → chunk-jbnkc3n4.js.map} +2 -2
- package/dist/chunk-myntqyk8.js +4 -0
- package/dist/chunk-myntqyk8.js.map +14 -0
- package/dist/chunk-ng7ryvkk.js +4 -0
- package/dist/{chunk-w8eezrzs.js.map → chunk-ng7ryvkk.js.map} +2 -2
- package/dist/chunk-njsvs0gx.js +41 -0
- package/dist/{chunk-8arqqbhx.js.map → chunk-njsvs0gx.js.map} +13 -11
- package/dist/chunk-nshcr6nw.js +4 -0
- package/dist/{chunk-wv5423nm.js.map → chunk-nshcr6nw.js.map} +2 -2
- package/dist/chunk-nyn5gztt.js +4 -0
- package/dist/{chunk-ameyxxdy.js.map → chunk-nyn5gztt.js.map} +5 -5
- package/dist/chunk-rsj6ke1v.js +8 -0
- package/dist/{chunk-36mj8mav.js.map → chunk-rsj6ke1v.js.map} +2 -2
- package/dist/chunk-v0mpng4p.js +4 -0
- package/dist/{chunk-0wqf4729.js.map → chunk-v0mpng4p.js.map} +2 -2
- package/dist/chunk-x02snmef.js +3 -0
- package/dist/chunk-x02snmef.js.map +15 -0
- package/dist/chunk-xd3556sw.js +4 -0
- package/dist/{chunk-9qk0pjxc.js.map → chunk-xd3556sw.js.map} +2 -2
- package/dist/chunk-y2fy75zm.js +4 -0
- package/dist/{chunk-crahc1t6.js.map → chunk-y2fy75zm.js.map} +2 -2
- package/dist/chunk-zjy4ngej.js +5 -0
- package/dist/{chunk-zp1h0k9v.js.map → chunk-zjy4ngej.js.map} +5 -5
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/ClientRouterContext.d.ts +4 -1
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +4 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +35 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/useBreadcrumbs.d.ts +6 -0
- package/dist/client/useBreadcrumbs.d.ts.map +1 -0
- package/dist/client/useNavigate.d.ts.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/index.js +5 -2
- package/dist/facades/index.js.map +2 -2
- package/dist/http/ViewRouter.d.ts +14 -4
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +3 -3
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/server/index.js +6 -6
- package/dist/server/index.js.map +2 -2
- package/dist/services/index.js +63 -3
- package/dist/services/index.js.map +2 -2
- package/dist/services/router/ViewRouterServiceContainer.d.ts +1 -0
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/bin/index.js +0 -35238
- package/dist/chunk-0wqf4729.js +0 -4
- package/dist/chunk-36mj8mav.js +0 -8
- package/dist/chunk-5yex263y.js +0 -4
- package/dist/chunk-641dtrzq.js +0 -4
- package/dist/chunk-6g1mntab.js +0 -4
- package/dist/chunk-8arqqbhx.js +0 -20
- package/dist/chunk-9qk0pjxc.js +0 -4
- package/dist/chunk-ameyxxdy.js +0 -4
- package/dist/chunk-avqfpn5v.js +0 -11
- package/dist/chunk-b8d5htph.js +0 -4
- package/dist/chunk-crahc1t6.js +0 -4
- package/dist/chunk-d1jvc299.js +0 -4
- package/dist/chunk-ek6n8gyv.js +0 -4
- package/dist/chunk-ek6n8gyv.js.map +0 -10
- package/dist/chunk-hwaaf04e.js +0 -4
- package/dist/chunk-hzfj9k0z.js +0 -4
- package/dist/chunk-hzfj9k0z.js.map +0 -14
- package/dist/chunk-qbvhdtxt.js +0 -4
- package/dist/chunk-t0br3jky.js +0 -4
- package/dist/chunk-t6h32cqw.js +0 -5
- package/dist/chunk-vqpqea57.js +0 -4
- package/dist/chunk-vress81a.js +0 -22
- package/dist/chunk-w8eezrzs.js +0 -4
- package/dist/chunk-wv5423nm.js +0 -4
- package/dist/chunk-x46drz7r.js +0 -4
- package/dist/chunk-zp1h0k9v.js +0 -4
package/dist/chunk-0wqf4729.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Xb as Ne,Yb as v}from"./chunk-vvdgy5ba.js";var G=v((Y)=>{Object.defineProperty(Y,"__esModule",{value:!0});Y.default=Qu;var Gu=Ku(import.meta.require("crypto"));function Ku(u){return u&&u.__esModule?u:{default:u}}var z=new Uint8Array(256),n=z.length;function Qu(){if(n>z.length-16)Gu.default.randomFillSync(z),n=0;return z.slice(n,n+=16)}});var J=v((Z)=>{Object.defineProperty(Z,"__esModule",{value:!0});Z.default=void 0;var Wu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;Z.default=Wu});var L=v((g)=>{Object.defineProperty(g,"__esModule",{value:!0});g.default=void 0;var Xu=Yu(J());function Yu(u){return u&&u.__esModule?u:{default:u}}function Zu(u){return typeof u==="string"&&Xu.default.test(u)}var wu=Zu;g.default=wu});var $=v((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.default=void 0;N.unsafeStringify=F;var Ju=gu(L());function gu(u){return u&&u.__esModule?u:{default:u}}var t=[];for(let u=0;u<256;++u)t.push((u+256).toString(16).slice(1));function F(u,e=0){return t[u[e+0]]+t[u[e+1]]+t[u[e+2]]+t[u[e+3]]+"-"+t[u[e+4]]+t[u[e+5]]+"-"+t[u[e+6]]+t[u[e+7]]+"-"+t[u[e+8]]+t[u[e+9]]+"-"+t[u[e+10]]+t[u[e+11]]+t[u[e+12]]+t[u[e+13]]+t[u[e+14]]+t[u[e+15]]}function Du(u,e=0){let r=F(u,e);if(!Ju.default(r))throw TypeError("Stringified UUID is invalid");return r}var Fu=Du;N.default=Fu});var i=v((B)=>{Object.defineProperty(B,"__esModule",{value:!0});B.default=void 0;var Ru=Bu(G()),Cu=$();function Bu(u){return u&&u.__esModule?u:{default:u}}var C,K,Q=0,V=0;function Uu(u,e,r){let l=e&&r||0,d=e||new Array(16);u=u||{};let P=u.node||C,M=u.clockseq!==void 0?u.clockseq:K;if(P==null||M==null){let O=u.random||(u.rng||Ru.default)();if(P==null)P=C=[O[0]|1,O[1],O[2],O[3],O[4],O[5]];if(M==null)M=K=(O[6]<<8|O[7])&16383}let A=u.msecs!==void 0?u.msecs:Date.now(),c=u.nsecs!==void 0?u.nsecs:V+1,_=A-Q+(c-V)/1e4;if(_<0&&u.clockseq===void 0)M=M+1&16383;if((_<0||A>Q)&&u.nsecs===void 0)c=0;if(c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Q=A,V=c,K=M,A+=12219292800000;let E=((A&268435455)*1e4+c)%4294967296;d[l++]=E>>>24&255,d[l++]=E>>>16&255,d[l++]=E>>>8&255,d[l++]=E&255;let a=A/4294967296*1e4&268435455;d[l++]=a>>>8&255,d[l++]=a&255,d[l++]=a>>>24&15|16,d[l++]=a>>>16&255,d[l++]=M>>>8|128,d[l++]=M&255;for(let O=0;O<6;++O)d[l+O]=P[O];return e||Cu.unsafeStringify(d)}var iu=Uu;B.default=iu});var W=v((h)=>{Object.defineProperty(h,"__esModule",{value:!0});h.default=void 0;var hu=mu(L());function mu(u){return u&&u.__esModule?u:{default:u}}function Su(u){if(!hu.default(u))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(u.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(u.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(u.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(u.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(u.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var ku=Su;h.default=ku});var X=v((p)=>{Object.defineProperty(p,"__esModule",{value:!0});p.URL=p.DNS=void 0;p.default=yu;var pu=$(),fu=Hu(W());function Hu(u){return u&&u.__esModule?u:{default:u}}function Tu(u){u=unescape(encodeURIComponent(u));let e=[];for(let r=0;r<u.length;++r)e.push(u.charCodeAt(r));return e}var S="6ba7b810-9dad-11d1-80b4-00c04fd430c8";p.DNS=S;var k="6ba7b811-9dad-11d1-80b4-00c04fd430c8";p.URL=k;function yu(u,e,r){function l(d,P,M,A){var c;if(typeof d==="string")d=Tu(d);if(typeof P==="string")P=fu.default(P);if(((c=P)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let _=new Uint8Array(16+d.length);if(_.set(P),_.set(d,P.length),_=r(_),_[6]=_[6]&15|e,_[8]=_[8]&63|128,M){A=A||0;for(let E=0;E<16;++E)M[A+E]=_[E];return M}return pu.unsafeStringify(_)}try{l.name=u}catch(d){}return l.DNS=S,l.URL=k,l}});var y=v((H)=>{Object.defineProperty(H,"__esModule",{value:!0});H.default=void 0;var ou=su(import.meta.require("crypto"));function su(u){return u&&u.__esModule?u:{default:u}}function ue(u){if(Array.isArray(u))u=Buffer.from(u);else if(typeof u==="string")u=Buffer.from(u,"utf8");return ou.default.createHash("md5").update(u).digest()}var ee=ue;H.default=ee});var s=v((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.default=void 0;var re=j(X()),de=j(y());function j(u){return u&&u.__esModule?u:{default:u}}var le=re.default("v3",48,de.default),te=le;b.default=te});var ru=v((uu)=>{Object.defineProperty(uu,"__esModule",{value:!0});uu.default=void 0;var ve=_e(import.meta.require("crypto"));function _e(u){return u&&u.__esModule?u:{default:u}}var Oe={randomUUID:ve.default.randomUUID};uu.default=Oe});var _u=v((tu)=>{Object.defineProperty(tu,"__esModule",{value:!0});tu.default=void 0;var du=lu(ru()),Me=lu(G()),Pe=$();function lu(u){return u&&u.__esModule?u:{default:u}}function qe(u,e,r){if(du.default.randomUUID&&!e&&!u)return du.default.randomUUID();u=u||{};let l=u.random||(u.rng||Me.default)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){r=r||0;for(let d=0;d<16;++d)e[r+d]=l[d];return e}return Pe.unsafeStringify(l)}var Ae=qe;tu.default=Ae});var Pu=v((Ou)=>{Object.defineProperty(Ou,"__esModule",{value:!0});Ou.default=void 0;var xe=ce(import.meta.require("crypto"));function ce(u){return u&&u.__esModule?u:{default:u}}function Ee(u){if(Array.isArray(u))u=Buffer.from(u);else if(typeof u==="string")u=Buffer.from(u,"utf8");return xe.default.createHash("sha1").update(u).digest()}var Ie=Ee;Ou.default=Ie});var cu=v((Au)=>{Object.defineProperty(Au,"__esModule",{value:!0});Au.default=void 0;var Le=qu(X()),$e=qu(Pu());function qu(u){return u&&u.__esModule?u:{default:u}}var ae=Le.default("v5",80,$e.default),ne=ae;Au.default=ne});var Lu=v((Eu)=>{Object.defineProperty(Eu,"__esModule",{value:!0});Eu.default=void 0;var ze="00000000-0000-0000-0000-000000000000";Eu.default=ze});var nu=v(($u)=>{Object.defineProperty($u,"__esModule",{value:!0});$u.default=void 0;var Ge=Ke(L());function Ke(u){return u&&u.__esModule?u:{default:u}}function Qe(u){if(!Ge.default(u))throw TypeError("Invalid UUID");return parseInt(u.slice(14,15),16)}var Ve=Qe;$u.default=Ve});var zu=v((q)=>{Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"NIL",{enumerable:!0,get:function(){return we.default}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Fe.default}});Object.defineProperty(q,"stringify",{enumerable:!0,get:function(){return De.default}});Object.defineProperty(q,"v1",{enumerable:!0,get:function(){return We.default}});Object.defineProperty(q,"v3",{enumerable:!0,get:function(){return Xe.default}});Object.defineProperty(q,"v4",{enumerable:!0,get:function(){return Ye.default}});Object.defineProperty(q,"v5",{enumerable:!0,get:function(){return Ze.default}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ge.default}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return Je.default}});var We=I(i()),Xe=I(s()),Ye=I(_u()),Ze=I(cu()),we=I(Lu()),Je=I(nu()),ge=I(L()),De=I($()),Fe=I(W());function I(u){return u&&u.__esModule?u:{default:u}}});var x=Ne(zu(),1),oe=x.default.v1,se=x.default.v3,u0=x.default.v4,e0=x.default.v5,r0=x.default.NIL,d0=x.default.version,l0=x.default.validate,t0=x.default.stringify,v0=x.default.parse;
|
|
2
|
-
export{zu as ob,u0 as pb};
|
|
3
|
-
|
|
4
|
-
//# debugId=7622BBA0ED34A31364756E2164756E21
|
package/dist/chunk-36mj8mav.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ma as I,fa as g,ta as P,wa as w}from"./chunk-t6h32cqw.js";import"./chunk-wrtx683g.js";import{mb as d}from"./chunk-ek6n8gyv.js";import{Xb as h}from"./chunk-vvdgy5ba.js";var i=h(d(),1);import A from"fs/promises";var C=h(d(),1);var E="169.254.170.2",R="169.254.170.23",p="[fd00:ec2::23]",S=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===E||e.hostname===R||e.hostname===p)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
-
- ECS container host 169.254.170.2
|
|
5
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var m=h(d(),1);function K(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function T(e,c){let r=await w(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new m.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:I(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var x=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var O="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="http://169.254.170.2",_="AWS_CONTAINER_CREDENTIALS_FULL_URI",v="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",D=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c,a=e.awsContainerCredentialsRelativeUri??process.env[O],r=e.awsContainerCredentialsFullUri??process.env[_],t=e.awsContainerAuthorizationToken??process.env[B],s=e.awsContainerAuthorizationTokenFile??process.env[v],n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)n("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),n("awsContainerCredentialsFullUri will take precedence.");if(t&&s)n("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),n("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${b}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);S(y,e.logger);let u=new P({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return x(async()=>{let o=K(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await A.readFile(s)).toString();try{let f=await u.handle(o);return T(f.response)}catch(f){throw new i.CredentialsProviderError(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{D as fromHttp};
|
|
7
|
-
|
|
8
|
-
//# debugId=190B547C58C9CB0564756E2164756E21
|
package/dist/chunk-5yex263y.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$ as Je,A as B,B as Qe,C as V,D as N,E as f,F as g,G as Xe,H as he,I as ue,J as we,K as be,L as Ye,M as Ze,O as ns,P as ds,Q as je,R as xe,S as ve,T as Te,U as ke,V as He,W as x,X as Re,Y as Ee,Z as qe,_ as Se,aa as Ie,r as U,s as _,t as Le,u as Me,v as We,w as Ae}from"./chunk-8arqqbhx.js";import{ba as l,ca as de}from"./chunk-d1jvc299.js";import{$a as es,Aa as as,Ba as k,Ga as z,Ha as fe,Ia as h,Pa as Ge,Qa as u,Ra as ge,Sa as ye,Ta as me,Ua as $e,Va as Pe,Ya as c,Za as y,da as Ue,ea as _e,ka as se,ma as te,na as re,oa as Ke,pa as ae,qa as ne,ta as le,ua as pe}from"./chunk-t6h32cqw.js";import"./chunk-k9katf2f.js";import"./chunk-wrtx683g.js";import"./chunk-ek6n8gyv.js";import"./chunk-0wqf4729.js";import"./chunk-2myc2s6w.js";import{Xb as i}from"./chunk-vvdgy5ba.js";var p=i(B(),1);var $=i(x(),1);var P=async(e,s,t)=>{return{operation:U(s).operation,region:await _(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ps(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var J=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ps(e))}return s},I=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var C=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var ze=i(x(),1);var oe=i(x(),1),ce=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ms={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ms;var hs=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ee=(e,s={})=>{return hs.get(e,()=>f(G,{endpointParams:e,logger:s.logger}))};N.aws=g;var ie=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new oe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ce.NoAuthSigner}],logger:e?.logger??new re,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??de,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var De=(e)=>{me(process.version);let s=Se(e),t=()=>s().then(ye),r=ie(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Re({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(ve),region:e?.region??l(we,be),requestHandler:le.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ke,default:async()=>(await t()).retryMode||xe}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??pe,useDualstackEndpoint:e?.useDualstackEndpoint??l(he),useFipsEndpoint:e?.useFipsEndpoint??l(ue)}};var Be=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Fe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ce=(e,s)=>{let t={...v(Je(e)),...v($e(e)),...v(Ue(e)),...v(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ie(t),...Pe(t),..._e(t),...Fe(t)}};class Oe extends Ke{constructor(...[e]){let s=De(e||{}),t=C(s),r=Qe(t),a=Te(r),n=Ye(a),D=Le(n),cs=je(D),is=I(cs),F=Ce(is,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(ls)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ls.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Ge{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class E extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Ve=(e)=>({...e,...e.accessToken&&{accessToken:k}}),us=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ne=(e)=>({...e,...e.roleCredentials&&{roleCredentials:us(e.roleCredentials)}});var m=i(x(),1),ss=i(B(),1);var ts=async(e,s)=>{let t=ss.requestBuilder(e,s),r=c({},Es,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=c({[Bs]:[,z(e[Ds],"roleName")],[zs]:[,z(e[qs],"accountId")]}),n;return t.m("GET").h(r).q(a).b(n),t.build()};var rs=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ws(e,s);let t=c({$metadata:w(e)}),r=z(fe(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:es});return Object.assign(t,a),t};var ws=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await xs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await vs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await ks(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Rs(t,s);default:let a=t.body;return bs({output:e,parsedBody:a,errorCode:r})}},bs=ge(o),xs=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new R({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new E({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new q({$metadata:w(e),...t});return u(n,e.body)},Rs=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Es=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class os extends as.classBuilder().ep(L).m(function(e,s,t,r){return[ns(t,this.serialize,this.deserialize),ds(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ve,Ne).ser(ts).de(rs).build(){}export{Oe as SSOClient,os as GetRoleCredentialsCommand};
|
|
3
|
-
|
|
4
|
-
//# debugId=8B7C5006F3BEB49F64756E2164756E21
|
package/dist/chunk-641dtrzq.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var O=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,s,r,a,u){this.type=t,this.name=e,this.prefix=s,this.value=r,this.suffix=a,this.modifier=u}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Q=/[$_\p{ID_Start}]/u,Y=/[$_\u200C\u200D\p{ID_Continue}]/u,D=".*";function tt(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function M(t,e=!1){let s=[],r=0;for(;r<t.length;){let a=t[r],u=function(o){if(!e)throw new TypeError(o);s.push({type:"INVALID_CHAR",index:r,value:t[r++]})};if(a==="*"){s.push({type:"ASTERISK",index:r,value:t[r++]});continue}if(a==="+"||a==="?"){s.push({type:"OTHER_MODIFIER",index:r,value:t[r++]});continue}if(a==="\\"){s.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(a==="{"){s.push({type:"OPEN",index:r,value:t[r++]});continue}if(a==="}"){s.push({type:"CLOSE",index:r,value:t[r++]});continue}if(a===":"){let o="",i=r+1;for(;i<t.length;){let h=t.substr(i,1);if(i===r+1&&Q.test(h)||i!==r+1&&Y.test(h)){o+=t[i++];continue}break}if(!o){u(`Missing parameter name at ${r}`);continue}s.push({type:"NAME",index:r,value:o}),r=i;continue}if(a==="("){let o=1,i="",h=r+1,n=!1;if(t[h]==="?"){u(`Pattern cannot start with "?" at ${h}`);continue}for(;h<t.length;){if(!tt(t[h],!1)){u(`Invalid character '${t[h]}' at ${h}.`),n=!0;break}if(t[h]==="\\"){i+=t[h++]+t[h++];continue}if(t[h]===")"){if(o--,o===0){h++;break}}else if(t[h]==="("&&(o++,t[h+1]!=="?")){u(`Capturing groups are not allowed at ${h}`),n=!0;break}i+=t[h++]}if(n)continue;if(o){u(`Unbalanced pattern at ${r}`);continue}if(!i){u(`Missing pattern at ${r}`);continue}s.push({type:"REGEX",index:r,value:i}),r=h;continue}s.push({type:"CHAR",index:r,value:t[r++]})}return s.push({type:"END",index:r,value:""}),s}function F(t,e={}){let s=M(t);e.delimiter??="/#?",e.prefixes??="./";let r=`[^${d(e.delimiter)}]+?`,a=[],u=0,o=0,i="",h=new Set,n=(p)=>{if(o<s.length&&s[o].type===p)return s[o++].value},f=()=>n("OTHER_MODIFIER")??n("ASTERISK"),w=(p)=>{let c=n(p);if(c!==void 0)return c;let{type:l,index:R}=s[o];throw new TypeError(`Unexpected ${l} at ${R}, expected ${p}`)},E=()=>{let p="",c;for(;c=n("CHAR")??n("ESCAPED_CHAR");)p+=c;return p},J=(p)=>p,P=e.encodePart||J,T="",U=(p)=>{T+=p},I=()=>{T.length&&(a.push(new O(3,"","",P(T),"",3)),T="")},_=(p,c,l,R,v)=>{let g=3;switch(v){case"?":g=1;break;case"*":g=0;break;case"+":g=2;break}if(!c&&!l&&g===3){U(p);return}if(I(),!c&&!l){if(!p)return;a.push(new O(3,"","",P(p),"",g));return}let m;l?l==="*"?m=D:m=l:m=r;let C=2;m===r?(C=1,m=""):m===D&&(C=0,m="");let b;if(c?b=c:l&&(b=u++),h.has(b))throw new TypeError(`Duplicate name '${b}'.`);h.add(b),a.push(new O(C,b,P(p),m,P(R),g))};for(;o<s.length;){let p=n("CHAR"),c=n("NAME"),l=n("REGEX");if(!c&&!l&&(l=n("ASTERISK")),c||l){let v=p??"";e.prefixes.indexOf(v)===-1&&(U(v),v=""),I();let g=f();_(v,c,l,"",g);continue}let R=p??n("ESCAPED_CHAR");if(R){U(R);continue}if(n("OPEN")){let v=E(),g=n("NAME"),m=n("REGEX");!g&&!m&&(m=n("ASTERISK"));let C=E();w("CLOSE");let b=f();_(v,g,m,C,b);continue}I(),w("END")}return a}function d(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function j(t){return t&&t.ignoreCase?"ui":"u"}function et(t,e,s){return W(F(t,s),e,s)}function k(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function W(t,e,s={}){s.delimiter??="/#?",s.prefixes??="./",s.sensitive??=!1,s.strict??=!1,s.end??=!0,s.start??=!0,s.endsWith="";let r=s.start?"^":"";for(let i of t){if(i.type===3){i.modifier===3?r+=d(i.value):r+=`(?:${d(i.value)})${k(i.modifier)}`;continue}e&&e.push(i.name);let h=`[^${d(s.delimiter)}]+?`,n=i.value;if(i.type===1?n=h:i.type===0&&(n=D),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${n})${k(i.modifier)}`:r+=`((?:${n})${k(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${d(i.prefix)}(${n})${d(i.suffix)})`,r+=k(i.modifier);continue}r+=`(?:${d(i.prefix)}`,r+=`((?:${n})(?:`,r+=d(i.suffix),r+=d(i.prefix),r+=`(?:${n}))*)${d(i.suffix)})`,i.modifier===0&&(r+="?")}let a=`[${d(s.endsWith)}]|\$`,u=`[${d(s.delimiter)}]`;if(s.end)return s.strict||(r+=`${u}?`),s.endsWith.length?r+=`(?=${a})`:r+="$",new RegExp(r,j(s));s.strict||(r+=`(?:${u}(?=${a}))?`);let o=!1;if(t.length){let i=t[t.length-1];i.type===3&&i.modifier===3&&(o=s.delimiter.indexOf(i)>-1)}return o||(r+=`(?=${u}|${a})`),new RegExp(r,j(s))}var $={delimiter:"",prefixes:"",sensitive:!0,strict:!0},st={delimiter:".",prefixes:"",sensitive:!0,strict:!0},it={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function rt(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1}function G(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function nt(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t}function K(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["}var X=["ftp","file","http","https","ws","wss"];function V(t){if(!t)return!0;for(let e of X)if(t.test(e))return!0;return!1}function ot(t,e){if(t=G(t,"#"),e||t==="")return t;let s=new URL("https://example.com");return s.hash=t,s.hash?s.hash.substring(1,s.hash.length):""}function ht(t,e){if(t=G(t,"?"),e||t==="")return t;let s=new URL("https://example.com");return s.search=t,s.search?s.search.substring(1,s.search.length):""}function at(t,e){return e||t===""?t:K(t)?q(t):Z(t)}function ut(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.password=t,s.password}function pt(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.username=t,s.username}function ct(t,e,s){if(s||t==="")return t;if(e&&!X.includes(e))return new URL(`${e}:${t}`).pathname;let r=t[0]=="/";return t=new URL(r?t:"/-"+t,"https://example.com").pathname,r||(t=t.substring(2,t.length)),t}function ft(t,e,s){return z(e)===t&&(t=""),s||t===""?t:B(t)}function lt(t,e){return t=nt(t,":"),e||t===""?t:N(t)}function z(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function N(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function mt(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username}function dt(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password}function Z(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname}function q(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function B(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function gt(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}function wt(t){return t===""?t:new URL(`data:${t}`).pathname}function yt(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function vt(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var bt=class{#n;#i=[];#e={};#t=0;#r=1;#u=0;#h=0;#l=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#i=M(this.#n,!0);this.#t<this.#i.length;this.#t+=this.#r){if(this.#r=1,this.#i[this.#t].type==="END"){if(this.#h===0){this.#v(),this.#p()?this.#s(9,1):this.#c()?this.#s(8,1):this.#s(7,0);continue}else if(this.#h===2){this.#f(5);continue}this.#s(10,0);break}if(this.#l>0)if(this.#C())this.#l-=1;else continue;if(this.#k()){this.#l+=1;continue}switch(this.#h){case 0:this.#b()&&this.#f(1);break;case 1:if(this.#b()){this.#O();let t=7,e=1;this.#$()?(t=2,e=3):this.#d&&(t=2),this.#s(t,e)}break;case 2:this.#w()?this.#f(3):(this.#y()||this.#c()||this.#p())&&this.#f(5);break;case 3:this.#E()?this.#s(4,1):this.#w()&&this.#s(5,1);break;case 4:this.#w()&&this.#s(5,1);break;case 5:this.#L()?this.#m+=1:this.#A()&&(this.#m-=1),this.#R()&&!this.#m?this.#s(6,1):this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 6:this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 7:this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 8:this.#p()&&this.#s(9,1);break;case 9:break;case 10:break}}this.#e.hostname!==void 0&&this.#e.port===void 0&&(this.#e.port="")}#s(t,e){switch(this.#h){case 0:break;case 1:this.#e.protocol=this.#a();break;case 2:break;case 3:this.#e.username=this.#a();break;case 4:this.#e.password=this.#a();break;case 5:this.#e.hostname=this.#a();break;case 6:this.#e.port=this.#a();break;case 7:this.#e.pathname=this.#a();break;case 8:this.#e.search=this.#a();break;case 9:this.#e.hash=this.#a();break;case 10:break}this.#h!==0&&t!==10&&([1,2,3,4].includes(this.#h)&&[6,7,8,9].includes(t)&&(this.#e.hostname??=""),[1,2,3,4,5,6].includes(this.#h)&&[8,9].includes(t)&&(this.#e.pathname??=this.#d?"/":""),[1,2,3,4,5,6,7].includes(this.#h)&&t===9&&(this.#e.search??="")),this.#x(t,e)}#x(t,e){this.#h=t,this.#u=this.#t+e,this.#t+=e,this.#r=0}#v(){this.#t=this.#u,this.#r=0}#f(t){this.#v(),this.#h=t}#g(t){return t<0&&(t=this.#i.length-t),t<this.#i.length?this.#i[t]:this.#i[this.#i.length-1]}#o(t,e){let s=this.#g(t);return s.value===e&&(s.type==="CHAR"||s.type==="ESCAPED_CHAR"||s.type==="INVALID_CHAR")}#b(){return this.#o(this.#t,":")}#$(){return this.#o(this.#t+1,"/")&&this.#o(this.#t+2,"/")}#w(){return this.#o(this.#t,"@")}#E(){return this.#o(this.#t,":")}#R(){return this.#o(this.#t,":")}#y(){return this.#o(this.#t,"/")}#c(){if(this.#o(this.#t,"?"))return!0;if(this.#i[this.#t].value!=="?")return!1;let t=this.#g(this.#t-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#p(){return this.#o(this.#t,"#")}#k(){return this.#i[this.#t].type=="OPEN"}#C(){return this.#i[this.#t].type=="CLOSE"}#L(){return this.#o(this.#t,"[")}#A(){return this.#o(this.#t,"]")}#a(){let t=this.#i[this.#t],e=this.#g(this.#u).index;return this.#n.substring(e,t.index)}#O(){let t={};Object.assign(t,$),t.encodePart=N;let e=et(this.#a(),void 0,t);this.#d=V(e)}},S=["protocol","username","password","hostname","port","pathname","search","hash"],x="*";function H(t,e){if(typeof t!="string")throw new TypeError("parameter 1 is not of type 'string'.");let s=new URL(t,e);return{protocol:s.protocol.substring(0,s.protocol.length-1),username:s.username,password:s.password,hostname:s.hostname,port:s.port,pathname:s.pathname,search:s.search!==""?s.search.substring(1,s.search.length):void 0,hash:s.hash!==""?s.hash.substring(1,s.hash.length):void 0}}function y(t,e){return e?A(t):t}function L(t,e,s){let r;if(typeof e.baseURL=="string")try{r=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=y(r.protocol.substring(0,r.protocol.length-1),s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=y(r.username,s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(t.password=y(r.password,s)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=y(r.hostname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=y(r.port,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=y(r.pathname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(t.search=y(r.search.substring(1,r.search.length),s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(t.hash=y(r.hash.substring(1,r.hash.length),s))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=lt(e.protocol,s)),typeof e.username=="string"&&(t.username=pt(e.username,s)),typeof e.password=="string"&&(t.password=ut(e.password,s)),typeof e.hostname=="string"&&(t.hostname=at(e.hostname,s)),typeof e.port=="string"&&(t.port=ft(e.port,t.protocol,s)),typeof e.pathname=="string"){if(t.pathname=e.pathname,r&&!rt(t.pathname,s)){let a=r.pathname.lastIndexOf("/");a>=0&&(t.pathname=y(r.pathname.substring(0,a+1),s)+t.pathname)}t.pathname=ct(t.pathname,t.protocol,s)}return typeof e.search=="string"&&(t.search=ht(e.search,s)),typeof e.hash=="string"&&(t.hash=ot(e.hash,s)),t}function A(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function xt(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function $t(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let s=".*",r=`[^${xt(e.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,u="";for(let o=0;o<t.length;++o){let i=t[o];if(i.type===3){if(i.modifier===3){u+=A(i.value);continue}u+=`{${A(i.value)}}${k(i.modifier)}`;continue}let h=i.hasCustomName(),n=!!i.suffix.length||!!i.prefix.length&&(i.prefix.length!==1||!e.prefixes.includes(i.prefix)),f=o>0?t[o-1]:null,w=o<t.length-1?t[o+1]:null;if(!n&&h&&i.type===1&&i.modifier===3&&w&&!w.prefix.length&&!w.suffix.length)if(w.type===3){let E=w.value.length>0?w.value[0]:"";n=a.test(E)}else n=!w.hasCustomName();if(!n&&!i.prefix.length&&f&&f.type===3){let E=f.value[f.value.length-1];n=e.prefixes.includes(E)}n&&(u+="{"),u+=A(i.prefix),h&&(u+=`:${i.name}`),i.type===2?u+=`(${i.value})`:i.type===1?h||(u+=`(${r})`):i.type===0&&(!h&&(!f||f.type===3||f.modifier!==3||n||i.prefix!=="")?u+="*":u+=`(${s})`),i.type===1&&h&&i.suffix.length&&a.test(i.suffix[0])&&(u+="\\"),u+=A(i.suffix),n&&(u+="}"),i.modifier!==3&&(u+=k(i.modifier))}return u}var Et=class{#n;#i={};#e={};#t={};#r={};#u=!1;constructor(t={},e,s){try{let r;if(typeof e=="string"?r=e:s=e,typeof t=="string"){let i=new bt(t);if(i.parse(),t=i.result,r===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=r}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(r)throw new TypeError("parameter 1 is not of type 'string'.")}typeof s>"u"&&(s={ignoreCase:!1});let a={ignoreCase:s.ignoreCase===!0},u={pathname:x,protocol:x,username:x,password:x,hostname:x,port:x,search:x,hash:x};this.#n=L(u,t,!0),z(this.#n.protocol)===this.#n.port&&(this.#n.port="");let o;for(o of S){if(!(o in this.#n))continue;let i={},h=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(i,$),i.encodePart=N;break;case"username":Object.assign(i,$),i.encodePart=mt;break;case"password":Object.assign(i,$),i.encodePart=dt;break;case"hostname":Object.assign(i,st),K(h)?i.encodePart=q:i.encodePart=Z;break;case"port":Object.assign(i,$),i.encodePart=B;break;case"pathname":V(this.#i.protocol)?(Object.assign(i,it,a),i.encodePart=gt):(Object.assign(i,$,a),i.encodePart=wt);break;case"search":Object.assign(i,$,a),i.encodePart=yt;break;case"hash":Object.assign(i,$,a),i.encodePart=vt;break}try{this.#r[o]=F(h,i),this.#i[o]=W(this.#r[o],this.#e[o],i),this.#t[o]=$t(this.#r[o],i),this.#u=this.#u||this.#r[o].some((n)=>n.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return!1}let r;for(r of S)if(!this.#i[r].exec(s[r]))return!1;return!0}exec(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return null}let r={};e?r.inputs=[t,e]:r.inputs=[t];let a;for(a of S){let u=this.#i[a].exec(s[a]);if(!u)return null;let o={};for(let[i,h]of this.#e[a].entries())if(typeof h=="string"||typeof h=="number"){let n=u[i+1];o[h]=n}r[a]={input:s[a]??"",groups:o}}return r}static compareComponent(t,e,s){let r=(i,h)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(i[n]<h[n])return-1;if(i[n]===h[n])continue;return 1}return 0},a=new O(3,"","","","",3),u=new O(0,"","","","",3),o=(i,h)=>{let n=0;for(;n<Math.min(i.length,h.length);++n){let f=r(i[n],h[n]);if(f)return f}return i.length===h.length?0:r(i[n]??a,h[n]??a)};return!e.#t[t]&&!s.#t[t]?0:e.#t[t]&&!s.#t[t]?o(e.#r[t],[u]):!e.#t[t]&&s.#t[t]?o([u],s.#r[t]):o(e.#r[t],s.#r[t])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};
|
|
2
|
-
export{Et as g};
|
|
3
|
-
|
|
4
|
-
//# debugId=C13028D3388D3B3264756E2164756E21
|
package/dist/chunk-6g1mntab.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{bb as N,cb as W,db as I,gb as v,hb as P}from"./chunk-k9katf2f.js";import"./chunk-wrtx683g.js";import{mb as _}from"./chunk-ek6n8gyv.js";import{Xb as f}from"./chunk-vvdgy5ba.js";var T=f(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=f(_(),1);var K=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-b8d5htph.js");if(R[e])return R[e];let s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-b8d5htph.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=f(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${h}`,!1)};var q=f(_(),1);var S=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${h}`,!1)};import{promises as B}from"fs";var{writeFile:Q}=B,j=(e,r)=>{let s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);let i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);let{sso_start_url:l,sso_region:p}=a,o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${h}`,!1)}S("accessToken",o.accessToken),S("expiresAt",o.expiresAt);let{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;S("clientId",o.clientId,!0),S("clientSecret",o.clientSecret,!0),S("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());let n=await G(o,p);S("accessToken",n.accessToken),S("expiresIn",n.expiresIn);let g=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:g.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:g}}catch(n){return D(c),c}};var k=f(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:m,clientConfig:a,profile:l,logger:p})=>{let o,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let w=await z({profile:l})();o={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:y,logger:p})}else try{o=await I(e)}catch(w){throw new k.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:p})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:p});let{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-5yex263y.js"),g=m||new c(Object.assign({},a??{},{region:a?.region??t})),C;try{C=await g.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(w){throw new k.CredentialsProviderError(w,{tryNextLink:y,logger:p})}let{roleCredentials:{accessKeyId:d,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!d||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:p});return{accessKeyId:d,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=f(_(),1),V=(e,r)=>{let{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:m}=e;if(!s||!t||!i||!m)throw new J.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:m}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!m){let o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let d=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==d.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==d.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=d.sso_region,o.sso_start_url=d.sso_start_url}let{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:g}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:g,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
|
|
3
|
-
|
|
4
|
-
//# debugId=BC2C40AFE6F368D764756E2164756E21
|