@psnext/slingcli 2.5.20260615-2 → 2.5.20260617-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
  2. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
  3. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
  4. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
  6. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
  7. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
  8. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
  9. package/node_modules/@aws-sdk/core/package.json +8 -8
  10. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
  11. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  12. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
  13. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
  14. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
  15. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
  16. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
  17. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
  18. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
  19. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  20. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +7 -7
  21. package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
  22. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
  23. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
  24. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
  25. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  26. package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
  27. package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
  28. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
  29. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  30. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
  31. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  32. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
  33. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
  34. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
  35. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +7 -7
  36. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  37. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
  38. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
  39. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
  40. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  41. package/node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +7 -9
  42. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +5 -5
  43. package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +3 -5
  44. package/node_modules/@aws-sdk/middleware-eventstream/package.json +5 -5
  45. package/node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +16 -18
  46. package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
  47. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
  48. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
  49. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
  50. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
  51. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
  52. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
  53. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
  54. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
  55. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
  56. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
  57. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  58. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
  59. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  60. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
  61. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  62. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +7 -7
  63. package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
  64. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
  65. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
  66. package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
  67. package/node_modules/@aws-sdk/types/package.json +4 -4
  68. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
  69. package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
  70. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
  71. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
  72. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
  73. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
  74. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  75. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  76. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +21 -57
  77. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +277 -175
  78. package/node_modules/@earendil-works/pi-ai/dist/models.js +4 -1
  79. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +52 -34
  80. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +11 -9
  81. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +7 -4
  82. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js +4 -3
  83. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +15 -5
  84. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +2 -1
  85. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +18 -17
  86. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +21 -8
  87. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  88. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +8 -7
  89. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  90. package/node_modules/@earendil-works/pi-ai/dist/stream.js +1 -1
  91. package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +17 -22
  92. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js +2 -1
  93. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +3 -2
  94. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js +44 -0
  95. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  96. package/node_modules/@earendil-works/pi-coding-agent/dist/bun/restore-sandbox-env.js +4 -0
  97. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
  98. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +10 -7
  99. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +8 -1
  100. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +2 -2
  101. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +10 -10
  102. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +75 -3
  103. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +17 -1
  104. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +8 -4
  105. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +1 -1
  106. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +10 -0
  107. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +19 -19
  108. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +2 -0
  109. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +6 -6
  110. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +4 -0
  111. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +17 -5
  112. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +4 -0
  113. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +0 -1
  114. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +0 -5
  115. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +6 -6
  116. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +23 -5
  117. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +17 -17
  118. package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
  119. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
  120. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  121. package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
  122. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
  123. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
  124. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
  125. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
  126. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
  127. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
  128. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
  129. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
  130. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
  131. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
  132. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
  133. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
  134. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
  135. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
  136. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
  137. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
  138. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
  139. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
  140. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
  141. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
  142. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
  143. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
  144. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
  145. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
  146. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  147. package/node_modules/@smithy/core/package.json +7 -6
  148. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
  149. package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
  150. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
  151. package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
  152. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
  153. package/node_modules/@smithy/signature-v4/package.json +6 -6
  154. package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
  155. package/node_modules/@smithy/types/package.json +4 -4
  156. package/node_modules/marked/README.md +13 -4
  157. package/node_modules/marked/bin/main.js +16 -14
  158. package/node_modules/marked/bin/marked.js +2 -1
  159. package/node_modules/marked/lib/marked.d.ts +157 -125
  160. package/node_modules/marked/lib/marked.esm.js +67 -2179
  161. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  162. package/node_modules/marked/lib/marked.umd.js +67 -2201
  163. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  164. package/node_modules/marked/man/marked.1 +4 -2
  165. package/node_modules/marked/man/marked.1.md +2 -1
  166. package/node_modules/marked/package.json +27 -35
  167. package/node_modules/undici/docs/docs/api/Client.md +3 -0
  168. package/node_modules/undici/docs/docs/api/Cookies.md +27 -0
  169. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
  170. package/node_modules/undici/lib/core/socks5-client.js +14 -4
  171. package/node_modules/undici/lib/core/socks5-utils.js +18 -4
  172. package/node_modules/undici/lib/dispatcher/agent.js +1 -1
  173. package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
  174. package/node_modules/undici/lib/dispatcher/client-h1.js +69 -1
  175. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  176. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -0
  177. package/node_modules/undici/lib/dispatcher/pool.js +1 -1
  178. package/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
  179. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +45 -34
  180. package/node_modules/undici/lib/util/cache.js +8 -2
  181. package/node_modules/undici/lib/web/cookies/parse.js +17 -25
  182. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
  183. package/node_modules/undici/lib/web/websocket/receiver.js +80 -23
  184. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
  185. package/node_modules/undici/lib/web/websocket/websocket.js +8 -1
  186. package/node_modules/undici/package.json +1 -1
  187. package/node_modules/undici/types/client.d.ts +16 -0
  188. package/package.json +6 -6
  189. package/slingshot/index.js +253 -253
  190. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
  191. package/node_modules/marked/lib/marked.cjs +0 -2211
  192. package/node_modules/marked/lib/marked.cjs.map +0 -7
  193. package/node_modules/marked/lib/marked.d.cts +0 -728
  194. package/node_modules/marked/marked.min.js +0 -69
  195. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -1,9 +1,7 @@
1
- 'use strict';
2
-
3
- var config = require('@smithy/core/config');
4
- var node_child_process = require('node:child_process');
5
- var node_util = require('node:util');
6
- var client = require('@aws-sdk/core/client');
1
+ const { externalDataInterceptor, CredentialsProviderError, parseKnownFiles, getProfileName } = require("@smithy/core/config");
2
+ const { exec } = require("node:child_process");
3
+ const { promisify } = require("node:util");
4
+ const { setCredentialFeature } = require("@aws-sdk/core/client");
7
5
 
8
6
  const getValidatedProcessCredentials = (profileName, data, profiles) => {
9
7
  if (data.Version !== 1) {
@@ -31,7 +29,7 @@ const getValidatedProcessCredentials = (profileName, data, profiles) => {
31
29
  ...(data.CredentialScope && { credentialScope: data.CredentialScope }),
32
30
  ...(accountId && { accountId }),
33
31
  };
34
- client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
32
+ setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
35
33
  return credentials;
36
34
  };
37
35
 
@@ -40,7 +38,7 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
40
38
  if (profiles[profileName]) {
41
39
  const credentialProcess = profile["credential_process"];
42
40
  if (credentialProcess !== undefined) {
43
- const execPromise = node_util.promisify(config.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
41
+ const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);
44
42
  try {
45
43
  const { stdout } = await execPromise(credentialProcess);
46
44
  let data;
@@ -53,15 +51,15 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
53
51
  return getValidatedProcessCredentials(profileName, data, profiles);
54
52
  }
55
53
  catch (error) {
56
- throw new config.CredentialsProviderError(error.message, { logger });
54
+ throw new CredentialsProviderError(error.message, { logger });
57
55
  }
58
56
  }
59
57
  else {
60
- throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
58
+ throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
61
59
  }
62
60
  }
63
61
  else {
64
- throw new config.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
62
+ throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
65
63
  logger,
66
64
  });
67
65
  }
@@ -69,8 +67,8 @@ const resolveProcessCredentials = async (profileName, profiles, logger) => {
69
67
 
70
68
  const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
71
69
  init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
72
- const profiles = await config.parseKnownFiles(init);
73
- return resolveProcessCredentials(config.getProfileName({
70
+ const profiles = await parseKnownFiles(init);
71
+ return resolveProcessCredentials(getProfileName({
74
72
  profile: init.profile ?? callerClientConfig?.profile,
75
73
  }), profiles, init.logger);
76
74
  };
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-process",
3
- "version": "3.972.46",
3
+ "version": "3.972.47",
4
4
  "description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
7
  "scripts": {
8
8
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
9
9
  "build:cjs": "node ../../scripts/compilation/inline",
10
- "build:es": "tsc -p tsconfig.es.json",
10
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
11
11
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
12
- "build:types": "tsc -p tsconfig.types.json",
12
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
13
13
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
14
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
14
+ "clean": "premove dist-cjs dist-es dist-types",
15
15
  "test": "yarn g:vitest run",
16
16
  "test:watch": "yarn g:vitest watch"
17
17
  },
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/core": "^3.974.20",
30
- "@aws-sdk/types": "^3.973.12",
29
+ "@aws-sdk/core": "^3.974.21",
30
+ "@aws-sdk/types": "^3.973.13",
31
31
  "@smithy/core": "^3.24.6",
32
32
  "@smithy/types": "^4.14.3",
33
33
  "tslib": "^2.6.2"
@@ -1,8 +1,6 @@
1
- 'use strict';
2
-
3
- var config = require('@smithy/core/config');
4
- var client = require('@aws-sdk/core/client');
5
- var tokenProviders = require('@aws-sdk/token-providers');
1
+ const { CredentialsProviderError, getSSOTokenFromFile, getProfileName, parseKnownFiles, loadSsoSessionData } = require("@smithy/core/config");
2
+ const { setCredentialFeature } = require("@aws-sdk/core/client");
3
+ const { fromSso } = require("@aws-sdk/token-providers");
6
4
 
7
5
  const isSsoProfile = (arg) => arg &&
8
6
  (typeof arg.sso_start_url === "string" ||
@@ -17,7 +15,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
17
15
  const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
18
16
  if (ssoSession) {
19
17
  try {
20
- const _token = await tokenProviders.fromSso({
18
+ const _token = await fromSso({
21
19
  profile,
22
20
  filepath,
23
21
  configFilepath,
@@ -32,7 +30,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
32
30
  };
33
31
  }
34
32
  catch (e) {
35
- throw new config.CredentialsProviderError(e.message, {
33
+ throw new CredentialsProviderError(e.message, {
36
34
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
37
35
  logger,
38
36
  });
@@ -40,23 +38,23 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
40
38
  }
41
39
  else {
42
40
  try {
43
- token = await config.getSSOTokenFromFile(ssoStartUrl);
41
+ token = await getSSOTokenFromFile(ssoStartUrl);
44
42
  }
45
43
  catch (e) {
46
- throw new config.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
44
+ throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
47
45
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
48
46
  logger,
49
47
  });
50
48
  }
51
49
  }
52
50
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
53
- throw new config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
51
+ throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
54
52
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
55
53
  logger,
56
54
  });
57
55
  }
58
56
  const { accessToken } = token;
59
- const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return require('./loadSso-BKDNrsal.js'); });
57
+ const { SSOClient, GetRoleCredentialsCommand } = require('./loadSso-BGYXHf8s.js');
60
58
  const sso = ssoClient ||
61
59
  new SSOClient(Object.assign({}, clientConfig ?? {}, {
62
60
  logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
@@ -72,14 +70,14 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
72
70
  }));
73
71
  }
74
72
  catch (e) {
75
- throw new config.CredentialsProviderError(e, {
73
+ throw new CredentialsProviderError(e, {
76
74
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
77
75
  logger,
78
76
  });
79
77
  }
80
78
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;
81
79
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
82
- throw new config.CredentialsProviderError("SSO returns an invalid temporary credential.", {
80
+ throw new CredentialsProviderError("SSO returns an invalid temporary credential.", {
83
81
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
84
82
  logger,
85
83
  });
@@ -93,10 +91,10 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
93
91
  ...(accountId && { accountId }),
94
92
  };
95
93
  if (ssoSession) {
96
- client.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
94
+ setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
97
95
  }
98
96
  else {
99
- client.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
97
+ setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
100
98
  }
101
99
  return credentials;
102
100
  };
@@ -104,7 +102,7 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss
104
102
  const validateSsoProfile = (profile, logger) => {
105
103
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
106
104
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
107
- throw new config.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
105
+ throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` +
108
106
  `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
109
107
  }
110
108
  return profile;
@@ -114,32 +112,32 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
114
112
  init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
115
113
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
116
114
  const { ssoClient } = init;
117
- const profileName = config.getProfileName({
115
+ const profileName = getProfileName({
118
116
  profile: init.profile ?? callerClientConfig?.profile,
119
117
  });
120
118
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
121
- const profiles = await config.parseKnownFiles(init);
119
+ const profiles = await parseKnownFiles(init);
122
120
  const profile = profiles[profileName];
123
121
  if (!profile) {
124
- throw new config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
122
+ throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
125
123
  }
126
124
  if (!isSsoProfile(profile)) {
127
- throw new config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
125
+ throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
128
126
  logger: init.logger,
129
127
  });
130
128
  }
131
129
  if (profile?.sso_session) {
132
- const ssoSessions = await config.loadSsoSessionData(init);
130
+ const ssoSessions = await loadSsoSessionData(init);
133
131
  const session = ssoSessions[profile.sso_session];
134
132
  const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
135
133
  if (ssoRegion && ssoRegion !== session.sso_region) {
136
- throw new config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
134
+ throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
137
135
  tryNextLink: false,
138
136
  logger: init.logger,
139
137
  });
140
138
  }
141
139
  if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
142
- throw new config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
140
+ throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
143
141
  tryNextLink: false,
144
142
  logger: init.logger,
145
143
  });
@@ -166,7 +164,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
166
164
  });
167
165
  }
168
166
  else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
169
- throw new config.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
167
+ throw new CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " +
170
168
  '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
171
169
  }
172
170
  else {
@@ -0,0 +1,3 @@
1
+ const { GetRoleCredentialsCommand, SSOClient } = require("@aws-sdk/nested-clients/sso");
2
+ exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
3
+ exports.SSOClient = SSOClient;
@@ -1,21 +1,19 @@
1
- 'use strict';
2
-
3
- var client = require('@aws-sdk/core/client');
4
- var httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');
5
- var config = require('@smithy/core/config');
6
- var node_fs = require('node:fs');
1
+ const { setTokenFeature } = require("@aws-sdk/core/client");
2
+ const { getBearerTokenEnvKey } = require("@aws-sdk/core/httpAuthSchemes");
3
+ const { TokenProviderError, getSSOTokenFilepath, parseKnownFiles, getProfileName, loadSsoSessionData, getSSOTokenFromFile, memoize, chain } = require("@smithy/core/config");
4
+ const { promises } = require("node:fs");
7
5
 
8
6
  const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
9
7
  logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
10
8
  if (!signingName) {
11
- throw new config.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
9
+ throw new TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
12
10
  }
13
- const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
11
+ const bearerTokenKey = getBearerTokenEnvKey(signingName);
14
12
  if (!(bearerTokenKey in process.env)) {
15
- throw new config.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
13
+ throw new TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
16
14
  }
17
15
  const token = { token: process.env[bearerTokenKey] };
18
- client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
16
+ setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
19
17
  return token;
20
18
  };
21
19
 
@@ -23,7 +21,7 @@ const EXPIRE_WINDOW_MS = 5 * 60 * 1000;
23
21
  const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
24
22
 
25
23
  const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
26
- const { SSOOIDCClient } = await import('@aws-sdk/nested-clients/sso-oidc');
24
+ const { SSOOIDCClient } = require('@aws-sdk/nested-clients/sso-oidc');
27
25
  const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
28
26
  const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
29
27
  region: ssoRegion ?? init.clientConfig?.region,
@@ -34,7 +32,7 @@ const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
34
32
  };
35
33
 
36
34
  const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
37
- const { CreateTokenCommand } = await import('@aws-sdk/nested-clients/sso-oidc');
35
+ const { CreateTokenCommand } = require('@aws-sdk/nested-clients/sso-oidc');
38
36
  const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
39
37
  return ssoOidcClient.send(new CreateTokenCommand({
40
38
  clientId: ssoToken.clientId,
@@ -46,19 +44,19 @@ const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientCo
46
44
 
47
45
  const validateTokenExpiry = (token) => {
48
46
  if (token.expiration && token.expiration.getTime() < Date.now()) {
49
- throw new config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
47
+ throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
50
48
  }
51
49
  };
52
50
 
53
51
  const validateTokenKey = (key, value, forRefresh = false) => {
54
52
  if (typeof value === "undefined") {
55
- throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
53
+ throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
56
54
  }
57
55
  };
58
56
 
59
- const { writeFile } = node_fs.promises;
57
+ const { writeFile } = promises;
60
58
  const writeSSOTokenToFile = (id, ssoToken) => {
61
- const tokenFilepath = config.getSSOTokenFilepath(id);
59
+ const tokenFilepath = getSSOTokenFilepath(id);
62
60
  const tokenString = JSON.stringify(ssoToken, null, 2);
63
61
  return writeFile(tokenFilepath, tokenString);
64
62
  };
@@ -66,36 +64,36 @@ const writeSSOTokenToFile = (id, ssoToken) => {
66
64
  const lastRefreshAttemptTime = new Date(0);
67
65
  const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
68
66
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
69
- const profiles = await config.parseKnownFiles(init);
70
- const profileName = config.getProfileName({
67
+ const profiles = await parseKnownFiles(init);
68
+ const profileName = getProfileName({
71
69
  profile: init.profile ?? callerClientConfig?.profile,
72
70
  });
73
71
  const profile = profiles[profileName];
74
72
  if (!profile) {
75
- throw new config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
73
+ throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
76
74
  }
77
75
  else if (!profile["sso_session"]) {
78
- throw new config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
76
+ throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
79
77
  }
80
78
  const ssoSessionName = profile["sso_session"];
81
- const ssoSessions = await config.loadSsoSessionData(init);
79
+ const ssoSessions = await loadSsoSessionData(init);
82
80
  const ssoSession = ssoSessions[ssoSessionName];
83
81
  if (!ssoSession) {
84
- throw new config.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
82
+ throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
85
83
  }
86
84
  for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
87
85
  if (!ssoSession[ssoSessionRequiredKey]) {
88
- throw new config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
86
+ throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
89
87
  }
90
88
  }
91
89
  ssoSession["sso_start_url"];
92
90
  const ssoRegion = ssoSession["sso_region"];
93
91
  let ssoToken;
94
92
  try {
95
- ssoToken = await config.getSSOTokenFromFile(ssoSessionName);
93
+ ssoToken = await getSSOTokenFromFile(ssoSessionName);
96
94
  }
97
95
  catch (e) {
98
- throw new config.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
96
+ throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
99
97
  }
100
98
  validateTokenKey("accessToken", ssoToken.accessToken);
101
99
  validateTokenKey("expiresAt", ssoToken.expiresAt);
@@ -141,13 +139,13 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
141
139
  const fromStatic = ({ token, logger }) => async () => {
142
140
  logger?.debug("@aws-sdk/token-providers - fromStatic");
143
141
  if (!token || !token.token) {
144
- throw new config.TokenProviderError(`Please pass a valid token to fromStatic`, false);
142
+ throw new TokenProviderError(`Please pass a valid token to fromStatic`, false);
145
143
  }
146
144
  return token;
147
145
  };
148
146
 
149
- const nodeProvider = (init = {}) => config.memoize(config.chain(fromSso(init), async () => {
150
- throw new config.TokenProviderError("Could not load token from any providers", false);
147
+ const nodeProvider = (init = {}) => memoize(chain(fromSso(init), async () => {
148
+ throw new TokenProviderError("Could not load token from any providers", false);
151
149
  }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);
152
150
 
153
151
  exports.fromEnvSigningName = fromEnvSigningName;
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.1066.0",
3
+ "version": "3.1069.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
7
  "scripts": {
8
8
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
9
9
  "build:cjs": "node ../../scripts/compilation/inline",
10
- "build:es": "tsc -p tsconfig.es.json",
10
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
11
11
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
12
- "build:types": "tsc -p tsconfig.types.json",
12
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
13
13
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
14
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
14
+ "clean": "premove dist-cjs dist-es dist-types",
15
15
  "extract:docs": "api-extractor run --local",
16
16
  "test": "yarn g:vitest run",
17
17
  "test:watch": "yarn g:vitest watch",
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "license": "Apache-2.0",
31
31
  "dependencies": {
32
- "@aws-sdk/core": "^3.974.20",
33
- "@aws-sdk/nested-clients": "^3.997.20",
34
- "@aws-sdk/types": "^3.973.12",
32
+ "@aws-sdk/core": "^3.974.21",
33
+ "@aws-sdk/nested-clients": "^3.997.21",
34
+ "@aws-sdk/types": "^3.973.13",
35
35
  "@smithy/core": "^3.24.6",
36
36
  "@smithy/types": "^4.14.3",
37
37
  "tslib": "^2.6.2"
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-sso",
3
- "version": "3.972.52",
3
+ "version": "3.972.53",
4
4
  "description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
7
  "scripts": {
8
8
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
9
9
  "build:cjs": "node ../../scripts/compilation/inline",
10
- "build:es": "tsc -p tsconfig.es.json",
10
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
11
11
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
12
- "build:types": "tsc -p tsconfig.types.json",
12
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
13
13
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
14
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
14
+ "clean": "premove dist-cjs dist-es dist-types",
15
15
  "test": "yarn g:vitest run",
16
16
  "test:watch": "yarn g:vitest watch",
17
17
  "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
- "@aws-sdk/core": "^3.974.20",
32
- "@aws-sdk/nested-clients": "^3.997.20",
33
- "@aws-sdk/token-providers": "3.1066.0",
34
- "@aws-sdk/types": "^3.973.12",
31
+ "@aws-sdk/core": "^3.974.21",
32
+ "@aws-sdk/nested-clients": "^3.997.21",
33
+ "@aws-sdk/token-providers": "3.1069.0",
34
+ "@aws-sdk/types": "^3.973.13",
35
35
  "@smithy/core": "^3.24.6",
36
36
  "@smithy/types": "^4.14.3",
37
37
  "tslib": "^2.6.2"
@@ -1,33 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromTokenFile = void 0;
4
- const client_1 = require("@aws-sdk/core/client");
5
- const config_1 = require("@smithy/core/config");
6
- const node_fs_1 = require("node:fs");
7
- const fromWebToken_1 = require("./fromWebToken");
1
+ const { setCredentialFeature } = require("@aws-sdk/core/client");
2
+ const { CredentialsProviderError, externalDataInterceptor } = require("@smithy/core/config");
3
+ const { readFileSync } = require("node:fs");
4
+ const { fromWebToken } = require("./fromWebToken");
8
5
  const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
9
6
  const ENV_ROLE_ARN = "AWS_ROLE_ARN";
10
7
  const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
11
- const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
8
+ exports.fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
12
9
  init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
13
10
  const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
14
11
  const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
15
12
  const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
16
13
  if (!webIdentityTokenFile || !roleArn) {
17
- throw new config_1.CredentialsProviderError("Web identity configuration not specified", {
14
+ throw new CredentialsProviderError("Web identity configuration not specified", {
18
15
  logger: init.logger,
19
16
  });
20
17
  }
21
- const credentials = await (0, fromWebToken_1.fromWebToken)({
18
+ const credentials = await fromWebToken({
22
19
  ...init,
23
- webIdentityToken: config_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
24
- (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
20
+ webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
21
+ readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
25
22
  roleArn,
26
23
  roleSessionName,
27
24
  })(awsIdentityProperties);
28
25
  if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
29
- (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
26
+ setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
30
27
  }
31
28
  return credentials;
32
29
  };
33
- exports.fromTokenFile = fromTokenFile;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromWebToken = void 0;
4
- const fromWebToken = (init) => async (awsIdentityProperties) => {
1
+ exports.fromWebToken = (init) => async (awsIdentityProperties) => {
5
2
  init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
6
3
  const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
7
4
  let { roleAssumerWithWebIdentity } = init;
8
5
  if (!roleAssumerWithWebIdentity) {
9
- const { getDefaultRoleAssumerWithWebIdentity } = await import("@aws-sdk/nested-clients/sts");
6
+ const { getDefaultRoleAssumerWithWebIdentity } = require("@aws-sdk/nested-clients/sts");
10
7
  roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
11
8
  ...init.clientConfig,
12
9
  credentialProviderLogger: init.logger,
@@ -26,4 +23,3 @@ const fromWebToken = (init) => async (awsIdentityProperties) => {
26
23
  DurationSeconds: durationSeconds,
27
24
  });
28
25
  };
29
- exports.fromWebToken = fromWebToken;
@@ -1,27 +1,3 @@
1
- 'use strict';
2
-
3
- var fromTokenFile = require('./fromTokenFile');
4
- var fromWebToken = require('./fromWebToken');
5
-
6
-
7
-
8
- Object.prototype.hasOwnProperty.call(fromTokenFile, '__proto__') &&
9
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
10
- Object.defineProperty(exports, '__proto__', {
11
- enumerable: true,
12
- value: fromTokenFile['__proto__']
13
- });
14
-
15
- Object.keys(fromTokenFile).forEach(function (k) {
16
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromTokenFile[k];
17
- });
18
- Object.prototype.hasOwnProperty.call(fromWebToken, '__proto__') &&
19
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
20
- Object.defineProperty(exports, '__proto__', {
21
- enumerable: true,
22
- value: fromWebToken['__proto__']
23
- });
24
-
25
- Object.keys(fromWebToken).forEach(function (k) {
26
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromWebToken[k];
27
- });
1
+ var __exportStar = (m, e) => { Object.assign(e, m); };
2
+ __exportStar(require("./fromTokenFile"), exports);
3
+ __exportStar(require("./fromWebToken"), exports);
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-web-identity",
3
- "version": "3.972.52",
3
+ "version": "3.972.53",
4
4
  "description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
7
  "scripts": {
8
8
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
9
9
  "build:cjs": "node ../../scripts/compilation/inline",
10
- "build:es": "tsc -p tsconfig.es.json",
10
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
11
11
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
12
- "build:types": "tsc -p tsconfig.types.json",
12
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
13
13
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
14
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
14
+ "clean": "premove dist-cjs dist-es dist-types",
15
15
  "test": "yarn g:vitest run",
16
16
  "test:watch": "yarn g:vitest watch"
17
17
  },
@@ -34,9 +34,9 @@
34
34
  },
35
35
  "license": "Apache-2.0",
36
36
  "dependencies": {
37
- "@aws-sdk/core": "^3.974.20",
38
- "@aws-sdk/nested-clients": "^3.997.20",
39
- "@aws-sdk/types": "^3.973.12",
37
+ "@aws-sdk/core": "^3.974.21",
38
+ "@aws-sdk/nested-clients": "^3.997.21",
39
+ "@aws-sdk/types": "^3.973.13",
40
40
  "@smithy/core": "^3.24.6",
41
41
  "@smithy/types": "^4.14.3",
42
42
  "tslib": "^2.6.2"
@@ -1,9 +1,7 @@
1
- 'use strict';
1
+ const { EventStreamCodec } = require("@smithy/core/event-streams");
2
+ const { Transform, Readable, PassThrough, pipeline } = require("node:stream");
2
3
 
3
- var eventStreams = require('@smithy/core/event-streams');
4
- var node_stream = require('node:stream');
5
-
6
- class EventSigningTransformStream extends node_stream.Transform {
4
+ class EventSigningTransformStream extends Transform {
7
5
  priorSignature;
8
6
  messageSigner;
9
7
  eventStreamCodec;
@@ -69,18 +67,18 @@ class EventStreamPayloadHandler {
69
67
  credentials;
70
68
  constructor(options) {
71
69
  this.messageSigner = options.messageSigner;
72
- this.eventStreamCodec = new eventStreams.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
70
+ this.eventStreamCodec = new EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
73
71
  this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
74
72
  this.credentials = options.credentials;
75
73
  }
76
74
  async handle(next, args, context = {}) {
77
75
  const request = args.request;
78
76
  const { body: payload, query } = request;
79
- if (!(payload instanceof node_stream.Readable)) {
77
+ if (!(payload instanceof Readable)) {
80
78
  throw new Error("Eventstream payload must be a Readable stream.");
81
79
  }
82
80
  const payloadStream = payload;
83
- request.body = new node_stream.PassThrough({
81
+ request.body = new PassThrough({
84
82
  objectMode: true,
85
83
  });
86
84
  const match = request.headers?.authorization?.match(/Signature=([\w]+)$/);
@@ -98,7 +96,7 @@ class EventStreamPayloadHandler {
98
96
  let resolvePipeline;
99
97
  const pipelineError = new Promise((resolve, reject) => {
100
98
  resolvePipeline = () => resolve(undefined);
101
- node_stream.pipeline(payloadStream, signingStream, request.body, (err) => {
99
+ pipeline(payloadStream, signingStream, request.body, (err) => {
102
100
  if (err) {
103
101
  reject(new Error(`Pipeline error in @aws-sdk/eventstream-handler-node: ${err.message}`, { cause: err }));
104
102
  }