gemi 0.4.111 → 0.4.113

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 (69) hide show
  1. package/dist/app/index.js +1 -1
  2. package/dist/chunk-11azhtfq.js +4 -0
  3. package/dist/{chunk-s5natt4n.js.map → chunk-11azhtfq.js.map} +5 -5
  4. package/dist/chunk-2p10c4kh.js +5 -0
  5. package/dist/chunk-2p10c4kh.js.map +64 -0
  6. package/dist/{chunk-djyzfn1b.js → chunk-3ndk6f56.js} +2 -2
  7. package/dist/{chunk-djyzfn1b.js.map → chunk-3ndk6f56.js.map} +5 -5
  8. package/dist/chunk-8mtrpdem.js +20 -0
  9. package/dist/{chunk-vtq6at24.js.map → chunk-8mtrpdem.js.map} +16 -11
  10. package/dist/chunk-9txn8acf.js +11 -0
  11. package/dist/{chunk-ck4b2z5a.js.map → chunk-9txn8acf.js.map} +5 -5
  12. package/dist/chunk-bhxyhsqr.js +4 -0
  13. package/dist/{chunk-p9qbw9m8.js.map → chunk-bhxyhsqr.js.map} +4 -4
  14. package/dist/chunk-bn6dtgj4.js +4 -0
  15. package/dist/{chunk-dw6fyde0.js.map → chunk-bn6dtgj4.js.map} +2 -2
  16. package/dist/chunk-cj78pfaa.js +4 -0
  17. package/dist/chunk-cj78pfaa.js.map +10 -0
  18. package/dist/chunk-fc27f4cb.js +4 -0
  19. package/dist/{chunk-nv02r6kq.js.map → chunk-fc27f4cb.js.map} +2 -2
  20. package/dist/chunk-mvmwz99e.js +4 -0
  21. package/dist/{chunk-f0k8kxnp.js.map → chunk-mvmwz99e.js.map} +5 -5
  22. package/dist/chunk-pd22hcnn.js +4 -0
  23. package/dist/{chunk-y56jme0t.js.map → chunk-pd22hcnn.js.map} +5 -5
  24. package/dist/{chunk-r06tvhy1.js → chunk-rb7jfsvq.js} +2 -2
  25. package/dist/{chunk-r06tvhy1.js.map → chunk-rb7jfsvq.js.map} +1 -1
  26. package/dist/chunk-tpdm7nax.js +8 -0
  27. package/dist/{chunk-vfq8m4st.js.map → chunk-tpdm7nax.js.map} +2 -2
  28. package/dist/{chunk-ss47s88c.js → chunk-tqey3r3k.js} +2 -2
  29. package/dist/{chunk-ss47s88c.js.map → chunk-tqey3r3k.js.map} +1 -1
  30. package/dist/chunk-tr7zwxhw.js +4 -0
  31. package/dist/{chunk-w7d8nbgw.js.map → chunk-tr7zwxhw.js.map} +6 -6
  32. package/dist/chunk-x2f9x5m1.js +4 -0
  33. package/dist/{chunk-emb8fan6.js.map → chunk-x2f9x5m1.js.map} +2 -2
  34. package/dist/chunk-yec7wnh4.js +4 -0
  35. package/dist/{chunk-0wt838y6.js.map → chunk-yec7wnh4.js.map} +4 -4
  36. package/dist/client/auth/useForgotPassword.d.ts +1 -1
  37. package/dist/client/auth/useResetPassword.d.ts +1 -1
  38. package/dist/client/auth/useSignIn.d.ts +1 -1
  39. package/dist/client/auth/useSignOut.d.ts +1 -1
  40. package/dist/client/auth/useSignUp.d.ts +1 -1
  41. package/dist/client/index.js.map +1 -1
  42. package/dist/client/useMutation.d.ts +5 -5
  43. package/dist/client/useMutation.d.ts.map +1 -1
  44. package/dist/http/HttpRequest.d.ts +2 -3
  45. package/dist/http/HttpRequest.d.ts.map +1 -1
  46. package/dist/http/index.js +2 -2
  47. package/dist/http/index.js.map +3 -3
  48. package/dist/kernel/index.js +1 -1
  49. package/dist/services/index.js +2 -11
  50. package/dist/services/index.js.map +6 -17
  51. package/package.json +1 -1
  52. package/dist/chunk-0wt838y6.js +0 -4
  53. package/dist/chunk-3aebg4t6.js +0 -5
  54. package/dist/chunk-3aebg4t6.js.map +0 -73
  55. package/dist/chunk-5pasfeez.js +0 -3
  56. package/dist/chunk-5pasfeez.js.map +0 -15
  57. package/dist/chunk-ck4b2z5a.js +0 -11
  58. package/dist/chunk-dw6fyde0.js +0 -4
  59. package/dist/chunk-emb8fan6.js +0 -4
  60. package/dist/chunk-f0k8kxnp.js +0 -4
  61. package/dist/chunk-nv02r6kq.js +0 -4
  62. package/dist/chunk-p9qbw9m8.js +0 -4
  63. package/dist/chunk-s5natt4n.js +0 -4
  64. package/dist/chunk-vfq8m4st.js +0 -8
  65. package/dist/chunk-vtq6at24.js +0 -20
  66. package/dist/chunk-w7d8nbgw.js +0 -4
  67. package/dist/chunk-y56jme0t.js +0 -4
  68. /package/dist/{chunk-sd6qmtfs.js → chunk-25y8fca8.js} +0 -0
  69. /package/dist/{chunk-sd6qmtfs.js.map → chunk-25y8fca8.js.map} +0 -0
@@ -1,4 +0,0 @@
1
- // @bun
2
- import"./chunk-td079vg9.js";import"./chunk-r06tvhy1.js";import{Pb as i,Qb as f}from"./chunk-5pasfeez.js";import{$b as C,Wb as y,Xb as K,Yb as E,ac as N}from"./chunk-ss47s88c.js";var F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-p9qbw9m8.js");if(I[e])return I[e];const s=new r({region:e});return I[e]=s,s};var H=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-p9qbw9m8.js");return(await M(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var v=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${_}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as W}from"fs";var{writeFile:j}=W,b=(e,r)=>{const s=K(e),t=JSON.stringify(r,null,2);return j(s,t)};var G=new Date(0),U=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await N(e),s=y(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);const a=t.sso_session,c=(await C(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);const{sso_start_url:p,sso_region:S}=c;let o;try{o=await E(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);const{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>L)return l;if(Date.now()-G.getTime()<30000)return v(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{G.setTime(Date.now());const n=await H(o,S);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);const h=new Date(Date.now()+n.expiresIn*1000);try{await b(a,{...o,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:h}}catch(n){return v(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:p,logger:S})=>{let o;const x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const g=await U({profile:p})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:S})}else try{o=await E(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S});const{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-djyzfn1b.js"),h=d||new l(Object.assign({},c??{},{region:c?.region??t}));let O;try{O=await h.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:S})}const{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:D,credentialScope:A,accountId:$}={}}=O;if(!w||!k||!R||!D)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:S});return{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:new Date(D),...A&&{credentialScope:A},...$&&{accountId:$}}};var q=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i(`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:a,ssoSession:d}=e,{ssoClient:c}=e,p=y(e);if(!r&&!s&&!t&&!a&&!d){const o=(await N(e))[p];if(!o)throw new i(`Profile ${p} was not found.`,{logger:e.logger});if(!F(o))throw new i(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const w=(await C(e))[o.sso_session],k=` configurations in profile ${p} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}const{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:h}=q(o,e.logger);return P({ssoStartUrl:x,ssoSession:h,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:p})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:p})};export{q as validateSsoProfile,F as isSsoProfile,Ee as fromSSO};
3
-
4
- //# debugId=EC166B1C91A9AD9464756E2164756E21
@@ -1,4 +0,0 @@
1
- import{Pb as s,Rb as y,Sb as u,Tb as C}from"./chunk-5pasfeez.js";import{Wb as d,_b as g}from"./chunk-ss47s88c.js";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 l=(o,r)=>async()=>{try{const t=o(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new s(t.message||`Not found in ENV: ${c(o.toString())}`,{logger:r})}};var h=(o,{preferredFile:r="config",...t}={})=>async()=>{const e=d(t),{configFile:n,credentialsFile:i}=await g(t),f=i[e]||{},m=n[e]||{},S=r==="config"?{...f,...m}:{...m,...f};try{const p=o(S,r==="config"?n:i);if(p===void 0)throw new Error;return p}catch(a){throw new s(a.message||`Not found in config files w/ profile [${e}]: ${c(o.toString())}`,{logger:t.logger})}};var E=(o)=>typeof o==="function",w=(o)=>E(o)?async()=>await o():u(o);var k=({environmentVariableSelector:o,configFileSelector:r,default:t},e={})=>C(y(l(o),h(r,e),w(t)));function F(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 N=(o)=>{if(typeof o==="string")return N(new URL(o));const{hostname:r,pathname:t,port:e,protocol:n,search:i}=o;let f;if(i)f=F(i);return{hostname:r,port:e?parseInt(e):void 0,protocol:n,path:t,query:f}};
2
- export{k as Mb,N as Nb};
3
-
4
- //# debugId=5AE22A00E1B3026364756E2164756E21
File without changes