@aws-sdk/middleware-user-agent 3.972.25 → 3.972.27
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 +10 -10
- package/dist-es/check-features.js +1 -1
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var core = require('@smithy/core');
|
|
4
4
|
var utilEndpoints = require('@aws-sdk/util-endpoints');
|
|
5
5
|
var protocolHttp = require('@smithy/protocol-http');
|
|
6
|
-
var
|
|
6
|
+
var client = require('@aws-sdk/core/client');
|
|
7
7
|
var utilRetry = require('@smithy/util-retry');
|
|
8
8
|
|
|
9
9
|
const DEFAULT_UA_APP_ID = undefined;
|
|
@@ -38,17 +38,17 @@ const ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
|
38
38
|
async function checkFeatures(context, config, args) {
|
|
39
39
|
const request = args.request;
|
|
40
40
|
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
|
|
41
|
-
|
|
41
|
+
client.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
42
42
|
}
|
|
43
43
|
if (typeof config.retryStrategy === "function") {
|
|
44
44
|
const retryStrategy = await config.retryStrategy();
|
|
45
45
|
if (typeof retryStrategy.mode === "string") {
|
|
46
46
|
switch (retryStrategy.mode) {
|
|
47
47
|
case utilRetry.RETRY_MODES.ADAPTIVE:
|
|
48
|
-
|
|
48
|
+
client.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
49
49
|
break;
|
|
50
50
|
case utilRetry.RETRY_MODES.STANDARD:
|
|
51
|
-
|
|
51
|
+
client.setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -56,17 +56,17 @@ async function checkFeatures(context, config, args) {
|
|
|
56
56
|
if (typeof config.accountIdEndpointMode === "function") {
|
|
57
57
|
const endpointV2 = context.endpointV2;
|
|
58
58
|
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
|
|
59
|
-
|
|
59
|
+
client.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
|
|
60
60
|
}
|
|
61
61
|
switch (await config.accountIdEndpointMode?.()) {
|
|
62
62
|
case "disabled":
|
|
63
|
-
|
|
63
|
+
client.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
64
64
|
break;
|
|
65
65
|
case "preferred":
|
|
66
|
-
|
|
66
|
+
client.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
67
67
|
break;
|
|
68
68
|
case "required":
|
|
69
|
-
|
|
69
|
+
client.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -74,10 +74,10 @@ async function checkFeatures(context, config, args) {
|
|
|
74
74
|
if (identity?.$source) {
|
|
75
75
|
const credentials = identity;
|
|
76
76
|
if (credentials.accountId) {
|
|
77
|
-
|
|
77
|
+
client.setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
78
78
|
}
|
|
79
79
|
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
|
|
80
|
-
|
|
80
|
+
client.setFeature(context, key, value);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-user-agent",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.27",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-user-agent",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/core": "^3.973.
|
|
28
|
+
"@aws-sdk/core": "^3.973.26",
|
|
29
29
|
"@aws-sdk/types": "^3.973.6",
|
|
30
30
|
"@aws-sdk/util-endpoints": "^3.996.5",
|
|
31
|
-
"@smithy/core": "^3.23.
|
|
31
|
+
"@smithy/core": "^3.23.13",
|
|
32
32
|
"@smithy/protocol-http": "^5.3.12",
|
|
33
33
|
"@smithy/types": "^4.13.1",
|
|
34
34
|
"@smithy/util-retry": "^4.2.12",
|