@stacksjs/buddy 0.68.1 → 0.69.2
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/README.md +1 -1
- package/dist/chunk-0ara6h0a.js +2 -0
- package/dist/chunk-0pxb6cz2.js +3 -0
- package/dist/chunk-1v5v7cn7.js +2 -0
- package/dist/chunk-3v3zq8w4.js +2 -0
- package/dist/{chunk-jr4naxsv.js → chunk-3yp4xe8e.js} +1 -1
- package/dist/{chunk-3wpw5xgd.js → chunk-5d1pmfaj.js} +1 -1
- package/dist/chunk-7dhp3rzj.js +61 -0
- package/dist/chunk-8y9rns0z.js +2 -0
- package/dist/chunk-c0awzy8k.js +10 -0
- package/dist/chunk-c6ermrr1.js +3 -0
- package/dist/{chunk-8gx9at51.js → chunk-cdnqz7bt.js} +1 -1
- package/dist/{chunk-27ksm11g.js → chunk-f0ywgmn1.js} +2 -2
- package/dist/chunk-fzqy272g.js +2 -0
- package/dist/chunk-hmvbpz4z.js +25 -0
- package/dist/chunk-kqn7aa4r.js +5442 -0
- package/dist/chunk-n337bav6.js +5 -0
- package/dist/chunk-rez6aknn.js +29 -0
- package/dist/chunk-rvzykrtp.js +10 -0
- package/dist/{chunk-b3wr7cpk.js → chunk-tnqbven5.js} +2 -2
- package/dist/{chunk-25nxsybw.js → chunk-vs0pve8j.js} +2 -2
- package/dist/{chunk-hgrs6wcy.js → chunk-x4zbf5c8.js} +1 -1
- package/dist/{chunk-z1h35hsa.js → chunk-xqcyxfy4.js} +2 -1
- package/dist/{chunk-0q0jn0kk.js → chunk-yajm5bx9.js} +1 -1
- package/dist/chunk-ybkvyfqx.js +2 -0
- package/dist/{chunk-f0ksrase.js → chunk-zmz07e1t.js} +2 -2
- package/dist/chunk-zxexe5eh.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/ports.d.ts +0 -1
- package/dist/queue.d.ts +3 -0
- package/dist/schedule.d.ts +3 -0
- package/dist/search.d.ts +3 -0
- package/package.json +54 -55
- package/dist/chunk-06g79v9j.js +0 -2
- package/dist/chunk-08bm2xax.js +0 -2
- package/dist/chunk-0enrsn65.js +0 -978
- package/dist/chunk-0m218zhk.js +0 -2
- package/dist/chunk-0qvaepnz.js +0 -2
- package/dist/chunk-0yyhz107.js +0 -2
- package/dist/chunk-11vhe2za.js +0 -2
- package/dist/chunk-13143jmy.js +0 -3
- package/dist/chunk-1agj4qty.js +0 -2
- package/dist/chunk-1c4yywmn.js +0 -9
- package/dist/chunk-1e2f0z80.js +0 -2
- package/dist/chunk-1v13dkfw.js +0 -2
- package/dist/chunk-20e0mpcw.js +0 -9
- package/dist/chunk-2mhj5ght.js +0 -2
- package/dist/chunk-2wrs9p57.js +0 -1
- package/dist/chunk-2yj4j69j.js +0 -2
- package/dist/chunk-2ymn50ck.js +0 -2
- package/dist/chunk-3vjfkr7v.js +0 -978
- package/dist/chunk-3y0gapf6.js +0 -2
- package/dist/chunk-4rb5r88h.js +0 -978
- package/dist/chunk-4wb68jfr.js +0 -2
- package/dist/chunk-5ewcj9vd.js +0 -2
- package/dist/chunk-5fm9mfqs.js +0 -2
- package/dist/chunk-5jhkn5by.js +0 -2
- package/dist/chunk-5m9xts4v.js +0 -2
- package/dist/chunk-63pxna7y.js +0 -978
- package/dist/chunk-6sqy7049.js +0 -2
- package/dist/chunk-6yazdvb4.js +0 -2
- package/dist/chunk-746p83dw.js +0 -2
- package/dist/chunk-76g7tr80.js +0 -2
- package/dist/chunk-7fz1p8p3.js +0 -10
- package/dist/chunk-814adsn3.js +0 -2
- package/dist/chunk-831wk0b3.js +0 -2
- package/dist/chunk-833tanrb.js +0 -2
- package/dist/chunk-8cx90pvv.js +0 -2
- package/dist/chunk-8yky4bsd.js +0 -10
- package/dist/chunk-91pnyybg.js +0 -9
- package/dist/chunk-99syj1p0.js +0 -2
- package/dist/chunk-9bxh78vd.js +0 -5
- package/dist/chunk-9jaqey2q.js +0 -2
- package/dist/chunk-9tyaew40.js +0 -2
- package/dist/chunk-9zcyq5gh.js +0 -2
- package/dist/chunk-a4g1e1n0.js +0 -2
- package/dist/chunk-a6g2jk1y.js +0 -2
- package/dist/chunk-aaqd43t5.js +0 -2
- package/dist/chunk-adswb3gq.js +0 -2
- package/dist/chunk-atnw2cq3.js +0 -2
- package/dist/chunk-avdharmq.js +0 -2
- package/dist/chunk-b13gbfg3.js +0 -2
- package/dist/chunk-bngyck4v.js +0 -2
- package/dist/chunk-brb5zthb.js +0 -1
- package/dist/chunk-bx2vf8g7.js +0 -5
- package/dist/chunk-c343n0yt.js +0 -2
- package/dist/chunk-cdwpqzrw.js +0 -2
- package/dist/chunk-cm7bwdk9.js +0 -2
- package/dist/chunk-cs5k02gt.js +0 -1
- package/dist/chunk-cv8f2v27.js +0 -2
- package/dist/chunk-d2dbhn2h.js +0 -2
- package/dist/chunk-d3awsfqm.js +0 -9
- package/dist/chunk-d9q17hb8.js +0 -2
- package/dist/chunk-dw62d69f.js +0 -2
- package/dist/chunk-e8p8v7ca.js +0 -978
- package/dist/chunk-ehhrhkwe.js +0 -9
- package/dist/chunk-enhf12a1.js +0 -2
- package/dist/chunk-f2d9w3nr.js +0 -2
- package/dist/chunk-f3y73e4b.js +0 -6
- package/dist/chunk-fe3xb8z9.js +0 -2
- package/dist/chunk-fg5gh4dn.js +0 -2
- package/dist/chunk-fh4rw8kr.js +0 -5
- package/dist/chunk-fxsv4p5c.js +0 -8
- package/dist/chunk-gg80s18j.js +0 -2
- package/dist/chunk-gjefq0nq.js +0 -2
- package/dist/chunk-h5saw32v.js +0 -2
- package/dist/chunk-ha75r57f.js +0 -8
- package/dist/chunk-hrsat16n.js +0 -8
- package/dist/chunk-hxy5t7tm.js +0 -10
- package/dist/chunk-hzfqtj82.js +0 -2
- package/dist/chunk-j2n86dsz.js +0 -2
- package/dist/chunk-jg68fsnk.js +0 -10
- package/dist/chunk-jhvjhf1j.js +0 -2
- package/dist/chunk-js6y6fm1.js +0 -2
- package/dist/chunk-jtax0mpm.js +0 -2
- package/dist/chunk-k59kbbvm.js +0 -2
- package/dist/chunk-kanz993c.js +0 -2
- package/dist/chunk-kg9abatp.js +0 -2
- package/dist/chunk-kvghsjg7.js +0 -5
- package/dist/chunk-ky8p46ae.js +0 -5
- package/dist/chunk-kzm498bh.js +0 -2
- package/dist/chunk-m4gwjnfh.js +0 -6
- package/dist/chunk-mevackhg.js +0 -9
- package/dist/chunk-msv6dcc2.js +0 -2
- package/dist/chunk-mxdajhb4.js +0 -10
- package/dist/chunk-mxzjn2gs.js +0 -978
- package/dist/chunk-n1bqkqk7.js +0 -10
- package/dist/chunk-n2c2dcxa.js +0 -2
- package/dist/chunk-njtyervf.js +0 -1
- package/dist/chunk-nx1598yr.js +0 -2
- package/dist/chunk-p18kqenr.js +0 -1
- package/dist/chunk-p23aswbf.js +0 -2
- package/dist/chunk-p55ntqj0.js +0 -2
- package/dist/chunk-p5va3trj.js +0 -2
- package/dist/chunk-p88bsqtc.js +0 -10
- package/dist/chunk-p9z7f8c8.js +0 -2
- package/dist/chunk-ppkzf21q.js +0 -8
- package/dist/chunk-prqq5zw2.js +0 -2
- package/dist/chunk-pv6hp18q.js +0 -10
- package/dist/chunk-q9ycfthp.js +0 -2
- package/dist/chunk-qhcx6dmf.js +0 -2
- package/dist/chunk-qma4ysd8.js +0 -9
- package/dist/chunk-qq851psj.js +0 -6
- package/dist/chunk-qqp394c2.js +0 -2
- package/dist/chunk-r6rhrt1p.js +0 -2
- package/dist/chunk-ra5sfgg4.js +0 -2
- package/dist/chunk-rfd43z7p.js +0 -5
- package/dist/chunk-rtfeef82.js +0 -2
- package/dist/chunk-ryjbc6dz.js +0 -5
- package/dist/chunk-s2n3hw0a.js +0 -2
- package/dist/chunk-sk3x55wm.js +0 -2
- package/dist/chunk-sm7vvfqf.js +0 -2
- package/dist/chunk-sqbdav33.js +0 -2
- package/dist/chunk-sy4d4hnx.js +0 -2
- package/dist/chunk-t0b356bb.js +0 -978
- package/dist/chunk-t9wdnzz4.js +0 -6
- package/dist/chunk-v25g7h01.js +0 -2
- package/dist/chunk-v7zy7xda.js +0 -1
- package/dist/chunk-v9kknk69.js +0 -2
- package/dist/chunk-vg4vfkzk.js +0 -6
- package/dist/chunk-vgcre8jy.js +0 -2
- package/dist/chunk-vqyngnj0.js +0 -9
- package/dist/chunk-w17d2rbd.js +0 -6
- package/dist/chunk-x22v9kvb.js +0 -2
- package/dist/chunk-xacjs4ar.js +0 -6
- package/dist/chunk-xmdbxa8w.js +0 -1
- package/dist/chunk-xy6hjazn.js +0 -978
- package/dist/chunk-y0m35t3m.js +0 -2
- package/dist/chunk-y1tre8v8.js +0 -8
- package/dist/chunk-y50mc7dt.js +0 -2
- package/dist/chunk-y93ke5m6.js +0 -2
- package/dist/chunk-yktee4wv.js +0 -1
- package/dist/chunk-yvmyw2r2.js +0 -2
- package/dist/chunk-z6xydw90.js +0 -2
- package/dist/chunk-zak32nab.js +0 -2
- package/dist/stacks +0 -0
package/dist/chunk-y0m35t3m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{wa as z,xa as P}from"./chunk-b13gbfg3.js";import"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import{wb as D}from"./chunk-gg80s18j.js";import{xb as _}from"./chunk-d2dbhn2h.js";var m=_(D(),1);import{parse as o}from"url";var K=_(D(),1);import{Buffer as a}from"buffer";import{request as n}from"http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.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 m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=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(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
|
package/dist/chunk-y1tre8v8.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{Eb as X}from"./chunk-p9z7f8c8.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
2
|
-
no longer support Node.js 16.x on January 6, 2025.
|
|
3
|
-
|
|
4
|
-
To continue receiving updates to AWS services, bug fixes, and security
|
|
5
|
-
updates please upgrade to a supported Node.js LTS version.
|
|
6
|
-
|
|
7
|
-
More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}H(Q,"setCredentialFeature");function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}H(R,"setFeature")});
|
|
8
|
-
export{M as vb};
|
package/dist/chunk-y50mc7dt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lb as L,rb as M}from"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import{wb as j}from"./chunk-hrsat16n.js";import{Ab as D,yb as O}from"./chunk-yktee4wv.js";import{Db as k}from"./chunk-yvmyw2r2.js";var R=k(j(),1);var G=k(j(),1);var J=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-xacjs4ar.js"),{fromContainerMetadata:E}=await import("./chunk-cdwpqzrw.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>D(x(b??{}),E(b))().then(C)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-cdwpqzrw.js");return async()=>x(b)().then(C)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-jr4naxsv.js");return async()=>x(b)().then(C)}};if(y in I)return I[y];else throw new O(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},C=(y)=>G.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var T=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(u(y,{profile:w,logger:_})||v(y,{profile:w,logger:_}))},u=(y,{profile:w,logger:_})=>{let I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},v=(y,{profile:w,logger:_})=>{let I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},U=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y];if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-06g79v9j.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}let{source_profile:x}=b;if(x&&x in I)throw new O(`Detected a cycle attempting to resolve credentials for profile ${L(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);let E=x?A(x,w,_,{...I,[x]:!0},Q(w[x]??{})):(await J(b.credential_source,y,_.logger)(_))();if(Q(b))return E.then((K)=>R.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new O(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}let h=await E;return _.roleAssumer(h,K).then((m)=>R.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},Q=(y)=>{return!y.role_arn&&!!y.credential_source};var V=k(j(),1),W=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",X=async(y,w)=>import("./chunk-zak32nab.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>V.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var $=k(j(),1),Y=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-11vhe2za.js");return I({profile:y,logger:_.logger})().then((b)=>{if(w.sso_session)return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},Z=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var H=k(j(),1),q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return H.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var c=k(j(),1),S=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,F=async(y,w)=>import("./chunk-sqbdav33.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>c.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var A=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&q(x))return z(x,_);if(b||T(x,{profile:y,logger:_.logger}))return U(y,w,_,I);if(q(x))return z(x,_);if(S(x))return F(x,_);if(W(x))return X(_,y);if(Z(x))return await Y(y,x,_);throw new O(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var by=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let w=await M(y);return A(L(y),w,y)};export{by as fromIni};
|
package/dist/chunk-y93ke5m6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kb as N,lb as X,mb as I,pb as R,qb as v}from"./chunk-8gx9at51.js";import"./chunk-6yazdvb4.js";import{vb as ee}from"./chunk-ha75r57f.js";import{wb as h}from"./chunk-gg80s18j.js";import{xb as l}from"./chunk-d2dbhn2h.js";var T=l(h(),1);var K=(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 $=l(ee(),1);var u=l(h(),1);var b=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var D={},U=async(e)=>{let{SSOOIDCClient:r}=await import("./chunk-sm7vvfqf.js");if(D[e])return D[e];let s=new r({region:e});return D[e]=s,s};var q=async(e,r)=>{let{CreateTokenCommand:s}=await import("./chunk-sm7vvfqf.js");return(await U(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var W=l(h(),1);var P=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new W.TokenProviderError(`Token is expired. ${_}`,!1)};var j=l(h(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new j.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as Q}from"fs";var{writeFile:Z}=Q,z=(e,r)=>{let s=X(e),t=JSON.stringify(r,null,2);return Z(s,t)};var J=new Date(0),V=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await v(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 R(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:f,sso_region:S}=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. ${_}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);let{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>b)return c;if(Date.now()-J.getTime()<30000)return P(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{J.setTime(Date.now());let n=await q(o,S);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);let g=new Date(Date.now()+n.expiresIn*1000);try{await z(i,{...o,accessToken:n.accessToken,expiresAt:g.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:g}}catch(n){return P(c),c}};var k=l(h(),1);var y=!1,F=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:m,clientConfig:a,profile:f,logger:S})=>{let o,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{let w=await V({profile:f})();o={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new k.CredentialsProviderError(w.message,{tryNextLink:y,logger:S})}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:S})}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:S});let{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-2yj4j69j.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:S})}let{roleCredentials:{accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:M,credentialScope:G,accountId:H}={}}=C;if(!d||!O||!L||!M)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:S});let A={accessKeyId:d,secretAccessKey:O,sessionToken:L,expiration:new Date(M),...G&&{credentialScope:G},...H&&{accountId:H}};if(r)$.setCredentialFeature(A,"CREDENTIALS_SSO","s");else $.setCredentialFeature(A,"CREDENTIALS_SSO_LEGACY","u");return A};var Y=l(h(),1),B=(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 Y.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 Ie=(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,f=N(e);if(!r&&!s&&!t&&!i&&!m){let o=(await v(e))[f];if(!o)throw new T.CredentialsProviderError(`Profile ${f} was not found.`,{logger:e.logger});if(!K(o))throw new T.CredentialsProviderError(`Profile ${f} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){let d=(await R(e))[o.sso_session],O=` configurations in profile ${f} 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}=B(o,e.logger);return F({ssoStartUrl:E,ssoSession:g,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:f})}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 F({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:f})};export{B as validateSsoProfile,K as isSsoProfile,Ie as fromSSO};
|
package/dist/chunk-yktee4wv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class n extends Error{constructor(t,e=!0){let o,r=!0;if(typeof e==="boolean")o=void 0,r=e;else if(e!=null&&typeof e==="object")o=e.logger,r=e.tryNextLink??!0;super(t);this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,n.prototype),o?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${t}`)}static from(t,e=!0){return Object.assign(new this(t.message,e),t)}}class u extends n{constructor(t,e=!0){super(t,e);this.name="CredentialsProviderError",Object.setPrototypeOf(this,u.prototype)}}class l extends n{constructor(t,e=!0){super(t,e);this.name="TokenProviderError",Object.setPrototypeOf(this,l.prototype)}}var v=(...t)=>async()=>{if(t.length===0)throw new n("No providers in chain");let e;for(let o of t)try{return await o()}catch(r){if(e=r,r?.tryNextLink)continue;throw r}throw e};var w=(t)=>()=>Promise.resolve(t);var b=(t,e,o)=>{let r,i,s,f=!1,a=async()=>{if(!i)i=t();try{r=await i,s=!0,f=!1}finally{i=void 0}return r};if(e===void 0)return async(c)=>{if(!s||c?.forceRefresh)r=await a();return r};return async(c)=>{if(!s||c?.forceRefresh)r=await a();if(f)return r;if(o&&!o(r))return f=!0,r;if(e(r))return await a(),r;return r}};export{n as xb,u as yb,l as zb,v as Ab,w as Bb,b as Cb};
|
package/dist/chunk-yvmyw2r2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b},o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var q=(a,b)=>()=>(a&&(b=a(a=0)),b);
|
|
2
|
-
export{m as Db,n as Eb,o as Fb,p as Gb,q as Hb};
|
package/dist/chunk-z6xydw90.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$ as pe,M as Le,N as Me,O as We,P as Ae,Q as ys,R as F,S as Ke,T as V,U as O,V as N,W as f,X as x,Y as Qe,Z as ie,_ as le,aa as ye,ba as Xe,ca as Ye,da as ds,ea as ns,fa as Ze,ga as me,ha as he,ia as Te,ja as ue,ka as He,la as ke,ma as Re,na as te,oa as re,pa as Ee,qa as qe,ra as ae,sa as de,ta as Se,ua as Ie,va as Pe}from"./chunk-p88bsqtc.js";import{wa as l,xa as ee}from"./chunk-p55ntqj0.js";import{$a as $e,Ja as je,Ka as os,La as R,Pa as D,Qa as fe,Ra as h,Va as Ve,Wa as u,Xa as ge,Ya as we,Za as be,ab as Je,cb as es,db as se,eb as i,fb as y,gb as ss,hb as xe,ib as ve,ya as Ue,za as _e}from"./chunk-ky8p46ae.js";import"./chunk-njtyervf.js";import"./chunk-avdharmq.js";import"./chunk-y1tre8v8.js";import"./chunk-v7zy7xda.js";import{Cb as c}from"./chunk-p9z7f8c8.js";var p=c(F(),1);var _=c(x(),1),v=c(ys(),1),$=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ms(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(ms(e))}return s},I=(e)=>{return{..._.resolveAwsSdkSigV4Config(e)}};var P=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var L={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.679.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.679.0","@aws-sdk/middleware-host-header":"3.679.0","@aws-sdk/middleware-logger":"3.679.0","@aws-sdk/middleware-recursion-detection":"3.679.0","@aws-sdk/middleware-user-agent":"3.679.0","@aws-sdk/region-config-resolver":"3.679.0","@aws-sdk/types":"3.679.0","@aws-sdk/util-endpoints":"3.679.0","@aws-sdk/util-user-agent-browser":"3.679.0","@aws-sdk/util-user-agent-node":"3.679.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@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.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@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=c(x(),1);var ne=c(x(),1),oe=c(F(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[T],Y=[j],Z=[{["ref"]:"Region"}],us={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:n,headers:n},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[T,j],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},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:n,headers:n},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=us;var ws=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return ws.get(e,()=>N(G,{endpointParams:e,logger:s.logger}))};O.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??de,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ne.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new se,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ee,utf8Decoder:e?.utf8Decoder??te,utf8Encoder:e?.utf8Encoder??re}};var De=(e)=>{be(process.version);let s=Se(e),t=()=>s().then(we),r=ce(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:L.version}),maxAttempts:e?.maxAttempts??l(he),region:e?.region??l(pe,ye),requestHandler:xe.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ue,default:async()=>(await t()).retryMode||me}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??ve,useDualstackEndpoint:e?.useDualstackEndpoint??l(ie),useFipsEndpoint:e?.useFipsEndpoint??l(le),userAgentAppId:e?.userAgentAppId??l(Re)}};var Be=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((B)=>B.schemeId===a.schemeId);if(d===-1)s.push(a);else s.splice(d,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 k=(e)=>e,Ce=(e,s)=>{let t={...k(Ie(e)),...k($e(e)),...k(Ue(e)),...k(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Pe(t),...Je(t),..._e(t),...Fe(t)}};class Ge extends je{constructor(...[e]){let s=De(e||{}),t=P(s),r=Ke(t),a=Te(r),d=Xe(a),B=Le(d),is=Ze(B),ls=I(is),U=Ce(ls,e?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ye(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:$,identityProviderConfigProvider:async(ps)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ps.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Ve{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class E extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:R}}),bs=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Ne=(e)=>({...e,...e.roleCredentials&&{roleCredentials:bs(e.roleCredentials)}});var m=c(x(),1),ts=c(F(),1);var rs=async(e,s)=>{let t=ts.requestBuilder(e,s),r=i({},es,{[Us]:e[zs]});t.bp("/federation/credentials");let a=i({[Fs]:[,D(e[Bs],"roleName")],[Ds]:[,D(e[Ss],"accountId")]}),d;return t.m("GET").h(r).q(a).b(d),t.build()};var as=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return xs(e,s);let t=i({$metadata:w(e)}),r=D(fe(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ss});return Object.assign(t,a),t};var xs=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 ks(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Rs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Es(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await qs(t,s);default:let a=t.body;return vs({output:e,parsedBody:a,errorCode:r})}},vs=ge(o),ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new E({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new q({$metadata:w(e),...t});return u(d,e.body)},Es=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new S({$metadata:w(e),...t});return u(d,e.body)},qs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new z({$metadata:w(e),...t});return u(d,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 Ss="accountId",zs="accessToken",Ds="account_id";var Bs="roleName",Fs="role_name",Us="x-amz-sso_bearer_token";class cs extends os.classBuilder().ep(C).m(function(e,s,t,r){return[ds(t,this.serialize,this.deserialize),ns(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ne).ser(rs).de(as).build(){}export{Ge as SSOClient,cs as GetRoleCredentialsCommand};
|
package/dist/chunk-zak32nab.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lb as _,rb as A}from"./chunk-xmdbxa8w.js";import"./chunk-ra5sfgg4.js";import{wb as K}from"./chunk-hrsat16n.js";import{yb as o}from"./chunk-yktee4wv.js";import{Db as E}from"./chunk-yvmyw2r2.js";import{exec as T}from"child_process";import{promisify as y}from"util";var w=E(K(),1),S=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let i=new Date;if(new Date(n.Expiration)<i)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let t={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return w.setCredentialFeature(t,"CREDENTIALS_PROCESS","w"),t};var x=async(c,n,e)=>{let s=n[c];if(n[c]){let t=s.credential_process;if(t!==void 0){let i=y(T);try{let{stdout:r}=await i(t),u;try{u=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return S(c,u,n)}catch(r){throw new o(r.message,{logger:e})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var R=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let n=await A(c);return x(_(c),n,c.logger)};export{R as fromProcess};
|
package/dist/stacks
DELETED
|
Binary file
|