gemi 0.16.0 → 0.16.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/dist/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/auth/AuthenticationServiceProvider.d.ts +2 -6
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-xttpe58q.js → chunk-2e5r9zc8.js} +2 -2
- package/dist/{chunk-xttpe58q.js.map → chunk-2e5r9zc8.js.map} +1 -1
- package/dist/chunk-3exa3rf7.js +4 -0
- package/dist/{chunk-f196t91j.js.map → chunk-3exa3rf7.js.map} +11 -8
- package/dist/{chunk-ta13zfs4.js → chunk-4kkyjz2j.js} +3 -3
- package/dist/{chunk-ta13zfs4.js.map → chunk-4kkyjz2j.js.map} +1 -1
- package/dist/{chunk-ng2p76w0.js → chunk-5g8wefgj.js} +2 -2
- package/dist/{chunk-ng2p76w0.js.map → chunk-5g8wefgj.js.map} +1 -1
- package/dist/{chunk-t7h2bfdc.js → chunk-5saeq23h.js} +3 -3
- package/dist/{chunk-t7h2bfdc.js.map → chunk-5saeq23h.js.map} +1 -1
- package/dist/{chunk-3za8zsph.js → chunk-5zy36vzw.js} +2 -2
- package/dist/{chunk-3za8zsph.js.map → chunk-5zy36vzw.js.map} +1 -1
- package/dist/chunk-662r0ncr.js +9 -0
- package/dist/{chunk-gbvbe40d.js.map → chunk-662r0ncr.js.map} +3 -4
- package/dist/{chunk-7hhtnc5w.js → chunk-8hz7nqa6.js} +2 -2
- package/dist/{chunk-7hhtnc5w.js.map → chunk-8hz7nqa6.js.map} +1 -1
- package/dist/chunk-a30zkbbx.js +4 -0
- package/dist/{chunk-e7jsryv0.js.map → chunk-a30zkbbx.js.map} +5 -5
- package/dist/{chunk-wvrm1f95.js → chunk-ac8m7p53.js} +1 -1
- package/dist/{chunk-j2ymcc6q.js → chunk-arayp1w0.js} +2 -2
- package/dist/{chunk-j2ymcc6q.js.map → chunk-arayp1w0.js.map} +1 -1
- package/dist/{chunk-ebkqmqqv.js → chunk-awqqsf8p.js} +3 -3
- package/dist/{chunk-ebkqmqqv.js.map → chunk-awqqsf8p.js.map} +1 -1
- package/dist/chunk-bq3ssfcb.js +27 -0
- package/dist/{chunk-tecykzzj.js.map → chunk-bq3ssfcb.js.map} +3 -4
- package/dist/chunk-d5bjn9jq.js +4 -0
- package/dist/{chunk-8dq9vxkx.js.map → chunk-d5bjn9jq.js.map} +2 -2
- package/dist/chunk-dgsssga5.js +4 -0
- package/dist/{chunk-29ws1r7g.js.map → chunk-dgsssga5.js.map} +2 -2
- package/dist/chunk-dyq4bf49.js +4 -0
- package/dist/{chunk-a1hr4h7e.js.map → chunk-dyq4bf49.js.map} +1 -1
- package/dist/{chunk-27wb042h.js → chunk-e4t6twrj.js} +2 -2
- package/dist/{chunk-27wb042h.js.map → chunk-e4t6twrj.js.map} +1 -1
- package/dist/{chunk-vs8z6vye.js → chunk-eyw5m86d.js} +2 -2
- package/dist/{chunk-vs8z6vye.js.map → chunk-eyw5m86d.js.map} +1 -1
- package/dist/chunk-fhx0vt7d.js +5 -0
- package/dist/{chunk-gfptwbg1.js.map → chunk-fhx0vt7d.js.map} +2 -2
- package/dist/chunk-hakywsfq.js +4 -0
- package/dist/{chunk-xs7ze1bn.js.map → chunk-hakywsfq.js.map} +1 -1
- package/dist/chunk-k5h445f9.js +4 -0
- package/dist/{chunk-byw3s9kx.js.map → chunk-k5h445f9.js.map} +2 -2
- package/dist/{chunk-qfy8y0cb.js → chunk-m65hegz2.js} +4 -4
- package/dist/{chunk-qfy8y0cb.js.map → chunk-m65hegz2.js.map} +3 -4
- package/dist/chunk-pdxpkd11.js +5 -0
- package/dist/{chunk-36metsym.js.map → chunk-pdxpkd11.js.map} +5 -5
- package/dist/chunk-qj8d5qgn.js +4 -0
- package/dist/chunk-qj8d5qgn.js.map +10 -0
- package/dist/{chunk-012pty5m.js → chunk-rfs3fhhw.js} +2 -2
- package/dist/{chunk-012pty5m.js.map → chunk-rfs3fhhw.js.map} +1 -1
- package/dist/chunk-tzznavpf.js +4 -0
- package/dist/{chunk-5cr89erj.js.map → chunk-tzznavpf.js.map} +4 -4
- package/dist/{chunk-tt59hv0g.js → chunk-v6kcbyg4.js} +3 -3
- package/dist/{chunk-tt59hv0g.js.map → chunk-v6kcbyg4.js.map} +1 -1
- package/dist/{chunk-11mj8m4b.js → chunk-vas2h4rh.js} +3 -3
- package/dist/{chunk-11mj8m4b.js.map → chunk-vas2h4rh.js.map} +1 -1
- package/dist/chunk-w19m1fcb.js +5 -0
- package/dist/{chunk-wcx72bkd.js.map → chunk-w19m1fcb.js.map} +6 -6
- package/dist/chunk-xsmhw13v.js +8 -0
- package/dist/{chunk-b5ey3qx8.js.map → chunk-xsmhw13v.js.map} +2 -2
- package/dist/chunk-yaeec5ch.js +4 -0
- package/dist/{chunk-s5y9sq5v.js.map → chunk-yaeec5ch.js.map} +5 -5
- package/dist/chunk-yjwabzsb.js +4 -0
- package/dist/{chunk-edb7bzhf.js.map → chunk-yjwabzsb.js.map} +2 -2
- package/dist/chunk-zv5ztmxm.js +4 -0
- package/dist/{chunk-pjnwtece.js.map → chunk-zv5ztmxm.js.map} +2 -2
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/Link.d.ts +1 -1
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/RouteTransitionProvider.d.ts +14 -0
- package/dist/client/RouteTransitionProvider.d.ts.map +1 -0
- package/dist/client/auth/useForgotPassword.d.ts +6 -3
- package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
- package/dist/client/auth/useResetPassword.d.ts +7 -4
- package/dist/client/auth/useResetPassword.d.ts.map +1 -1
- package/dist/client/auth/useSignIn.d.ts +27 -14
- package/dist/client/auth/useSignIn.d.ts.map +1 -1
- package/dist/client/auth/useSignOut.d.ts +4 -1
- package/dist/client/auth/useSignOut.d.ts.map +1 -1
- package/dist/client/auth/useSignUp.d.ts +4 -6
- package/dist/client/auth/useSignUp.d.ts.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +124 -74
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts +20 -5
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/email/index.js +1 -1
- package/dist/facades/index.js +4 -4
- package/dist/facades/index.js.map +3 -3
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.js +48 -48
- package/dist/services/index.js.map +5 -5
- package/package.json +1 -1
- package/dist/chunk-29ws1r7g.js +0 -4
- package/dist/chunk-36metsym.js +0 -5
- package/dist/chunk-5cr89erj.js +0 -4
- package/dist/chunk-7642sy4a.js +0 -3
- package/dist/chunk-7642sy4a.js.map +0 -15
- package/dist/chunk-8dq9vxkx.js +0 -4
- package/dist/chunk-a1hr4h7e.js +0 -4
- package/dist/chunk-b5ey3qx8.js +0 -8
- package/dist/chunk-byw3s9kx.js +0 -4
- package/dist/chunk-e7jsryv0.js +0 -4
- package/dist/chunk-edb7bzhf.js +0 -4
- package/dist/chunk-f196t91j.js +0 -3
- package/dist/chunk-gbvbe40d.js +0 -9
- package/dist/chunk-gfptwbg1.js +0 -5
- package/dist/chunk-pjnwtece.js +0 -4
- package/dist/chunk-s5y9sq5v.js +0 -4
- package/dist/chunk-tecykzzj.js +0 -27
- package/dist/chunk-wcx72bkd.js +0 -5
- package/dist/chunk-xs7ze1bn.js +0 -4
- /package/dist/{chunk-wvrm1f95.js.map → chunk-ac8m7p53.js.map} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Za as E,db as v}from"./chunk-eyw5m86d.js";import{kc as O}from"./chunk-awqqsf8p.js";import"./chunk-v6kcbyg4.js";import{mc as $}from"./chunk-qj8d5qgn.js";import{wc as k,yc as C}from"./chunk-5zy36vzw.js";var u=k($(),1);var q=k(O(),1),z=k($(),1);var U=k(O(),1),j=k($(),1),V=(y,w,_)=>{let I={EcsContainer:async(b)=>{let{fromHttp:x}=await import("./chunk-xsmhw13v.js"),{fromContainerMetadata:A}=await import("./chunk-pdxpkd11.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>j.chain(x(b??{}),A(b))().then(R)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:x}=await import("./chunk-pdxpkd11.js");return async()=>x(b)().then(R)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:x}=await import("./chunk-d5bjn9jq.js");return async()=>x(b)().then(R)}};if(y in I)return I[y];else throw new j.CredentialsProviderError(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},R=(y)=>U.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var X=(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&&(d(y,{profile:w,logger:_})||n(y,{profile:w,logger:_}))},d=(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},n=(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},Y=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let b=w[y],{source_profile:x,region:A}=b;if(!_.roleAssumer){let{getDefaultRoleAssumer:K}=await import("./chunk-k5h445f9.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:{..._?.parentClientConfig,region:A??_?.parentClientConfig?.region}},_.clientPlugins)}if(x&&x in I)throw new z.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${E(_)}. 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 T=x?L(x,w,_,{...I,[x]:!0},W(w[x]??{})):(await V(b.credential_source,y,_.logger)(_))();if(W(b))return T.then((K)=>q.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 z.CredentialsProviderError(`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 P=await T;return _.roleAssumer(P,K).then((N)=>q.setCredentialFeature(N,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},W=(y)=>{return!y.role_arn&&!!y.credential_source};var Z=k(O(),1),H=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",c=async(y,w)=>import("./chunk-dgsssga5.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>Z.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var G=k(O(),1),S=async(y,w,_={})=>{let{fromSSO:I}=await import("./chunk-w19m1fcb.js");return I({profile:y,logger:_.logger,parentClientConfig:_.parentClientConfig,clientConfig:_.clientConfig})().then((b)=>{if(w.sso_session)return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return G.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},F=(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 M=k(O(),1),J=(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,Q=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 M.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var h=k(O(),1),D=(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,m=async(y,w)=>import("./chunk-yjwabzsb.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)=>h.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var L=async(y,w,_,I={},b=!1)=>{let x=w[y];if(Object.keys(I).length>0&&J(x))return Q(x,_);if(b||X(x,{profile:y,logger:_.logger}))return Y(y,w,_,I);if(J(x))return Q(x,_);if(D(x))return m(x,_);if(H(x))return c(_,y);if(F(x))return await S(y,x,_);throw new u.CredentialsProviderError(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var ky=(y={})=>async({callerClientConfig:w}={})=>{let _={...y,parentClientConfig:{...w,...y.parentClientConfig}};_.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let I=await v(_);return L(E({profile:y.profile??w?.profile}),I,_)};export{ky as fromIni};
|
|
3
|
+
|
|
4
|
+
//# debugId=85B320B6839C09E664756E2164756E21
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/
|
|
3
|
+
"sources": ["../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js", "../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
|
|
5
6
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName } from \"@smithy/shared-ini-file-loader\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/nested-clients/sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
|
|
6
7
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/property-provider\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
|
|
7
8
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n",
|
|
8
9
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })().then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
|
|
9
10
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
|
|
10
11
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n",
|
|
11
|
-
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
|
|
12
12
|
"import { getProfileName, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig,\n },\n };\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName({\n profile: _init.profile ?? callerClientConfig?.profile,\n }), profiles, init);\n};\n"
|
|
13
13
|
],
|
|
14
|
-
"mappings": ";
|
|
15
|
-
"debugId": "
|
|
14
|
+
"mappings": ";wOAAA,SCAA,SACA,KCDA,SACA,WACa,EAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,IAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,IAAQ,YAAa,KAAa,gCAC1B,yBAA0B,KAAa,+BAE/C,OADA,GAAQ,MAAM,sEAAsE,EAC7E,SAAY,QAAM,EAAS,GAAW,CAAC,CAAC,EAAG,EAAsB,CAAO,CAAC,EAAE,EAAE,KAAK,CAAgB,GAE7G,oBAAqB,MAAO,IAAY,CACpC,GAAQ,MAAM,6EAA6E,EAC3F,IAAQ,wBAAyB,KAAa,+BAC9C,MAAO,UAAY,EAAqB,CAAO,EAAE,EAAE,KAAK,CAAgB,GAE5E,YAAa,MAAO,IAAY,CAC5B,GAAQ,MAAM,qEAAqE,EACnF,IAAQ,WAAY,KAAa,+BACjC,MAAO,UAAY,EAAQ,CAAO,EAAE,EAAE,KAAK,CAAgB,EAEnE,EACA,GAAI,KAAoB,EACpB,OAAO,EAAmB,GAG1B,WAAM,IAAI,2BAAyB,4CAA4C,UAAoB,kEAC/B,CAAE,QAAO,CAAC,GA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E2164756E21",
|
|
16
16
|
"names": []
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{S as
|
|
1
|
+
import{xc as D}from"./chunk-5zy36vzw.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{let j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{addChecksumAlgorithm(z){j.push(z)},checksumAlgorithms(){return j}}},"getChecksumConfiguration"),F=Q((b)=>{let j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return E(b)},"getDefaultClientConfiguration"),k=Q((b)=>{return F(b)},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
+
export{S as lc};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=4DA1EAD1F6CE6C7464756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n Alg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zD,OAHA,EAAgB,QAAa,UAC7B,EAAgB,YAAiB,cACjC,EAAgB,SAAc,WACvB,IACN,GAAkB,CAAC,CAAC,EAGnB,GAA0C,CAAC,IAA4B,CAIzE,OAHA,EAAwB,SAAc,WACtC,EAAwB,SAAc,WACtC,EAAwB,QAAa,UAC9B,IACN,GAA0B,CAAC,CAAC",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "4DA1EAD1F6CE6C7464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{uc as E}from"./chunk-5g8wefgj.js";function G(){let q=process.env.APP_DIR,y=`${process.env.ROOT_DIR}/dist/server/bootstrap.mjs`,z=new File([`
|
|
2
2
|
import { app } from "${y}"
|
|
3
3
|
self.onmessage = async (event) => {
|
|
4
4
|
const clone = app.clone()
|
|
@@ -17,6 +17,6 @@ import{wc as E}from"./chunk-ng2p76w0.js";function G(){let q=process.env.APP_DIR,
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
`],"worker.ts"),A=URL.createObjectURL(z);return new Worker(A)}async function H(q,x){let y=G();return y.postMessage({jobName:q,args:x}),await new Promise((z,A)=>{y.onmessage=(F)=>{let B=F.data;if("error"in B)A(B.error);else z(B.result)}})}class K extends E{service;static _name="QueueServiceContainer";queue=new Set;activeRunningJobsCount=0;isRunning=!1;jobs={};constructor(q){super();this.service=q;this.jobs=Object.fromEntries(this.service.jobs.map((x)=>[x.name,x]))}dispatchJob(q,x){if(this.jobs[q])return new this.jobs[q]().run(JSON.parse(x))}async next(){if(!this.isRunning)this.isRunning=!0;if(this.activeRunningJobsCount>=this.service.concurrency)return await new Promise((x)=>setTimeout(x,1000)),this.next();let q=this.queue.values().next().value;if(this.jobs[q?.class]){let{value:x}=this.queue.values().next();if(x)this.queue.delete(x);this.run(q)}if(this.queue.size===0){this.isRunning=!1;return}await this.next()}async run(q){let x=this.jobs[q.class],y=new x,z=JSON.parse(q.args);this.activeRunningJobsCount++;try{let A=await(y.worker?H(q.class,q.args):y.run(...z));y.onSuccess(A,...z)}catch(A){if(y.onFail(A,...z),q.retries>=y.maxAttempts-1)y.onDeadletter(A,...z);else this.push(x,q.args,q.retries+1)}this.activeRunningJobsCount--}push(q,x,y=0){if(this.queue.add({class:q.name,args:x,createdAt:Date.now(),retries:y}),!this.isRunning)this.next()}}
|
|
20
|
-
export{K as
|
|
20
|
+
export{K as nc};
|
|
21
21
|
|
|
22
|
-
//# debugId=
|
|
22
|
+
//# debugId=51C066D9827A96B264756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import { ServiceContainer } from \"../ServiceContainer\";\nimport { Job } from \"./Job\";\nimport { QueueServiceProvider } from \"./QueueServiceProvider\";\n\nfunction createWorker() {\n const APP_DIR = process.env.APP_DIR;\n const ROOT_DIR = process.env.ROOT_DIR;\n\n const appPath =\n process.env.NODE_ENV === \"production\"\n ? `${ROOT_DIR}/dist/server/bootstrap.mjs`\n : `${APP_DIR}/bootstrap.ts`;\n\n const file = new File(\n [\n `\n import { app } from \"${appPath}\"\n self.onmessage = async (event) => {\n const clone = app.clone()\n let result = null;\n let error = null;\n try {\n result = clone.dispatchJob(event.data.jobName, event.data.args)\n } catch (err) {\n error = err\n }\n clone.destroy()\n if(error) {\n self.postMessage({error});\n } else {\n self.postMessage({result});\n }\n };\n `,\n ],\n \"worker.ts\",\n );\n const url = URL.createObjectURL(file);\n return new Worker(url);\n}\n\n// TODO: terminate worker after the job is done\nasync function runInWorker(jobName: string, args: string) {\n const worker = createWorker();\n worker.postMessage({ jobName, args });\n return await new Promise((resolve, reject) => {\n worker.onmessage = (e) => {\n const data = e.data;\n if (\"error\" in data) {\n reject(data.error);\n } else {\n resolve(data.result);\n }\n };\n });\n}\n\ntype JobDefinition = {\n class: string;\n args: string;\n createdAt: number;\n retries: number;\n};\n\nexport class QueueServiceContainer extends ServiceContainer {\n static _name = \"QueueServiceContainer\";\n\n queue: Set<JobDefinition> = new Set();\n activeRunningJobsCount = 0;\n isRunning = false;\n jobs: Record<string, new () => Job> = {};\n\n constructor(public service: QueueServiceProvider) {\n super();\n this.jobs = Object.fromEntries(\n this.service.jobs.map((job) => [job.name, job]),\n );\n }\n\n dispatchJob(jobName: string, args: string) {\n if (this.jobs[jobName]) {\n const job = new this.jobs[jobName]();\n return job.run(JSON.parse(args));\n }\n }\n\n async next() {\n if (!this.isRunning) {\n this.isRunning = true;\n }\n\n if (this.activeRunningJobsCount >= this.service.concurrency) {\n await new Promise((resolve) => setTimeout(resolve, 1000));\n return this.next();\n }\n\n const jobDefinition = this.queue.values().next().value as JobDefinition;\n\n if (this.jobs[jobDefinition?.class]) {\n const { value } = this.queue.values().next();\n if (value) {\n this.queue.delete(value);\n }\n\n this.run(jobDefinition);\n }\n\n if (this.queue.size === 0) {\n this.isRunning = false;\n return;\n }\n\n await this.next();\n }\n\n private async run(jobDefinition: JobDefinition) {\n const Job = this.jobs[jobDefinition.class];\n const jobInstance = new Job();\n const args: any[] = JSON.parse(jobDefinition.args);\n\n this.activeRunningJobsCount++;\n\n try {\n const result = await (jobInstance.worker\n ? runInWorker(jobDefinition.class, jobDefinition.args)\n : jobInstance.run(...args));\n\n jobInstance.onSuccess(result, ...args);\n } catch (err) {\n jobInstance.onFail(err, ...args);\n if (jobDefinition.retries >= jobInstance.maxAttempts - 1) {\n jobInstance.onDeadletter(err, ...args);\n } else {\n this.push(Job, jobDefinition.args, jobDefinition.retries + 1);\n }\n }\n\n this.activeRunningJobsCount--;\n }\n\n push(job: new () => Job, args: string, retries = 0) {\n this.queue.add({\n class: job.name,\n args,\n createdAt: Date.now(),\n retries,\n });\n if (!this.isRunning) {\n this.next();\n }\n }\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": "yCAIA,SAAS,CAAY,EAAG,CACtB,IAAM,EAAU,QAAQ,IAAI,QAGtB,EAEA,GAJW,QAAQ,IAAI,qCAOvB,EAAO,IAAI,KACf,C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O,CAAK,EAGzB,KAAK,IAAI,CAAa,EAGxB,GAAI,KAAK,MAAM,OAAS,EAAG,CACzB,KAAK,UAAY,GACjB,OAGF,MAAM,KAAK,KAAK,OAGJ,IAAG,CAAC,EAA8B,CAC9C,IAAM,EAAM,KAAK,KAAK,EAAc,OAC9B,EAAc,IAAI,EAClB,EAAc,KAAK,MAAM,EAAc,IAAI,EAEjD,KAAK,yBAEL,GAAI,CACF,IAAM,EAAS,MAAO,EAAY,OAC9B,EAAY,EAAc,MAAO,EAAc,IAAI,EACnD,EAAY,IAAI,GAAG,CAAI,GAE3B,EAAY,UAAU,EAAQ,GAAG,CAAI,EACrC,MAAO,EAAK,CAEZ,GADA,EAAY,OAAO,EAAK,GAAG,CAAI,EAC3B,EAAc,SAAW,EAAY,YAAc,EACrD,EAAY,aAAa,EAAK,GAAG,CAAI,EAErC,UAAK,KAAK,EAAK,EAAc,KAAM,EAAc,QAAU,CAAC,EAIhE,KAAK,yBAGP,IAAI,CAAC,EAAoB,EAAc,EAAU,EAAG,CAOlD,GANA,KAAK,MAAM,IAAI,CACb,MAAO,EAAI,KACX,OACA,UAAW,KAAK,IAAI,EACpB,SACF,CAAC,GACI,KAAK,UACR,KAAK,KAAK,EAGhB",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "51C066D9827A96B264756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$a as R,Za as I,_a as z,cb as v,db as A}from"./chunk-eyw5m86d.js";import{kc as oe}from"./chunk-awqqsf8p.js";import"./chunk-v6kcbyg4.js";import{mc as u}from"./chunk-qj8d5qgn.js";import{wc as S,yc as D}from"./chunk-5zy36vzw.js";var T=S(u(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var F=S(oe(),1);var x=S(u(),1);var U=300000,h="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var q=async(e,s={})=>{let{SSOOIDCClient:o}=await import("./chunk-zv5ztmxm.js");return new o(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:s.clientConfig?.logger??s.parentClientConfig?.logger}))};var W=async(e,s,o={})=>{let{CreateTokenCommand:i}=await import("./chunk-zv5ztmxm.js");return(await q(s,o)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var j=S(u(),1);var $=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new j.TokenProviderError(`Token is expired. ${h}`,!1)};var X=S(u(),1);var g=(e,s,o=!1)=>{if(typeof s==="undefined")throw new X.TokenProviderError(`Value not present for '${e}' in SSO Token${o?". Cannot refresh":""}. ${h}`,!1)};import{promises as Z}from"fs";var{writeFile:ee}=Z,J=(e,s)=>{let o=z(e),i=JSON.stringify(s,null,2);return ee(o,i)};var V=new Date(0),Y=(e={})=>async({callerClientConfig:s}={})=>{let o={...e,parentClientConfig:{...s,...e.parentClientConfig}};o.logger?.debug("@aws-sdk/token-providers - fromSso");let i=await A(o),r=I({profile:o.profile??s?.profile}),f=i[r];if(!f)throw new x.TokenProviderError(`Profile '${r}' could not be found in shared credentials file.`,!1);else if(!f.sso_session)throw new x.TokenProviderError(`Profile '${r}' is missing required property 'sso_session'.`);let l=f.sso_session,a=(await v(o))[l];if(!a)throw new x.TokenProviderError(`Sso session '${l}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new x.TokenProviderError(`Sso session '${l}' is missing required property '${n}'.`,!1);let{sso_start_url:w,sso_region:t}=a,c;try{c=await R(l)}catch(n){throw new x.TokenProviderError(`The SSO session token associated with profile=${r} was not found or is invalid. ${h}`,!1)}g("accessToken",c.accessToken),g("expiresAt",c.expiresAt);let{accessToken:E,expiresAt:O}=c,p={token:E,expiration:new Date(O)};if(p.expiration.getTime()-Date.now()>U)return p;if(Date.now()-V.getTime()<30000)return $(p),p;g("clientId",c.clientId,!0),g("clientSecret",c.clientSecret,!0),g("refreshToken",c.refreshToken,!0);try{V.setTime(Date.now());let n=await W(c,t,o);g("accessToken",n.accessToken),g("expiresIn",n.expiresIn);let _=new Date(Date.now()+n.expiresIn*1000);try{await J(l,{...c,accessToken:n.accessToken,expiresAt:_.toISOString(),refreshToken:n.refreshToken})}catch(m){}return{token:n.accessToken,expiration:_}}catch(n){return $(p),p}};var k=S(u(),1);var N=!1,L=async({ssoStartUrl:e,ssoSession:s,ssoAccountId:o,ssoRegion:i,ssoRoleName:r,ssoClient:f,clientConfig:l,parentClientConfig:y,profile:a,logger:w})=>{let t,c="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let d=await Y({profile:a})();t={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:N,logger:w})}else try{t=await R(e)}catch(d){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:N,logger:w})}if(new Date(t.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:N,logger:w});let{accessToken:E}=t,{SSOClient:O,GetRoleCredentialsCommand:p}=await import("./chunk-yaeec5ch.js"),n=f||new O(Object.assign({},l??{},{logger:l?.logger??y?.logger,region:l?.region??i})),_;try{_=await n.send(new p({accountId:o,roleName:r,accessToken:E}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:N,logger:w})}let{roleCredentials:{accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:G,credentialScope:K,accountId:b}={}}=_;if(!m||!C||!M||!G)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:N,logger:w});let P={accessKeyId:m,secretAccessKey:C,sessionToken:M,expiration:new Date(G),...K&&{credentialScope:K},...b&&{accountId:b}};if(s)F.setCredentialFeature(P,"CREDENTIALS_SSO","s");else F.setCredentialFeature(P,"CREDENTIALS_SSO_LEGACY","u");return P};var B=S(u(),1),Q=(e,s)=>{let{sso_start_url:o,sso_account_id:i,sso_region:r,sso_role_name:f}=e;if(!o||!i||!r||!f)throw new B.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(", ")}
|
|
3
|
+
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e};var Re=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:o,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoSession:l}=e,{ssoClient:y}=e,a=I({profile:e.profile??s?.profile});if(!o&&!i&&!r&&!f&&!l){let t=(await A(e))[a];if(!t)throw new T.CredentialsProviderError(`Profile ${a} was not found.`,{logger:e.logger});if(!H(t))throw new T.CredentialsProviderError(`Profile ${a} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let m=(await v(e))[t.sso_session],C=` configurations in profile ${a} and sso-session ${t.sso_session}`;if(r&&r!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+C,{tryNextLink:!1,logger:e.logger});if(o&&o!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+C,{tryNextLink:!1,logger:e.logger});t.sso_region=m.sso_region,t.sso_start_url=m.sso_start_url}let{sso_start_url:c,sso_account_id:E,sso_region:O,sso_role_name:p,sso_session:n}=Q(t,e.logger);return L({ssoStartUrl:c,ssoSession:n,ssoAccountId:E,ssoRegion:O,ssoRoleName:p,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})}else if(!o||!i||!r||!f)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return L({ssoStartUrl:o,ssoSession:l,ssoAccountId:i,ssoRegion:r,ssoRoleName:f,ssoClient:y,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,profile:a})};export{Q as validateSsoProfile,H as isSsoProfile,Re as fromSSO};
|
|
4
|
+
|
|
5
|
+
//# debugId=1DE24D3A331D89F164756E2164756E21
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/
|
|
3
|
+
"sources": ["../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js", "../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../../node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../../node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n });\n }\n};\n",
|
|
5
6
|
"export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
|
|
6
7
|
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getSSOTokenFromFile } from \"@smithy/shared-ini-file-loader\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({ profile })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n",
|
|
8
|
+
"import { TokenProviderError } from \"@smithy/property-provider\";\nimport { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, } from \"@smithy/shared-ini-file-loader\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTime = new Date(0);\nexport const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig,\n },\n };\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n",
|
|
7
9
|
"export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n",
|
|
8
10
|
"export const getSsoOidcClient = async (ssoRegion, init = {}) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger,\n }));\n return ssoOidcClient;\n};\n",
|
|
9
11
|
"import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n",
|
|
10
12
|
"import { TokenProviderError } from \"@smithy/property-provider\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
|
|
11
13
|
"import { TokenProviderError } from \"@smithy/property-provider\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n",
|
|
12
14
|
"import { getSSOTokenFilepath } from \"@smithy/shared-ini-file-loader\";\nimport { promises as fsPromises } from \"fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n",
|
|
13
|
-
"import {
|
|
14
|
-
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n",
|
|
15
|
-
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n });\n }\n};\n"
|
|
15
|
+
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n"
|
|
16
16
|
],
|
|
17
|
-
"mappings": ";
|
|
18
|
-
"debugId": "
|
|
17
|
+
"mappings": ";iQAAA,SCAO,FAAM,JAAe,LAAC,IAAQ,IAChC,OAAO,EAAI,gBAAkB,UAC1B,OAAO,EAAI,iBAAmB,UAC9B,OAAO,EAAI,cAAgB,UAC3B,OAAO,EAAI,aAAe,UAC1B,OAAO,EAAI,gBAAkB,UCLrC,gBCAA,eCAO,IAAM,EAAmB,OACnB,EAAkB,kFCDxB,IAAM,EAAmB,MAAO,EAAW,EAAO,CAAC,IAAM,CAC5D,IAAQ,iBAAkB,KAAa,+BAKvC,OAJsB,IAAI,EAAc,OAAO,OAAO,CAAC,EAAG,EAAK,cAAgB,CAAC,EAAG,CAC/E,OAAQ,GAAa,EAAK,cAAc,OACxC,OAAQ,EAAK,cAAc,QAAU,EAAK,oBAAoB,MAClE,CAAC,CAAC,GCJC,IAAM,EAAqB,MAAO,EAAU,EAAW,EAAO,CAAC,IAAM,CACxE,IAAQ,sBAAuB,KAAa,+BAE5C,OADsB,MAAM,EAAiB,EAAW,CAAI,GACvC,KAAK,IAAI,EAAmB,CAC7C,SAAU,EAAS,SACnB,aAAc,EAAS,aACvB,aAAc,EAAS,aACvB,UAAW,eACf,CAAC,CAAC,GCTN,eAEO,IAAM,EAAsB,CAAC,IAAU,CAC1C,GAAI,EAAM,YAAc,EAAM,WAA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,IAAiB,IAAc,EACrD,MAAM,IAAI,2BAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQ,EAAK,MAAO,CAAC,EAG5G,YAAO,EAAsB,CACzB,cACA,aACA,eACA,YACA,cACA,YACA,aAAc,EAAK,aACnB,mBAAoB,EAAK,mBACzB,QAAS,CACb,CAAC",
|
|
18
|
+
"debugId": "1DE24D3A331D89F164756E2164756E21",
|
|
19
19
|
"names": []
|
|
20
20
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ka as w}from"./chunk-662r0ncr.js";import{Db as I,gb as g,qb as x}from"./chunk-m65hegz2.js";import"./chunk-5saeq23h.js";import{kc as b}from"./chunk-awqqsf8p.js";import"./chunk-v6kcbyg4.js";import{mc as i}from"./chunk-qj8d5qgn.js";import{wc as m}from"./chunk-5zy36vzw.js";var E=m(b(),1);var d=m(i(),1);import v from"fs/promises";var C=m(i(),1);var u="169.254.170.2",A="169.254.170.23",O="[fd00:ec2::23]",S=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===u||e.hostname===A||e.hostname===O)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
5
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var o=m(i(),1);function P(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function K(e,a){let r=await w(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:I(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a})}var T=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var _="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="http://169.254.170.2",D="AWS_CONTAINER_CREDENTIALS_FULL_URI",M="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",N="AWS_CONTAINER_AUTHORIZATION_TOKEN",j=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[_],r=e.awsContainerCredentialsFullUri??process.env[D],t=e.awsContainerAuthorizationToken??process.env[N],s=e.awsContainerAuthorizationTokenFile??process.env[M],n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)n("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),n("awsContainerCredentialsFullUri will take precedence.");if(t&&s)n("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),n("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${B}${c}`;else throw new d.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
+
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(a);S(y,e.logger);let R=new x({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return T(async()=>{let f=P(y);if(t)f.headers.Authorization=t;else if(s)f.headers.Authorization=(await v.readFile(s)).toString();try{let h=await R.handle(f);return K(h.response).then((p)=>E.setCredentialFeature(p,"CREDENTIALS_HTTP","z"))}catch(h){throw new d.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{j as fromHttp};
|
|
7
|
+
|
|
8
|
+
//# debugId=C5093FB613EC4E3E64756E2164756E21
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { parseRfc3339DateTime } from \"@smithy/smithy-client\";\nimport { sdkStreamMixin } from \"@smithy/util-stream\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
|
|
8
8
|
"export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": ";yTAAA,SAGA,
|
|
11
|
-
"debugId": "
|
|
10
|
+
"mappings": ";yTAAA,SAEA,SACA,qBCHA,SAGA,FAAM,JAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,OAGH,KACD,GAAI,EAAI,WAAa,YACjB,OAEJ,IAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,IAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI,EAAa,KAAO,OACpB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAQ,EAAa,EAAE,GACvB,EAAa,SAAW,EACxB,OAGR,MAAM,IAAI,2BAAyB;AAAA;AAAA;AAAA,yDAGmB,CAAE,QAAO,CAAC,GCxCpE,eAIO,SAAS,CAAgB,CAAC,EAAK,CAClC,OAAO,IAAI,EAAY,CACnB,SAAU,EAAI,SAC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C,IAE7E,EAAQ,YAAc,EAAG,EAAQ,SAAW,IAAI",
|
|
11
|
+
"debugId": "C5093FB613EC4E3E64756E2164756E21",
|
|
12
12
|
"names": []
|
|
13
13
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Aa as ye,Ba as me,Ca as he,Da as ue,Ea as Ye,Fa as Ze,Ha as ds,Ia as ns,Ja as Ce,Ka as we,La as be,Ma as je,Na as xe,Oa as Te,Pa as ve,Qa as ke,Ra as Re,Sa as Ee,Ta as qe,Ua as Ie,Va as _e,ma as F,na as D,oa as Pe,pa as Me,qa as We,ra as Ae,ua as Qe,va as G,wa as O,xa as V,ya as N,za as Xe}from"./chunk-3exa3rf7.js";import{Wa as l,Xa as re}from"./chunk-a30zkbbx.js";import"./chunk-eyw5m86d.js";import{Gb as Ge,Hb as u,Ib as ge,Jb as le,Kb as pe,Lb as $e,Mb as Je,Ob as fe,Pb as ae,Qb as c,Rb as y,Ub as es,eb as Fe,fb as Ue,lb as f,mb as ee,ob as se,pb as te,qb as ce,rb as ie,sb as Ke,ub as rs,vb as v,xb as S,yb as Ne,zb as h}from"./chunk-m65hegz2.js";import{Xb as B,_b as x}from"./chunk-bq3ssfcb.js";import"./chunk-5saeq23h.js";import"./chunk-awqqsf8p.js";import"./chunk-v6kcbyg4.js";import"./chunk-qj8d5qgn.js";import"./chunk-4kkyjz2j.js";import{wc as i}from"./chunk-5zy36vzw.js";var p=i(B(),1);var U=i(x(),1);var $=async(e,s,t)=>{return{operation:F(s).operation,region:await D(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ys(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(ys(e))}return s},I=(e)=>{let s=U.resolveAwsSdkSigV4Config(e);return Object.assign(s,{authSchemePreference:D(e.authSchemePreference??[])})};var _=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var P={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.797.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.796.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.796.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.787.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.796.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 Se=i(x(),1);var de=i(x(),1),ne=i(B(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},C={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},T={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[T,"supportsDualStack"]}]},X=[C],Y=[j],Z=[{["ref"]:"Region"}],hs={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:[C,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"]:[T,"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"}]},H=hs;var us=new G({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return us.get(e,()=>V(H,{endpointParams:e,logger:s.logger}))};O.aws=N;var oe=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??f,base64Encoder:e?.base64Encoder??te,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 de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ne.NoAuthSigner}],logger:e?.logger??new ae,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??re,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??se}};var ze=(e)=>{pe(process.version);let s=qe(e),t=()=>s().then(le),r=oe(e);Se.emitWarningIfUnsupportedVersion(process.version);let a={profile:e?.profile};return{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ee,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:P.version}),maxAttempts:e?.maxAttempts??l(be,e),region:e?.region??l(he,{...ue,...a}),requestHandler:ce.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...xe,default:async()=>(await t()).retryMode||we},e),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??ie,useDualstackEndpoint:e?.useDualstackEndpoint??l(ye,a),useFipsEndpoint:e?.useFipsEndpoint??l(me,a),userAgentAppId:e?.userAgentAppId??l(ke,a)}};var De=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((z)=>z.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}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var Le=(e,s)=>{let t=Object.assign(Ie(e),$e(e),Fe(e),De(e));return s.forEach((r)=>r.configure(t)),Object.assign(e,_e(t),Je(t),Ue(t),Be(t))};class He extends Ke{config;constructor(...[e]){let s=ze(e||{});super(s);this.initConfig=s;let t=_(s),r=Qe(t),a=je(r),d=Ye(a),z=Pe(d),cs=Ce(z),is=I(cs),ls=Le(is,e?.extensions||[]);this.config=ls,this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:async(ps)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ps.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Ge{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class k extends o{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,k.prototype)}}class R extends o{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,R.prototype)}}class E extends o{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,E.prototype)}}class q extends o{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,q.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:v}}),ws=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:v},...e.sessionToken&&{sessionToken:v}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ws(e.roleCredentials)}});var m=i(x(),1),ss=i(B(),1);var ts=async(e,s)=>{let t=ss.requestBuilder(e,s),r=c({},fe,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=c({[Bs]:[,S(e[Ds],"roleName")],[zs]:[,S(e[qs],"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 bs(e,s);let t=c({$metadata:w(e)}),r=S(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:es});return Object.assign(t,a),t};var bs=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 vs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ks(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Rs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Es(t,s);default:let a=t.body;return xs({output:e,parsedBody:a,errorCode:r})}},xs=ge(o),vs=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new k({$metadata:w(e),...t});return u(d,e.body)},ks=async(e,s)=>{let t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new R({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=c({}),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)},Es=async(e,s)=>{let t=c({}),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)},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 qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class os extends rs.classBuilder().ep(L).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,Ve).ser(ts).de(as).build(){}export{He as SSOClient,os as GetRoleCredentialsCommand};
|
|
3
|
+
|
|
4
|
+
//# debugId=4AAEF9590240BD8A64756E2164756E21
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/
|
|
3
|
+
"sources": ["../../../node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/models/SSOServiceException.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js", "../../../node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRecursionDetectionPlugin } from \"@aws-sdk/middleware-recursion-detection\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { resolveRegionConfig } from \"@smithy/config-resolver\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { getContentLengthPlugin } from \"@smithy/middleware-content-length\";\nimport { resolveEndpointConfig } from \"@smithy/middleware-endpoint\";\nimport { getRetryPlugin, resolveRetryConfig } from \"@smithy/middleware-retry\";\nimport { Client as __Client, } from \"@smithy/smithy-client\";\nimport { defaultSSOHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class SSOClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n",
|
|
6
6
|
"import { resolveAwsSdkSigV4Config, } from \"@aws-sdk/core\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/util-middleware\";\nexport const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: (await normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nexport const defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccountRoles\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccounts\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"Logout\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"import { awsEndpointFunctions } from \"@aws-sdk/util-endpoints\";\nimport { customEndpointFunctions, EndpointCache, resolveEndpoint } from \"@smithy/util-endpoints\";\nimport { ruleSet } from \"./ruleset\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n",
|
|
12
12
|
"export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n",
|
|
13
13
|
"import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from \"@aws-sdk/region-config-resolver\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/protocol-http\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/smithy-client\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n",
|
|
14
|
-
"import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { getSerdePlugin } from \"@smithy/middleware-serde\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from \"../models/models_0\";\nimport { de_GetRoleCredentialsCommand, se_GetRoleCredentialsCommand } from \"../protocols/Aws_restJson1\";\nexport { $Command };\nexport class GetRoleCredentialsCommand extends $Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [\n getSerdePlugin(config, this.serialize, this.deserialize),\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n ];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog)\n .ser(se_GetRoleCredentialsCommand)\n .de(de_GetRoleCredentialsCommand)\n .build() {\n}\n",
|
|
15
14
|
"import { ServiceException as __ServiceException, } from \"@smithy/smithy-client\";\nexport { __ServiceException };\nexport class SSOServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n}\n",
|
|
16
15
|
"import { SENSITIVE_STRING } from \"@smithy/smithy-client\";\nimport { SSOServiceException as __BaseException } from \"./SSOServiceException\";\nexport class InvalidRequestException extends __BaseException {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n}\nexport class ResourceNotFoundException extends __BaseException {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nexport class TooManyRequestsException extends __BaseException {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nexport class UnauthorizedException extends __BaseException {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n}\nexport const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: SENSITIVE_STRING }),\n});\nexport const RoleCredentialsFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING }),\n ...(obj.sessionToken && { sessionToken: SENSITIVE_STRING }),\n});\nexport const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }),\n});\nexport const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: SENSITIVE_STRING }),\n});\nexport const ListAccountsRequestFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: SENSITIVE_STRING }),\n});\nexport const LogoutRequestFilterSensitiveLog = (obj) => ({\n ...obj,\n ...(obj.accessToken && { accessToken: SENSITIVE_STRING }),\n});\n",
|
|
17
|
-
"import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from \"@aws-sdk/core\";\nimport { requestBuilder as rb } from \"@smithy/core\";\nimport { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, take, withBaseException, } from \"@smithy/smithy-client\";\nimport { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from \"../models/models_0\";\nimport { SSOServiceException as __BaseException } from \"../models/SSOServiceException\";\nexport const se_GetRoleCredentialsCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/federation/credentials\");\n const query = map({\n [_rn]: [, __expectNonNull(input[_rN], `roleName`)],\n [_ai]: [, __expectNonNull(input[_aI], `accountId`)],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_ListAccountRolesCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/assignment/roles\");\n const query = map({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, __expectNonNull(input[_aI], `accountId`)],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_ListAccountsCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/assignment/accounts\");\n const query = map({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_LogoutCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n};\nexport const de_GetRoleCredentialsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n roleCredentials: _json,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_ListAccountRolesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n nextToken: __expectString,\n roleList: _json,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_ListAccountsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n accountList: _json,\n nextToken: __expectString,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_LogoutCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst de_CommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode,\n });\n }\n};\nconst throwDefaultError = withBaseException(__BaseException);\nconst de_InvalidRequestExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_UnauthorizedExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst _aI = \"accountId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _mR = \"maxResults\";\nconst _mr = \"max_result\";\nconst _nT = \"nextToken\";\nconst _nt = \"next_token\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\n"
|
|
16
|
+
"import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from \"@aws-sdk/core\";\nimport { requestBuilder as rb } from \"@smithy/core\";\nimport { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, take, withBaseException, } from \"@smithy/smithy-client\";\nimport { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from \"../models/models_0\";\nimport { SSOServiceException as __BaseException } from \"../models/SSOServiceException\";\nexport const se_GetRoleCredentialsCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/federation/credentials\");\n const query = map({\n [_rn]: [, __expectNonNull(input[_rN], `roleName`)],\n [_ai]: [, __expectNonNull(input[_aI], `accountId`)],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_ListAccountRolesCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/assignment/roles\");\n const query = map({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, __expectNonNull(input[_aI], `accountId`)],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_ListAccountsCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/assignment/accounts\");\n const query = map({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n};\nexport const se_LogoutCommand = async (input, context) => {\n const b = rb(input, context);\n const headers = map({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT],\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n};\nexport const de_GetRoleCredentialsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n roleCredentials: _json,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_ListAccountRolesCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n nextToken: __expectString,\n roleList: _json,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_ListAccountsCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), \"body\");\n const doc = take(data, {\n accountList: _json,\n nextToken: __expectString,\n });\n Object.assign(contents, doc);\n return contents;\n};\nexport const de_LogoutCommand = async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = map({\n $metadata: deserializeMetadata(output),\n });\n await collectBody(output.body, context);\n return contents;\n};\nconst de_CommandError = async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context),\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode,\n });\n }\n};\nconst throwDefaultError = withBaseException(__BaseException);\nconst de_InvalidRequestExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst de_UnauthorizedExceptionRes = async (parsedOutput, context) => {\n const contents = map({});\n const data = parsedOutput.body;\n const doc = take(data, {\n message: __expectString,\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents,\n });\n return __decorateServiceException(exception, parsedOutput.body);\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\nconst collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\nconst _aI = \"accountId\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _mR = \"maxResults\";\nconst _mr = \"max_result\";\nconst _nT = \"nextToken\";\nconst _nt = \"next_token\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\n",
|
|
17
|
+
"import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { getSerdePlugin } from \"@smithy/middleware-serde\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from \"../models/models_0\";\nimport { de_GetRoleCredentialsCommand, se_GetRoleCredentialsCommand } from \"../protocols/Aws_restJson1\";\nexport { $Command };\nexport class GetRoleCredentialsCommand extends $Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [\n getSerdePlugin(config, this.serialize, this.deserialize),\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n ];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog)\n .ser(se_GetRoleCredentialsCommand)\n .de(de_GetRoleCredentialsCommand)\n .build() {\n}\n"
|
|
18
18
|
],
|
|
19
|
-
"mappings": ";
|
|
20
|
-
"debugId": "
|
|
19
|
+
"mappings": ";w7BAKA,SCLA,SAEO,FAAM,JAA6C,AAAO,JAAQ,JAAS,FAAU,LACxF,AAAO,CACH,UAAW,EAAiB,CAAO,EAAE,UACrC,OAAS,MAAM,EAAkB,EAAO,MAAM,EAAE,IAC3C,IAAM,CACH,MAAM,IAAI,MAAM,yDAAyD,IAC1E,CACX,GAEJ,SAAS,EAAgC,CAAC,EAAgB,CACtD,MAAO,CACH,SAAU,iBACV,kBAAmB,CACf,KAAM,eACN,OAAQ,EAAe,MAC3B,EACA,oBAAqB,CAAC,EAAQ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4C,EAC3F,IAAI,EAA4B,EAChC,GAAG,EAA4B,EAC/B,MAAM,CAAE,CACb",
|
|
20
|
+
"debugId": "4AAEF9590240BD8A64756E2164756E21",
|
|
21
21
|
"names": []
|
|
22
22
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{kc as T}from"./chunk-awqqsf8p.js";import{mc as f}from"./chunk-qj8d5qgn.js";import{wc as E,yc as p}from"./chunk-5zy36vzw.js";var c=E(T(),1),N=E(f(),1);import{readFileSync as A}from"fs";var i=(e)=>async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:r,roleSessionName:s,webIdentityToken:n,providerId:S,policyArns:d,policy:l,durationSeconds:m}=e,{roleAssumerWithWebIdentity:t}=e;if(!t){let{getDefaultRoleAssumerWithWebIdentity:a}=await import("./chunk-k5h445f9.js");t=a({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...o?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return t({RoleArn:r,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:S,PolicyArns:d,Policy:l,DurationSeconds:m})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",O="AWS_ROLE_SESSION_NAME",k=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[I],s=e?.roleSessionName??process.env[O];if(!o||!r)throw new N.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:A(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])c.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,k as fromTokenFile};
|
|
3
|
+
|
|
4
|
+
//# debugId=F8C6363824E0544F64756E2164756E21
|