@aws-sdk/core 3.956.0 → 3.964.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.
package/dist-cjs/index.js CHANGED
@@ -226,7 +226,15 @@ const resolveAwsSdkSigV4Config = (config) => {
226
226
  });
227
227
  const boundProvider = bindCallerConfig(config, memoizedProvider);
228
228
  if (isUserSupplied && !boundProvider.attributed) {
229
- resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
229
+ const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
230
+ resolvedCredentials = async (options) => {
231
+ const creds = await boundProvider(options);
232
+ const attributedCreds = creds;
233
+ if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
234
+ return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
235
+ }
236
+ return attributedCreds;
237
+ };
230
238
  resolvedCredentials.memoized = boundProvider.memoized;
231
239
  resolvedCredentials.configBound = boundProvider.configBound;
232
240
  resolvedCredentials.attributed = true;
@@ -174,7 +174,15 @@ const resolveAwsSdkSigV4Config = (config) => {
174
174
  });
175
175
  const boundProvider = bindCallerConfig(config, memoizedProvider);
176
176
  if (isUserSupplied && !boundProvider.attributed) {
177
- resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
177
+ const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
178
+ resolvedCredentials = async (options) => {
179
+ const creds = await boundProvider(options);
180
+ const attributedCreds = creds;
181
+ if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
182
+ return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
183
+ }
184
+ return attributedCreds;
185
+ };
178
186
  resolvedCredentials.memoized = boundProvider.memoized;
179
187
  resolvedCredentials.configBound = boundProvider.configBound;
180
188
  resolvedCredentials.attributed = true;
@@ -17,7 +17,15 @@ export const resolveAwsSdkSigV4Config = (config) => {
17
17
  });
18
18
  const boundProvider = bindCallerConfig(config, memoizedProvider);
19
19
  if (isUserSupplied && !boundProvider.attributed) {
20
- resolvedCredentials = async (options) => boundProvider(options).then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e"));
20
+ const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
21
+ resolvedCredentials = async (options) => {
22
+ const creds = await boundProvider(options);
23
+ const attributedCreds = creds;
24
+ if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
25
+ return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
26
+ }
27
+ return attributedCreds;
28
+ };
21
29
  resolvedCredentials.memoized = boundProvider.memoized;
22
30
  resolvedCredentials.configBound = boundProvider.configBound;
23
31
  resolvedCredentials.attributed = true;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.956.0",
3
+ "version": "3.964.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
- "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
+ "build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline core && rimraf ./dist-cjs/api-extractor-type-index.js",
8
8
  "build:es": "tsc -p tsconfig.es.json && rimraf ./dist-es/api-extractor-type-index.js",
9
- "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
9
+ "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
10
10
  "build:types": "tsc -p tsconfig.types.json",
11
11
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12
12
  "lint": "node ../../scripts/validation/submodules-linter.js --pkg core",
@@ -81,8 +81,8 @@
81
81
  },
82
82
  "license": "Apache-2.0",
83
83
  "dependencies": {
84
- "@aws-sdk/types": "3.956.0",
85
- "@aws-sdk/xml-builder": "3.956.0",
84
+ "@aws-sdk/types": "3.957.0",
85
+ "@aws-sdk/xml-builder": "3.957.0",
86
86
  "@smithy/core": "^3.20.0",
87
87
  "@smithy/node-config-provider": "^4.3.7",
88
88
  "@smithy/property-provider": "^4.2.7",