create-sailor 1.3.2 → 1.3.3
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 +23 -8
- package/dist/index.js +130 -130
- package/package.json +2 -2
- package/dist/aws-kms-BRGZLC2X.js +0 -1
- package/dist/chunk-2VIWVVHK.js +0 -1
- package/dist/chunk-4F23MJOI.js +0 -1
- package/dist/chunk-6EI2BXXZ.js +0 -1
- package/dist/chunk-7DCGNQSQ.js +0 -5
- package/dist/chunk-7HOF72FC.js +0 -1
- package/dist/chunk-7VJYOZUP.js +0 -2
- package/dist/chunk-7Z3O7WJM.js +0 -49
- package/dist/chunk-B35GFLVZ.js +0 -5
- package/dist/chunk-BAI5W3AB.js +0 -1
- package/dist/chunk-DGJUBN33.js +0 -1
- package/dist/chunk-DIXI4M5O.js +0 -1
- package/dist/chunk-EA5HU2X4.js +0 -9
- package/dist/chunk-EXLRPVEX.js +0 -1
- package/dist/chunk-FGJ5K4WM.js +0 -1
- package/dist/chunk-HC3S5NWW.js +0 -1
- package/dist/chunk-KIX47M2V.js +0 -40
- package/dist/chunk-LOPYJ44X.js +0 -31
- package/dist/chunk-O3WYNHSC.js +0 -20
- package/dist/chunk-OJM5Y4UT.js +0 -1
- package/dist/chunk-PXU2OOBT.js +0 -1
- package/dist/chunk-QEIMNOY2.js +0 -1
- package/dist/chunk-QMKVUKS6.js +0 -1
- package/dist/chunk-RR5R4AKJ.js +0 -1
- package/dist/chunk-XSSPJU77.js +0 -1
- package/dist/chunk-YW4FFW47.js +0 -1
- package/dist/chunk-ZEEOYOWD.js +0 -1
- package/dist/credits-L2HL2UEU.js +0 -1787
- package/dist/dist-XS6SQF6X.js +0 -5
- package/dist/dist-Z6UUHTH2.js +0 -8
- package/dist/dist-es-M3FWVZJF.js +0 -1
- package/dist/dist-es-NDZJSZR3.js +0 -2
- package/dist/dist-es-NVFYVK4E.js +0 -1
- package/dist/dist-es-OUTR3NFA.js +0 -5
- package/dist/dist-es-UGE2JJUB.js +0 -1
- package/dist/dist-es-VHZAJVLW.js +0 -1
- package/dist/dist-es-WTYBIVJ2.js +0 -2
- package/dist/event-streams-WTP73PI5.js +0 -1
- package/dist/getMachineId-bsd-DVN24SFH.js +0 -1
- package/dist/getMachineId-darwin-LMU6AYNV.js +0 -2
- package/dist/getMachineId-linux-BHWLMOUW.js +0 -1
- package/dist/getMachineId-unsupported-G5LY7Y3J.js +0 -1
- package/dist/getMachineId-win-CWK62SDK.js +0 -1
- package/dist/loadSso-O5OGD76B.js +0 -1
- package/dist/local-V5XPOCXA.js +0 -1
- package/dist/multipart-parser-73SROTP5.js +0 -2
- package/dist/query_compiler_fast_bg.postgresql-7BFUBDOL.js +0 -2
- package/dist/query_compiler_fast_bg.postgresql.wasm-base64-I4FAC6EL.js +0 -1
- package/dist/signin-DZIPNQBV.js +0 -1
- package/dist/src-BFSJ5KFS.js +0 -3
- package/dist/src-ERQKJBBE.js +0 -1
- package/dist/sso-oidc-SYBBWZG3.js +0 -1
- package/dist/sts-DREA5KZD.js +0 -6
package/dist/dist-Z6UUHTH2.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as $}from"./chunk-B35GFLVZ.js";import{a as p,c as w}from"./chunk-DGJUBN33.js";var H=w(i=>{"use strict";var V=i&&i.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),X=i&&i.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),D=i&&i.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&V(t,e,r);return X(t,e),t};Object.defineProperty(i,"__esModule",{value:!0});i.req=i.json=i.toBuffer=void 0;var Y=D(p("http")),Z=D(p("https"));async function T(e){let t=0,r=[];for await(let n of e)t+=n.length,r.push(n);return Buffer.concat(r,t)}i.toBuffer=T;async function ee(e){let r=(await T(e)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=` (input: ${r})`,o}}i.json=ee;function te(e,t={}){let n=((typeof e=="string"?e:e.href).startsWith("https:")?Z:Y).request(e,t),o=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=o.then.bind(o),n}i.req=te});var k=w(c=>{"use strict";var L=c&&c.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),re=c&&c.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),R=c&&c.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&L(t,e,r);return re(t,e),t},ne=c&&c.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&L(t,e,r)};Object.defineProperty(c,"__esModule",{value:!0});c.Agent=void 0;var oe=R(p("net")),I=R(p("http")),se=p("https");ne(H(),c);var d=Symbol("AgentBaseInternalState"),q=class extends I.Agent{constructor(t){super(t),this[d]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
2
|
-
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(t){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[t]||(this.sockets[t]=[]);let r=new oe.Socket({writable:!1});return this.sockets[t].push(r),this.totalSocketCount++,r}decrementSockets(t,r){if(!this.sockets[t]||r===null)return;let n=this.sockets[t],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[t])}getName(t){return this.isSecureEndpoint(t)?se.Agent.prototype.getName.call(this,t):super.getName(t)}createSocket(t,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(t,o)).then(f=>{if(this.decrementSockets(s,a),f instanceof I.Agent)try{return f.addRequest(t,o)}catch(_){return n(_)}this[d].currentSocket=f,super.createSocket(t,r,n)},f=>{this.decrementSockets(s,a),n(f)})}createConnection(){let t=this[d].currentSocket;if(this[d].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[d].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[d]&&(this[d].defaultPort=t)}get protocol(){return this[d].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[d]&&(this[d].protocol=t)}};c.Agent=q});var U=w(g=>{"use strict";var ie=g&&g.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0});g.parseProxyResponse=void 0;var ce=ie($()),j=(0,ce.default)("https-proxy-agent:parse-proxy-response");function ue(e){return new Promise((t,r)=>{let n=0,o=[];function s(){let h=e.read();h?b(h):e.once("readable",s)}function a(){e.removeListener("end",f),e.removeListener("error",_),e.removeListener("readable",s)}function f(){a(),j("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function _(h){a(),j("onerror %o",h),r(h)}function b(h){o.push(h),n+=h.length;let y=Buffer.concat(o,n),l=y.indexOf(`\r
|
|
3
|
-
\r
|
|
4
|
-
`);if(l===-1){j("have not received end of HTTP headers yet..."),s();return}let A=y.slice(0,l).toString("ascii").split(`\r
|
|
5
|
-
`),m=A.shift();if(!m)return e.destroy(),r(new Error("No header received from proxy CONNECT response"));let B=m.split(" "),G=+B[1],Q=B.slice(2).join(" "),v={};for(let O of A){if(!O)continue;let N=O.indexOf(":");if(N===-1)return e.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${O}"`));let x=O.slice(0,N).toLowerCase(),M=O.slice(N+1).trimStart(),S=v[x];typeof S=="string"?v[x]=[S,M]:Array.isArray(S)?S.push(M):v[x]=M}j("got proxy server response: %o %o",m,v),a(),t({connect:{statusCode:G,statusText:Q,headers:v},buffered:y})}e.on("error",_),e.on("end",f),s()})}g.parseProxyResponse=ue});var ge=w(u=>{var ae=u&&u.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),fe=u&&u.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),K=u&&u.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ae(t,e,r);return fe(t,e),t},W=u&&u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u,"__esModule",{value:!0});u.HttpsProxyAgent=void 0;var C=K(p("net")),z=K(p("tls")),le=W(p("assert")),he=W($()),de=k(),pe=p("url"),_e=U(),P=(0,he.default)("https-proxy-agent"),F=e=>e.servername===void 0&&e.host&&!C.isIP(e.host)?{...e,servername:e.host}:e,E=class extends de.Agent{constructor(t,r){super(r),this.options={path:void 0},this.proxy=typeof t=="string"?new pe.URL(t):t,this.proxyHeaders=r?.headers??{},P("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?J(r,"headers"):null,host:n,port:o}}async connect(t,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;n.protocol==="https:"?(P("Creating `tls.Socket`: %o",this.connectOpts),o=z.connect(F(this.connectOpts))):(P("Creating `net.Socket`: %o",this.connectOpts),o=C.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=C.isIPv6(r.host)?`[${r.host}]`:r.host,f=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
6
|
-
`;if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(s))f+=`${l}: ${s[l]}\r
|
|
7
|
-
`;let _=(0,_e.parseProxyResponse)(o);o.write(`${f}\r
|
|
8
|
-
`);let{connect:b,buffered:h}=await _;if(t.emit("proxyConnect",b),this.emit("proxyConnect",b,t),b.statusCode===200)return t.once("socket",ye),r.secureEndpoint?(P("Upgrading socket connection to TLS"),z.connect({...J(F(r),"host","path","port"),socket:o})):o;o.destroy();let y=new C.Socket({writable:!1});return y.readable=!0,t.once("socket",l=>{P("Replaying proxy buffer for failed request"),(0,le.default)(l.listenerCount("data")>0),l.push(h),l.push(null)}),y}};E.protocols=["http","https"];u.HttpsProxyAgent=E;function ye(e){e.resume()}function J(e,...t){let r={},n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}});export default ge();
|
package/dist/dist-es-M3FWVZJF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as d}from"./chunk-FGJ5K4WM.js";import{a as l}from"./chunk-QMKVUKS6.js";import{b as c}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";import{readFileSync as _}from"fs";var a=e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:s,providerId:n,policyArns:g,policy:p,durationSeconds:E}=e,{roleAssumerWithWebIdentity:i}=e;if(!i){let{getDefaultRoleAssumerWithWebIdentity:f}=await import("./sts-DREA5KZD.js");i=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return i({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:n,PolicyArns:g,Policy:p,DurationSeconds:E})};var m="AWS_WEB_IDENTITY_TOKEN_FILE",S="AWS_ROLE_ARN",N="AWS_ROLE_SESSION_NAME",w=(e={})=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[m],r=e?.roleArn??process.env[S],s=e?.roleSessionName??process.env[N];if(!o||!r)throw new c("Web identity configuration not specified",{logger:e.logger});let n=await a({...e,webIdentityToken:d?.getTokenRecord?.()[o]??_(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})(t);return o===process.env[m]&&l(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),n};export{w as fromTokenFile,a as fromWebToken};
|
package/dist/dist-es-NDZJSZR3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as M,c as u}from"./chunk-PXU2OOBT.js";import"./chunk-DIXI4M5O.js";import"./chunk-FGJ5K4WM.js";import{a as S,b as s}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";import{parse as $}from"url";import{Buffer as W}from"buffer";import{request as K}from"http";function m(e){return new Promise((t,n)=>{let o=K({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});o.on("error",r=>{n(Object.assign(new S("Unable to connect to instance metadata service"),r)),o.destroy()}),o.on("timeout",()=>{n(new S("TimeoutError from instance metadata service")),o.destroy()}),o.on("response",r=>{let{statusCode:a=400}=r;(a<200||300<=a)&&(n(Object.assign(new S("Error response received from instance metadata service"),{statusCode:a})),o.destroy());let f=[];r.on("data",i=>{f.push(i)}),r.on("end",()=>{t(W.concat(f)),o.destroy()})}),o.end()})}var N=e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string",g=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}});var pe=1e3,me=0,h=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t});var A=(e,t)=>{let n=e();for(let o=0;o<t;o++)n=n.catch(e);return n};var C="AWS_CONTAINER_CREDENTIALS_FULL_URI",O="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",y="AWS_CONTAINER_AUTHORIZATION_TOKEN",Ne=(e={})=>{let{timeout:t,maxRetries:n}=h(e);return()=>A(async()=>{let o=await j({logger:e.logger}),r=JSON.parse(await B(t,o));if(!N(r))throw new s("Invalid response received from instance metadata service.",{logger:e.logger});return g(r)},n)},B=async(e,t)=>(process.env[y]&&(t.headers={...t.headers,Authorization:process.env[y]}),(await m({...t,timeout:e})).toString()),G="169.254.170.2",q={localhost:!0,"127.0.0.1":!0},H={"http:":!0,"https:":!0},j=async({logger:e})=>{if(process.env[O])return{hostname:G,path:process.env[O]};if(process.env[C]){let t=$(process.env[C]);if(!t.hostname||!(t.hostname in q))throw new s(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in H))throw new s(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new s(`The container metadata credential provider cannot be used unless the ${O} or ${C} environment variable is set`,{tryNextLink:!1,logger:e})};var v=class e extends s{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(t,n=!0){super(t,n),this.tryNextLink=n,Object.setPrototypeOf(this,e.prototype)}};var _;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"})(_||(_={}));var Y="AWS_EC2_METADATA_SERVICE_ENDPOINT",J="ec2_metadata_service_endpoint",P={environmentVariableSelector:e=>e[Y],configFileSelector:e=>e[J],default:void 0};var p;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(p||(p={}));var z="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",X="ec2_metadata_service_endpoint_mode",R={environmentVariableSelector:e=>e[z],configFileSelector:e=>e[X],default:p.IPv4};var D=async()=>M(await Z()||await Q()),Z=async()=>u(P)(),Q=async()=>{let e=await u(R)();switch(e){case p.IPv4:return _.IPv4;case p.IPv6:return _.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(p)}`)}};var ee="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",w=(e,t)=>{let n=300+Math.floor(Math.random()*300),o=new Date(Date.now()+n*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(o)}.
|
|
2
|
-
For more information, please visit: `+ee);let r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:o}};var b=(e,t={})=>{let n=t?.logger||console,o;return async()=>{let r;try{r=await e(),r.expiration&&r.expiration.getTime()<Date.now()&&(r=w(r,n))}catch(a){if(o)n.warn("Credential renew failed: ",a),r=w(o,n);else throw a}return o=r,r}};var k="/latest/meta-data/iam/security-credentials/",te="/latest/api/token",x="AWS_EC2_METADATA_V1_DISABLED",F="ec2_metadata_v1_disabled",L="x-aws-ec2-metadata-token",Je=(e={})=>b(oe(e),{logger:e.logger}),oe=(e={})=>{let t=!1,{logger:n,profile:o}=e,{timeout:r,maxRetries:a}=h(e),f=async(i,E)=>{if(t||E.headers?.[L]==null){let c=!1,d=!1,U=await u({environmentVariableSelector:l=>{let I=l[x];if(d=!!I&&I!=="false",I===void 0)throw new s(`${x} not set in env, checking config file next.`,{logger:e.logger});return d},configFileSelector:l=>{let I=l[F];return c=!!I&&I!=="false",c},default:!1},{profile:o})();if(e.ec2MetadataV1Disabled||U){let l=[];throw e.ec2MetadataV1Disabled&&l.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),c&&l.push(`config file profile (${F})`),d&&l.push(`process environment variable (${x})`),new v(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${l.join(", ")}].`)}}let V=(await A(async()=>{let c;try{c=await ne(E)}catch(d){throw d.statusCode===401&&(t=!1),d}return c},i)).trim();return A(async()=>{let c;try{c=await ae(V,E,e)}catch(d){throw d.statusCode===401&&(t=!1),d}return c},i)};return async()=>{let i=await D();if(t)return n?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),f(a,{...i,timeout:r});{let E;try{E=(await re({...i,timeout:r})).toString()}catch(T){if(T?.statusCode===400)throw Object.assign(T,{message:"EC2 Metadata token request returned error"});return(T.message==="TimeoutError"||[403,404,405].includes(T.statusCode))&&(t=!0),n?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),f(a,{...i,timeout:r})}return f(a,{...i,headers:{[L]:E},timeout:r})}}},re=async e=>m({...e,path:te,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),ne=async e=>(await m({...e,path:k})).toString(),ae=async(e,t,n)=>{let o=JSON.parse((await m({...t,path:k+e})).toString());if(!N(o))throw new s("Invalid response received from instance metadata service.",{logger:n.logger});return g(o)};export{me as DEFAULT_MAX_RETRIES,pe as DEFAULT_TIMEOUT,y as ENV_CMDS_AUTH_TOKEN,C as ENV_CMDS_FULL_URI,O as ENV_CMDS_RELATIVE_URI,_ as Endpoint,Ne as fromContainerMetadata,Je as fromInstanceMetadata,D as getInstanceMetadataEndpoint,m as httpRequest,h as providerConfigFromInit};
|
package/dist/dist-es-NVFYVK4E.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-DIXI4M5O.js";import{b as y,e as L,h as k}from"./chunk-FGJ5K4WM.js";import{a as b}from"./chunk-XSSPJU77.js";import{a as c}from"./chunk-QMKVUKS6.js";import{b as l}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";var O=(e,r,t)=>{let o={EcsContainer:async s=>{let{fromHttp:i}=await import("./dist-es-OUTR3NFA.js"),{fromContainerMetadata:n}=await import("./dist-es-NDZJSZR3.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>D(i(s??{}),n(s))().then(I)},Ec2InstanceMetadata:async s=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./dist-es-NDZJSZR3.js");return async()=>i(s)().then(I)},Environment:async s=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./dist-es-VHZAJVLW.js");return async()=>i(s)().then(I)}};if(e in o)return o[e];throw new l(`Unsupported credential source in profile ${r}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},I=e=>c(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var N=(e,{profile:r="default",logger:t}={})=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(Y(e,{profile:r,logger:t})||z(e,{profile:r,logger:t})),Y=(e,{profile:r,logger:t})=>{let o=typeof e.source_profile=="string"&&typeof e.credential_source>"u";return o&&t?.debug?.(` ${r} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),o},z=(e,{profile:r,logger:t})=>{let o=typeof e.credential_source=="string"&&typeof e.source_profile>"u";return o&&t?.debug?.(` ${r} isCredentialSourceProfile credential_source=${e.credential_source}`),o},$=async(e,r,t,o,s={},i)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=r[e],{source_profile:a,region:p}=n;if(!t.roleAssumer){let{getDefaultRoleAssumer:u}=await import("./sts-DREA5KZD.js");t.roleAssumer=u({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...o,...t?.parentClientConfig,region:p??t?.parentClientConfig?.region??o?.region}},t.clientPlugins)}if(a&&a in s)throw new l(`Detected a cycle attempting to resolve credentials for profile ${y(t)}. Profiles visited: `+Object.keys(s).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${a?`source_profile=[${a}]`:`profile=[${e}]`}`);let m=a?i(a,r,t,o,{...s,[a]:!0},F(r[a]??{})):(await O(n.credential_source,e,t.logger)(t))();if(F(n))return m.then(u=>c(u,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{let u={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:d}=n;if(d){if(!t.mfaCodeProvider)throw new l(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});u.SerialNumber=d,u.TokenCode=await t.mfaCodeProvider(d)}let g=await m;return t.roleAssumer(g,u).then(f=>c(f,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},F=e=>!e.role_arn&&!!e.credential_source;import{createHash as V,createPrivateKey as X,createPublicKey as Q,sign as Z}from"crypto";import{promises as P}from"fs";import{homedir as ee}from"os";import{dirname as te,join as K}from"path";var E=class e{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(r,t,o){this.profileData=r,this.init=t,this.callerClientConfig=o}async loadCredentials(){let r=await this.loadToken();if(!r)throw new l(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let t=r.accessToken,o=Date.now();return new Date(t.expiresAt).getTime()-o<=e.REFRESH_THRESHOLD?this.refresh(r):{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,accountId:t.accountId,expiration:new Date(t.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(r){let{SigninClient:t,CreateOAuth2TokenCommand:o}=await import("./signin-DZIPNQBV.js"),{logger:s,userAgentAppId:i}=this.callerClientConfig??{},a=(d=>d?.metadata?.handlerProtocol==="h2")(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,p=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,m=new t({credentials:{accessKeyId:"",secretAccessKey:""},region:p,requestHandler:a,logger:s,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(m.middlewareStack);let u={tokenInput:{clientId:r.clientId,refreshToken:r.refreshToken,grantType:"refresh_token"}};try{let d=await m.send(new o(u)),{accessKeyId:g,secretAccessKey:f,sessionToken:_}=d.tokenOutput?.accessToken??{},{refreshToken:w,expiresIn:R}=d.tokenOutput??{};if(!g||!f||!_||!w)throw new l("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let S=(R??900)*1e3,h=new Date(Date.now()+S),A={...r,accessToken:{...r.accessToken,accessKeyId:g,secretAccessKey:f,sessionToken:_,expiresAt:h.toISOString()},refreshToken:w};await this.saveToken(A);let C=A.accessToken;return{accessKeyId:C.accessKeyId,secretAccessKey:C.secretAccessKey,sessionToken:C.sessionToken,accountId:C.accountId,expiration:h}}catch(d){if(d.name==="AccessDeniedException"){let g=d.error,f;switch(g){case"TOKEN_EXPIRED":f="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":f="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":f="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:f=`Failed to refresh token: ${String(d)}. Please re-authenticate using \`aws login\``}throw new l(f,{logger:this.logger,tryNextLink:!1})}throw new l(`Failed to refresh token: ${String(d)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let r=this.getTokenFilePath();try{let t;try{t=await L(r,{ignoreCache:this.init?.ignoreCache})}catch{t=await P.readFile(r,"utf8")}let o=JSON.parse(t),s=["accessToken","clientId","refreshToken","dpopKey"].filter(i=>!o[i]);if(o.accessToken?.accountId||s.push("accountId"),s.length>0)throw new l(`Token validation failed, missing fields: ${s.join(", ")}`,{logger:this.logger,tryNextLink:!1});return o}catch(t){throw new l(`Failed to load token from ${r}: ${String(t)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(r){let t=this.getTokenFilePath(),o=te(t);try{await P.mkdir(o,{recursive:!0})}catch{}await P.writeFile(t,JSON.stringify(r,null,2),"utf8")}getTokenFilePath(){let r=process.env.AWS_LOGIN_CACHE_DIRECTORY??K(ee(),".aws","login","cache"),t=Buffer.from(this.loginSession,"utf8"),o=V("sha256").update(t).digest("hex");return K(r,`${o}.json`)}derToRawSignature(r){let t=2;if(r[t]!==2)throw new Error("Invalid DER signature");t++;let o=r[t++],s=r.subarray(t,t+o);if(t+=o,r[t]!==2)throw new Error("Invalid DER signature");t++;let i=r[t++],n=r.subarray(t,t+i);s=s[0]===0?s.subarray(1):s,n=n[0]===0?n.subarray(1):n;let a=Buffer.concat([Buffer.alloc(32-s.length),s]),p=Buffer.concat([Buffer.alloc(32-n.length),n]);return Buffer.concat([a,p])}createDPoPInterceptor(r){r.add(t=>async o=>{if(b.isInstance(o.request)){let s=o.request,i=`${s.protocol}//${s.hostname}${s.port?`:${s.port}`:""}${s.path}`,n=await this.generateDpop(s.method,i);s.headers={...s.headers,DPoP:n}}return t(o)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(r="POST",t){let o=await this.loadToken();try{let s=X({key:o.dpopKey,format:"pem",type:"sec1"}),n=Q(s).export({format:"der",type:"spki"}),a=-1;for(let h=0;h<n.length;h++)if(n[h]===4){a=h;break}let p=n.slice(a+1,a+33),m=n.slice(a+33,a+65),u={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:p.toString("base64url"),y:m.toString("base64url")}},d={jti:crypto.randomUUID(),htm:r,htu:t,iat:Math.floor(Date.now()/1e3)},g=Buffer.from(JSON.stringify(u)).toString("base64url"),f=Buffer.from(JSON.stringify(d)).toString("base64url"),_=`${g}.${f}`,w=Z("sha256",Buffer.from(_),s),S=this.derToRawSignature(w).toString("base64url");return`${_}.${S}`}catch(s){throw new l(`Failed to generate Dpop proof: ${s instanceof Error?s.message:String(s)}`,{logger:this.logger,tryNextLink:!1})}}};var B=e=>async({callerClientConfig:r}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await k(e||{}),o=y({profile:e?.profile??r?.profile}),s=t[o];if(!s?.login_session)throw new l(`Profile ${o} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let n=await new E(s,e,r).loadCredentials();return c(n,"CREDENTIALS_LOGIN","AD")};var H=e=>!!(e&&e.login_session),j=async(e,r,t)=>{let o=await B({...r,profile:e})({callerClientConfig:t});return c(o,"CREDENTIALS_PROFILE_LOGIN","AC")};var W=e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string",q=async(e,r)=>import("./dist-es-UGE2JJUB.js").then(({fromProcess:t})=>t({...e,profile:r})().then(o=>c(o,"CREDENTIALS_PROFILE_PROCESS","v")));var M=async(e,r,t={},o)=>{let{fromSSO:s}=await import("./dist-es-WTYBIVJ2.js");return s({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:o}).then(i=>r.sso_session?c(i,"CREDENTIALS_PROFILE_SSO","r"):c(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))},U=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 T=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,x=async(e,r)=>{r?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return c(t,"CREDENTIALS_PROFILE","n")};var G=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,J=async(e,r,t)=>import("./dist-es-M3FWVZJF.js").then(({fromTokenFile:o})=>o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:r.roleAssumerWithWebIdentity,logger:r.logger,parentClientConfig:r.parentClientConfig})({callerClientConfig:t}).then(s=>c(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var v=async(e,r,t,o,s={},i=!1)=>{let n=r[e];if(Object.keys(s).length>0&&T(n))return x(n,t);if(i||N(n,{profile:e,logger:t.logger}))return $(e,r,t,o,s,v);if(T(n))return x(n,t);if(G(n))return J(n,t,o);if(W(n))return q(t,e);if(U(n))return await M(e,n,t,o);if(H(n))return j(e,t,o);throw new l(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var Me=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await k(e);return v(y({profile:e.profile??r?.profile}),t,e,r)};export{Me as fromIni};
|
package/dist/dist-es-OUTR3NFA.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-7VJYOZUP.js";import{e as A,j as C}from"./chunk-7DCGNQSQ.js";import{a as T}from"./chunk-XSSPJU77.js";import"./chunk-QEIMNOY2.js";import{a as l}from"./chunk-QMKVUKS6.js";import{b as a}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";import g from"fs/promises";var u="169.254.170.2",R="169.254.170.23",w="[fd00:ec2::23]",p=(e,o)=>{if(e.protocol!=="https:"&&!(e.hostname===u||e.hostname===R||e.hostname===w)){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 n=e.hostname.split("."),r=t=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(n[0]==="127"&&r(n[1])&&r(n[2])&&r(n[3])&&n.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
2
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
3
|
-
- ECS container host 169.254.170.2
|
|
4
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:o})}};function _(e){return new T({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((o,[n,r])=>(o[n]=r,o),{}),fragment:e.hash})}async function I(e,o){let r=await h(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 a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:o});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch{}throw Object.assign(new a(`Server responded with status: ${e.statusCode}`,{logger:o}),{Code:t.Code,Message:t.Message})}throw new a(`Server responded with status: ${e.statusCode}`,{logger:o})}var f=(e,o,n)=>async()=>{for(let r=0;r<o;++r)try{return await e()}catch{await new Promise(s=>setTimeout(s,n))}return await e()};var S="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",O="http://169.254.170.2",L="AWS_CONTAINER_CREDENTIALS_FULL_URI",y="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",v="AWS_CONTAINER_AUTHORIZATION_TOKEN",U=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let o,n=e.awsContainerCredentialsRelativeUri??process.env[S],r=e.awsContainerCredentialsFullUri??process.env[L],t=e.awsContainerAuthorizationToken??process.env[v],s=e.awsContainerAuthorizationTokenFile??process.env[y],i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(n&&r&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),i("awsContainerCredentialsFullUri will take precedence.")),t&&s&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),i("awsContainerAuthorizationToken will take precedence.")),r)o=r;else if(n)o=`${O}${n}`;else throw new a(`No HTTP credential provider host provided.
|
|
5
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let m=new URL(o);p(m,e.logger);let E=A.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return f(async()=>{let c=_(m);t?c.headers.Authorization=t:s&&(c.headers.Authorization=(await g.readFile(s)).toString());try{let d=await E.handle(c);return I(d.response).then(N=>l(N,"CREDENTIALS_HTTP","z"))}catch(d){throw new a(String(d),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3)};export{U as fromHttp};
|
package/dist/dist-es-UGE2JJUB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as p,h as a,i as f}from"./chunk-FGJ5K4WM.js";import{a as l}from"./chunk-QMKVUKS6.js";import{b as c}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";import{exec as m}from"child_process";import{promisify as P}from"util";var u=(r,e,o)=>{if(e.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(e.AccessKeyId===void 0||e.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(e.Expiration){let i=new Date;if(new Date(e.Expiration)<i)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let s=e.AccountId;!s&&o?.[r]?.aws_account_id&&(s=o[r].aws_account_id);let t={accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,...e.SessionToken&&{sessionToken:e.SessionToken},...e.Expiration&&{expiration:new Date(e.Expiration)},...e.CredentialScope&&{credentialScope:e.CredentialScope},...s&&{accountId:s}};return l(t,"CREDENTIALS_PROCESS","w"),t};var w=async(r,e,o)=>{let s=e[r];if(e[r]){let t=s.credential_process;if(t!==void 0){let i=P(f?.getTokenRecord?.().exec??m);try{let{stdout:n}=await i(t),d;try{d=JSON.parse(n.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return u(r,d,e)}catch(n){throw new c(n.message,{logger:o})}}else throw new c(`Profile ${r} did not contain credential_process.`,{logger:o})}else throw new c(`Profile ${r} could not be found in shared credentials file.`,{logger:o})};var K=(r={})=>async({callerClientConfig:e}={})=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let o=await a(r);return w(p({profile:r.profile??e?.profile}),o,r.logger)};export{K as fromProcess};
|
package/dist/dist-es-VHZAJVLW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-7HOF72FC.js";import"./chunk-QMKVUKS6.js";import"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";export{f as ENV_ACCOUNT_ID,e as ENV_CREDENTIAL_SCOPE,d as ENV_EXPIRATION,a as ENV_KEY,b as ENV_SECRET,c as ENV_SESSION,g as fromEnv};
|
package/dist/dist-es-WTYBIVJ2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as O,c as H,d as y,g as E,h as A}from"./chunk-FGJ5K4WM.js";import{a as R}from"./chunk-QMKVUKS6.js";import{a as K,b as c}from"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";var p=class e extends K{name="TokenProviderError";constructor(o,s=!0){super(o,s),Object.setPrototypeOf(this,e.prototype)}};var j=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="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var U=async(e,o={},s)=>{let{SSOOIDCClient:t}=await import("./sso-oidc-SYBBWZG3.js"),n=f=>o.clientConfig?.[f]??o.parentClientConfig?.[f]??s?.[f];return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:n("logger"),userAgentAppId:n("userAgentAppId")}))};var q=async(e,o,s={},t)=>{let{CreateTokenCommand:n}=await import("./sso-oidc-SYBBWZG3.js");return(await U(o,s,t)).send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var P=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new p(`Token is expired. ${u}`,!1)};var d=(e,o,s=!1)=>{if(typeof o>"u")throw new p(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${u}`,!1)};import{promises as Y}from"fs";var{writeFile:B}=Y,W=(e,o)=>{let s=H(e),t=JSON.stringify(o,null,2);return B(s,t)};var X=new Date(0),z=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await A(e),t=O({profile:e.profile??o?.profile}),n=s[t];if(n){if(!n.sso_session)throw new p(`Profile '${t}' is missing required property 'sso_session'.`)}else throw new p(`Profile '${t}' could not be found in shared credentials file.`,!1);let a=n.sso_session,g=(await E(e))[a];if(!g)throw new p(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let i of["sso_start_url","sso_region"])if(!g[i])throw new p(`Sso session '${a}' is missing required property '${i}'.`,!1);let S=g.sso_start_url,x=g.sso_region,r;try{r=await y(a)}catch{throw new p(`The SSO session token associated with profile=${t} was not found or is invalid. ${u}`,!1)}d("accessToken",r.accessToken),d("expiresAt",r.expiresAt);let{accessToken:_,expiresAt:k}=r,l={token:_,expiration:new Date(k)};if(l.expiration.getTime()-Date.now()>3e5)return l;if(Date.now()-X.getTime()<30*1e3)return P(l),l;d("clientId",r.clientId,!0),d("clientSecret",r.clientSecret,!0),d("refreshToken",r.refreshToken,!0);try{X.setTime(Date.now());let i=await q(r,x,e,o);d("accessToken",i.accessToken),d("expiresIn",i.expiresIn);let m=new Date(Date.now()+i.expiresIn*1e3);try{await W(a,{...r,accessToken:i.accessToken,expiresAt:m.toISOString(),refreshToken:i.refreshToken})}catch{}return{token:i.accessToken,expiration:m}}catch{return P(l),l}};var T=!1,v=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:s,ssoRegion:t,ssoRoleName:n,ssoClient:a,clientConfig:f,parentClientConfig:g,callerClientConfig:S,profile:x,filepath:r,configFilepath:_,ignoreCache:k,logger:l})=>{let i,m="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{let w=await z({profile:x,filepath:r,configFilepath:_,ignoreCache:k})();i={accessToken:w.token,expiresAt:new Date(w.expiration).toISOString()}}catch(w){throw new c(w.message,{tryNextLink:T,logger:l})}else try{i=await y(e)}catch{throw new c(`The SSO session associated with this profile is invalid. ${m}`,{tryNextLink:T,logger:l})}if(new Date(i.expiresAt).getTime()-Date.now()<=0)throw new c(`The SSO session associated with this profile has expired. ${m}`,{tryNextLink:T,logger:l});let{accessToken:I}=i,{SSOClient:h,GetRoleCredentialsCommand:C}=await import("./loadSso-O5OGD76B.js"),V=a||new h(Object.assign({},f??{},{logger:f?.logger??S?.logger??g?.logger,region:f?.region??t,userAgentAppId:f?.userAgentAppId??S?.userAgentAppId??g?.userAgentAppId})),D;try{D=await V.send(new C({accountId:s,roleName:n,accessToken:I}))}catch(w){throw new c(w,{tryNextLink:T,logger:l})}let{roleCredentials:{accessKeyId:F,secretAccessKey:$,sessionToken:L,expiration:b,credentialScope:M,accountId:G}={}}=D;if(!F||!$||!L||!b)throw new c("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:l});let N={accessKeyId:F,secretAccessKey:$,sessionToken:L,expiration:new Date(b),...M&&{credentialScope:M},...G&&{accountId:G}};return o?R(N,"CREDENTIALS_SSO","s"):R(N,"CREDENTIALS_SSO_LEGACY","u"),N};var J=(e,o)=>{let{sso_start_url:s,sso_account_id:t,sso_region:n,sso_role_name:a}=e;if(!s||!t||!n||!a)throw new c(`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(", ")}
|
|
2
|
-
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e};var $e=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:s,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoSession:f}=e,{ssoClient:g}=e,S=O({profile:e.profile??o?.profile});if(!s&&!t&&!n&&!a&&!f){let r=(await A(e))[S];if(!r)throw new c(`Profile ${S} was not found.`,{logger:e.logger});if(!j(r))throw new c(`Profile ${S} is not configured with SSO credentials.`,{logger:e.logger});if(r?.sso_session){let h=(await E(e))[r.sso_session],C=` configurations in profile ${S} and sso-session ${r.sso_session}`;if(n&&n!==h.sso_region)throw new c("Conflicting SSO region"+C,{tryNextLink:!1,logger:e.logger});if(s&&s!==h.sso_start_url)throw new c("Conflicting SSO start_url"+C,{tryNextLink:!1,logger:e.logger});r.sso_region=h.sso_region,r.sso_start_url=h.sso_start_url}let{sso_start_url:_,sso_account_id:k,sso_region:l,sso_role_name:i,sso_session:m}=J(r,e.logger);return v({ssoStartUrl:_,ssoSession:m,ssoAccountId:k,ssoRegion:l,ssoRoleName:i,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else{if(!s||!t||!n||!a)throw new c('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});return v({ssoStartUrl:s,ssoSession:f,ssoAccountId:t,ssoRegion:n,ssoRoleName:a,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}};export{$e as fromSSO,j as isSsoProfile,J as validateSsoProfile};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as z,e as x}from"./chunk-QEIMNOY2.js";import"./chunk-DGJUBN33.js";var M=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:y}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=y}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){let c=this.marshaller,y=n.getEventStreamMember(),S=n.getMemberSchema(y),d=this.serializer,u=this.defaultContentType,h=Symbol("initialRequestMarker"),p={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:u}};d.write(n,o);let t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(let r of i)yield r}};return c.serialize(p,r=>{if(r[h])return{headers:r.headers,body:r.body};let t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,S,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??u},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){let c=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),u=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{let e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){let l=await this.deserializer.read(n,a);return delete l[y],{[u]:!0,...l}}else if(e in d){let l=d[e];if(l.isStructSchema()){let m={},f=!1;for(let[s,g]of l.structIterator()){let{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(f=f||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??x)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){let b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?m[s]=BigInt(b.toString()):m[s]=Number(b):m[s]=b)}}if(f)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),p=h[Symbol.asyncIterator](),r=await p.next();if(r.done)return h;if(r.value?.[u]){if(!n)throw new 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](){for(r?.value?.[u]||(yield r.value);;){let{done:t,value:e}=await p.next();if(t)break;yield e}}}}writeEventBody(i,n,o){let c=this.serializer,y=i,S=null,d,u=n.getSchema()[4].includes(i),h={};if(u){let t=n.getMemberSchema(i);if(t.isStructSchema()){for(let[e,a]of t.structIterator()){let{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)S=e;else if(l){let f=o[i][e],s="binary";a.isNumericSchema()?(-2)**31<=f&&f<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),f!=null&&(h[e]={type:s,value:f},delete o[i][e])}}if(S!==null){let e=t.getMemberSchema(S);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),c.write(e,o[i][S])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{let[t,e]=o[i];y=t,c.write(15,e)}let p=c.flush()??new Uint8Array;return{body:typeof p=="string"?(this.serdeContext?.utf8Decoder??z)(p):p,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}};export{M as EventStreamSerde};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,b as s}from"./chunk-BAI5W3AB.js";import{g as r,l as n}from"./chunk-YW4FFW47.js";import{b as i}from"./chunk-DGJUBN33.js";import{promises as o}from"fs";async function m(){try{return(await o.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(e){r.debug(`error reading machine id: ${e}`)}try{return(await t("kenv -q smbios.system.uuid")).stdout.trim()}catch(e){r.debug(`error reading machine id: ${e}`)}}var a=i(()=>{s();n()});a();export{m as getMachineId};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as n,b as s}from"./chunk-BAI5W3AB.js";import{g as i,l as o}from"./chunk-YW4FFW47.js";import{b as d}from"./chunk-DGJUBN33.js";async function l(){try{let t=(await n('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
2
|
-
`).find(c=>c.includes("IOPlatformUUID"));if(!t)return;let r=t.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(e){i.debug(`error reading machine id: ${e}`)}}var a=d(()=>{s();o()});a();export{l as getMachineId};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r,l as a}from"./chunk-YW4FFW47.js";import{b as n}from"./chunk-DGJUBN33.js";import{promises as o}from"fs";async function m(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let i of t)try{return(await o.readFile(i,{encoding:"utf8"})).trim()}catch(e){r.debug(`error reading machine id: ${e}`)}}var c=n(()=>{a()});c();export{m as getMachineId};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,l as d}from"./chunk-YW4FFW47.js";import{b as n}from"./chunk-DGJUBN33.js";async function t(){e.debug("could not read machine-id: unsupported platform")}var o=n(()=>{d()});o();export{t as getMachineId};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,b as d}from"./chunk-BAI5W3AB.js";import{g as n,l as a}from"./chunk-YW4FFW47.js";import{b as o}from"./chunk-DGJUBN33.js";import*as r from"process";async function f(){let c="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";r.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in r.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let i=(await s(`${e} ${c}`)).stdout.split("REG_SZ");if(i.length===2)return i[1].trim()}catch(t){n.debug(`error reading machine id: ${t}`)}}var m=o(()=>{d();a()});m();export{f as getMachineId};
|
package/dist/loadSso-O5OGD76B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as le}from"./chunk-4F23MJOI.js";import{d as W,e as Ie}from"./chunk-ZEEOYOWD.js";import"./chunk-2VIWVVHK.js";import{$ as ye,A as Z,B as ee,C as te,D as oe,E as re,F as se,G as ne,H as ie,I as ae,J as pe,K as ce,L as ue,M as de,Q as me,R as he,S as fe,T as ge,U as Se,V as ve,W as Ee,X as xe,Y as _e,Z as Pe,_ as Re,a as w,aa as Ce,b as D,ba as Ae,c as k,ca as Oe,d as b,da as Te,e as H,ea as Ne,f as F,fa as we,g as C,ga as De,h as U,ha as ke,i as G,ia as be,l as V,o as A,v as B,w as Q,x as Y,y as J,z as X}from"./chunk-O3WYNHSC.js";import{a as K,c as u}from"./chunk-PXU2OOBT.js";import"./chunk-DIXI4M5O.js";import"./chunk-FGJ5K4WM.js";import"./chunk-7VJYOZUP.js";import{b as $,c as z,e as j,f as L}from"./chunk-7DCGNQSQ.js";import"./chunk-XSSPJU77.js";import{d as q,e as M}from"./chunk-QEIMNOY2.js";import"./chunk-QMKVUKS6.js";import"./chunk-EXLRPVEX.js";import"./chunk-DGJUBN33.js";var He=async(e,t,o)=>({operation:F(t).operation,region:await C(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function gt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,o)=>({signingProperties:{config:t,context:o}})}}function St(e){return{schemeId:"smithy.api#noAuth"}}var Fe=e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(St(e)):t.push(gt(e)),t},Ue=e=>{let t=re(e);return Object.assign(t,{authSchemePreference:C(e.authSchemePreference??[])})};var Ge=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),$e={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Qe="required";var i="argv";var qe="isSet",m="booleanEquals",d="error",l="endpoint",p="tree",I="PartitionResult",O="getAttr",Me={[Qe]:!1,type:"string"},ze={[Qe]:!0,default:!1,type:"boolean"},je={ref:"Endpoint"},Ye={fn:m,[i]:[{ref:"UseFIPS"},!0]},Je={fn:m,[i]:[{ref:"UseDualStack"},!0]},n={},Le={fn:O,[i]:[{ref:I},"supportsFIPS"]},Xe={ref:I},Ke={fn:m,[i]:[!0,{fn:O,[i]:[Xe,"supportsDualStack"]}]},Ve=[Ye],Be=[Je],We=[{ref:"Region"}],vt={version:"1.0",parameters:{Region:Me,UseDualStack:ze,UseFIPS:ze,Endpoint:Me},rules:[{conditions:[{fn:qe,[i]:[je]}],rules:[{conditions:Ve,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:Be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:je,properties:n,headers:n},type:l}],type:p},{conditions:[{fn:qe,[i]:We}],rules:[{conditions:[{fn:"aws.partition",[i]:We,assign:I}],rules:[{conditions:[Ye,Je],rules:[{conditions:[{fn:m,[i]:[!0,Le]},Ke],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:p},{conditions:Ve,rules:[{conditions:[{fn:m,[i]:[Le,!0]}],rules:[{conditions:[{fn:"stringEquals",[i]:[{fn:O,[i]:[Xe,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:l},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:p},{conditions:Be,rules:[{conditions:[Ke],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:l}],type:p},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:p},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:l}],type:p}],type:p},{error:"Invalid Configuration: Missing Region",type:d}]},Ze=vt;var Et=new Y({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),et=(e,t={})=>Et.get(e,()=>X(Ze,{endpointParams:e,logger:t.logger}));J.aws=Z;var c=class e extends ie{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var g=class e extends c{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},S=class e extends c{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},v=class e extends c{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},E=class e extends c{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var xt="AccessTokenType",_t="GetRoleCredentials",Pt="GetRoleCredentialsRequest",Rt="GetRoleCredentialsResponse",yt="InvalidRequestException",Ct="RoleCredentials",At="ResourceNotFoundException",It="SecretAccessKeyType",Ot="SessionTokenType",Tt="TooManyRequestsException",Nt="UnauthorizedException",wt="accountId",Dt="accessKeyId",kt="accessToken",bt="account_id",x="client",_="error",Ht="expiration",Ft="http",P="httpError",Ut="httpHeader",tt="httpQuery",R="message",Gt="roleCredentials",$t="roleName",qt="role_name",ot="smithy.ts.sdk.synthetic.com.amazonaws.sso",Mt="secretAccessKey",zt="sessionToken",jt="x-amz-sso_bearer_token",a="com.amazonaws.sso",rt=A.for(ot),Lt=[-3,ot,"SSOServiceException",0,[],[]];rt.registerError(Lt,c);var h=A.for(a),Kt=[-3,a,yt,{[_]:x,[P]:400},[R],[0]];h.registerError(Kt,g);var Vt=[-3,a,At,{[_]:x,[P]:404},[R],[0]];h.registerError(Vt,S);var Bt=[-3,a,Tt,{[_]:x,[P]:429},[R],[0]];h.registerError(Bt,v);var Wt=[-3,a,Nt,{[_]:x,[P]:401},[R],[0]];h.registerError(Wt,E);var st=[rt,h],Qt=[0,a,xt,8,0],Yt=[0,a,It,8,0],Jt=[0,a,Ot,8,0],Xt=[3,a,Pt,0,[$t,wt,kt],[[0,{[tt]:qt}],[0,{[tt]:bt}],[()=>Qt,{[Ut]:jt}]],3],Zt=[3,a,Rt,0,[Gt],[[()=>eo,0]]],eo=[3,a,Ct,0,[Dt,Mt,zt,Ht],[0,[()=>Yt,0],[()=>Jt,0],1]],nt=[9,a,_t,{[Ft]:["GET","/federation/credentials",200]},()=>Xt,()=>Zt];var it=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??$,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??et,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new te},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new W}],logger:e?.logger??new de,protocol:e?.protocol??le,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:st,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??K,utf8Decoder:e?.utf8Decoder??q,utf8Encoder:e?.utf8Encoder??M});var at=e=>{pe(process.version);let t=De(e),o=()=>t().then(ae),s=it(e);ee(process.version);let r={profile:e?.profile,logger:s.logger};return{...s,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??u(oe,r),bodyLengthChecker:e?.bodyLengthChecker??we,defaultUserAgentProvider:e?.defaultUserAgentProvider??Oe({serviceId:s.serviceId,clientVersion:Ie.version}),maxAttempts:e?.maxAttempts??u(Re,e),region:e?.region??u(Se,{...ve,...r}),requestHandler:j.create(e?.requestHandler??o),retryMode:e?.retryMode??u({...Ce,default:async()=>(await o()).retryMode||me},e),sha256:e?.sha256??Ne.bind(null,"sha256"),streamCollector:e?.streamCollector??L,useDualstackEndpoint:e?.useDualstackEndpoint??u(fe,r),useFipsEndpoint:e?.useFipsEndpoint??u(ge,r),userAgentAppId:e?.userAgentAppId??u(Te,r)}};var pt=e=>{let t=e.httpAuthSchemes,o=e.httpAuthSchemeProvider,s=e.credentials;return{setHttpAuthScheme(r){let f=t.findIndex(y=>y.schemeId===r.schemeId);f===-1?t.push(r):t.splice(f,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){o=r},httpAuthSchemeProvider(){return o},setCredentials(r){s=r},credentials(){return s}}},ct=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var ut=(e,t)=>{let o=Object.assign(ke(e),ce(e),w(e),pt(e));return t.forEach(s=>s.configure(o)),Object.assign(e,be(o),ue(o),D(o),ct(o))};var T=class extends se{config;constructor(...[t]){let o=at(t||{});super(o),this.initConfig=o;let s=Ge(o),r=Q(s),f=ye(r),y=Ee(f),dt=y,lt=Pe(dt),mt=Ue(lt),ht=ut(mt,t?.extensions||[]);this.config=ht,this.middlewareStack.use(V(this.config)),this.middlewareStack.use(he(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(xe(this.config)),this.middlewareStack.use(k(this.config)),this.middlewareStack.use(b(this.config)),this.middlewareStack.use(H(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:He,identityProviderConfigProvider:async ft=>new B({"aws.auth#sigv4":ft.credentials})})),this.middlewareStack.use(G(this.config))}destroy(){super.destroy()}};var N=class extends ne.classBuilder().ep($e).m(function(t,o,s,r){return[_e(s,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(nt).build(){};export{N as GetRoleCredentialsCommand,T as SSOClient};
|
package/dist/local-V5XPOCXA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-HC3S5NWW.js";import"./chunk-RR5R4AKJ.js";import"./chunk-7Z3O7WJM.js";import"./chunk-YW4FFW47.js";import"./chunk-B35GFLVZ.js";import"./chunk-DGJUBN33.js";export{a as LocalProvider};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as F,d as U,f as V,k as Y}from"./chunk-LOPYJ44X.js";import{b as B}from"./chunk-DGJUBN33.js";function v(u){let o=u.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!o)return;let n=o[2]||o[3]||"",r=n.slice(n.lastIndexOf("\\")+1);return r=r.replace(/%22/g,'"'),r=r.replace(/&#(\d{4});/g,(E,l)=>String.fromCharCode(l)),r}async function z(u,o){if(!/multipart/i.test(o))throw new TypeError("Failed to fetch");let n=o.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");let r=new y(n[1]||n[2]),E,l,d,H,e,i,A=[],b=new U,p=s=>{d+=h.decode(s,{stream:!0})},N=s=>{A.push(s)},a=()=>{let s=new F(A,i,{type:e});b.append(H,s)},S=()=>{b.append(H,d)},h=new TextDecoder("utf-8");h.decode(),r.onPartBegin=function(){r.onPartData=p,r.onPartEnd=S,E="",l="",d="",H="",e="",i=null,A.length=0},r.onHeaderField=function(s){E+=h.decode(s,{stream:!0})},r.onHeaderValue=function(s){l+=h.decode(s,{stream:!0})},r.onHeaderEnd=function(){if(l+=h.decode(),E=E.toLowerCase(),E==="content-disposition"){let s=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);s&&(H=s[2]||s[3]||""),i=v(l),i&&(r.onPartData=N,r.onPartEnd=a)}else E==="content-type"&&(e=l);l="",E=""};for await(let s of u)r.write(s);return r.end(),b}var f,t,w,_,O,g,x,m,C,I,M,$,R,y,Z=B(()=>{Y();V();f=0,t={START_BOUNDARY:f++,HEADER_FIELD_START:f++,HEADER_FIELD:f++,HEADER_VALUE_START:f++,HEADER_VALUE:f++,HEADER_VALUE_ALMOST_DONE:f++,HEADERS_ALMOST_DONE:f++,PART_DATA_START:f++,PART_DATA:f++,END:f++},w=1,_={PART_BOUNDARY:w,LAST_BOUNDARY:w*=2},O=10,g=13,x=32,m=45,C=58,I=97,M=122,$=u=>u|32,R=()=>{},y=class{constructor(o){this.index=0,this.flags=0,this.onHeaderEnd=R,this.onHeaderField=R,this.onHeadersEnd=R,this.onHeaderValue=R,this.onPartBegin=R,this.onPartData=R,this.onPartEnd=R,this.boundaryChars={},o=`\r
|
|
2
|
-
--`+o;let n=new Uint8Array(o.length);for(let r=0;r<o.length;r++)n[r]=o.charCodeAt(r),this.boundaryChars[n[r]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=t.START_BOUNDARY}write(o){let n=0,r=o.length,E=this.index,{lookbehind:l,boundary:d,boundaryChars:H,index:e,state:i,flags:A}=this,b=this.boundary.length,p=b-1,N=o.length,a,S,h=c=>{this[c+"Mark"]=n},s=c=>{delete this[c+"Mark"]},D=(c,P,T,k)=>{(P===void 0||P!==T)&&this[c](k&&k.subarray(P,T))},L=(c,P)=>{let T=c+"Mark";T in this&&(P?(D(c,this[T],n,o),delete this[T]):(D(c,this[T],o.length,o),this[T]=0))};for(n=0;n<r;n++)switch(a=o[n],i){case t.START_BOUNDARY:if(e===d.length-2){if(a===m)A|=_.LAST_BOUNDARY;else if(a!==g)return;e++;break}else if(e-1===d.length-2){if(A&_.LAST_BOUNDARY&&a===m)i=t.END,A=0;else if(!(A&_.LAST_BOUNDARY)&&a===O)e=0,D("onPartBegin"),i=t.HEADER_FIELD_START;else return;break}a!==d[e+2]&&(e=-2),a===d[e+2]&&e++;break;case t.HEADER_FIELD_START:i=t.HEADER_FIELD,h("onHeaderField"),e=0;case t.HEADER_FIELD:if(a===g){s("onHeaderField"),i=t.HEADERS_ALMOST_DONE;break}if(e++,a===m)break;if(a===C){if(e===1)return;L("onHeaderField",!0),i=t.HEADER_VALUE_START;break}if(S=$(a),S<I||S>M)return;break;case t.HEADER_VALUE_START:if(a===x)break;h("onHeaderValue"),i=t.HEADER_VALUE;case t.HEADER_VALUE:a===g&&(L("onHeaderValue",!0),D("onHeaderEnd"),i=t.HEADER_VALUE_ALMOST_DONE);break;case t.HEADER_VALUE_ALMOST_DONE:if(a!==O)return;i=t.HEADER_FIELD_START;break;case t.HEADERS_ALMOST_DONE:if(a!==O)return;D("onHeadersEnd"),i=t.PART_DATA_START;break;case t.PART_DATA_START:i=t.PART_DATA,h("onPartData");case t.PART_DATA:if(E=e,e===0){for(n+=p;n<N&&!(o[n]in H);)n+=b;n-=p,a=o[n]}if(e<d.length)d[e]===a?(e===0&&L("onPartData",!0),e++):e=0;else if(e===d.length)e++,a===g?A|=_.PART_BOUNDARY:a===m?A|=_.LAST_BOUNDARY:e=0;else if(e-1===d.length)if(A&_.PART_BOUNDARY){if(e=0,a===O){A&=~_.PART_BOUNDARY,D("onPartEnd"),D("onPartBegin"),i=t.HEADER_FIELD_START;break}}else A&_.LAST_BOUNDARY&&a===m?(D("onPartEnd"),i=t.END,A=0):e=0;if(e>0)l[e-1]=a;else if(E>0){let c=new Uint8Array(l.buffer,l.byteOffset,l.byteLength);D("onPartData",0,E,c),E=0,h("onPartData"),n--}break;case t.END:break;default:throw new Error(`Unexpected state entered: ${i}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=e,this.state=i,this.flags=A}end(){if(this.state===t.HEADER_FIELD_START&&this.index===0||this.state===t.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==t.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});Z();export{z as toFormData};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./chunk-DGJUBN33.js";var v=()=>{};v.prototype=v;var o;function $(n){o=n}var y=null;function l(){return(y===null||y.byteLength===0)&&(y=new Uint8Array(o.memory.buffer)),y}var h=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});h.decode();var j=2146435072,A=0;function O(n,e){return A+=e,A>=j&&(h=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),h.decode(),A=e),h.decode(l().subarray(n,n+e))}function I(n,e){return n=n>>>0,O(n,e)}var b=0,d=new TextEncoder;"encodeInto"in d||(d.encodeInto=function(n,e){let t=d.encode(n);return e.set(t),{read:n.length,written:t.length}});function w(n,e,t){if(t===void 0){let c=d.encode(n),u=e(c.length,1)>>>0;return l().subarray(u,u+c.length).set(c),b=c.length,u}let r=n.length,_=e(r,1)>>>0,s=l(),i=0;for(;i<r;i++){let c=n.charCodeAt(i);if(c>127)break;s[_+i]=c}if(i!==r){i!==0&&(n=n.slice(i)),_=t(_,r,r=i+n.length*3,1)>>>0;let c=l().subarray(_+i,_+r),u=d.encodeInto(n,c);i+=u.written,_=t(_,r,i,1)>>>0}return b=i,_}var f=null;function a(){return(f===null||f.buffer.detached===!0||f.buffer.detached===void 0&&f.buffer!==o.memory.buffer)&&(f=new DataView(o.memory.buffer)),f}function m(n){return n==null}function S(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let _=n.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){let _=n.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(n)){let _=n.length,s="[";_>0&&(s+=S(n[0]));for(let i=1;i<_;i++)s+=", "+S(n[i]);return s+="]",s}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t&&t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
-
${n.stack}`:r}function B(n,e){return n=n>>>0,l().subarray(n/1,n/1+e)}function g(n){let e=o.__wbindgen_externrefs.get(n);return o.__externref_table_dealloc(n),e}var x=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_querycompiler_free(n>>>0,1)),p=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,x.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_querycompiler_free(e,0)}compileBatch(e){let t=w(e,o.__wbindgen_malloc,o.__wbindgen_realloc),r=b,_=o.querycompiler_compileBatch(this.__wbg_ptr,t,r);if(_[2])throw g(_[1]);return g(_[0])}constructor(e){let t=o.querycompiler_new(e);if(t[2])throw g(t[1]);return this.__wbg_ptr=t[0]>>>0,x.register(this,this.__wbg_ptr,this),this}compile(e){let t=w(e,o.__wbindgen_malloc,o.__wbindgen_realloc),r=b,_=o.querycompiler_compile(this.__wbg_ptr,t,r);if(_[2])throw g(_[1]);return g(_[0])}};Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);function q(n,e){return Error(I(n,e))}function E(n){return Number(n)}function N(n,e){let t=String(e),r=w(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=b;a().setInt32(n+4,_,!0),a().setInt32(n+0,r,!0)}function T(n){let e=n,t=typeof e=="boolean"?e:void 0;return m(t)?16777215:t?1:0}function U(n,e){let t=S(e),r=w(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=b;a().setInt32(n+4,_,!0),a().setInt32(n+0,r,!0)}function M(n,e){return n in e}function R(n){let e=n;return typeof e=="object"&&e!==null}function D(n){return typeof n=="string"}function k(n){return n===void 0}function C(n,e){return n==e}function F(n,e){let t=e,r=typeof t=="number"?t:void 0;a().setFloat64(n+8,m(r)?0:r,!0),a().setInt32(n+0,!m(r),!0)}function z(n,e){let t=e,r=typeof t=="string"?t:void 0;var _=m(r)?0:w(r,o.__wbindgen_malloc,o.__wbindgen_realloc),s=b;a().setInt32(n+4,s,!0),a().setInt32(n+0,_,!0)}function P(n,e){throw new Error(I(n,e))}function G(n){return Object.entries(n)}function J(n){return n.getTime()}function L(n,e){return n[e>>>0]}function Q(n,e){return n[e]}function V(n){let e;try{e=n instanceof ArrayBuffer}catch{e=!1}return e}function W(n){let e;try{e=n instanceof Uint8Array}catch{e=!1}return e}function Y(n){return Number.isSafeInteger(n)}function H(n){return n.length}function K(n){return n.length}function X(){return new Date}function Z(){return new Object}function nn(n){return new Uint8Array(n)}function en(){return new Map}function tn(){return new Array}function _n(n,e,t){Uint8Array.prototype.set.call(B(n,e),t)}function rn(n,e,t){n[e]=t}function on(n,e,t){return n.set(e,t)}function cn(n,e,t){n[e>>>0]=t}function sn(n,e){global.PRISMA_WASM_PANIC_REGISTRY.set_message(I(n,e))}function an(n,e){return I(n,e)}function bn(n){return BigInt.asUintN(64,n)}function fn(n){return n}function un(n){return n}function gn(){let n=o.__wbindgen_externrefs,e=n.grow(4);n.set(0,void 0),n.set(e+0,void 0),n.set(e+1,null),n.set(e+2,!0),n.set(e+3,!1)}export{p as QueryCompiler,q as __wbg_Error_e83987f665cf5504,E as __wbg_Number_bb48ca12f395cd08,N as __wbg_String_8f0eb39a4a4c2f66,T as __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68,U as __wbg___wbindgen_debug_string_df47ffb5e35e6763,M as __wbg___wbindgen_in_bb933bd9e1b3bc0f,R as __wbg___wbindgen_is_object_c818261d21f283a4,D as __wbg___wbindgen_is_string_fbb76cb2940daafd,k as __wbg___wbindgen_is_undefined_2d472862bd29a478,C as __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147,F as __wbg___wbindgen_number_get_a20bf9b85341449d,z as __wbg___wbindgen_string_get_e4f06c90489ad01b,P as __wbg___wbindgen_throw_b855445ff6a94295,G as __wbg_entries_e171b586f8f6bdbf,J as __wbg_getTime_14776bfb48a1bff9,L as __wbg_get_7bed016f185add81,Q as __wbg_get_with_ref_key_1dc361bd10053bfe,V as __wbg_instanceof_ArrayBuffer_70beb1189ca63b38,W as __wbg_instanceof_Uint8Array_20c8e73002f7af98,Y as __wbg_isSafeInteger_d216eda7911dde36,H as __wbg_length_69bca3cb64fc8748,K as __wbg_length_cdd215e10d9dd507,X as __wbg_new_0_f9740686d739025c,Z as __wbg_new_1acc0b6eea89d040,nn as __wbg_new_5a79be3ab53b8aa5,en as __wbg_new_68651c719dcda04e,tn as __wbg_new_e17d9f43105b08be,_n as __wbg_prototypesetcall_2a6620b6922694b2,rn as __wbg_set_3f1d0b984ed272ed,on as __wbg_set_907fb406c34a251d,cn as __wbg_set_c213c871859d6500,sn as __wbg_set_message_82ae475bb413aa5c,$ as __wbg_set_wasm,an as __wbindgen_cast_2241b6af4c4b2941,bn as __wbindgen_cast_4625c577ab2ec9ee,fn as __wbindgen_cast_9ae0607507abb057,un as __wbindgen_cast_d6cd19b81560fd6e,gn as __wbindgen_init_externref_table};
|