gemi 0.5.3 → 0.7.0

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 (120) hide show
  1. package/dist/app/App.d.ts +1 -0
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +2 -2
  4. package/dist/app/index.js.map +3 -3
  5. package/dist/bin/index.js +16 -57
  6. package/dist/broadcasting/index.js +1 -1
  7. package/dist/chunk-0q2mxfke.js +5 -0
  8. package/dist/chunk-0q2mxfke.js.map +64 -0
  9. package/dist/chunk-0ykbtpxc.js +4 -0
  10. package/dist/{chunk-t34vnmky.js.map → chunk-0ykbtpxc.js.map} +1 -1
  11. package/dist/{chunk-azwtbn3m.js → chunk-1qr49psp.js} +2 -2
  12. package/dist/{chunk-azwtbn3m.js.map → chunk-1qr49psp.js.map} +1 -1
  13. package/dist/{chunk-77gdtbj7.js → chunk-2xa4pbxq.js} +2 -2
  14. package/dist/{chunk-77gdtbj7.js.map → chunk-2xa4pbxq.js.map} +1 -1
  15. package/dist/chunk-59v5dnya.js +20 -0
  16. package/dist/{chunk-9we58rz2.js.map → chunk-59v5dnya.js.map} +6 -8
  17. package/dist/{chunk-ckn0v6nd.js → chunk-74c59y5c.js} +3 -3
  18. package/dist/{chunk-ckn0v6nd.js.map → chunk-74c59y5c.js.map} +1 -1
  19. package/dist/{chunk-7v15p9nn.js → chunk-79cfd363.js} +3 -3
  20. package/dist/{chunk-7v15p9nn.js.map → chunk-79cfd363.js.map} +1 -1
  21. package/dist/{chunk-srsjrh5y.js → chunk-7jhdg3q5.js} +3 -3
  22. package/dist/{chunk-srsjrh5y.js.map → chunk-7jhdg3q5.js.map} +1 -1
  23. package/dist/{chunk-740bx4ar.js → chunk-7pwzsfq2.js} +2 -2
  24. package/dist/{chunk-740bx4ar.js.map → chunk-7pwzsfq2.js.map} +1 -1
  25. package/dist/{chunk-0s3yapam.js → chunk-ampttx61.js} +3 -3
  26. package/dist/{chunk-0s3yapam.js.map → chunk-ampttx61.js.map} +1 -1
  27. package/dist/{chunk-9em80ypy.js → chunk-bpqd0d4g.js} +2 -2
  28. package/dist/{chunk-9em80ypy.js.map → chunk-bpqd0d4g.js.map} +1 -1
  29. package/dist/chunk-d7s659wd.js +4 -0
  30. package/dist/{chunk-yaqp7fex.js.map → chunk-d7s659wd.js.map} +4 -4
  31. package/dist/{chunk-hnyegpzf.js → chunk-djfe1w23.js} +3 -3
  32. package/dist/{chunk-hnyegpzf.js.map → chunk-djfe1w23.js.map} +1 -1
  33. package/dist/{chunk-rr5j1686.js → chunk-exvtvmb6.js} +2 -2
  34. package/dist/{chunk-rr5j1686.js.map → chunk-exvtvmb6.js.map} +1 -1
  35. package/dist/{chunk-ewp71f92.js → chunk-g3838fme.js} +2 -2
  36. package/dist/{chunk-ewp71f92.js.map → chunk-g3838fme.js.map} +1 -1
  37. package/dist/{chunk-83snmykp.js → chunk-gpx46fk2.js} +3 -3
  38. package/dist/{chunk-83snmykp.js.map → chunk-gpx46fk2.js.map} +1 -1
  39. package/dist/{chunk-0q8sry4s.js → chunk-h65yyskz.js} +2 -2
  40. package/dist/{chunk-0q8sry4s.js.map → chunk-h65yyskz.js.map} +1 -1
  41. package/dist/{chunk-95hz1khz.js → chunk-hydta8h3.js} +2 -2
  42. package/dist/{chunk-95hz1khz.js.map → chunk-hydta8h3.js.map} +1 -1
  43. package/dist/chunk-jjkvret2.js +4 -0
  44. package/dist/{chunk-zze295mv.js.map → chunk-jjkvret2.js.map} +4 -4
  45. package/dist/{chunk-6y378xez.js → chunk-jwx1ymkq.js} +2 -2
  46. package/dist/{chunk-6y378xez.js.map → chunk-jwx1ymkq.js.map} +1 -1
  47. package/dist/{chunk-ch0p7trm.js → chunk-ns0xv46h.js} +2 -2
  48. package/dist/{chunk-ch0p7trm.js.map → chunk-ns0xv46h.js.map} +1 -1
  49. package/dist/chunk-q30kam3c.js +8 -0
  50. package/dist/{chunk-0gs55008.js.map → chunk-q30kam3c.js.map} +2 -2
  51. package/dist/chunk-qe8pzmx4.js +4 -0
  52. package/dist/{chunk-njjn5kvb.js.map → chunk-qe8pzmx4.js.map} +4 -4
  53. package/dist/chunk-qsj2vhhs.js +4 -0
  54. package/dist/{chunk-3pfpq2xc.js.map → chunk-qsj2vhhs.js.map} +1 -1
  55. package/dist/chunk-rvge2dbd.js +3 -0
  56. package/dist/chunk-rvge2dbd.js.map +16 -0
  57. package/dist/{chunk-ac7dhq1c.js → chunk-s6redhaf.js} +2 -2
  58. package/dist/{chunk-ac7dhq1c.js.map → chunk-s6redhaf.js.map} +1 -1
  59. package/dist/{chunk-9877dbvm.js → chunk-x1ry5x7k.js} +2 -2
  60. package/dist/{chunk-9877dbvm.js.map → chunk-x1ry5x7k.js.map} +1 -1
  61. package/dist/{chunk-7tq73gy6.js → chunk-ye2x38qd.js} +2 -2
  62. package/dist/{chunk-7tq73gy6.js.map → chunk-ye2x38qd.js.map} +1 -1
  63. package/dist/chunk-zg1wzdnw.js +4 -0
  64. package/dist/{chunk-bt35atmf.js.map → chunk-zg1wzdnw.js.map} +4 -4
  65. package/dist/client/ClientRouterContext.d.ts.map +1 -1
  66. package/dist/client/HttpClientContext.d.ts +12 -0
  67. package/dist/client/HttpClientContext.d.ts.map +1 -0
  68. package/dist/client/QueryManagerContext.d.ts.map +1 -1
  69. package/dist/client/QueryResource.d.ts +3 -1
  70. package/dist/client/QueryResource.d.ts.map +1 -1
  71. package/dist/client/i18n/I18nContext.d.ts.map +1 -1
  72. package/dist/client/i18n/useLocale.d.ts.map +1 -1
  73. package/dist/client/index.d.ts +2 -1
  74. package/dist/client/index.d.ts.map +1 -1
  75. package/dist/client/index.js +202 -151
  76. package/dist/client/index.js.map +1 -1
  77. package/dist/client/init.d.ts +1 -0
  78. package/dist/client/init.d.ts.map +1 -1
  79. package/dist/client/useMutation.d.ts.map +1 -1
  80. package/dist/client/useNavigate.d.ts.map +1 -1
  81. package/dist/email/index.js +2 -2
  82. package/dist/email/index.js.map +1 -1
  83. package/dist/facades/index.js +2 -2
  84. package/dist/facades/index.js.map +5 -4
  85. package/dist/http/index.js +2 -2
  86. package/dist/http/index.js.map +1 -1
  87. package/dist/kernel/Kernel.d.ts +2 -0
  88. package/dist/kernel/Kernel.d.ts.map +1 -1
  89. package/dist/kernel/index.js +2 -2
  90. package/dist/kernel/index.js.map +3 -3
  91. package/dist/server/index.js +5 -5
  92. package/dist/server/index.js.map +5 -6
  93. package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts +14 -0
  94. package/dist/services/image-optimization/ImageOptimizationServiceContainer.d.ts.map +1 -0
  95. package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts +7 -0
  96. package/dist/services/image-optimization/ImageOptimizationServiceProvider.d.ts.map +1 -0
  97. package/dist/services/image-optimization/drivers/ImageOptimizationDriver.d.ts +5 -0
  98. package/dist/services/image-optimization/drivers/ImageOptimizationDriver.d.ts.map +1 -0
  99. package/dist/services/image-optimization/drivers/SharpDriver.d.ts +6 -0
  100. package/dist/services/image-optimization/drivers/SharpDriver.d.ts.map +1 -0
  101. package/dist/services/image-optimization/drivers/types.d.ts +14 -0
  102. package/dist/services/image-optimization/drivers/types.d.ts.map +1 -0
  103. package/dist/services/index.d.ts +4 -0
  104. package/dist/services/index.d.ts.map +1 -1
  105. package/dist/services/index.js +6 -6
  106. package/dist/services/index.js.map +11 -7
  107. package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunk-0gs55008.js +0 -8
  110. package/dist/chunk-3pfpq2xc.js +0 -4
  111. package/dist/chunk-3saf3cee.js +0 -5
  112. package/dist/chunk-3saf3cee.js.map +0 -65
  113. package/dist/chunk-9we58rz2.js +0 -20
  114. package/dist/chunk-bt35atmf.js +0 -4
  115. package/dist/chunk-njjn5kvb.js +0 -4
  116. package/dist/chunk-t34vnmky.js +0 -4
  117. package/dist/chunk-wthx7151.js +0 -4
  118. package/dist/chunk-wthx7151.js.map +0 -16
  119. package/dist/chunk-yaqp7fex.js +0 -4
  120. package/dist/chunk-zze295mv.js +0 -4
@@ -1,4 +0,0 @@
1
- class a{}
2
- export{a as Rb};
3
-
4
- //# debugId=776985636D5ECCAC64756E2164756E21
@@ -1,4 +0,0 @@
1
- import{Bb as g,xb as d}from"./chunk-ac7dhq1c.js";import{Jb as s,Lb as y,Mb as u,Nb as C}from"./chunk-740bx4ar.js";function c(o){try{let 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{let 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()=>{let e=d(t),{configFile:n,credentialsFile:i}=await g(t),f=i[e]||{},m=n[e]||{},S=r==="config"?{...f,...m}:{...m,...f};try{let 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){let 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));let{hostname:r,pathname:t,port:e,protocol:n,search:i}=o,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 wa,N as xa};
3
-
4
- //# debugId=258FB7B0A3DFFA4764756E2164756E21
@@ -1,16 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../node_modules/@smithy/node-config-provider/dist-es/getSelectorName.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromEnv.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromSharedConfigFiles.js", "../../../node_modules/@smithy/node-config-provider/dist-es/fromStatic.js", "../../../node_modules/@smithy/node-config-provider/dist-es/configLoader.js", "../../../node_modules/@smithy/querystring-parser/dist-es/index.js", "../../../node_modules/@smithy/url-parser/dist-es/index.js"],
4
- "sourcesContent": [
5
- "export function getSelectorName(functionString) {\n try {\n const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n constants.delete(\"CONFIG\");\n constants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n constants.delete(\"ENV\");\n return [...constants].join(\", \");\n }\n catch (e) {\n return functionString;\n }\n}\n",
6
- "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromEnv = (envVarSelector, logger) => async () => {\n try {\n const config = envVarSelector(process.env);\n if (config === undefined) {\n throw new Error();\n }\n return config;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger });\n }\n};\n",
7
- "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName, loadSharedConfigFiles } from \"@smithy/shared-ini-file-loader\";\nimport { getSelectorName } from \"./getSelectorName\";\nexport const fromSharedConfigFiles = (configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = getProfileName(init);\n const { configFile, credentialsFile } = await loadSharedConfigFiles(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\"\n ? { ...profileFromCredentials, ...profileFromConfig }\n : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === undefined) {\n throw new Error();\n }\n return configValue;\n }\n catch (e) {\n throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });\n }\n};\n",
8
- "import { fromStatic as convertToProvider } from \"@smithy/property-provider\";\nconst isFunction = (func) => typeof func === \"function\";\nexport const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : convertToProvider(defaultValue);\n",
9
- "import { chain, memoize } from \"@smithy/property-provider\";\nimport { fromEnv } from \"./fromEnv\";\nimport { fromSharedConfigFiles } from \"./fromSharedConfigFiles\";\nimport { fromStatic } from \"./fromStatic\";\nexport const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => memoize(chain(fromEnv(environmentVariableSelector), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));\n",
10
- "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n",
11
- "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n"
12
- ],
13
- "mappings": "wHAAO,GAAS,CAAe,CAAC,EAAgB,CAC5C,GAAI,CACA,IAAM,EAAY,IAAI,IAAI,MAAM,KAAK,EAAe,MAAM,eAAe,GAAK,CAAC,CAAC,CAAC,EAIjF,OAHA,EAAU,OAAO,QAAQ,EACzB,EAAU,OAAO,yBAAyB,EAC1C,EAAU,OAAO,KAAK,EACf,CAAC,GAAG,CAAS,EAAE,KAAK,IAAI,QAE5B,EAAP,CACI,OAAO,GCPR,IAAM,EAAU,CAAC,EAAgB,IAAW,SAAY,CAC3D,GAAI,CACA,IAAM,EAAS,EAAe,QAAQ,GAAG,EACzC,GAAI,IAAW,OACX,MAAM,IAAI,MAEd,OAAO,QAEJ,EAAP,CACI,MAAM,IAAI,EAAyB,EAAE,SAAW,qBAAqB,EAAgB,EAAe,SAAS,CAAC,IAAK,CAAE,QAAO,CAAC,ICR9H,IAAM,EAAwB,CAAC,GAAkB,gBAAgB,YAAa,GAAS,CAAC,IAAM,SAAY,CAC7G,IAAM,EAAU,EAAe,CAAI,GAC3B,aAAY,mBAAoB,MAAM,EAAsB,CAAI,EAClE,EAAyB,EAAgB,IAAY,CAAC,EACtD,EAAoB,EAAW,IAAY,CAAC,EAC5C,EAAgB,IAAkB,SAClC,IAAK,KAA2B,CAAkB,EAClD,IAAK,KAAsB,CAAuB,EACxD,GAAI,CAEA,IAAM,EAAc,EAAe,EADnB,IAAkB,SAAW,EAAa,CACD,EACzD,GAAI,IAAgB,OAChB,MAAM,IAAI,MAEd,OAAO,QAEJ,EAAP,CACI,MAAM,IAAI,EAAyB,EAAE,SAAW,yCAAyC,OAAa,EAAgB,EAAe,SAAS,CAAC,IAAK,CAAE,OAAQ,EAAK,MAAO,CAAC,ICnBnL,IAAM,EAAa,CAAC,WAAgB,IAAS,WAChC,EAAa,CAAC,IAAiB,EAAW,CAAY,EAAI,SAAY,MAAM,EAAa,EAAI,EAAkB,CAAY,ECEjI,IAAM,EAAa,EAAG,8BAA6B,qBAAoB,QAAS,GAAgB,EAAgB,CAAC,IAAM,EAAQ,EAAM,EAAQ,CAA2B,EAAG,EAAsB,EAAoB,CAAa,EAAG,EAAW,CAAY,CAAC,CAAC,ECJ9P,SAAS,CAAgB,CAAC,EAAa,CAC1C,IAAM,EAAQ,CAAC,EAEf,GADA,EAAc,EAAY,QAAQ,MAAO,EAAE,EACvC,EACA,QAAW,KAAQ,EAAY,MAAM,GAAG,EAAG,CACvC,IAAK,EAAK,EAAQ,MAAQ,EAAK,MAAM,GAAG,EAExC,GADA,EAAM,mBAAmB,CAAG,EACxB,EACA,EAAQ,mBAAmB,CAAK,EAEpC,KAAM,KAAO,GACT,EAAM,GAAO,UAER,MAAM,QAAQ,EAAM,EAAI,EAC7B,EAAM,GAAK,KAAK,CAAK,MAGrB,GAAM,GAAO,CAAC,EAAM,GAAM,CAAK,EAI3C,OAAO,ECpBJ,IAAM,EAAW,CAAC,IAAQ,CAC7B,UAAW,IAAQ,SACf,OAAO,EAAS,IAAI,IAAI,CAAG,CAAC,EAEhC,IAAQ,WAAU,WAAU,OAAM,WAAU,UAAW,EACnD,EACJ,GAAI,EACA,EAAQ,EAAiB,CAAM,EAEnC,MAAO,CACH,WACA,KAAM,EAAO,SAAS,CAAI,EAAI,OAC9B,WACA,KAAM,EACN,OACJ",
14
- "debugId": "258FB7B0A3DFFA4764756E2164756E21",
15
- "names": []
16
- }
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{wa as z,xa as B}from"./chunk-wthx7151.js";import"./chunk-ac7dhq1c.js";import"./chunk-srsjrh5y.js";import{Ib as K,Jb as y}from"./chunk-740bx4ar.js";import"./chunk-rr5j1686.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{let T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{let{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{let T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){let I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{let c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1,R=await z({environmentVariableSelector:(S)=>{let A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{let A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){let S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}let V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{let w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{let T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
3
-
4
- //# debugId=6DAC96ECA012EA3164756E2164756E21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{N as Yh}from"./chunk-ckn0v6nd.js";import{$ as Q0,O as Dw,P as k0,Q as K0,R as F0,S as B0,V as Xh,W as y0,X as vl,Y as Ml,Z as zl,_ as Nl,aa as gl,ba as xl,ca as il,da as cl,ea as X0,fa as Y0,ha as F,ia as B,ja as Z0,ka as el,la as pl,ma as $0,na as nl,oa as V0,pa as Gh,qa as ol,ra as ul,sa as tl,ta as h0,ua as J0,va as D0}from"./chunk-9we58rz2.js";import{wa as f,xa as al}from"./chunk-wthx7151.js";import{Aa as A0,Fa as Tl,Ha as Al,Ia as Ll,Ka as U0,La as Rl,Ma as jl,Pa as bl,Qa as fl,Wa as K,Xa as Hh,Ya as t0,ab as L0,cb as H,eb as u,hb as R0,jb as P0,kb as T,lb as j0,mb as Cl,nb as Ol,ob as H0,pb as m0,qb as ph,ya as d0,za as S0}from"./chunk-3saf3cee.js";import"./chunk-ac7dhq1c.js";import"./chunk-srsjrh5y.js";import"./chunk-9em80ypy.js";import"./chunk-740bx4ar.js";import"./chunk-7v15p9nn.js";import"./chunk-hnyegpzf.js";import{Vb as A}from"./chunk-rr5j1686.js";var C=A(Xh(),1);var Il=A(Gh(),1),Ih=A(Dw(),1);var dl=async(h,w,l)=>{return{operation:Ih.getSmithyContext(w).operation,region:await Ih.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Ew(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function Gl(h){return{schemeId:"smithy.api#noAuth"}}var Sl=(h)=>{let w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(Gl(h));break}case"AssumeRoleWithWebIdentity":{w.push(Gl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:L}),Hl=(h)=>{let w=kw(h);return{...Il.resolveAwsSdkSigV4Config(w)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts 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-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts",test:"yarn test:unit","test:unit":"jest"},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/client-sso-oidc":"3.654.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"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-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var dh=A(Gh(),1);var l0=A(Xh(),1);var sl=A(Gh(),1),rl=A(Xh(),1);var Dl={["required"]:!1,["type"]:"String"},Qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Y={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Pl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Pl,"supportsDualStack"]}]},Ul=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Vl],Fw={version:"1.0",parameters:{Region:Dl,UseDualStack:Qh,UseFIPS:Qh,Endpoint:Dl,UseGlobalEndpoint:Qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Ul},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Ul,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Vl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Pl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Y,headers:Y},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[Bl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},ql=Fw;var Bw=new vl({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Wl=(h,w={})=>{return Bw.get(h,()=>zl(ql,{endpointParams:h,logger:w.logger}))};Ml.aws=Nl;var _l=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Rl,base64Encoder:h?.base64Encoder??jl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Wl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Sl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new sl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Ll,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??al,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var w0=(h)=>{Ol(process.version);let w=h0(h),l=()=>w().then(Cl),G=_l(h);return dh.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??tl,credentialDefaultProvider:h?.credentialDefaultProvider??Yh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ol({serviceId:G.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Yh(S?.__config||{})()),signer:new dh.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new l0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(pl),region:h?.region??f(il,cl),requestHandler:bl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...nl,default:async()=>(await l()).retryMode||el}),sha256:h?.sha256??ul.bind(null,"sha256"),streamCollector:h?.streamCollector??fl,useDualstackEndpoint:h?.useDualstackEndpoint??f(gl),useFipsEndpoint:h?.useFipsEndpoint??f(xl)}};var G0=(h)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){let S=w.findIndex((d)=>d.schemeId===I.schemeId);if(S===-1)w.push(I);else w.splice(S,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},I0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Sh=(h)=>h,E0=(h,w)=>{let l={...Sh(J0(h)),...Sh(H0(h)),...Sh(d0(h)),...Sh(G0(h))};return w.forEach((G)=>G.configure(l)),{...h,...D0(l),...m0(l),...S0(l),...I0(l)}};class L extends U0{constructor(...[h]){let w=w0(h||{}),l=ml(w),G=y0(l),I=$0(G),S=X0(I),d=k0(S),X=Z0(d),M=Hl(X),q=E0(M,h?.extensions||[]);super(q);this.config=q,this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(V0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:dl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Q extends P0{constructor(h){super(h);Object.setPrototypeOf(this,Q.prototype)}}class mh extends Q{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Q{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Q{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Q{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Q{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Q{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Q{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}class Bh extends Q{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),q0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),v0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),M0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),z0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var v=A(Gh(),1);var a0=async(h,w)=>{let l=a,G;return G=b({...Pw(h,w),[r]:lG,[_]:s}),j(w,l,"/",void 0,G)},s0=async(h,w)=>{let l=a,G;return G=b({...qw(h,w),[r]:wG,[_]:s}),j(w,l,"/",void 0,G)},r0=async(h,w)=>{let l=a,G;return G=b({...vw(h,w),[r]:GG,[_]:s}),j(w,l,"/",void 0,G)},_0=async(h,w)=>{let l=a,G;return G=b({...Mw(h,w),[r]:IG,[_]:s}),j(w,l,"/",void 0,G)},b0=async(h,w)=>{let l=a,G;return G=b({...zw(h,w),[r]:dG,[_]:s}),j(w,l,"/",void 0,G)},f0=async(h,w)=>{let l=a,G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),j(w,l,"/",void 0,G)},C0=async(h,w)=>{let l=a,G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),j(w,l,"/",void 0,G)},O0=async(h,w)=>{let l=a,G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),j(w,l,"/",void 0,G)},g0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=sw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},x0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=rw(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=_w(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=bw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=Ow(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=gw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=xw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);let l=await v.parseXmlBody(h.body,w),G={};return G=iw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},R=async(h,w)=>{let l={...h,body:await v.parseXmlErrorBody(h.body,w)},G=JG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Uw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Zw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await $w(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Vw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Qw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Yw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await yw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Xw(l,w);default:let I=l.body;return hG({output:h,parsedBody:I.Error,errorCode:G})}},Uw=async(h,w)=>{let l=h.body,G=fw(l.Error,w),I=new mh({$metadata:k(h),...G});return T(I,l)},yw=async(h,w)=>{let l=h.body,G=cw(l.Error,w),I=new Fh({$metadata:k(h),...G});return T(I,l)},Qw=async(h,w)=>{let l=h.body,G=ew(l.Error,w),I=new kh({$metadata:k(h),...G});return T(I,l)},Xw=async(h,w)=>{let l=h.body,G=pw(l.Error,w),I=new Bh({$metadata:k(h),...G});return T(I,l)},Yw=async(h,w)=>{let l=h.body,G=nw(l.Error,w),I=new Kh({$metadata:k(h),...G});return T(I,l)},Zw=async(h,w)=>{let l=h.body,G=ow(l.Error,w),I=new Jh({$metadata:k(h),...G});return T(I,l)},$w=async(h,w)=>{let l=h.body,G=uw(l.Error,w),I=new Dh({$metadata:k(h),...G});return T(I,l)},Vw=async(h,w)=>{let l=h.body,G=tw(l.Error,w),I=new Eh({$metadata:k(h),...G});return T(I,l)},Pw=(h,w)=>{let l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){let G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){let G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{let d=`Tags.${I}`;l[d]=S})}if(h[gh]!=null){let G=aw(h[gh],w);if(h[gh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,S])=>{let d=`TransitiveTagKeys.${I}`;l[d]=S})}if(h[qh]!=null)l[qh]=h[qh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[jh]!=null){let G=Rw(h[jh],w);if(h[jh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,S])=>{let d=`ProvidedContexts.${I}`;l[d]=S})}return l},qw=(h,w)=>{let l={};if(h[W]!=null)l[W]=h[W];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[bh]!=null)l[bh]=h[bh];if(h[$]!=null){let G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},vw=(h,w)=>{let l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ch]!=null)l[ch]=h[ch];if(h[ah]!=null)l[ah]=h[ah];if(h[$]!=null){let G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Mw=(h,w)=>{let l={};if(h[vh]!=null)l[vh]=h[vh];return l},zw=(h,w)=>{let l={};if(h[O]!=null)l[O]=h[O];return l},Nw=(h,w)=>{return{}},Ww=(h,w)=>{let l={};if(h[Th]!=null)l[Th]=h[Th];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){let G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{let d=`PolicyArns.${I}`;l[d]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){let G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{let d=`Tags.${I}`;l[d]=S})}return l},Tw=(h,w)=>{let l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Uh=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=Aw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Aw=(h,w)=>{let l={};if(h[eh]!=null)l[eh]=h[eh];return l},Lw=(h,w)=>{let l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[$h]!=null)l[$h]=h[$h];return l},Rw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=Lw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},jw=(h,w)=>{let l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[ih]!=null)l[ih]=h[ih];return l},aw=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},u0=(h,w)=>{let l={},G=1;for(let I of h){if(I===null)continue;let S=jw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},nh=(h,w)=>{let l={};if(h[Zh]!=null)l[Zh]=H(h[Zh]);if(h[N]!=null)l[N]=H(h[N]);return l},sw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=nh(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},rw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=nh(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Nh]!=null)l[Nh]=H(h[Nh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Ah]!=null)l[Ah]=H(h[Ah]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[z]!=null)l[z]=nh(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{let l={};if(h[O]!=null)l[O]=H(h[O]);if(h[_h]!=null)l[_h]=H(h[_h]);if(h[Oh]!=null)l[Oh]=H(h[Oh]);if(h[Ph]!=null)l[Ph]=L0(R0(h[Ph]));return l},bw=(h,w)=>{let l={};if(h[Vh]!=null)l[Vh]=H(h[Vh]);return l},fw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},Cw=(h,w)=>{let l={};if(h[zh]!=null)l[zh]=H(h[zh]);if(h[N]!=null)l[N]=H(h[N]);return l},Ow=(h,w)=>{let l={};if(h[g]!=null)l[g]=H(h[g]);return l},gw=(h,w)=>{let l={};if(h[xh]!=null)l[xh]=H(h[xh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},xw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[Mh]!=null)l[Mh]=Cw(h[Mh],w);if(h[V]!=null)l[V]=u(h[V]);return l},iw=(h,w)=>{let l={};if(h[U]!=null)l[U]=t(h[U],w);return l},cw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},ew=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{let l={};if(h[m]!=null)l[m]=H(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var hG=j0(Q),j=async(h,w,l,G,I)=>{let{hostname:S,protocol:d="https",port:X,path:M}=await h.endpoint(),q={protocol:d,hostname:S,port:X,method:"POST",path:M.endsWith("/")?M.slice(0,-1)+l:M+l,headers:w};if(G!==void 0)q.hostname=G;if(I!==void 0)q.body=I;return new A0(q)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",O="AccessKeyId",lG="AssumeRole",Zh="AssumedRoleId",z="AssumedRoleUser",wG="AssumeRoleWithSAML",GG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",$h="ContextAssertion",IG="DecodeAuthorizationMessage",Vh="DecodedMessage",y="DurationSeconds",Ph="Expiration",qh="ExternalId",vh="EncodedMessage",Mh="FederatedUser",zh="FederatedUserId",dG="GetAccessKeyInfo",SG="GetCallerIdentity",HG="GetFederationToken",mG="GetSessionToken",Nh="Issuer",Wh="Key",Th="Name",Ah="NameQualifier",Z="Policy",$="PolicyArns",Lh="PrincipalArn",Rh="ProviderArn",jh="ProvidedContexts",ah="ProviderId",V="PackedPolicySize",sh="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",_h="SecretAccessKey",bh="SAMLAssertion",fh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",Ch="SubjectType",Oh="SessionToken",e="Tags",p="TokenCode",gh="TransitiveTagKeys",xh="UserId",_="Version",ih="Value",ch="WebIdentityToken",eh="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>ph(w)+"="+ph(l)).join("&"),JG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,q0).ser(a0).de(g0).build(){}class oh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(v0,M0).ser(s0).de(x0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(z0,N0).ser(r0).de(i0).build(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(f0).de(p0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}class wl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}var DG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:oh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:uh,GetAccessKeyInfoCommand:th,GetCallerIdentityCommand:hl,GetFederationTokenCommand:ll,GetSessionTokenCommand:wl};class hw extends L{}t0(DG,hw);var lw="us-east-1",ww=(h)=>{if(typeof h?.Arn==="string"){let w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Gw=async(h,w,l)=>{let G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${lw} (STS default)`),G??I??lw},Iw=(h,w)=>{let l,G;return async(I,S)=>{if(G=I,!l){let{logger:q=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,mw=await Gw(n,h?.parentClientConfig?.region,yh),Jw=!Sw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:mw,requestHandler:Jw?wh:void 0,logger:q})}let{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(S));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);let M=ww(X);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...M&&{accountId:M}}}},dw=(h,w)=>{let l;return async(G)=>{if(!l){let{logger:X=h?.parentClientConfig?.logger,region:M,requestHandler:q=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await Gw(M,h?.parentClientConfig?.region,n),yh=!Sw(q);l=new w({region:wh,requestHandler:yh?q:void 0,logger:X})}let{Credentials:I,AssumedRoleUser:S}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);let d=ww(S);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}}}};var Sw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Hw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},EG=(h={},w)=>Iw(h,Hw(L,w)),kG=(h={},w)=>dw(h,Hw(L,w)),ad=(h)=>(w)=>h({roleAssumer:EG(w),roleAssumerWithWebIdentity:kG(w),...w});export{kG as getDefaultRoleAssumerWithWebIdentity,EG as getDefaultRoleAssumer,ad as decorateDefaultCredentialProvider,U0 as __Client,Q as STSServiceException,L as STSClient,hw as STS,Eh as RegionDisabledException,Dh as PackedPolicyTooLargeException,Jh as MalformedPolicyDocumentException,Kh as InvalidIdentityTokenException,Bh as InvalidAuthorizationMessageException,kh as IDPRejectedClaimException,Fh as IDPCommunicationErrorException,T0 as GetSessionTokenResponseFilterSensitiveLog,wl as GetSessionTokenCommand,W0 as GetFederationTokenResponseFilterSensitiveLog,ll as GetFederationTokenCommand,hl as GetCallerIdentityCommand,th as GetAccessKeyInfoCommand,mh as ExpiredTokenException,uh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,z0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,M0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,v0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,oh as AssumeRoleWithSAMLCommand,q0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
3
-
4
- //# debugId=46ABE06770D80BDA64756E2164756E21