gemi 0.35.0 → 0.36.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 +3 -3
- package/dist/app/index.js.map +3 -3
- package/dist/bin/gemi.js +134 -73
- package/dist/bin/gemi.js.map +6 -6
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-h9jhxz2x.js → chunk-07keqpsw.js} +2 -2
- package/dist/{chunk-h9jhxz2x.js.map → chunk-07keqpsw.js.map} +1 -1
- package/dist/{chunk-qr0d4b5g.js → chunk-1gd1fyth.js} +2 -2
- package/dist/{chunk-qr0d4b5g.js.map → chunk-1gd1fyth.js.map} +3 -3
- package/dist/{chunk-a9pdqf5t.js → chunk-1sdckzzr.js} +2 -2
- package/dist/{chunk-a9pdqf5t.js.map → chunk-1sdckzzr.js.map} +2 -2
- package/dist/chunk-21hd56fa.js +4 -0
- package/dist/{chunk-nrx04seh.js.map → chunk-21hd56fa.js.map} +4 -4
- package/dist/chunk-2vpsbhpm.js +5 -0
- package/dist/{chunk-9n86xysb.js.map → chunk-2vpsbhpm.js.map} +1 -1
- package/dist/chunk-3vxaqv3c.js +4 -0
- package/dist/chunk-3vxaqv3c.js.map +18 -0
- package/dist/chunk-4pxf7y2s.js +5 -0
- package/dist/{chunk-b6bzvtq4.js.map → chunk-4pxf7y2s.js.map} +1 -1
- package/dist/{chunk-k47r0hsx.js → chunk-513mekrd.js} +2 -2
- package/dist/{chunk-k47r0hsx.js.map → chunk-513mekrd.js.map} +3 -3
- package/dist/chunk-640e07kh.js +4 -0
- package/dist/chunk-640e07kh.js.map +18 -0
- package/dist/{chunk-767rmjwk.js → chunk-65z4wbps.js} +1 -1
- package/dist/chunk-69wrnjjn.js +5 -0
- package/dist/chunk-69wrnjjn.js.map +10 -0
- package/dist/chunk-6g2bsmwf.js +5 -0
- package/dist/{chunk-nmnvzhbg.js.map → chunk-6g2bsmwf.js.map} +3 -3
- package/dist/{chunk-2xy7v0g8.js → chunk-8ty8fefr.js} +2 -2
- package/dist/{chunk-2xy7v0g8.js.map → chunk-8ty8fefr.js.map} +1 -1
- package/dist/{chunk-r0830s5q.js → chunk-9p1z3vnt.js} +2 -2
- package/dist/{chunk-r0830s5q.js.map → chunk-9p1z3vnt.js.map} +1 -1
- package/dist/chunk-bwd327vf.js +32 -0
- package/dist/chunk-bwd327vf.js.map +43 -0
- package/dist/{chunk-qpyzybek.js → chunk-e2713ftx.js} +2 -2
- package/dist/{chunk-qpyzybek.js.map → chunk-e2713ftx.js.map} +1 -1
- package/dist/{chunk-ve14d93s.js → chunk-e4vawn5g.js} +2 -2
- package/dist/{chunk-ve14d93s.js.map → chunk-e4vawn5g.js.map} +1 -1
- package/dist/{chunk-rasyrk0x.js → chunk-es84e2a1.js} +3 -3
- package/dist/{chunk-rasyrk0x.js.map → chunk-es84e2a1.js.map} +1 -1
- package/dist/{chunk-xzg1b2z7.js → chunk-fjqa7s60.js} +2 -2
- package/dist/{chunk-xzg1b2z7.js.map → chunk-fjqa7s60.js.map} +2 -2
- package/dist/chunk-ghy6gn4g.js +5 -0
- package/dist/chunk-ghy6gn4g.js.map +11 -0
- package/dist/{chunk-36rsqj4c.js → chunk-gj2setdy.js} +2 -2
- package/dist/chunk-gj2setdy.js.map +13 -0
- package/dist/{chunk-myee2gs0.js → chunk-gncq70ga.js} +3 -3
- package/dist/{chunk-myee2gs0.js.map → chunk-gncq70ga.js.map} +2 -2
- package/dist/{chunk-zz9bxhhv.js → chunk-haenvmrp.js} +3 -3
- package/dist/{chunk-zz9bxhhv.js.map → chunk-haenvmrp.js.map} +1 -1
- package/dist/{chunk-wdhx2g1k.js → chunk-kp6wx276.js} +2 -2
- package/dist/{chunk-wdhx2g1k.js.map → chunk-kp6wx276.js.map} +2 -2
- package/dist/{chunk-nypaxg5s.js → chunk-m5g0mh9n.js} +3 -3
- package/dist/{chunk-nypaxg5s.js.map → chunk-m5g0mh9n.js.map} +1 -1
- package/dist/{chunk-mcxe6c90.js → chunk-mnvzewf8.js} +2 -2
- package/dist/{chunk-mcxe6c90.js.map → chunk-mnvzewf8.js.map} +3 -3
- package/dist/{chunk-ak88bhtn.js → chunk-pp10jse0.js} +3 -3
- package/dist/{chunk-ak88bhtn.js.map → chunk-pp10jse0.js.map} +2 -2
- package/dist/chunk-qy4114a4.js +4 -0
- package/dist/chunk-qy4114a4.js.map +19 -0
- package/dist/{chunk-3nxfa642.js → chunk-rat133ng.js} +51 -51
- package/dist/{chunk-3nxfa642.js.map → chunk-rat133ng.js.map} +17 -17
- package/dist/chunk-tp6rd9q1.js +4 -0
- package/dist/chunk-tp6rd9q1.js.map +22 -0
- package/dist/{chunk-hpdz0h4c.js → chunk-txk5dr5r.js} +2 -2
- package/dist/{chunk-hpdz0h4c.js.map → chunk-txk5dr5r.js.map} +2 -2
- package/dist/{chunk-av2gtbbe.js → chunk-vmpxc391.js} +2 -2
- package/dist/{chunk-av2gtbbe.js.map → chunk-vmpxc391.js.map} +1 -1
- package/dist/{chunk-v98329xf.js → chunk-wm448x87.js} +1 -1
- package/dist/chunk-xak5xspk.js +21 -0
- package/dist/chunk-xak5xspk.js.map +43 -0
- package/dist/{chunk-ap5svqgk.js → chunk-xdm3d6a3.js} +2 -2
- package/dist/{chunk-ap5svqgk.js.map → chunk-xdm3d6a3.js.map} +2 -2
- package/dist/chunk-y5h3n5t8.js +5 -0
- package/dist/{chunk-k78w4dqh.js.map → chunk-y5h3n5t8.js.map} +1 -1
- package/dist/chunk-yhrk5bfy.js +5 -0
- package/dist/{chunk-ssvnwn8n.js.map → chunk-yhrk5bfy.js.map} +4 -4
- package/dist/{chunk-th2hknhb.js → chunk-za0tn4cg.js} +6 -6
- package/dist/{chunk-th2hknhb.js.map → chunk-za0tn4cg.js.map} +4 -4
- package/dist/client/index.js +10208 -7659
- package/dist/client/index.js.map +1 -1
- package/dist/email/Email.d.ts +1 -0
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +3 -3
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +3 -3
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/services/index.js.map +1 -1
- package/dist/vite/{index-DIJejLN8.mjs → index-3fSp4NVF.mjs} +1 -1
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-CM73P_uJ.mjs → typescript-1ZdUKbbC.mjs} +15 -5
- package/package.json +1 -2
- package/dist/chunk-11yk2z9x.js +0 -32
- package/dist/chunk-11yk2z9x.js.map +0 -43
- package/dist/chunk-36rsqj4c.js.map +0 -13
- package/dist/chunk-3kssr2vd.js +0 -4
- package/dist/chunk-3kssr2vd.js.map +0 -15
- package/dist/chunk-5sjb8aqm.js +0 -4
- package/dist/chunk-5sjb8aqm.js.map +0 -22
- package/dist/chunk-60w3jw47.js +0 -4
- package/dist/chunk-60w3jw47.js.map +0 -15
- package/dist/chunk-95b92a6a.js +0 -5
- package/dist/chunk-95b92a6a.js.map +0 -12
- package/dist/chunk-9n86xysb.js +0 -5
- package/dist/chunk-a11m65k0.js +0 -4
- package/dist/chunk-a11m65k0.js.map +0 -19
- package/dist/chunk-b6bzvtq4.js +0 -5
- package/dist/chunk-bqm0qsyv.js +0 -21
- package/dist/chunk-bqm0qsyv.js.map +0 -42
- package/dist/chunk-k78w4dqh.js +0 -5
- package/dist/chunk-nmnvzhbg.js +0 -5
- package/dist/chunk-nrx04seh.js +0 -4
- package/dist/chunk-ssvnwn8n.js +0 -5
- /package/dist/{chunk-767rmjwk.js.map → chunk-65z4wbps.js.map} +0 -0
- /package/dist/{chunk-v98329xf.js.map → chunk-wm448x87.js.map} +0 -0
package/dist/chunk-k78w4dqh.js
DELETED
package/dist/chunk-nmnvzhbg.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Xa as mc,Ya as r}from"./chunk-95b92a6a.js";import"./chunk-ssvnwn8n.js";import"./chunk-myee2gs0.js";import{pb as _}from"./chunk-ak88bhtn.js";import{Bb as O,zb as u}from"./chunk-b6bzvtq4.js";import{Buffer as hc}from"buffer";import{request as Yc}from"http";function E(c){return new Promise((I,x)=>{let N=Yc({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});N.on("error",(T)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),T)),N.destroy()}),N.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),N.destroy()}),N.on("response",(T)=>{let{statusCode:y=400}=T;if(y<200||300<=y)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:y})),N.destroy();let $=[];T.on("data",(w)=>{$.push(w)}),T.on("end",()=>{I(hc.concat($)),N.destroy()})}),N.end()})}var K;var D=O(()=>{K=u(_(),1)});var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",L=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var W=()=>{};var Hc=1000,qc=0,Q=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var X=()=>{};var v=(c,I)=>{let x=c();for(let N=0;N<I;N++)x=x.catch(c);return x};var b=()=>{};import{parse as Sc}from"url";var z,H="AWS_CONTAINER_CREDENTIALS_FULL_URI",q="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",M="AWS_CONTAINER_AUTHORIZATION_TOKEN",kc=(c={})=>{let{timeout:I,maxRetries:x}=Q(c);return()=>v(async()=>{let N=await jc({logger:c.logger}),T=JSON.parse(await fc(I,N));if(!G(T))throw new z.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return L(T)},x)},fc=async(c,I)=>{if(process.env[M])I.headers={...I.headers,Authorization:process.env[M]};return(await E({...I,timeout:c})).toString()},uc="169.254.170.2",Ec,$c,jc=async({logger:c})=>{if(process.env[q])return{hostname:uc,path:process.env[q]};if(process.env[H]){let I=Sc(process.env[H]);if(!I.hostname||!(I.hostname in Ec))throw new z.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in $c))throw new z.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new z.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${q} or ${H} environment variable is set`,{tryNextLink:!1,logger:c})};var p=O(()=>{D();W();X();b();z=u(_(),1),Ec={localhost:!0,"127.0.0.1":!0},$c={"http:":!0,"https:":!0}});var C,Z;var a=O(()=>{C=u(_(),1);Z=class Z extends C.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(c,I=!0){super(c,I);this.tryNextLink=I,Object.setPrototypeOf(this,Z.prototype)}}});var J;var B=O(()=>{(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}))});var n;var o=O(()=>{n={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0}});var f;var t=O(()=>{(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}))});var Ac="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",Jc="ec2_metadata_service_endpoint_mode",s;var g=O(()=>{t();s={environmentVariableSelector:(c)=>c[Ac],configFileSelector:(c)=>c[Jc],default:f.IPv4}});var U,l,F=async()=>l.parseUrl(await vc()||await zc()),vc=async()=>U.loadConfig(n)(),zc=async()=>{let c=await U.loadConfig(s)();switch(c){case f.IPv4:return J.IPv4;case f.IPv6:return J.IPv6;default:throw Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(f)}`)}};var P=O(()=>{B();o();t();g();U=u(r(),1),l=u(mc(),1)});var V=(c,I)=>{let x=300+Math.floor(Math.random()*300),N=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(N)}.
|
|
3
|
-
For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let T=c.originalExpiration??c.expiration;return{...c,...T?{originalExpiration:T}:{},expiration:N}};var d=()=>{};var e=(c,I={})=>{let x=I?.logger||console,N;return async()=>{let T;try{if(T=await c(),T.expiration&&T.expiration.getTime()<Date.now())T=V(T,x)}catch(y){if(N)x.warn("Credential renew failed: ",y),T=V(N,x);else throw y}return N=T,T}};var i=O(()=>{d()});var Nc,k,Tc="/latest/meta-data/iam/security-credentials/",Kc="/latest/api/token",R="AWS_EC2_METADATA_V1_DISABLED",cc="ec2_metadata_v1_disabled",Ic="x-aws-ec2-metadata-token",YI=(c={})=>e(_c(c),{logger:c.logger}),_c=(c={})=>{let I=!1,{logger:x,profile:N}=c,{timeout:T,maxRetries:y}=Q(c),$=async(w,j)=>{if(I||j.headers?.[Ic]==null){let h=!1,Y=!1,wc=await Nc.loadConfig({environmentVariableSelector:(S)=>{let A=S[R];if(Y=!!A&&A!=="false",A===void 0)throw new k.CredentialsProviderError(`${R} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[cc];return h=!!A&&A!=="false",h},default:!1},{profile:N})();if(c.ec2MetadataV1Disabled||wc){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${cc})`);if(Y)S.push(`process environment variable (${R})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let yc=(await v(async()=>{let h;try{h=await Gc(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return v(async()=>{let h;try{h=await Lc(yc,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await F();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(y,{...w,timeout:T});else{let j;try{j=(await Dc({...w,timeout:T})).toString()}catch(m){if(m?.statusCode===400)throw Object.assign(m,{message:"EC2 Metadata token request returned error"});else if(m.message==="TimeoutError"||[403,404,405].includes(m.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(y,{...w,timeout:T})}return $(y,{...w,headers:{[Ic]:j},timeout:T})}}},Dc=async(c)=>E({...c,path:Kc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Gc=async(c)=>(await E({...c,path:Tc})).toString(),Lc=async(c,I,x)=>{let N=JSON.parse((await E({...I,path:Tc+c})).toString());if(!G(N))throw new k.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return L(N)};var xc=O(()=>{a();D();W();X();b();P();i();Nc=u(r(),1),k=u(_(),1)});var Oc=()=>{};var Qc=O(()=>{D();P();B();p();xc();X();Oc()});Qc();export{Q as providerConfigFromInit,E as httpRequest,F as getInstanceMetadataEndpoint,YI as fromInstanceMetadata,kc as fromContainerMetadata,J as Endpoint,q as ENV_CMDS_RELATIVE_URI,H as ENV_CMDS_FULL_URI,M as ENV_CMDS_AUTH_TOKEN,Hc as DEFAULT_TIMEOUT,qc as DEFAULT_MAX_RETRIES};
|
|
4
|
-
|
|
5
|
-
//# debugId=477CC7F8B351D2D864756E2164756E21
|
package/dist/chunk-nrx04seh.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nb as M}from"./chunk-a9pdqf5t.js";import{Bb as E}from"./chunk-b6bzvtq4.js";class x{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:a,deserializer:o,serdeContext:m,defaultContentType:d}){this.marshaller=i,this.serializer=a,this.deserializer=o,this.serdeContext=m,this.defaultContentType=d}async serializeEventStream({eventStream:i,requestSchema:a,initialRequest:o}){let m=this.marshaller,d=a.getEventStreamMember(),p=a.getMemberSchema(d),y=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){let r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};y.write(a,o);let t=y.flush();yield{[h]:!0,headers:r,body:t}}for await(let r of i)yield r}};return m.serialize(S,(r)=>{if(r[h])return{headers:r.headers,body:r.body};let t=Object.keys(r).find((s)=>{return s!=="__type"})??"",{additionalHeaders:e,body:n,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:n}})}async deserializeEventStream({response:i,responseSchema:a,initialResponseContainer:o}){let m=this.marshaller,d=a.getEventStreamMember(),y=a.getMemberSchema(d).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(i.body,async(t)=>{let e=Object.keys(t).find((l)=>{return l!=="__type"})??"",n=t[e].body;if(e==="initial-response"){let l=await this.deserializer.read(a,n);return delete l[d],{[f]:!0,...l}}else if(e in y){let l=y[e];if(l.isStructSchema()){let c={},u=!1;for(let[s,v]of l.structIterator()){let{eventHeader:g,eventPayload:w}=v.getMergedTraits();if(u=u||Boolean(g||w),w){if(v.isBlobSchema())c[s]=n;else if(v.isStringSchema())c[s]=(this.serdeContext?.utf8Encoder??z.toUtf8)(n);else if(v.isStructSchema())c[s]=await this.deserializer.read(v,n)}else if(g){let b=t[e].headers[s]?.value;if(b!=null)if(v.isNumericSchema())if(b&&typeof b==="object"&&"bytes"in b)c[s]=BigInt(b.toString());else c[s]=Number(b);else c[s]=b}}if(u)return{[e]:c}}return{[e]:await this.deserializer.read(l,n)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!a)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){if(!r?.value?.[f])yield r.value;while(!0){let{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,a,o){let m=this.serializer,d=i,p=null,y,f=(()=>{return a.getSchema()[4].includes(i)})(),h={};if(!f){let[t,e]=o[i];d=t,m.write(15,e)}else{let t=a.getMemberSchema(i);if(t.isStructSchema()){for(let[e,n]of t.structIterator()){let{eventHeader:l,eventPayload:c}=n.getMergedTraits();if(c)p=e;else if(l){let u=o[i][e],s="binary";if(n.isNumericSchema())if(-2147483648<=u&&u<=2147483647)s="integer";else s="long";else if(n.isTimestampSchema())s="timestamp";else if(n.isStringSchema())s="string";else if(n.isBooleanSchema())s="boolean";if(u!=null)h[e]={type:s,value:u},delete o[i][e]}}if(p!==null){let e=t.getMemberSchema(p);if(e.isBlobSchema())y="application/octet-stream";else if(e.isStringSchema())y="text/plain";m.write(e,o[i][p])}else m.write(t,o[i])}else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let S=m.flush();return{body:typeof S==="string"?(this.serdeContext?.utf8Decoder??z.fromUtf8)(S):S,eventType:d,explicitPayloadContentType:y,additionalHeaders:h}}}var z,T;var C=E(()=>{z=M();T=x});C();export{T as EventStreamSerde};export default {get EventStreamSerde(){return T}};
|
|
3
|
-
|
|
4
|
-
//# debugId=0C62860E5F24ADCF64756E2164756E21
|
package/dist/chunk-ssvnwn8n.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ob as re}from"./chunk-myee2gs0.js";import{Ab as d,Cb as c}from"./chunk-b6bzvtq4.js";var x=d((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getHomeDir=void 0;var W=c("os"),V=c("path"),_={},G=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},U=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:o=`C:${V.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${o}${r}`;let n=G();if(!_[n])_[n]=(0,W.homedir)();return _[n]};v.getHomeDir=U});var I=d((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.getSSOTokenFilepath=void 0;var X=c("crypto"),B=c("path"),J=x(),z=(e)=>{let r=(0,X.createHash)("sha1").update(e).digest("hex");return(0,B.join)((0,J.getHomeDir)(),".aws","sso","cache",`${r}.json`)};j.getSSOTokenFilepath=z});var R=d((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.getSSOTokenFromFile=C.tokenIntercept=void 0;var Q=c("fs/promises"),Y=I();C.tokenIntercept={};var Z=async(e)=>{if(C.tokenIntercept[e])return C.tokenIntercept[e];let t=(0,Y.getSSOTokenFilepath)(e),r=await(0,Q.readFile)(t,"utf8");return JSON.parse(r)};C.getSSOTokenFromFile=Z});var N=d((w)=>{Object.defineProperty(w,"__esModule",{value:!0});w.readFile=w.fileIntercept=w.filePromises=void 0;var ee=c("fs/promises");w.filePromises={};w.fileIntercept={};var te=(e,t)=>{if(w.fileIntercept[e]!==void 0)return w.fileIntercept[e];if(!w.filePromises[e]||t?.ignoreCache)w.filePromises[e]=(0,ee.readFile)(e,"utf8");return w.filePromises[e]};w.readFile=te});var Pe=d((l)=>{var F=x(),k=I(),T=R(),S=c("path"),O=re(),p=N(),q="AWS_PROFILE",$="default",oe=(e)=>e.profile||process.env[q]||$,a=".",ne=(e)=>Object.entries(e).filter(([t])=>{let r=t.indexOf(a);if(r===-1)return!1;return Object.values(O.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,o])=>{let n=r.indexOf(a),i=r.substring(0,n)===O.IniSectionType.PROFILE?r.substring(n+1):r;return t[i]=o,t},{...e.default&&{default:e.default}}),ie="AWS_CONFIG_FILE",M=()=>process.env[ie]||S.join(F.getHomeDir(),".aws","config"),se="AWS_SHARED_CREDENTIALS_FILE",ce=()=>process.env[se]||S.join(F.getHomeDir(),".aws","credentials"),ae=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,le=["__proto__","profile __proto__"],b=(e)=>{let t={},r,o;for(let n of e.split(/\r?\n/)){let i=n.split(/(^|\s)[;#]/)[0].trim();if(i[0]==="["&&i[i.length-1]==="]"){r=void 0,o=void 0;let s=i.substring(1,i.length-1),u=ae.exec(s);if(u){let[,f,,m]=u;if(Object.values(O.IniSectionType).includes(f))r=[f,m].join(a)}else r=s;if(le.includes(s))throw Error(`Found invalid profile name "${s}"`)}else if(r){let s=i.indexOf("=");if(![0,-1].includes(s)){let[u,f]=[i.substring(0,s).trim(),i.substring(s+1).trim()];if(f==="")o=u;else{if(o&&n.trimStart()===n)o=void 0;t[r]=t[r]||{};let m=o?[o,u].join(a):u;t[r][m]=f}}}}return t},A=()=>({}),K=async(e={})=>{let{filepath:t=ce(),configFilepath:r=M()}=e,o=F.getHomeDir(),n="~/",i=t;if(t.startsWith("~/"))i=S.join(o,t.slice(2));let h=r;if(r.startsWith("~/"))h=S.join(o,r.slice(2));let s=await Promise.all([p.readFile(h,{ignoreCache:e.ignoreCache}).then(b).then(ne).catch(A),p.readFile(i,{ignoreCache:e.ignoreCache}).then(b).catch(A)]);return{configFile:s[0],credentialsFile:s[1]}},ue=(e)=>Object.entries(e).filter(([t])=>t.startsWith(O.IniSectionType.SSO_SESSION+a)).reduce((t,[r,o])=>({...t,[r.substring(r.indexOf(a)+1)]:o}),{}),pe=()=>({}),fe=async(e={})=>p.readFile(e.configFilepath??M()).then(b).then(ue).catch(pe),de=(...e)=>{let t={};for(let r of e)for(let[o,n]of Object.entries(r))if(t[o]!==void 0)Object.assign(t[o],n);else t[o]=n;return t},Fe=async(e)=>{let t=await K(e);return de(t.configFile,t.credentialsFile)},ge={getFileRecord(){return p.fileIntercept},interceptFile(e,t){p.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return T.tokenIntercept},interceptToken(e,t){T.tokenIntercept[e]=t}};Object.defineProperty(l,"getSSOTokenFromFile",{enumerable:!0,get:function(){return T.getSSOTokenFromFile}});Object.defineProperty(l,"readFile",{enumerable:!0,get:function(){return p.readFile}});l.CONFIG_PREFIX_SEPARATOR=a;l.DEFAULT_PROFILE=$;l.ENV_PROFILE=q;l.externalDataInterceptor=ge;l.getProfileName=oe;l.loadSharedConfigFiles=K;l.loadSsoSessionData=fe;l.parseKnownFiles=Fe;Object.keys(F).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(l,e))Object.defineProperty(l,e,{enumerable:!0,get:function(){return F[e]}})});Object.keys(k).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(l,e))Object.defineProperty(l,e,{enumerable:!0,get:function(){return k[e]}})})});
|
|
3
|
-
export{Pe as Za};
|
|
4
|
-
|
|
5
|
-
//# debugId=8600770466F92E9064756E2164756E21
|
|
File without changes
|
|
File without changes
|