@stacksjs/buddy 0.64.6 → 0.66.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 (149) hide show
  1. package/dist/chunk-3cfvbq6w.js +5 -0
  2. package/dist/{chunk-kkckr1p6.js.map → chunk-3cfvbq6w.js.map} +13 -13
  3. package/dist/chunk-3v3h2zkp.js +5 -0
  4. package/dist/{chunk-1f6t66bt.js.map → chunk-3v3h2zkp.js.map} +4 -4
  5. package/dist/chunk-3zx3yk1m.js +4 -0
  6. package/dist/chunk-3zx3yk1m.js.map +15 -0
  7. package/dist/chunk-8a487snn.js +5 -0
  8. package/dist/{chunk-wmfxrbxe.js.map → chunk-8a487snn.js.map} +1 -1
  9. package/dist/chunk-9kkf5maz.js +5 -0
  10. package/dist/{chunk-ygxh9jsp.js.map → chunk-9kkf5maz.js.map} +5 -5
  11. package/dist/chunk-9qba8jdt.js +12 -0
  12. package/dist/{chunk-v7d1bf8z.js.map → chunk-9qba8jdt.js.map} +5 -5
  13. package/dist/chunk-cvpb67bs.js +5 -0
  14. package/dist/chunk-cvpb67bs.js.map +10 -0
  15. package/dist/chunk-eqwfdbyk.js +5 -0
  16. package/dist/chunk-eqwfdbyk.js.map +17 -0
  17. package/dist/chunk-f41k7dpa.js +5 -0
  18. package/dist/{chunk-44mrj8pm.js.map → chunk-f41k7dpa.js.map} +3 -3
  19. package/dist/chunk-fx1zxxxa.js +9 -0
  20. package/dist/{chunk-gsnfg0v2.js.map → chunk-fx1zxxxa.js.map} +3 -3
  21. package/dist/chunk-get5gzkc.js +11 -0
  22. package/dist/chunk-get5gzkc.js.map +10 -0
  23. package/dist/chunk-m43npkjw.js +5 -0
  24. package/dist/{chunk-b685jsh2.js.map → chunk-m43npkjw.js.map} +3 -3
  25. package/dist/chunk-mrrgcavv.js +831 -0
  26. package/dist/chunk-mrrgcavv.js.map +240 -0
  27. package/dist/chunk-n5y0mrsg.js +15 -0
  28. package/dist/chunk-n5y0mrsg.js.map +173 -0
  29. package/dist/chunk-qebxvzqz.js +5 -0
  30. package/dist/{chunk-ebp27f3t.js.map → chunk-qebxvzqz.js.map} +9 -9
  31. package/dist/chunk-qj2v5psd.js +5 -0
  32. package/dist/{chunk-een41wce.js.map → chunk-qj2v5psd.js.map} +7 -7
  33. package/dist/chunk-rh4brnzh.js +5 -0
  34. package/dist/{chunk-been0qrs.js.map → chunk-rh4brnzh.js.map} +5 -5
  35. package/dist/chunk-w2vwjv6k.js +6 -0
  36. package/dist/chunk-w2vwjv6k.js.map +57 -0
  37. package/dist/chunk-w81rbh65.js +5 -0
  38. package/dist/{chunk-e9xdp71t.js.map → chunk-w81rbh65.js.map} +2 -2
  39. package/dist/chunk-wayp5kn2.js +5 -0
  40. package/dist/{chunk-qrw0tzf0.js.map → chunk-wayp5kn2.js.map} +6 -6
  41. package/dist/chunk-x5c5ngpb.js +4 -0
  42. package/dist/{chunk-34xxhapv.js.map → chunk-x5c5ngpb.js.map} +2 -2
  43. package/dist/cli.d.ts +1 -0
  44. package/dist/cli.js +2 -2
  45. package/dist/cli.js.map +3 -3
  46. package/dist/commands/add.d.ts +2 -0
  47. package/dist/commands/build.d.ts +2 -0
  48. package/dist/commands/changelog.d.ts +2 -0
  49. package/dist/commands/clean.d.ts +2 -0
  50. package/dist/commands/cloud.d.ts +2 -0
  51. package/dist/commands/commit.d.ts +2 -0
  52. package/dist/commands/configure.d.ts +2 -0
  53. package/dist/commands/create.d.ts +2 -0
  54. package/dist/commands/deploy.d.ts +2 -0
  55. package/dist/commands/dev.d.ts +3 -0
  56. package/dist/commands/dns.d.ts +2 -0
  57. package/dist/commands/domains.d.ts +2 -0
  58. package/dist/commands/fresh.d.ts +2 -0
  59. package/dist/commands/generate.d.ts +2 -0
  60. package/dist/commands/http.d.ts +2 -0
  61. package/dist/commands/index.d.ts +33 -0
  62. package/dist/commands/install.d.ts +2 -0
  63. package/dist/commands/key.d.ts +2 -0
  64. package/dist/commands/lint.d.ts +2 -0
  65. package/dist/commands/list.d.ts +2 -0
  66. package/dist/commands/make.d.ts +2 -0
  67. package/dist/commands/migrate.d.ts +2 -0
  68. package/dist/commands/outdated.d.ts +2 -0
  69. package/dist/commands/ports.d.ts +2 -0
  70. package/dist/commands/prepublish.d.ts +2 -0
  71. package/dist/commands/projects.d.ts +2 -0
  72. package/dist/commands/release.d.ts +2 -0
  73. package/dist/commands/route.d.ts +2 -0
  74. package/dist/commands/seed.d.ts +2 -0
  75. package/dist/commands/setup.d.ts +4 -0
  76. package/dist/commands/test.d.ts +2 -0
  77. package/dist/commands/tinker.d.ts +2 -0
  78. package/dist/commands/types.d.ts +2 -0
  79. package/dist/commands/upgrade.d.ts +2 -0
  80. package/dist/commands/version.d.ts +2 -0
  81. package/dist/custom-cli.d.ts +1 -0
  82. package/dist/index.d.ts +1 -0
  83. package/dist/index.js +2 -2
  84. package/dist/index.js.map +1 -1
  85. package/dist/stacks +0 -0
  86. package/package.json +50 -56
  87. package/src/cli.ts +10 -7
  88. package/src/commands/add.ts +2 -2
  89. package/src/commands/build.ts +50 -32
  90. package/src/commands/changelog.ts +2 -2
  91. package/src/commands/clean.ts +2 -2
  92. package/src/commands/cloud.ts +31 -12
  93. package/src/commands/commit.ts +2 -2
  94. package/src/commands/configure.ts +4 -3
  95. package/src/commands/create.ts +3 -3
  96. package/src/commands/deploy.ts +22 -11
  97. package/src/commands/dev.ts +38 -25
  98. package/src/commands/dns.ts +2 -2
  99. package/src/commands/domains.ts +2 -2
  100. package/src/commands/fresh.ts +2 -2
  101. package/src/commands/generate.ts +27 -3
  102. package/src/commands/http.ts +2 -2
  103. package/src/commands/index.ts +3 -3
  104. package/src/commands/install.ts +2 -2
  105. package/src/commands/key.ts +2 -2
  106. package/src/commands/lint.ts +7 -10
  107. package/src/commands/list.ts +3 -3
  108. package/src/commands/make.ts +12 -12
  109. package/src/commands/migrate.ts +2 -2
  110. package/src/commands/outdated.ts +4 -4
  111. package/src/commands/ports.ts +27 -17
  112. package/src/commands/prepublish.ts +2 -2
  113. package/src/commands/projects.ts +6 -4
  114. package/src/commands/release.ts +5 -7
  115. package/src/commands/route.ts +2 -2
  116. package/src/commands/seed.ts +2 -2
  117. package/src/commands/setup.ts +11 -7
  118. package/src/commands/test.ts +77 -54
  119. package/src/commands/tinker.ts +2 -2
  120. package/src/commands/types.ts +2 -2
  121. package/src/commands/upgrade.ts +20 -13
  122. package/src/commands/version.ts +2 -2
  123. package/src/custom-cli.ts +3 -2
  124. package/dist/chunk-1f6t66bt.js +0 -5
  125. package/dist/chunk-1nyept5d.js +0 -5
  126. package/dist/chunk-1nyept5d.js.map +0 -10
  127. package/dist/chunk-3472npd1.js +0 -19
  128. package/dist/chunk-3472npd1.js.map +0 -156
  129. package/dist/chunk-34xxhapv.js +0 -4
  130. package/dist/chunk-3y8aq9qa.js +0 -8
  131. package/dist/chunk-3y8aq9qa.js.map +0 -65
  132. package/dist/chunk-44mrj8pm.js +0 -5
  133. package/dist/chunk-8adez9b9.js +0 -5
  134. package/dist/chunk-8adez9b9.js.map +0 -10
  135. package/dist/chunk-b685jsh2.js +0 -5
  136. package/dist/chunk-been0qrs.js +0 -5
  137. package/dist/chunk-dnr3cyf7.js +0 -7
  138. package/dist/chunk-dnr3cyf7.js.map +0 -60
  139. package/dist/chunk-e9xdp71t.js +0 -5
  140. package/dist/chunk-ebp27f3t.js +0 -5
  141. package/dist/chunk-een41wce.js +0 -5
  142. package/dist/chunk-gsnfg0v2.js +0 -9
  143. package/dist/chunk-kkckr1p6.js +0 -5
  144. package/dist/chunk-pq8pr524.js +0 -5
  145. package/dist/chunk-pq8pr524.js.map +0 -17
  146. package/dist/chunk-qrw0tzf0.js +0 -5
  147. package/dist/chunk-v7d1bf8z.js +0 -12
  148. package/dist/chunk-wmfxrbxe.js +0 -5
  149. package/dist/chunk-ygxh9jsp.js +0 -5
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js", "../../../../../node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js"],
4
+ "sourcesContent": [
5
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { getProfileName } from \"@smithy/shared-ini-file-loader\";\nimport { resolveCredentialSource } from \"./resolveCredentialSource\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nexport const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const data = profiles[profileName];\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import(\"@aws-sdk/client-sts\");\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: options?.parentClientConfig,\n }, options.clientPlugins);\n }\n const { source_profile } = data;\n if (source_profile && source_profile in visitedProfiles) {\n throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(data.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(data)) {\n return sourceCredsProvider.then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: data.role_arn,\n RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: data.external_id,\n DurationSeconds: parseInt(data.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = data;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n",
6
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { chain, CredentialsProviderError } from \"@smithy/property-provider\";\nexport const resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n const { fromContainerMetadata } = await import(\"@smithy/credential-provider-imds\");\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import(\"@aws-sdk/credential-provider-env\");\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n",
7
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nexport const resolveProcessCredentials = async (options, profile) => import(\"@aws-sdk/credential-provider-process\").then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n",
8
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const resolveSsoCredentials = async (profile, profileData, options = {}) => {\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO({\n profile,\n logger: options.logger,\n })().then((creds) => {\n if (profileData.sso_session) {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n};\nexport const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n",
9
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nexport const resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n",
10
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})().then((creds) => setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n",
11
+ "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { isAssumeRoleProfile, resolveAssumeRoleCredentials } from \"./resolveAssumeRoleCredentials\";\nimport { isProcessProfile, resolveProcessCredentials } from \"./resolveProcessCredentials\";\nimport { isSsoProfile, resolveSsoCredentials } from \"./resolveSsoCredentials\";\nimport { isStaticCredsProfile, resolveStaticCredentials } from \"./resolveStaticCredentials\";\nimport { isWebIdentityProfile, resolveWebIdentityCredentials } from \"./resolveWebIdentityCredentials\";\nexport const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n",
12
+ "import { getProfileName, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { resolveProfileData } from \"./resolveProfileData\";\nexport const fromIni = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await parseKnownFiles(init);\n return resolveProfileData(getProfileName(init), profiles, init);\n};\n"
13
+ ],
14
+ "mappings": ";wOAAA,SCAA,SAEO,FAAM,JAA0B,CAAC,EAAkB,EAAa,IAAW,CAC9E,MAAM,EAAqB,CACvB,aAAc,MAAO,IAAY,CAC7B,MAAQ,YAAa,KAAa,gCAC1B,yBAA0B,KAAa,+BAE/C,OADA,GAAQ,MAAM,sEAAsE,EAC7E,SAAY,EAAM,EAAS,GAAW,CAAC,CAAC,EAAG,EAAsB,CAAO,CAAC,EAAE,EAAE,KAAK,CAAgB,GAE7G,oBAAqB,MAAO,IAAY,CACpC,GAAQ,MAAM,6EAA6E,EAC3F,MAAQ,wBAAyB,KAAa,+BAC9C,MAAO,UAAY,EAAqB,CAAO,EAAE,EAAE,KAAK,CAAgB,GAE5E,YAAa,MAAO,IAAY,CAC5B,GAAQ,MAAM,qEAAqE,EACnF,MAAQ,WAAY,KAAa,+BACjC,MAAO,UAAY,EAAQ,CAAO,EAAE,EAAE,KAAK,CAAgB,EAEnE,EACA,GAAI,KAAoB,EACpB,OAAO,EAAmB,OAG1B,OAAM,IAAI,EAAyB,4CAA4C,UAAoB,kEAC/B,CAAE,QAAO,CAAC,GAGhF,EAAmB,CAAC,IAAU,uBAAqB,EAAO,qCAAsC,GAAG,EDxBlG,IAAM,EAAsB,CAAC,GAAO,UAAU,UAAW,UAAW,CAAC,IAAM,CAC9E,OAAQ,QAAQ,CAAG,UACR,IAAQ,iBACR,EAAI,WAAa,UACxB,CAAC,YAAa,QAAQ,EAAE,eAAe,EAAI,iBAAiB,EAAI,IAChE,CAAC,YAAa,QAAQ,EAAE,eAAe,EAAI,WAAW,EAAI,IAC1D,CAAC,YAAa,QAAQ,EAAE,eAAe,E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AAa,EAAU,EAAS,CAAe,EAEvF,GAAI,EAAqB,CAAI,EACzB,OAAO,EAAyB,EAAM,CAAO,EAEjD,GAAI,EAAqB,CAAI,EACzB,OAAO,EAA8B,EAAM,CAAO,EAEtD,GAAI,EAAiB,CAAI,EACrB,OAAO,EAA0B,EAAS,CAAW,EAEzD,GAAI,EAAa,CAAI,EACjB,OAAO,MAAM,EAAsB,EAAa,EAAM,CAAO,EAEjE,MAAM,IAAI,EAAyB,iDAAiD,2CAAsD,CAAE,OAAQ,EAAQ,MAAO,CAAC,GCxBjK,IAAM,GAAU,CAAC,EAAO,CAAC,IAAM,SAAY,CAC9C,EAAK,QAAQ,MAAM,4CAA4C,EAC/D,MAAM,EAAW,MAAM,EAAgB,CAAI,EAC3C,OAAO,EAAmB,EAAe,CAAI,EAAG,EAAU,CAAI",
15
+ "debugId": "369DE17AF0A5DE1F64756E2164756E21",
16
+ "names": []
17
+ }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{ub as a}from"./chunk-get5gzkc.js";import{wb as c}from"./chunk-3zx3yk1m.js";import{Bb as E}from"./chunk-8a487snn.js";var N=E(a(),1);import{readFileSync as p}from"fs";var i=(e)=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:o,roleSessionName:r,webIdentityToken:s,providerId:n,policyArns:S,policy:d,durationSeconds:l}=e;let{roleAssumerWithWebIdentity:t}=e;if(!t){const{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-3cfvbq6w.js");t=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return t({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:s,ProviderId:n,PolicyArns:S,Policy:d,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",T="AWS_ROLE_ARN",f="AWS_ROLE_SESSION_NAME",w=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[T],s=e?.roleSessionName??process.env[f];if(!o||!r)throw new c("Web identity configuration not specified",{logger:e.logger});const n=await i({...e,webIdentityToken:p(o,{encoding:"ascii"}),roleArn:r,roleSessionName:s})();if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as fromWebToken,w as fromTokenFile};
3
+
4
+ //# debugId=5A6CCB3E84E3029B64756E2164756E21
5
+ //# sourceMappingURL=chunk-f41k7dpa.js.map
@@ -2,10 +2,10 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../../../../node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
4
4
  "sourcesContent": [
5
- "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { readFileSync } from \"fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n return fromWebToken({\n ...init,\n webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n};\n",
5
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { readFileSync } from \"fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n",
6
6
  "export const fromWebToken = (init) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/client-sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: init.parentClientConfig,\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
7
7
  ],
8
- "mappings": ";uFAAA,SACA,uBAAS,WCDF,IAAM,EAAe,CAAC,IAAS,SAAY,CAC9C,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,MAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,EACxG,IAAM,8BAA+B,EACrC,IAAK,EAA4B,CAC7B,MAAQ,wCAAyC,KAAa,+BAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,EAAK,kBAC7B,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDjBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,SAAY,CACpD,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,MAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,IAAK,IAAyB,EAC1B,MAAM,IAAI,2BAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAa,IACb,EACH,iBAAkB,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC1E,UACA,iBACJ,CAAC,EAAE",
9
- "debugId": "F571DA061B084C0964756E2164756E21",
8
+ "mappings": ";uIAAA,SAEA,iBAAS,WCFF,IAAM,EAAe,CAAC,IAAS,SAAY,CAC9C,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,MAAQ,UAAS,kBAAiB,mBAAkB,aAAY,aAAY,SAAQ,mBAAoB,EACxG,IAAM,8BAA+B,EACrC,IAAK,EAA4B,CAC7B,MAAQ,wCAAyC,KAAa,+BAC9D,EAA6B,EAAqC,IAC3D,EAAK,aACR,yBAA0B,EAAK,OAC/B,mBAAoB,EAAK,kBAC7B,EAAG,EAAK,aAAa,EAEzB,OAAO,EAA2B,CAC9B,QAAS,EACT,gBAAiB,GAAmB,sBAAsB,KAAK,IAAI,IACnE,iBAAkB,EAClB,WAAY,EACZ,WAAY,EACZ,OAAQ,EACR,gBAAiB,CACrB,CAAC,GDhBL,IAAM,EAAiB,8BACjB,EAAe,eACf,EAAwB,wBACjB,EAAgB,CAAC,EAAO,CAAC,IAAM,SAAY,CACpD,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,MAAM,EAAuB,GAAM,sBAAwB,QAAQ,IAAI,GACjE,EAAU,GAAM,SAAW,QAAQ,IAAI,GACvC,EAAkB,GAAM,iBAAmB,QAAQ,IAAI,GAC7D,IAAK,IAAyB,EAC1B,MAAM,IAAI,EAAyB,2CAA4C,CAC3E,OAAQ,EAAK,MACjB,CAAC,EAEL,MAAM,EAAc,MAAM,EAAa,IAChC,EACH,iBAAkB,EAAa,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC1E,UACA,iBACJ,CAAC,EAAE,EACH,GAAI,IAAyB,QAAQ,IAAI,GACrC,uBAAqB,EAAa,wCAAyC,GAAG,EAElF,OAAO",
9
+ "debugId": "5A6CCB3E84E3029B64756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import{Ia as I,Ka as y,Ua as C,wa as d}from"./chunk-w2vwjv6k.js";import"./chunk-w81rbh65.js";import{ub as u}from"./chunk-get5gzkc.js";import{wb as n}from"./chunk-3zx3yk1m.js";import{Bb as p}from"./chunk-8a487snn.js";var P=p(u(),1);import A from"fs/promises";var x="169.254.170.2",E="169.254.170.23",R="[fd00:ec2::23]",i=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===x||e.hostname===E||e.hostname===R)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const c=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
3
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
4
+ - ECS container host 169.254.170.2
5
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};function S(e){return new d({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function g(e,a){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:a})}var w=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var O="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="http://169.254.170.2",v="AWS_CONTAINER_CREDENTIALS_FULL_URI",_="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",D=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a;const c=e.awsContainerCredentialsRelativeUri??process.env[O],r=e.awsContainerCredentialsFullUri??process.env[v],t=e.awsContainerAuthorizationToken??process.env[B],s=e.awsContainerAuthorizationTokenFile??process.env[_],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${b}${c}`;else throw new n(`No HTTP credential provider host provided.
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(a);i(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await A.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response).then((T)=>P.setCredentialFeature(T,"CREDENTIALS_HTTP","z"))}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{D as fromHttp};
7
+
8
+ //# debugId=E704F1A8A2A84F1964756E2164756E21
9
+ //# sourceMappingURL=chunk-fx1zxxxa.js.map
@@ -2,12 +2,12 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js", "../../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js", "../../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js", "../../../../../node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js"],
4
4
  "sourcesContent": [
5
- "import { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport fs from \"fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger ? console.warn : options.logger.warn;\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = new NodeHttpHandler({\n requestTimeout: options.timeout ?? 1000,\n connectionTimeout: options.timeout ?? 1000,\n });\n return retryWrapper(async () => {\n const request = createGetRequest(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await fs.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return getCredentials(result.response);\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n};\n",
5
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { NodeHttpHandler } from \"@smithy/node-http-handler\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport fs from \"fs/promises\";\nimport { checkUrl } from \"./checkUrl\";\nimport { createGetRequest, getCredentials } from \"./requestHelpers\";\nimport { retryWrapper } from \"./retry-wrapper\";\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger ? console.warn : options.logger.warn;\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n checkUrl(url, options.logger);\n const requestHandler = new NodeHttpHandler({\n requestTimeout: options.timeout ?? 1000,\n connectionTimeout: options.timeout ?? 1000,\n });\n return retryWrapper(async () => {\n const request = createGetRequest(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await fs.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return getCredentials(result.response).then((creds) => setCredentialFeature(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n};\n",
6
6
  "import { CredentialsProviderError } from \"@smithy/property-provider\";\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nexport const checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\n",
7
7
  "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { parseRfc3339DateTime } from \"@smithy/smithy-client\";\nimport { sdkStreamMixin } from \"@smithy/util-stream\";\nexport function createGetRequest(url) {\n return new HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexport async function getCredentials(response, logger) {\n const stream = sdkStreamMixin(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: parseRfc3339DateTime(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n",
8
8
  "export const retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\n"
9
9
  ],
10
- "mappings": ";8LACA,SACA,qBCFA,SAGA,IAAM,EAAqB,gBACrB,EAA0B,iBAC1B,EAA0B,iBACnB,EAAW,CAAC,EAAK,IAAW,CACrC,GAAI,EAAI,WAAa,SACjB,OAEJ,GAAI,EAAI,WAAa,GACjB,EAAI,WAAa,GACjB,EAAI,WAAa,EACjB,OAEJ,GAAI,EAAI,SAAS,SAAS,GAAG,GACzB,GAAI,EAAI,WAAa,SAAW,EAAI,WAAa,4CAC7C,WAGH,CACD,GAAI,EAAI,WAAa,YACjB,OAEJ,MAAM,EAAe,EAAI,SAAS,MAAM,GAAG,EACrC,EAAU,CAAC,IAAc,CAC3B,MAAM,EAAM,SAAS,EAAW,EAAE,EAClC,MAAO,IAAK,GAAO,GAAO,KAE9B,GAAI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AI,GAC9D,EAAY,EAAQ,oCAAsC,QAAQ,IAAI,GACtE,EAAO,EAAQ,QAAQ,aAAa,OAAS,eAAiB,EAAQ,OAAS,QAAQ,KAAO,EAAQ,OAAO,KACnH,GAAI,GAAY,EACZ,EAAK,6HACyF,EAC9F,EAAK,sDAAsD,EAE/D,GAAI,GAAS,EACT,EAAK,6HACyF,EAC9F,EAAK,sDAAsD,EAE/D,GAAI,EACA,EAAO,UAEF,EACL,EAAO,GAAG,IAA0B,QAGpC,OAAM,IAAI,EAAyB;AAAA,mFACyC,CAAE,OAAQ,EAAQ,MAAO,CAAC,EAE1G,MAAM,EAAM,IAAI,IAAI,CAAI,EACxB,EAAS,EAAK,EAAQ,MAAM,EAC5B,MAAM,EAAiB,IAAI,EAAgB,CACvC,eAAgB,EAAQ,SAAW,KACnC,kBAAmB,EAAQ,SAAW,IAC1C,CAAC,EACD,OAAO,EAAa,SAAY,CAC5B,MAAM,EAAU,EAAiB,CAAG,EACpC,GAAI,EACA,EAAQ,QAAQ,cAAgB,UAE3B,EACL,EAAQ,QAAQ,eAAiB,MAAM,EAAG,SAAS,CAAS,GAAG,SAAS,EAE5E,GAAI,CACA,MAAM,EAAS,MAAM,EAAe,OAAO,CAAO,EAClD,OAAO,EAAe,EAAO,QAAQ,EAAE,KAAK,CAAC,IAAU,uBAAqB,EAAO,mBAAoB,GAAG,CAAC,QAExG,EAAP,CACI,MAAM,IAAI,EAAyB,OAAO,CAAC,EAAG,CAAE,OAAQ,EAAQ,MAAO,CAAC,IAE7E,EAAQ,YAAc,EAAG,EAAQ,SAAW,IAAI",
11
+ "debugId": "E704F1A8A2A84F1964756E2164756E21",
12
12
  "names": []
13
13
  }
@@ -0,0 +1,11 @@
1
+ import{Db as X}from"./chunk-8a487snn.js";var N=X((U,T)=>{function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,G=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,H)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(H=Y(j,z))||H.enumerable})}return b},I=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>M,setCredentialFeature:()=>Q,setFeature:()=>R});T.exports=I(L);var K=!1,M=G((b)=>{if(b&&!K&&parseInt(b.substring(1,b.indexOf(".")))<18)K=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
+ no longer support Node.js 16.x on January 6, 2025.
3
+
4
+ To continue receiving updates to AWS services, bug fixes, and security
5
+ updates please upgrade to a supported Node.js LTS version.
6
+
7
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");G(Q,"setCredentialFeature");G(R,"setFeature")});
8
+ export{N as ub};
9
+
10
+ //# debugId=41EFE1226196C1E364756E2164756E21
11
+ //# sourceMappingURL=chunk-get5gzkc.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js"],
4
+ "sourcesContent": [
5
+ "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/client/index.ts\nvar client_exports = {};\n__export(client_exports, {\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n setCredentialFeature: () => setCredentialFeature,\n setFeature: () => setFeature\n});\nmodule.exports = __toCommonJS(client_exports);\n\n// src/submodules/client/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 18) {\n warningEmitted = true;\n process.emitWarning(\n `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI`\n );\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/submodules/client/setCredentialFeature.ts\nfunction setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n__name(setCredentialFeature, \"setCredentialFeature\");\n\n// src/submodules/client/setFeature.ts\nfunction setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {}\n };\n } else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n__name(setFeature, \"setFeature\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n emitWarningIfUnsupportedVersion,\n setCredentialFeature,\n setFeature\n});\n"
6
+ ],
7
+ "mappings": "yDA+CA,SAAS,CAAoB,CA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AAC,EAAI,GACvF,EAAiB,GACjB,QAAQ,YACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uDAOF,GAED,iCAAiC,EAUpC,EAAO,EAAsB,sBAAsB,EAanD,EAAO,EAAY,YAAY",
8
+ "debugId": "41EFE1226196C1E364756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{jb as _,pb as A}from"./chunk-x5c5ngpb.js";import"./chunk-w81rbh65.js";import{ub as K}from"./chunk-get5gzkc.js";import{wb as o}from"./chunk-3zx3yk1m.js";import{Bb as E}from"./chunk-8a487snn.js";import{exec as T}from"child_process";import{promisify as y}from"util";var w=E(K(),1),S=(c,n,e)=>{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 i=new Date;if(new Date(n.Expiration)<i)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;const t={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return w.setCredentialFeature(t,"CREDENTIALS_PROCESS","w"),t};var x=async(c,n,e)=>{const s=n[c];if(n[c]){const t=s.credential_process;if(t!==void 0){const i=y(T);try{const{stdout:r}=await i(t);let u;try{u=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return S(c,u,n)}catch(r){throw new o(r.message,{logger:e})}}else throw new o(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new o(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var R=(c={})=>async()=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const n=await A(c);return x(_(c),n,c.logger)};export{R as fromProcess};
3
+
4
+ //# debugId=EAB67590FEA5297464756E2164756E21
5
+ //# sourceMappingURL=chunk-m43npkjw.js.map
@@ -3,10 +3,10 @@
3
3
  "sources": ["../../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js", "../../../../../node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js"],
4
4
  "sourcesContent": [
5
5
  "import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { exec } from \"child_process\";\nimport { promisify } from \"util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n",
6
- "export const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n return {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n};\n",
6
+ "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n",
7
7
  "import { getProfileName, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName(init), profiles, init.logger);\n};\n"
8
8
  ],
9
- "mappings": ";gLAAA,SACA,SAAS,gBACT,oBAAS,aCFF,IAAM,EAAiC,CAAC,EAAa,EAAM,IAAa,CAC3E,GAAI,EAAK,UAAY,EACjB,MAA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