@aws-sdk/core 3.709.0 → 3.714.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.
|
@@ -196,14 +196,14 @@ var import_core2 = require("@smithy/core");
|
|
|
196
196
|
var import_signature_v4 = require("@smithy/signature-v4");
|
|
197
197
|
var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
|
|
198
198
|
let isUserSupplied = false;
|
|
199
|
-
let
|
|
199
|
+
let credentialsProvider;
|
|
200
200
|
if (config.credentials) {
|
|
201
201
|
isUserSupplied = true;
|
|
202
|
-
|
|
202
|
+
credentialsProvider = (0, import_core2.memoizeIdentityProvider)(config.credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh);
|
|
203
203
|
}
|
|
204
|
-
if (!
|
|
204
|
+
if (!credentialsProvider) {
|
|
205
205
|
if (config.credentialDefaultProvider) {
|
|
206
|
-
|
|
206
|
+
credentialsProvider = (0, import_core2.normalizeProvider)(
|
|
207
207
|
config.credentialDefaultProvider(
|
|
208
208
|
Object.assign({}, config, {
|
|
209
209
|
parentClientConfig: config
|
|
@@ -211,11 +211,12 @@ var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
|
|
|
211
211
|
)
|
|
212
212
|
);
|
|
213
213
|
} else {
|
|
214
|
-
|
|
214
|
+
credentialsProvider = /* @__PURE__ */ __name(async () => {
|
|
215
215
|
throw new Error("`credentials` is missing");
|
|
216
|
-
}, "
|
|
216
|
+
}, "credentialsProvider");
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
+
const boundCredentialsProvider = /* @__PURE__ */ __name(async () => credentialsProvider({ callerClientConfig: config }), "boundCredentialsProvider");
|
|
219
220
|
const {
|
|
220
221
|
// Default for signingEscapePath
|
|
221
222
|
signingEscapePath = true,
|
|
@@ -242,7 +243,7 @@ var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
|
|
|
242
243
|
config.signingName = config.signingName || signingService || config.serviceId;
|
|
243
244
|
const params = {
|
|
244
245
|
...config,
|
|
245
|
-
credentials:
|
|
246
|
+
credentials: boundCredentialsProvider,
|
|
246
247
|
region: config.signingRegion,
|
|
247
248
|
service: config.signingName,
|
|
248
249
|
sha256,
|
|
@@ -269,7 +270,7 @@ var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
|
|
|
269
270
|
config.signingName = config.signingName || signingService || config.serviceId;
|
|
270
271
|
const params = {
|
|
271
272
|
...config,
|
|
272
|
-
credentials:
|
|
273
|
+
credentials: boundCredentialsProvider,
|
|
273
274
|
region: config.signingRegion,
|
|
274
275
|
service: config.signingName,
|
|
275
276
|
sha256,
|
|
@@ -283,9 +284,9 @@ var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {
|
|
|
283
284
|
...config,
|
|
284
285
|
systemClockOffset,
|
|
285
286
|
signingEscapePath,
|
|
286
|
-
credentials: isUserSupplied ? async () =>
|
|
287
|
+
credentials: isUserSupplied ? async () => boundCredentialsProvider().then(
|
|
287
288
|
(creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_CODE", "e")
|
|
288
|
-
) :
|
|
289
|
+
) : boundCredentialsProvider,
|
|
289
290
|
signer
|
|
290
291
|
};
|
|
291
292
|
}, "resolveAwsSdkSigV4Config");
|
|
@@ -3,23 +3,24 @@ import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider,
|
|
|
3
3
|
import { SignatureV4 } from "@smithy/signature-v4";
|
|
4
4
|
export const resolveAwsSdkSigV4Config = (config) => {
|
|
5
5
|
let isUserSupplied = false;
|
|
6
|
-
let
|
|
6
|
+
let credentialsProvider;
|
|
7
7
|
if (config.credentials) {
|
|
8
8
|
isUserSupplied = true;
|
|
9
|
-
|
|
9
|
+
credentialsProvider = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh);
|
|
10
10
|
}
|
|
11
|
-
if (!
|
|
11
|
+
if (!credentialsProvider) {
|
|
12
12
|
if (config.credentialDefaultProvider) {
|
|
13
|
-
|
|
13
|
+
credentialsProvider = normalizeProvider(config.credentialDefaultProvider(Object.assign({}, config, {
|
|
14
14
|
parentClientConfig: config,
|
|
15
15
|
})));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
|
-
|
|
18
|
+
credentialsProvider = async () => {
|
|
19
19
|
throw new Error("`credentials` is missing");
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
const boundCredentialsProvider = async () => credentialsProvider({ callerClientConfig: config });
|
|
23
24
|
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;
|
|
24
25
|
let signer;
|
|
25
26
|
if (config.signer) {
|
|
@@ -40,7 +41,7 @@ export const resolveAwsSdkSigV4Config = (config) => {
|
|
|
40
41
|
config.signingName = config.signingName || signingService || config.serviceId;
|
|
41
42
|
const params = {
|
|
42
43
|
...config,
|
|
43
|
-
credentials:
|
|
44
|
+
credentials: boundCredentialsProvider,
|
|
44
45
|
region: config.signingRegion,
|
|
45
46
|
service: config.signingName,
|
|
46
47
|
sha256,
|
|
@@ -64,7 +65,7 @@ export const resolveAwsSdkSigV4Config = (config) => {
|
|
|
64
65
|
config.signingName = config.signingName || signingService || config.serviceId;
|
|
65
66
|
const params = {
|
|
66
67
|
...config,
|
|
67
|
-
credentials:
|
|
68
|
+
credentials: boundCredentialsProvider,
|
|
68
69
|
region: config.signingRegion,
|
|
69
70
|
service: config.signingName,
|
|
70
71
|
sha256,
|
|
@@ -79,8 +80,8 @@ export const resolveAwsSdkSigV4Config = (config) => {
|
|
|
79
80
|
systemClockOffset,
|
|
80
81
|
signingEscapePath,
|
|
81
82
|
credentials: isUserSupplied
|
|
82
|
-
? async () =>
|
|
83
|
-
:
|
|
83
|
+
? async () => boundCredentialsProvider().then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e"))
|
|
84
|
+
: boundCredentialsProvider,
|
|
84
85
|
signer,
|
|
85
86
|
};
|
|
86
87
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.714.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"license": "Apache-2.0",
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@aws-sdk/types": "3.
|
|
84
|
+
"@aws-sdk/types": "3.714.0",
|
|
85
85
|
"@smithy/core": "^2.5.5",
|
|
86
86
|
"@smithy/node-config-provider": "^3.1.12",
|
|
87
87
|
"@smithy/property-provider": "^3.1.11",
|