gemi 0.4.92 → 0.4.93

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.
Files changed (84) hide show
  1. package/dist/app/App.d.ts +2 -24
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +1 -1
  4. package/dist/bin/index.js +73 -31
  5. package/dist/broadcasting/index.js +1 -1
  6. package/dist/{chunk-8ee09f1f74206a04.js → chunk-035e233acf299392.js} +2 -2
  7. package/dist/{chunk-2c5ecf8dc0a97aba.js → chunk-04f04986e53516f0.js} +1 -1
  8. package/dist/{chunk-6b58f7c76c2a738c.js → chunk-0f0add364d3ea615.js} +1 -1
  9. package/dist/chunk-0fd23409fff0376b.js +2 -0
  10. package/dist/{chunk-07ad6201a5864cd0.js → chunk-1770e9abf10029e0.js} +1 -1
  11. package/dist/chunk-2573b2361de4a370.js +2 -0
  12. package/dist/{chunk-b13ef9b23e30af91.js → chunk-2f8839f406606d63.js} +1 -1
  13. package/dist/{chunk-7d5fe4acabfee228.js → chunk-33abc8f4f7df6791.js} +2 -2
  14. package/dist/chunk-494de321e3423d54.js +2 -0
  15. package/dist/chunk-496c32676431beab.js +18 -0
  16. package/dist/chunk-6286081da32e2feb.js +2 -0
  17. package/dist/{chunk-24a86f8f5ddc0cbd.js → chunk-7ce930fe69575c87.js} +1 -1
  18. package/dist/{chunk-9dc5c9b7a885d0bc.js → chunk-8fec55214eb03a61.js} +2 -2
  19. package/dist/chunk-9a9d43e4b919c267.js +2 -0
  20. package/dist/chunk-b6fb088270ea6584.js +3 -0
  21. package/dist/chunk-c459f3e37965c22f.js +2 -0
  22. package/dist/{chunk-0ba2cc302113ab40.js → chunk-cfb8c5b12b0e5378.js} +2 -2
  23. package/dist/chunk-cfbe2cbcadcb1ac1.js +2 -0
  24. package/dist/{chunk-542b3c90f0ff4ded.js → chunk-d09948245f5b426d.js} +1 -1
  25. package/dist/chunk-d7525516b1305ba3.js +6 -0
  26. package/dist/{chunk-332553172e3ab961.js → chunk-dfb863d471bf3b18.js} +2 -2
  27. package/dist/{chunk-28694e5e949df0ff.js → chunk-e1929f0f7003fbdf.js} +2 -2
  28. package/dist/chunk-e76c7e3bf2d698af.js +2 -0
  29. package/dist/{chunk-880cfc21ce7cc2c6.js → chunk-eabfa03c809e14df.js} +2 -2
  30. package/dist/{chunk-43b1a27bc037bc09.js → chunk-ef791082443c0cbd.js} +1 -1
  31. package/dist/{chunk-6a2141dd4169ce0e.js → chunk-f10ba402aaacfc12.js} +2 -2
  32. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  33. package/dist/client/index.js +3 -0
  34. package/dist/email/index.js +1 -1
  35. package/dist/facades/index.js +1 -1
  36. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  37. package/dist/http/index.js +1 -1
  38. package/dist/kernel/Kernel.d.ts +5 -4
  39. package/dist/kernel/Kernel.d.ts.map +1 -1
  40. package/dist/kernel/context.d.ts +2 -2
  41. package/dist/kernel/context.d.ts.map +1 -1
  42. package/dist/kernel/index.js +1 -1
  43. package/dist/server/index.js +5 -5
  44. package/dist/services/ServiceProvider.d.ts +1 -1
  45. package/dist/services/ServiceProvider.d.ts.map +1 -1
  46. package/dist/services/index.js +1 -10
  47. package/dist/services/router/ViewRouterServiceContainer.d.ts +12 -0
  48. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -0
  49. package/dist/services/router/ViewRouterServiceProvider.d.ts +13 -0
  50. package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -0
  51. package/dist/services/router/createComponentTree.d.ts +4 -0
  52. package/dist/services/router/createComponentTree.d.ts.map +1 -0
  53. package/dist/services/router/createComponentTree.test.d.ts +2 -0
  54. package/dist/services/router/createComponentTree.test.d.ts.map +1 -0
  55. package/dist/services/router/createFlatViewRoutes.d.ts +14 -0
  56. package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -0
  57. package/dist/services/router/createFlatViewRoutes.test.d.ts +2 -0
  58. package/dist/services/router/createFlatViewRoutes.test.d.ts.map +1 -0
  59. package/dist/services/router/createRouteManifest.d.ts +3 -0
  60. package/dist/services/router/createRouteManifest.d.ts.map +1 -0
  61. package/dist/services/router/createRouteManifest.test.d.ts +2 -0
  62. package/dist/services/router/createRouteManifest.test.d.ts.map +1 -0
  63. package/package.json +1 -1
  64. package/dist/app/Plugin.d.ts +0 -10
  65. package/dist/app/Plugin.d.ts.map +0 -1
  66. package/dist/app/createComponentTree.d.ts +0 -4
  67. package/dist/app/createComponentTree.d.ts.map +0 -1
  68. package/dist/app/createFlatViewRoutes.d.ts +0 -10
  69. package/dist/app/createFlatViewRoutes.d.ts.map +0 -1
  70. package/dist/app/createRouteManifest.d.ts +0 -3
  71. package/dist/app/createRouteManifest.d.ts.map +0 -1
  72. package/dist/chunk-156c827bf8d5029c.js +0 -5
  73. package/dist/chunk-53b7d6267c9172bc.js +0 -2
  74. package/dist/chunk-63884944ac5ce0f0.js +0 -2
  75. package/dist/chunk-83938f41a5342f87.js +0 -2
  76. package/dist/chunk-9475c6ed18013dc8.js +0 -2
  77. package/dist/chunk-9d5c096c43928b37.js +0 -1
  78. package/dist/chunk-a1ef3b11adc01140.js +0 -6
  79. package/dist/chunk-ad396345e8e74292.js +0 -2
  80. package/dist/chunk-e1a4203ece554bc3.js +0 -2
  81. package/dist/chunk-e4a19367b5596f21.js +0 -2
  82. package/dist/chunk-fe8cfc6e6c3ce826.js +0 -16
  83. package/dist/server/generateEtag.d.ts +0 -2
  84. package/dist/server/generateEtag.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B as _} from"./chunk-24a86f8f5ddc0cbd.js";import{rb as S} from"./chunk-880cfc21ce7cc2c6.js";var E=_(S(),1),p="AWS_ACCESS_KEY_ID",A="AWS_SECRET_ACCESS_KEY",C="AWS_SESSION_TOKEN",N="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",a="AWS_ACCOUNT_ID",i=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[p],r=process.env[A],n=process.env[C],s=process.env[N],t=process.env[I],c=process.env[a];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{i as fromEnv,C as ENV_SESSION,A as ENV_SECRET,p as ENV_KEY,N as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,a as ENV_ACCOUNT_ID};export{p as u,A as v,i as w};
2
+ import{y as _} from"./chunk-7ce930fe69575c87.js";import{vb as S} from"./chunk-eabfa03c809e14df.js";var E=_(S(),1),p="AWS_ACCESS_KEY_ID",A="AWS_SECRET_ACCESS_KEY",C="AWS_SESSION_TOKEN",N="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",a="AWS_ACCOUNT_ID",i=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[p],r=process.env[A],n=process.env[C],s=process.env[N],t=process.env[I],c=process.env[a];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{i as fromEnv,C as ENV_SESSION,A as ENV_SECRET,p as ENV_KEY,N as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,a as ENV_ACCOUNT_ID};export{p as t,A as u,i as v};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B as h} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6a2141dd4169ce0e.js";import{rb as _} from"./chunk-880cfc21ce7cc2c6.js";import{Ab as P,ub as N,vb as W,wb as I,zb as v} from"./chunk-b13ef9b23e30af91.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-83938f41a5342f87.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-83938f41a5342f87.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(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:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-e4a19367b5596f21.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
2
+ import{y as h} from"./chunk-7ce930fe69575c87.js";import"./chunk-f10ba402aaacfc12.js";import{vb as _} from"./chunk-eabfa03c809e14df.js";import{Ab as I,Db as v,Eb as P,yb as N,zb as W} from"./chunk-2f8839f406606d63.js";var T=h(_(),1);var H=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var u=h(_(),1);var K=300000,g="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var R={},b=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-9a9d43e4b919c267.js");if(R[e])return R[e];const s=new r({region:e});return R[e]=s,s};var G=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-9a9d43e4b919c267.js");return(await b(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var U=h(_(),1);var D=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new U.TokenProviderError(`Token is expired. ${g}`,!1)};var q=h(_(),1);var p=(e,r,s=!1)=>{if(typeof r==="undefined")throw new q.TokenProviderError(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${g}`,!1)};import{promises as B} from"fs";var{writeFile:Q}=B,j=(e,r)=>{const s=W(e),t=JSON.stringify(r,null,2);return Q(s,t)};var X=new Date(0),z=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await P(e),s=N(e),t=r[s];if(!t)throw new u.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new u.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const i=t.sso_session,a=(await v(e))[i];if(!a)throw new u.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!a[n])throw new u.TokenProviderError(`Sso session '${i}' is missing required property '${n}'.`,!1);const{sso_start_url:l,sso_region:f}=a;let o;try{o=await I(i)}catch(n){throw new u.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${g}`,!1)}p("accessToken",o.accessToken),p("expiresAt",o.expiresAt);const{accessToken:E,expiresAt:x}=o,c={token:E,expiration:new Date(x)};if(c.expiration.getTime()-Date.now()>K)return c;if(Date.now()-X.getTime()<30000)return D(c),c;p("clientId",o.clientId,!0),p("clientSecret",o.clientSecret,!0),p("refreshToken",o.refreshToken,!0);try{X.setTime(Date.now());const n=await G(o,f);p("accessToken",n.accessToken),p("expiresIn",n.expiresIn);const w=new Date(Date.now()+n.expiresIn*1000);try{await j(i,{...o,accessToken:n.accessToken,expiresAt:w.toISOString(),refreshToken:n.refreshToken})}catch(C){}return{token:n.accessToken,expiration:w}}catch(n){return D(c),c}};var k=h(_(),1);var y=!1,A=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:S,clientConfig:a,profile:l,logger:f})=>{let o;const E="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const d=await z({profile:l})();o={accessToken:d.token,expiresAt:new Date(d.expiration).toISOString()}}catch(d){throw new k.CredentialsProviderError(d.message,{tryNextLink:y,logger:f})}else try{o=await I(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:y,logger:f})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new k.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:y,logger:f});const{accessToken:x}=o,{SSOClient:c,GetRoleCredentialsCommand:n}=await import("./chunk-2573b2361de4a370.js"),w=S||new c(Object.assign({},a??{},{region:a?.region??t}));let C;try{C=await w.send(new n({accountId:s,roleName:i,accessToken:x}))}catch(d){throw new k.CredentialsProviderError(d,{tryNextLink:y,logger:f})}const{roleCredentials:{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:F,credentialScope:L,accountId:M}={}}=C;if(!m||!O||!$||!F)throw new k.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:y,logger:f});return{accessKeyId:m,secretAccessKey:O,sessionToken:$,expiration:new Date(F),...L&&{credentialScope:L},...M&&{accountId:M}}};var J=h(_(),1),V=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:i,sso_role_name:S}=e;if(!s||!t||!i||!S)throw new J.CredentialsProviderError('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoSession:S}=e,{ssoClient:a}=e,l=N(e);if(!r&&!s&&!t&&!i&&!S){const o=(await P(e))[l];if(!o)throw new T.CredentialsProviderError(`Profile ${l} was not found.`,{logger:e.logger});if(!H(o))throw new T.CredentialsProviderError(`Profile ${l} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const m=(await v(e))[o.sso_session],O=` configurations in profile ${l} and sso-session ${o.sso_session}`;if(t&&t!==m.sso_region)throw new T.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==m.sso_start_url)throw new T.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});o.sso_region=m.sso_region,o.sso_start_url=m.sso_start_url}const{sso_start_url:E,sso_account_id:x,sso_region:c,sso_role_name:n,sso_session:w}=V(o,e.logger);return A({ssoStartUrl:E,ssoSession:w,ssoAccountId:x,ssoRegion:c,ssoRoleName:n,ssoClient:a,clientConfig:e.clientConfig,profile:l})}else if(!r||!s||!t||!i)throw new T.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return A({ssoStartUrl:r,ssoSession:S,ssoAccountId:s,ssoRegion:t,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,profile:l})};export{V as validateSsoProfile,H as isSsoProfile,Ee as fromSSO};
@@ -0,0 +1,2 @@
1
+ var tt=function(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)},M=function(t,e=!1){let s=[],r=0;for(;r<t.length;){let a=t[r],u=function(o){if(!e)throw new TypeError(o);s.push({type:"INVALID_CHAR",index:r,value:t[r++]})};if(a==="*"){s.push({type:"ASTERISK",index:r,value:t[r++]});continue}if(a==="+"||a==="?"){s.push({type:"OTHER_MODIFIER",index:r,value:t[r++]});continue}if(a==="\\"){s.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(a==="{"){s.push({type:"OPEN",index:r,value:t[r++]});continue}if(a==="}"){s.push({type:"CLOSE",index:r,value:t[r++]});continue}if(a===":"){let o="",i=r+1;for(;i<t.length;){let h=t.substr(i,1);if(i===r+1&&Q.test(h)||i!==r+1&&Y.test(h)){o+=t[i++];continue}break}if(!o){u(`Missing parameter name at ${r}`);continue}s.push({type:"NAME",index:r,value:o}),r=i;continue}if(a==="("){let o=1,i="",h=r+1,n=!1;if(t[h]==="?"){u(`Pattern cannot start with "?" at ${h}`);continue}for(;h<t.length;){if(!tt(t[h],!1)){u(`Invalid character '${t[h]}' at ${h}.`),n=!0;break}if(t[h]==="\\"){i+=t[h++]+t[h++];continue}if(t[h]===")"){if(o--,o===0){h++;break}}else if(t[h]==="("&&(o++,t[h+1]!=="?")){u(`Capturing groups are not allowed at ${h}`),n=!0;break}i+=t[h++]}if(n)continue;if(o){u(`Unbalanced pattern at ${r}`);continue}if(!i){u(`Missing pattern at ${r}`);continue}s.push({type:"REGEX",index:r,value:i}),r=h;continue}s.push({type:"CHAR",index:r,value:t[r++]})}return s.push({type:"END",index:r,value:""}),s},F=function(t,e={}){let s=M(t);e.delimiter??="/#?",e.prefixes??="./";let r=`[^${d(e.delimiter)}]+?`,a=[],u=0,o=0,i="",h=new Set,n=(p)=>{if(o<s.length&&s[o].type===p)return s[o++].value},f=()=>n("OTHER_MODIFIER")??n("ASTERISK"),w=(p)=>{let c=n(p);if(c!==void 0)return c;let{type:l,index:R}=s[o];throw new TypeError(`Unexpected ${l} at ${R}, expected ${p}`)},E=()=>{let p="",c;for(;c=n("CHAR")??n("ESCAPED_CHAR");)p+=c;return p},J=(p)=>p,P=e.encodePart||J,T="",U=(p)=>{T+=p},I=()=>{T.length&&(a.push(new O(3,"","",P(T),"",3)),T="")},_=(p,c,l,R,v)=>{let g=3;switch(v){case"?":g=1;break;case"*":g=0;break;case"+":g=2;break}if(!c&&!l&&g===3){U(p);return}if(I(),!c&&!l){if(!p)return;a.push(new O(3,"","",P(p),"",g));return}let m;l?l==="*"?m=D:m=l:m=r;let C=2;m===r?(C=1,m=""):m===D&&(C=0,m="");let b;if(c?b=c:l&&(b=u++),h.has(b))throw new TypeError(`Duplicate name '${b}'.`);h.add(b),a.push(new O(C,b,P(p),m,P(R),g))};for(;o<s.length;){let p=n("CHAR"),c=n("NAME"),l=n("REGEX");if(!c&&!l&&(l=n("ASTERISK")),c||l){let v=p??"";e.prefixes.indexOf(v)===-1&&(U(v),v=""),I();let g=f();_(v,c,l,"",g);continue}let R=p??n("ESCAPED_CHAR");if(R){U(R);continue}if(n("OPEN")){let v=E(),g=n("NAME"),m=n("REGEX");!g&&!m&&(m=n("ASTERISK"));let C=E();w("CLOSE");let b=f();_(v,g,m,C,b);continue}I(),w("END")}return a},d=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},j=function(t){return t&&t.ignoreCase?"ui":"u"},et=function(t,e,s){return W(F(t,s),e,s)},k=function(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}},W=function(t,e,s={}){s.delimiter??="/#?",s.prefixes??="./",s.sensitive??=!1,s.strict??=!1,s.end??=!0,s.start??=!0,s.endsWith="";let r=s.start?"^":"";for(let i of t){if(i.type===3){i.modifier===3?r+=d(i.value):r+=`(?:${d(i.value)})${k(i.modifier)}`;continue}e&&e.push(i.name);let h=`[^${d(s.delimiter)}]+?`,n=i.value;if(i.type===1?n=h:i.type===0&&(n=D),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${n})${k(i.modifier)}`:r+=`((?:${n})${k(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${d(i.prefix)}(${n})${d(i.suffix)})`,r+=k(i.modifier);continue}r+=`(?:${d(i.prefix)}`,r+=`((?:${n})(?:`,r+=d(i.suffix),r+=d(i.prefix),r+=`(?:${n}))*)${d(i.suffix)})`,i.modifier===0&&(r+="?")}let a=`[${d(s.endsWith)}]|\$`,u=`[${d(s.delimiter)}]`;if(s.end)return s.strict||(r+=`${u}?`),s.endsWith.length?r+=`(?=${a})`:r+="$",new RegExp(r,j(s));s.strict||(r+=`(?:${u}(?=${a}))?`);let o=!1;if(t.length){let i=t[t.length-1];i.type===3&&i.modifier===3&&(o=s.delimiter.indexOf(i)>-1)}return o||(r+=`(?=${u}|${a})`),new RegExp(r,j(s))},rt=function(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1},G=function(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t},nt=function(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t},K=function(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["},V=function(t){if(!t)return!0;for(let e of X)if(t.test(e))return!0;return!1},ot=function(t,e){if(t=G(t,"#"),e||t==="")return t;let s=new URL("https://example.com");return s.hash=t,s.hash?s.hash.substring(1,s.hash.length):""},ht=function(t,e){if(t=G(t,"?"),e||t==="")return t;let s=new URL("https://example.com");return s.search=t,s.search?s.search.substring(1,s.search.length):""},at=function(t,e){return e||t===""?t:K(t)?q(t):Z(t)},ut=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.password=t,s.password},pt=function(t,e){if(e||t==="")return t;let s=new URL("https://example.com");return s.username=t,s.username},ct=function(t,e,s){if(s||t==="")return t;if(e&&!X.includes(e))return new URL(`${e}:${t}`).pathname;let r=t[0]=="/";return t=new URL(r?t:"/-"+t,"https://example.com").pathname,r||(t=t.substring(2,t.length)),t},ft=function(t,e,s){return z(e)===t&&(t=""),s||t===""?t:B(t)},lt=function(t,e){return t=nt(t,":"),e||t===""?t:N(t)},z=function(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}},N=function(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)},mt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username},dt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password},Z=function(t){if(t==="")return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname},q=function(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()},B=function(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)},gt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname},wt=function(t){return t===""?t:new URL(`data:${t}`).pathname},yt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)},vt=function(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)},H=function(t,e){if(typeof t!="string")throw new TypeError("parameter 1 is not of type 'string'.");let s=new URL(t,e);return{protocol:s.protocol.substring(0,s.protocol.length-1),username:s.username,password:s.password,hostname:s.hostname,port:s.port,pathname:s.pathname,search:s.search!==""?s.search.substring(1,s.search.length):void 0,hash:s.hash!==""?s.hash.substring(1,s.hash.length):void 0}},y=function(t,e){return e?A(t):t},L=function(t,e,s){let r;if(typeof e.baseURL=="string")try{r=new URL(e.baseURL),e.protocol===void 0&&(t.protocol=y(r.protocol.substring(0,r.protocol.length-1),s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&(t.username=y(r.username,s)),!s&&e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.username===void 0&&e.password===void 0&&(t.password=y(r.password,s)),e.protocol===void 0&&e.hostname===void 0&&(t.hostname=y(r.hostname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&(t.port=y(r.port,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&(t.pathname=y(r.pathname,s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&(t.search=y(r.search.substring(1,r.search.length),s)),e.protocol===void 0&&e.hostname===void 0&&e.port===void 0&&e.pathname===void 0&&e.search===void 0&&e.hash===void 0&&(t.hash=y(r.hash.substring(1,r.hash.length),s))}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if(typeof e.protocol=="string"&&(t.protocol=lt(e.protocol,s)),typeof e.username=="string"&&(t.username=pt(e.username,s)),typeof e.password=="string"&&(t.password=ut(e.password,s)),typeof e.hostname=="string"&&(t.hostname=at(e.hostname,s)),typeof e.port=="string"&&(t.port=ft(e.port,t.protocol,s)),typeof e.pathname=="string"){if(t.pathname=e.pathname,r&&!rt(t.pathname,s)){let a=r.pathname.lastIndexOf("/");a>=0&&(t.pathname=y(r.pathname.substring(0,a+1),s)+t.pathname)}t.pathname=ct(t.pathname,t.protocol,s)}return typeof e.search=="string"&&(t.search=ht(e.search,s)),typeof e.hash=="string"&&(t.hash=ot(e.hash,s)),t},A=function(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")},xt=function(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")},$t=function(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let s=".*",r=`[^${xt(e.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,u="";for(let o=0;o<t.length;++o){let i=t[o];if(i.type===3){if(i.modifier===3){u+=A(i.value);continue}u+=`{${A(i.value)}}${k(i.modifier)}`;continue}let h=i.hasCustomName(),n=!!i.suffix.length||!!i.prefix.length&&(i.prefix.length!==1||!e.prefixes.includes(i.prefix)),f=o>0?t[o-1]:null,w=o<t.length-1?t[o+1]:null;if(!n&&h&&i.type===1&&i.modifier===3&&w&&!w.prefix.length&&!w.suffix.length)if(w.type===3){let E=w.value.length>0?w.value[0]:"";n=a.test(E)}else n=!w.hasCustomName();if(!n&&!i.prefix.length&&f&&f.type===3){let E=f.value[f.value.length-1];n=e.prefixes.includes(E)}n&&(u+="{"),u+=A(i.prefix),h&&(u+=`:${i.name}`),i.type===2?u+=`(${i.value})`:i.type===1?h||(u+=`(${r})`):i.type===0&&(!h&&(!f||f.type===3||f.modifier!==3||n||i.prefix!=="")?u+="*":u+=`(${s})`),i.type===1&&h&&i.suffix.length&&a.test(i.suffix[0])&&(u+="\\"),u+=A(i.suffix),n&&(u+="}"),i.modifier!==3&&(u+=k(i.modifier))}return u},O=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,s,r,a,u){this.type=t,this.name=e,this.prefix=s,this.value=r,this.suffix=a,this.modifier=u}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},Q=/[$_\p{ID_Start}]/u,Y=/[$_\u200C\u200D\p{ID_Continue}]/u,D=".*",$={delimiter:"",prefixes:"",sensitive:!0,strict:!0},st={delimiter:".",prefixes:"",sensitive:!0,strict:!0},it={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0},X=["ftp","file","http","https","ws","wss"],bt=class{#n;#i=[];#e={};#t=0;#r=1;#u=0;#h=0;#l=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#i=M(this.#n,!0);this.#t<this.#i.length;this.#t+=this.#r){if(this.#r=1,this.#i[this.#t].type==="END"){if(this.#h===0){this.#v(),this.#p()?this.#s(9,1):this.#c()?this.#s(8,1):this.#s(7,0);continue}else if(this.#h===2){this.#f(5);continue}this.#s(10,0);break}if(this.#l>0)if(this.#C())this.#l-=1;else continue;if(this.#k()){this.#l+=1;continue}switch(this.#h){case 0:this.#b()&&this.#f(1);break;case 1:if(this.#b()){this.#O();let t=7,e=1;this.#$()?(t=2,e=3):this.#d&&(t=2),this.#s(t,e)}break;case 2:this.#w()?this.#f(3):(this.#y()||this.#c()||this.#p())&&this.#f(5);break;case 3:this.#E()?this.#s(4,1):this.#w()&&this.#s(5,1);break;case 4:this.#w()&&this.#s(5,1);break;case 5:this.#L()?this.#m+=1:this.#A()&&(this.#m-=1),this.#R()&&!this.#m?this.#s(6,1):this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 6:this.#y()?this.#s(7,0):this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 7:this.#c()?this.#s(8,1):this.#p()&&this.#s(9,1);break;case 8:this.#p()&&this.#s(9,1);break;case 9:break;case 10:break}}this.#e.hostname!==void 0&&this.#e.port===void 0&&(this.#e.port="")}#s(t,e){switch(this.#h){case 0:break;case 1:this.#e.protocol=this.#a();break;case 2:break;case 3:this.#e.username=this.#a();break;case 4:this.#e.password=this.#a();break;case 5:this.#e.hostname=this.#a();break;case 6:this.#e.port=this.#a();break;case 7:this.#e.pathname=this.#a();break;case 8:this.#e.search=this.#a();break;case 9:this.#e.hash=this.#a();break;case 10:break}this.#h!==0&&t!==10&&([1,2,3,4].includes(this.#h)&&[6,7,8,9].includes(t)&&(this.#e.hostname??=""),[1,2,3,4,5,6].includes(this.#h)&&[8,9].includes(t)&&(this.#e.pathname??=this.#d?"/":""),[1,2,3,4,5,6,7].includes(this.#h)&&t===9&&(this.#e.search??="")),this.#x(t,e)}#x(t,e){this.#h=t,this.#u=this.#t+e,this.#t+=e,this.#r=0}#v(){this.#t=this.#u,this.#r=0}#f(t){this.#v(),this.#h=t}#g(t){return t<0&&(t=this.#i.length-t),t<this.#i.length?this.#i[t]:this.#i[this.#i.length-1]}#o(t,e){let s=this.#g(t);return s.value===e&&(s.type==="CHAR"||s.type==="ESCAPED_CHAR"||s.type==="INVALID_CHAR")}#b(){return this.#o(this.#t,":")}#$(){return this.#o(this.#t+1,"/")&&this.#o(this.#t+2,"/")}#w(){return this.#o(this.#t,"@")}#E(){return this.#o(this.#t,":")}#R(){return this.#o(this.#t,":")}#y(){return this.#o(this.#t,"/")}#c(){if(this.#o(this.#t,"?"))return!0;if(this.#i[this.#t].value!=="?")return!1;let t=this.#g(this.#t-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}#p(){return this.#o(this.#t,"#")}#k(){return this.#i[this.#t].type=="OPEN"}#C(){return this.#i[this.#t].type=="CLOSE"}#L(){return this.#o(this.#t,"[")}#A(){return this.#o(this.#t,"]")}#a(){let t=this.#i[this.#t],e=this.#g(this.#u).index;return this.#n.substring(e,t.index)}#O(){let t={};Object.assign(t,$),t.encodePart=N;let e=et(this.#a(),void 0,t);this.#d=V(e)}},S=["protocol","username","password","hostname","port","pathname","search","hash"],x="*",Et=class{#n;#i={};#e={};#t={};#r={};#u=!1;constructor(t={},e,s){try{let r;if(typeof e=="string"?r=e:s=e,typeof t=="string"){let i=new bt(t);if(i.parse(),t=i.result,r===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=r}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(r)throw new TypeError("parameter 1 is not of type 'string'.")}typeof s>"u"&&(s={ignoreCase:!1});let a={ignoreCase:s.ignoreCase===!0},u={pathname:x,protocol:x,username:x,password:x,hostname:x,port:x,search:x,hash:x};this.#n=L(u,t,!0),z(this.#n.protocol)===this.#n.port&&(this.#n.port="");let o;for(o of S){if(!(o in this.#n))continue;let i={},h=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(i,$),i.encodePart=N;break;case"username":Object.assign(i,$),i.encodePart=mt;break;case"password":Object.assign(i,$),i.encodePart=dt;break;case"hostname":Object.assign(i,st),K(h)?i.encodePart=q:i.encodePart=Z;break;case"port":Object.assign(i,$),i.encodePart=B;break;case"pathname":V(this.#i.protocol)?(Object.assign(i,it,a),i.encodePart=gt):(Object.assign(i,$,a),i.encodePart=wt);break;case"search":Object.assign(i,$,a),i.encodePart=yt;break;case"hash":Object.assign(i,$,a),i.encodePart=vt;break}try{this.#r[o]=F(h,i),this.#i[o]=W(this.#r[o],this.#e[o],i),this.#t[o]=$t(this.#r[o],i),this.#u=this.#u||this.#r[o].some((n)=>n.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return!1}let r;for(r of S)if(!this.#i[r].exec(s[r]))return!1;return!0}exec(t={},e){let s={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?s=L(s,t,!1):s=L(s,H(t,e),!1)}catch{return null}let r={};e?r.inputs=[t,e]:r.inputs=[t];let a;for(a of S){let u=this.#i[a].exec(s[a]);if(!u)return null;let o={};for(let[i,h]of this.#e[a].entries())if(typeof h=="string"||typeof h=="number"){let n=u[i+1];o[h]=n}r[a]={input:s[a]??"",groups:o}}return r}static compareComponent(t,e,s){let r=(i,h)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(i[n]<h[n])return-1;if(i[n]===h[n])continue;return 1}return 0},a=new O(3,"","","","",3),u=new O(0,"","","","",3),o=(i,h)=>{let n=0;for(;n<Math.min(i.length,h.length);++n){let f=r(i[n],h[n]);if(f)return f}return i.length===h.length?0:r(i[n]??a,h[n]??a)};return!e.#t[t]&&!s.#t[t]?0:e.#t[t]&&!s.#t[t]?o(e.#r[t],[u]):!e.#t[t]&&s.#t[t]?o([u],s.#r[t]):o(e.#r[t],s.#r[t])}get protocol(){return this.#t.protocol}get username(){return this.#t.username}get password(){return this.#t.password}get hostname(){return this.#t.hostname}get port(){return this.#t.port}get pathname(){return this.#t.pathname}get search(){return this.#t.search}get hash(){return this.#t.hash}get hasRegExpGroups(){return this.#u}};
2
+ export{Et as K};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B as _} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-6a2141dd4169ce0e.js";import{rb as y} from"./chunk-880cfc21ce7cc2c6.js";import{Ab as S,ub as K} from"./chunk-b13ef9b23e30af91.js";var o=_(y(),1);import{exec as A} from"child_process";import{promisify as T} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=T(A);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:s})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var b=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{b as fromProcess};
2
+ import{y as _} from"./chunk-7ce930fe69575c87.js";import"./chunk-f10ba402aaacfc12.js";import{vb as y} from"./chunk-eabfa03c809e14df.js";import{Eb as S,yb as K} from"./chunk-2f8839f406606d63.js";var o=_(y(),1);import{exec as A} from"child_process";import{promisify as T} from"util";var i=(c,n,s)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){const t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let e=n.AccountId;if(!e&&s?.[c]?.aws_account_id)e=s[c].aws_account_id;return{accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...e&&{accountId:e}}};var x=async(c,n,s)=>{const e=n[c];if(n[c]){const t=e.credential_process;if(t!==void 0){const u=T(A);try{const{stdout:r}=await u(t);let w;try{w=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return i(c,w,n)}catch(r){throw new o.CredentialsProviderError(r.message,{logger:s})}}else throw new o.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:s})}else throw new o.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:s})};var b=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await S(c);return x(K(c),n,c.logger)};export{b as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{y as i} from"./chunk-7ce930fe69575c87.js";import"./chunk-e1929f0f7003fbdf.js";import{$ as Xe,M as U,N as _,O as Le,P as Me,Q as We,R as Ae,V as B,W as Qe,X as V,Y as N,Z as f,_ as g,aa as he,ba as ue,ca as we,da as be,ea as Ye,fa as Ze,ha as as,ia as ns,ja as je,ka as xe,la as ve,ma as Te,na as ke,oa as He,pa as x,qa as Re,ra as Ee,sa as qe,ta as Se,ua as Je,va as Ie} from"./chunk-496c32676431beab.js";import{$a as h,Da as se,Fa as te,Ga as re,Ha as Ke,Ia as ae,Ja as ne,Ma as le,Na as pe,Ta as rs,Ua as k,Za as z,_a as Ne,gb as Oe,hb as u,ib as fe,jb as ye,kb as me,lb as $e,mb as Pe,ob as c,pb as y,rb as ge,wa as Ue,xa as _e} from"./chunk-b6fb088270ea6584.js";import"./chunk-f10ba402aaacfc12.js";import{tb as l,ub as de} from"./chunk-494de321e3423d54.js";import"./chunk-eabfa03c809e14df.js";import"./chunk-2f8839f406606d63.js";var p=i(B(),1);var $=i(x(),1);var is=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},P=async(e,s,t)=>{return{operation:U(s).operation,region:await _(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},J=(e)=>{const 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(is(e))}return s},I=(e)=>{return{...$.resolveAwsSdkSigV4Config(e)}};var C=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},L={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var ze=i(x(),1);var oe=i(x(),1),ce=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ps={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ps;var ys=new V({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ee=(e,s={})=>{return ys.get(e,()=>f(G,{endpointParams:e,logger:s.logger}))};N.aws=g;var ie=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??ne,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ee,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new oe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ce.NoAuthSigner}],logger:e?.logger??new re,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??de,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var De=(e)=>{me(process.version);const s=Se(e),t=()=>s().then(ye),r=ie(e);return ze.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Re({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(ve),region:e?.region??l(we,be),requestHandler:le.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ke,default:async()=>(await t()).retryMode||xe}),sha256:e?.sha256??Ee.bind(null,"sha256"),streamCollector:e?.streamCollector??pe,useDualstackEndpoint:e?.useDualstackEndpoint??l(he),useFipsEndpoint:e?.useFipsEndpoint??l(ue)}};var Be=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Fe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ce=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Ue(e)),...v(Be(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ie(t),...Pe(t),..._e(t),...Fe(t)}};class ms extends Ke{constructor(...[e]){const s=De(e||{}),t=C(s),r=Qe(t),a=Te(r),n=Ye(a),D=Le(n),ds=je(D),os=I(ds),F=Ce(os,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Xe(this.config)),this.middlewareStack.use(He(this.config)),this.middlewareStack.use(Ze(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:P,identityProviderConfigProvider:async(cs)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":cs.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends Oe{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class E extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Ge=(e)=>({...e,...e.accessToken&&{accessToken:k}}),hs=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:hs(e.roleCredentials)}});var m=i(x(),1),es=i(B(),1);var ss=async(e,s)=>{const t=es.requestBuilder(e,s),r=c({},Rs,{[Bs]:e[qs]});t.bp("/federation/credentials");const a=c({[Ds]:[,z(e[zs],"roleName")],[Ss]:[,z(e[Es],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ts=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return us(e,s);const t=c({$metadata:w(e)}),r=z(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:ge});return Object.assign(t,a),t};var us=async(e,s)=>{const 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 bs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await xs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await vs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await ks(t,s);default:const a=t.body;return ws({output:e,parsedBody:a,errorCode:r})}},ws=fe(o),bs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Rs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Es="accountId",qs="accessToken",Ss="account_id";var zs="roleName",Ds="role_name",Bs="x-amz-sso_bearer_token";class Fs extends rs.classBuilder().ep(L).m(function(e,s,t,r){return[as(t,this.serialize,this.deserialize),ns(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Ge,Ve).ser(ss).de(ts).build(){}export{ms as SSOClient,Fs as GetRoleCredentialsCommand};
@@ -1 +1 @@
1
- import{B as x} from"./chunk-24a86f8f5ddc0cbd.js";import{ob as S} from"./chunk-6a2141dd4169ce0e.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as tb,B as ub,H as vb,$e as wb,c as xb,R as yb,Pe as zb,He as Ab};
1
+ import{y as x} from"./chunk-7ce930fe69575c87.js";import{sb as S} from"./chunk-f10ba402aaacfc12.js";var q="AWS_PROFILE";var B=(o)=>o.profile||process.env["AWS_PROFILE"]||"default";import{join as b} from"path";import{homedir as N} from"os";import{sep as L} from"path";var d={},w=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},f=()=>{const{HOME:o,USERPROFILE:e,HOMEPATH:t,HOMEDRIVE:r=`C:${L}`}=process.env;if(o)return o;if(e)return e;if(t)return`${r}${t}`;const i=w();if(!d[i])d[i]=N();return d[i]};var v="AWS_CONFIG_FILE",g=()=>process.env[v]||b(f(),".aws","config");var D=x(S(),1);import{join as I} from"path";var h=x(S(),1);var O=(o)=>Object.entries(o).filter(([e])=>{const t=e.indexOf(c);if(t===-1)return!1;return Object.values(h.IniSectionType).includes(e.substring(0,t))}).reduce((e,[t,r])=>{const i=t.indexOf(c),s=t.substring(0,i)===h.IniSectionType.PROFILE?t.substring(i+1):t;return e[s]=r,e},{...o.default&&{default:o.default}});import{join as j} from"path";var y="AWS_SHARED_CREDENTIALS_FILE",_=()=>process.env[y]||j(f(),".aws","credentials");var C=x(S(),1);var $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,G=["__proto__","profile __proto__"],a=(o)=>{const e={};let t,r;for(let i of o.split(/\r?\n/)){const s=i.split(/(^|\s)[;#]/)[0].trim();if(s[0]==="["&&s[s.length-1]==="]"){t=void 0,r=void 0;const n=s.substring(1,s.length-1),m=$.exec(n);if(m){const[,p,,F]=m;if(Object.values(C.IniSectionType).includes(p))t=[p,F].join(c)}else t=n;if(G.includes(n))throw new Error(`Found invalid profile name "${n}"`)}else if(t){const n=s.indexOf("=");if(![0,-1].includes(n)){const[m,p]=[s.substring(0,n).trim(),s.substring(n+1).trim()];if(p==="")r=m;else{if(r&&i.trimStart()===i)r=void 0;e[t]=e[t]||{};const F=r?[r,m].join(c):m;e[t][F]=p}}}}return e};import{promises as W} from"fs";var{readFile:K}=W,E={},l=(o,e)=>{if(!E[o]||e?.ignoreCache)E[o]=K(o,"utf8");return E[o]};var P=()=>({}),c=".",R=async(o={})=>{const{filepath:e=_(),configFilepath:t=g()}=o,r=f();let s=e;if(e.startsWith("~/"))s=I(r,e.slice(2));let u=t;if(t.startsWith("~/"))u=I(r,t.slice(2));const n=await Promise.all([l(u,{ignoreCache:o.ignoreCache}).then(a).then(O).catch(P),l(s,{ignoreCache:o.ignoreCache}).then(a).catch(P)]);return{configFile:n[0],credentialsFile:n[1]}};var T=(o)=>Object.entries(o).filter(([e])=>e.startsWith(D.IniSectionType.SSO_SESSION+c)).reduce((e,[t,r])=>({...e,[t.substring(t.indexOf(c)+1)]:r}),{});var V=()=>({}),Pe=async(o={})=>l(o.configFilepath??g()).then(a).then(T).catch(V);var A=(...o)=>{const e={};for(let t of o)for(let[r,i]of Object.entries(t))if(e[r]!==void 0)Object.assign(e[r],i);else e[r]=i;return e};var He=async(o)=>{const e=await R(o);return A(e.configFile,e.credentialsFile)};import{createHash as U} from"crypto";import{join as X} from"path";var H=(o)=>{const t=U("sha1").update(o).digest("hex");return X(f(),".aws","sso","cache",`${t}.json`)};import{promises as k} from"fs";var{readFile:M}=k,$e=async(o)=>{const e=H(o),t=await M(e,"utf8");return JSON.parse(t)};export{q as xb,B as yb,H as zb,$e as Ab,c as Bb,R as Cb,Pe as Db,He as Eb};
@@ -1,2 +1,2 @@
1
- import{A as r} from"./chunk-9475c6ed18013dc8.js";class e{static name;service;static use(){return r.getStore()[this.name].service}}class i extends e{t;static name="emailServiceContainer";constructor(t){super();this.service=t}}
2
- export{e as E,i as F};
1
+ import{x as r} from"./chunk-6286081da32e2feb.js";class e{static name;service;static use(){return r.getStore()[this.name].service}}class i extends e{t;static name="emailServiceContainer";constructor(t){super();this.service=t}}
2
+ export{e as B,i as C};
@@ -0,0 +1,2 @@
1
+ import{y as s} from"./chunk-7ce930fe69575c87.js";import{vb as m} from"./chunk-eabfa03c809e14df.js";import{Cb as w,yb as u} from"./chunk-2f8839f406606d63.js";var a=s(m(),1);var g=s(m(),1);function c(o){try{const r=new Set(Array.from(o.match(/([A-Z_]){3,}/g)??[]));return r.delete("CONFIG"),r.delete("CONFIG_PREFIX_SEPARATOR"),r.delete("ENV"),[...r].join(", ")}catch(r){return o}}var h=(o,r)=>async()=>{try{const t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new g.CredentialsProviderError(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var y=s(m(),1);var C=(o,{preferredFile:r="config",...t}={})=>async()=>{const e=u(t),{configFile:n,credentialsFile:i}=await w(t),f=i[e]||{},p=n[e]||{},N=r==="config"?{...f,...p}:{...p,...f};try{const d=o(N,r==="config"?n:i);if(d===void 0)throw new Error;return d}catch(l){throw new y.CredentialsProviderError(l.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var F=s(m(),1),x=(o)=>typeof o==="function",S=(o)=>x(o)?async()=>await o():F.fromStatic(o);var T=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>a.memoize(a.chain(h(o),C(r,e),S(t)));function E(o){const r={};if(o=o.replace(/^\?/,""),o)for(let t of o.split("&")){let[e,n=null]=t.split("=");if(e=decodeURIComponent(e),n)n=decodeURIComponent(n);if(!(e in r))r[e]=n;else if(Array.isArray(r[e]))r[e].push(n);else r[e]=[r[e],n]}return r}var v=(o)=>{if(typeof o==="string")return v(new URL(o));const{hostname:r,pathname:t,port:e,protocol:n,search:i}=o;let f;if(i)f=E(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
2
+ export{T as tb,v as ub};