@aws-sdk/middleware-user-agent 3.972.38 → 3.972.39
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
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@smithy/core');
|
|
4
4
|
var utilEndpoints = require('@aws-sdk/util-endpoints');
|
|
5
|
-
var
|
|
5
|
+
var protocols = require('@smithy/core/protocols');
|
|
6
6
|
var client = require('@aws-sdk/core/client');
|
|
7
|
-
var
|
|
7
|
+
var retry = require('@smithy/core/retry');
|
|
8
8
|
|
|
9
9
|
const DEFAULT_UA_APP_ID = undefined;
|
|
10
10
|
function isValidUserAgentAppId(appId) {
|
|
@@ -44,10 +44,10 @@ async function checkFeatures(context, config, args) {
|
|
|
44
44
|
const retryStrategy = await config.retryStrategy();
|
|
45
45
|
if (typeof retryStrategy.mode === "string") {
|
|
46
46
|
switch (retryStrategy.mode) {
|
|
47
|
-
case
|
|
47
|
+
case retry.RETRY_MODES.ADAPTIVE:
|
|
48
48
|
client.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
49
49
|
break;
|
|
50
|
-
case
|
|
50
|
+
case retry.RETRY_MODES.STANDARD:
|
|
51
51
|
client.setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
@@ -111,7 +111,7 @@ function encodeFeatures(features) {
|
|
|
111
111
|
|
|
112
112
|
const userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
113
113
|
const { request } = args;
|
|
114
|
-
if (!
|
|
114
|
+
if (!protocols.HttpRequest.isInstance(request)) {
|
|
115
115
|
return next(args);
|
|
116
116
|
}
|
|
117
117
|
const { headers } = request;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setFeature } from "@aws-sdk/core/client";
|
|
2
|
-
import { RETRY_MODES } from "@smithy/
|
|
2
|
+
import { RETRY_MODES } from "@smithy/core/retry";
|
|
3
3
|
const ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
4
4
|
export async function checkFeatures(context, config, args) {
|
|
5
5
|
const request = args.request;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUserAgentPrefix } from "@aws-sdk/util-endpoints";
|
|
2
|
-
import { HttpRequest } from "@smithy/
|
|
2
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
3
|
import { checkFeatures } from "./check-features";
|
|
4
4
|
import { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from "./constants";
|
|
5
5
|
import { encodeFeatures } from "./encode-features";
|
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.39",
|
|
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,13 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/core": "^3.974.
|
|
28
|
+
"@aws-sdk/core": "^3.974.9",
|
|
29
29
|
"@aws-sdk/types": "^3.973.8",
|
|
30
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
31
|
-
"@smithy/core": "^3.
|
|
32
|
-
"@smithy/protocol-http": "^5.3.14",
|
|
30
|
+
"@aws-sdk/util-endpoints": "^3.996.9",
|
|
31
|
+
"@smithy/core": "^3.24.1",
|
|
33
32
|
"@smithy/types": "^4.14.1",
|
|
34
|
-
"@smithy/util-retry": "^4.3.6",
|
|
35
33
|
"tslib": "^2.6.2"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|