@smithy/middleware-retry 4.3.0 → 4.4.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 +327 -380
- package/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js +1 -1
- package/dist-cjs/isStreamingPayload/isStreamingPayload.js +2 -2
- package/dist-es/AdaptiveRetryStrategy.js +1 -0
- package/dist-es/StandardRetryStrategy.js +5 -1
- package/package.json +9 -9
- package/dist-cjs/AdaptiveRetryStrategy.js +0 -1
- package/dist-cjs/StandardRetryStrategy.js +0 -1
- package/dist-cjs/configurations.js +0 -1
- package/dist-cjs/defaultRetryQuota.js +0 -1
- package/dist-cjs/delayDecider.js +0 -1
- package/dist-cjs/omitRetryHeadersMiddleware.js +0 -1
- package/dist-cjs/retryDecider.js +0 -1
- package/dist-cjs/retryMiddleware.js +0 -1
- package/dist-cjs/types.js +0 -1
- package/dist-cjs/util.js +0 -1
package/dist-cjs/index.js
CHANGED
|
@@ -1,411 +1,358 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,
|
|
24
|
-
CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,
|
|
25
|
-
CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,
|
|
26
|
-
ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,
|
|
27
|
-
ENV_RETRY_MODE: () => ENV_RETRY_MODE,
|
|
28
|
-
NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
|
|
29
|
-
NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
30
|
-
StandardRetryStrategy: () => StandardRetryStrategy,
|
|
31
|
-
defaultDelayDecider: () => defaultDelayDecider,
|
|
32
|
-
defaultRetryDecider: () => defaultRetryDecider,
|
|
33
|
-
getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,
|
|
34
|
-
getRetryAfterHint: () => getRetryAfterHint,
|
|
35
|
-
getRetryPlugin: () => getRetryPlugin,
|
|
36
|
-
omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,
|
|
37
|
-
omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,
|
|
38
|
-
resolveRetryConfig: () => resolveRetryConfig,
|
|
39
|
-
retryMiddleware: () => retryMiddleware,
|
|
40
|
-
retryMiddlewareOptions: () => retryMiddlewareOptions
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(index_exports);
|
|
43
|
-
|
|
44
|
-
// src/AdaptiveRetryStrategy.ts
|
|
45
|
-
|
|
1
|
+
'use strict';
|
|
46
2
|
|
|
47
|
-
|
|
48
|
-
var
|
|
3
|
+
var utilRetry = require('@smithy/util-retry');
|
|
4
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
5
|
+
var serviceErrorClassification = require('@smithy/service-error-classification');
|
|
6
|
+
var uuid = require('@smithy/uuid');
|
|
7
|
+
var utilMiddleware = require('@smithy/util-middleware');
|
|
8
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
9
|
+
var isStreamingPayload = require('./isStreamingPayload/isStreamingPayload');
|
|
49
10
|
|
|
11
|
+
const getDefaultRetryQuota = (initialRetryTokens, options) => {
|
|
12
|
+
const MAX_CAPACITY = initialRetryTokens;
|
|
13
|
+
const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT;
|
|
14
|
+
const retryCost = utilRetry.RETRY_COST;
|
|
15
|
+
const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST;
|
|
16
|
+
let availableCapacity = initialRetryTokens;
|
|
17
|
+
const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost);
|
|
18
|
+
const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity;
|
|
19
|
+
const retrieveRetryTokens = (error) => {
|
|
20
|
+
if (!hasRetryTokens(error)) {
|
|
21
|
+
throw new Error("No retry token available");
|
|
22
|
+
}
|
|
23
|
+
const capacityAmount = getCapacityAmount(error);
|
|
24
|
+
availableCapacity -= capacityAmount;
|
|
25
|
+
return capacityAmount;
|
|
26
|
+
};
|
|
27
|
+
const releaseRetryTokens = (capacityReleaseAmount) => {
|
|
28
|
+
availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
|
|
29
|
+
availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
|
|
30
|
+
};
|
|
31
|
+
return Object.freeze({
|
|
32
|
+
hasRetryTokens,
|
|
33
|
+
retrieveRetryTokens,
|
|
34
|
+
releaseRetryTokens,
|
|
35
|
+
});
|
|
36
|
+
};
|
|
50
37
|
|
|
51
|
-
|
|
38
|
+
const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
|
|
52
39
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const MAX_CAPACITY = initialRetryTokens;
|
|
57
|
-
const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry.NO_RETRY_INCREMENT;
|
|
58
|
-
const retryCost = options?.retryCost ?? import_util_retry.RETRY_COST;
|
|
59
|
-
const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry.TIMEOUT_RETRY_COST;
|
|
60
|
-
let availableCapacity = initialRetryTokens;
|
|
61
|
-
const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount");
|
|
62
|
-
const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens");
|
|
63
|
-
const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {
|
|
64
|
-
if (!hasRetryTokens(error)) {
|
|
65
|
-
throw new Error("No retry token available");
|
|
40
|
+
const defaultRetryDecider = (error) => {
|
|
41
|
+
if (!error) {
|
|
42
|
+
return false;
|
|
66
43
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return capacityAmount;
|
|
70
|
-
}, "retrieveRetryTokens");
|
|
71
|
-
const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => {
|
|
72
|
-
availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
|
|
73
|
-
availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
|
|
74
|
-
}, "releaseRetryTokens");
|
|
75
|
-
return Object.freeze({
|
|
76
|
-
hasRetryTokens,
|
|
77
|
-
retrieveRetryTokens,
|
|
78
|
-
releaseRetryTokens
|
|
79
|
-
});
|
|
80
|
-
}, "getDefaultRetryQuota");
|
|
81
|
-
|
|
82
|
-
// src/delayDecider.ts
|
|
83
|
-
|
|
84
|
-
var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider");
|
|
85
|
-
|
|
86
|
-
// src/retryDecider.ts
|
|
87
|
-
var import_service_error_classification = require("@smithy/service-error-classification");
|
|
88
|
-
var defaultRetryDecider = /* @__PURE__ */ __name((error) => {
|
|
89
|
-
if (!error) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);
|
|
93
|
-
}, "defaultRetryDecider");
|
|
44
|
+
return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error);
|
|
45
|
+
};
|
|
94
46
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
47
|
+
const asSdkError = (error) => {
|
|
48
|
+
if (error instanceof Error)
|
|
49
|
+
return error;
|
|
50
|
+
if (error instanceof Object)
|
|
51
|
+
return Object.assign(new Error(), error);
|
|
52
|
+
if (typeof error === "string")
|
|
53
|
+
return new Error(error);
|
|
54
|
+
return new Error(`AWS SDK error wrapper for ${error}`);
|
|
55
|
+
};
|
|
102
56
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
shouldRetry(error, attempts, maxAttempts) {
|
|
116
|
-
return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
|
|
117
|
-
}
|
|
118
|
-
async getMaxAttempts() {
|
|
119
|
-
let maxAttempts;
|
|
120
|
-
try {
|
|
121
|
-
maxAttempts = await this.maxAttemptsProvider();
|
|
122
|
-
} catch (error) {
|
|
123
|
-
maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;
|
|
57
|
+
class StandardRetryStrategy {
|
|
58
|
+
maxAttemptsProvider;
|
|
59
|
+
retryDecider;
|
|
60
|
+
delayDecider;
|
|
61
|
+
retryQuota;
|
|
62
|
+
mode = utilRetry.RETRY_MODES.STANDARD;
|
|
63
|
+
constructor(maxAttemptsProvider, options) {
|
|
64
|
+
this.maxAttemptsProvider = maxAttemptsProvider;
|
|
65
|
+
this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
|
|
66
|
+
this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
|
|
67
|
+
this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS);
|
|
124
68
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
async retry(next, args, options) {
|
|
128
|
-
let retryTokenAmount;
|
|
129
|
-
let attempts = 0;
|
|
130
|
-
let totalDelay = 0;
|
|
131
|
-
const maxAttempts = await this.getMaxAttempts();
|
|
132
|
-
const { request } = args;
|
|
133
|
-
if (import_protocol_http.HttpRequest.isInstance(request)) {
|
|
134
|
-
request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();
|
|
69
|
+
shouldRetry(error, attempts, maxAttempts) {
|
|
70
|
+
return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
|
|
135
71
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
if (options?.beforeRequest) {
|
|
142
|
-
await options.beforeRequest();
|
|
72
|
+
async getMaxAttempts() {
|
|
73
|
+
let maxAttempts;
|
|
74
|
+
try {
|
|
75
|
+
maxAttempts = await this.maxAttemptsProvider();
|
|
143
76
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
options.afterRequest(response);
|
|
77
|
+
catch (error) {
|
|
78
|
+
maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS;
|
|
147
79
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
(0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE,
|
|
159
|
-
attempts
|
|
160
|
-
);
|
|
161
|
-
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
162
|
-
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
163
|
-
totalDelay += delay;
|
|
164
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
165
|
-
continue;
|
|
80
|
+
return maxAttempts;
|
|
81
|
+
}
|
|
82
|
+
async retry(next, args, options) {
|
|
83
|
+
let retryTokenAmount;
|
|
84
|
+
let attempts = 0;
|
|
85
|
+
let totalDelay = 0;
|
|
86
|
+
const maxAttempts = await this.getMaxAttempts();
|
|
87
|
+
const { request } = args;
|
|
88
|
+
if (protocolHttp.HttpRequest.isInstance(request)) {
|
|
89
|
+
request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
|
|
166
90
|
}
|
|
167
|
-
|
|
168
|
-
|
|
91
|
+
while (true) {
|
|
92
|
+
try {
|
|
93
|
+
if (protocolHttp.HttpRequest.isInstance(request)) {
|
|
94
|
+
request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
|
|
95
|
+
}
|
|
96
|
+
if (options?.beforeRequest) {
|
|
97
|
+
await options.beforeRequest();
|
|
98
|
+
}
|
|
99
|
+
const { response, output } = await next(args);
|
|
100
|
+
if (options?.afterRequest) {
|
|
101
|
+
options.afterRequest(response);
|
|
102
|
+
}
|
|
103
|
+
this.retryQuota.releaseRetryTokens(retryTokenAmount);
|
|
104
|
+
output.$metadata.attempts = attempts + 1;
|
|
105
|
+
output.$metadata.totalRetryDelay = totalDelay;
|
|
106
|
+
return { response, output };
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
const err = asSdkError(e);
|
|
110
|
+
attempts++;
|
|
111
|
+
if (this.shouldRetry(err, attempts, maxAttempts)) {
|
|
112
|
+
retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
|
|
113
|
+
const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts);
|
|
114
|
+
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
115
|
+
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
116
|
+
totalDelay += delay;
|
|
117
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (!err.$metadata) {
|
|
121
|
+
err.$metadata = {};
|
|
122
|
+
}
|
|
123
|
+
err.$metadata.attempts = attempts;
|
|
124
|
+
err.$metadata.totalRetryDelay = totalDelay;
|
|
125
|
+
throw err;
|
|
126
|
+
}
|
|
169
127
|
}
|
|
170
|
-
err.$metadata.attempts = attempts;
|
|
171
|
-
err.$metadata.totalRetryDelay = totalDelay;
|
|
172
|
-
throw err;
|
|
173
|
-
}
|
|
174
128
|
}
|
|
175
|
-
|
|
129
|
+
}
|
|
130
|
+
const getDelayFromRetryAfterHeader = (response) => {
|
|
131
|
+
if (!protocolHttp.HttpResponse.isInstance(response))
|
|
132
|
+
return;
|
|
133
|
+
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
|
|
134
|
+
if (!retryAfterHeaderName)
|
|
135
|
+
return;
|
|
136
|
+
const retryAfter = response.headers[retryAfterHeaderName];
|
|
137
|
+
const retryAfterSeconds = Number(retryAfter);
|
|
138
|
+
if (!Number.isNaN(retryAfterSeconds))
|
|
139
|
+
return retryAfterSeconds * 1000;
|
|
140
|
+
const retryAfterDate = new Date(retryAfter);
|
|
141
|
+
return retryAfterDate.getTime() - Date.now();
|
|
176
142
|
};
|
|
177
|
-
var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => {
|
|
178
|
-
if (!import_protocol_http.HttpResponse.isInstance(response)) return;
|
|
179
|
-
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
|
|
180
|
-
if (!retryAfterHeaderName) return;
|
|
181
|
-
const retryAfter = response.headers[retryAfterHeaderName];
|
|
182
|
-
const retryAfterSeconds = Number(retryAfter);
|
|
183
|
-
if (!Number.isNaN(retryAfterSeconds)) return retryAfterSeconds * 1e3;
|
|
184
|
-
const retryAfterDate = new Date(retryAfter);
|
|
185
|
-
return retryAfterDate.getTime() - Date.now();
|
|
186
|
-
}, "getDelayFromRetryAfterHeader");
|
|
187
143
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
super(maxAttemptsProvider, superOptions);
|
|
196
|
-
this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter();
|
|
197
|
-
this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;
|
|
198
|
-
}
|
|
199
|
-
async retry(next, args) {
|
|
200
|
-
return super.retry(next, args, {
|
|
201
|
-
beforeRequest: /* @__PURE__ */ __name(async () => {
|
|
202
|
-
return this.rateLimiter.getSendToken();
|
|
203
|
-
}, "beforeRequest"),
|
|
204
|
-
afterRequest: /* @__PURE__ */ __name((response) => {
|
|
205
|
-
this.rateLimiter.updateClientSendingRate(response);
|
|
206
|
-
}, "afterRequest")
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// src/configurations.ts
|
|
212
|
-
var import_util_middleware = require("@smithy/util-middleware");
|
|
213
|
-
|
|
214
|
-
var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
|
|
215
|
-
var CONFIG_MAX_ATTEMPTS = "max_attempts";
|
|
216
|
-
var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
217
|
-
environmentVariableSelector: /* @__PURE__ */ __name((env) => {
|
|
218
|
-
const value = env[ENV_MAX_ATTEMPTS];
|
|
219
|
-
if (!value) return void 0;
|
|
220
|
-
const maxAttempt = parseInt(value);
|
|
221
|
-
if (Number.isNaN(maxAttempt)) {
|
|
222
|
-
throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
144
|
+
class AdaptiveRetryStrategy extends StandardRetryStrategy {
|
|
145
|
+
rateLimiter;
|
|
146
|
+
constructor(maxAttemptsProvider, options) {
|
|
147
|
+
const { rateLimiter, ...superOptions } = options ?? {};
|
|
148
|
+
super(maxAttemptsProvider, superOptions);
|
|
149
|
+
this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter();
|
|
150
|
+
this.mode = utilRetry.RETRY_MODES.ADAPTIVE;
|
|
223
151
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
152
|
+
async retry(next, args) {
|
|
153
|
+
return super.retry(next, args, {
|
|
154
|
+
beforeRequest: async () => {
|
|
155
|
+
return this.rateLimiter.getSendToken();
|
|
156
|
+
},
|
|
157
|
+
afterRequest: (response) => {
|
|
158
|
+
this.rateLimiter.updateClientSendingRate(response);
|
|
159
|
+
},
|
|
160
|
+
});
|
|
232
161
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
|
|
165
|
+
const CONFIG_MAX_ATTEMPTS = "max_attempts";
|
|
166
|
+
const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
167
|
+
environmentVariableSelector: (env) => {
|
|
168
|
+
const value = env[ENV_MAX_ATTEMPTS];
|
|
169
|
+
if (!value)
|
|
170
|
+
return undefined;
|
|
171
|
+
const maxAttempt = parseInt(value);
|
|
172
|
+
if (Number.isNaN(maxAttempt)) {
|
|
173
|
+
throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
174
|
+
}
|
|
175
|
+
return maxAttempt;
|
|
176
|
+
},
|
|
177
|
+
configFileSelector: (profile) => {
|
|
178
|
+
const value = profile[CONFIG_MAX_ATTEMPTS];
|
|
179
|
+
if (!value)
|
|
180
|
+
return undefined;
|
|
181
|
+
const maxAttempt = parseInt(value);
|
|
182
|
+
if (Number.isNaN(maxAttempt)) {
|
|
183
|
+
throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
184
|
+
}
|
|
185
|
+
return maxAttempt;
|
|
186
|
+
},
|
|
187
|
+
default: utilRetry.DEFAULT_MAX_ATTEMPTS,
|
|
236
188
|
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}, "resolveRetryConfig");
|
|
254
|
-
var ENV_RETRY_MODE = "AWS_RETRY_MODE";
|
|
255
|
-
var CONFIG_RETRY_MODE = "retry_mode";
|
|
256
|
-
var NODE_RETRY_MODE_CONFIG_OPTIONS = {
|
|
257
|
-
environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_RETRY_MODE], "environmentVariableSelector"),
|
|
258
|
-
configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_RETRY_MODE], "configFileSelector"),
|
|
259
|
-
default: import_util_retry.DEFAULT_RETRY_MODE
|
|
189
|
+
const resolveRetryConfig = (input) => {
|
|
190
|
+
const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;
|
|
191
|
+
const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS);
|
|
192
|
+
return Object.assign(input, {
|
|
193
|
+
maxAttempts,
|
|
194
|
+
retryStrategy: async () => {
|
|
195
|
+
if (retryStrategy) {
|
|
196
|
+
return retryStrategy;
|
|
197
|
+
}
|
|
198
|
+
const retryMode = await utilMiddleware.normalizeProvider(_retryMode)();
|
|
199
|
+
if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) {
|
|
200
|
+
return new utilRetry.AdaptiveRetryStrategy(maxAttempts);
|
|
201
|
+
}
|
|
202
|
+
return new utilRetry.StandardRetryStrategy(maxAttempts);
|
|
203
|
+
},
|
|
204
|
+
});
|
|
260
205
|
};
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
if (import_protocol_http.HttpRequest.isInstance(request)) {
|
|
268
|
-
delete request.headers[import_util_retry.INVOCATION_ID_HEADER];
|
|
269
|
-
delete request.headers[import_util_retry.REQUEST_HEADER];
|
|
270
|
-
}
|
|
271
|
-
return next(args);
|
|
272
|
-
}, "omitRetryHeadersMiddleware");
|
|
273
|
-
var omitRetryHeadersMiddlewareOptions = {
|
|
274
|
-
name: "omitRetryHeadersMiddleware",
|
|
275
|
-
tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
|
|
276
|
-
relation: "before",
|
|
277
|
-
toMiddleware: "awsAuthMiddleware",
|
|
278
|
-
override: true
|
|
206
|
+
const ENV_RETRY_MODE = "AWS_RETRY_MODE";
|
|
207
|
+
const CONFIG_RETRY_MODE = "retry_mode";
|
|
208
|
+
const NODE_RETRY_MODE_CONFIG_OPTIONS = {
|
|
209
|
+
environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
|
|
210
|
+
configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
|
|
211
|
+
default: utilRetry.DEFAULT_RETRY_MODE,
|
|
279
212
|
};
|
|
280
|
-
var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({
|
|
281
|
-
applyToStack: /* @__PURE__ */ __name((clientStack) => {
|
|
282
|
-
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
283
|
-
}, "applyToStack")
|
|
284
|
-
}), "getOmitRetryHeadersPlugin");
|
|
285
213
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
var import_smithy_client = require("@smithy/smithy-client");
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
var import_isStreamingPayload = require("./isStreamingPayload/isStreamingPayload");
|
|
293
|
-
var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
|
|
294
|
-
let retryStrategy = await options.retryStrategy();
|
|
295
|
-
const maxAttempts = await options.maxAttempts();
|
|
296
|
-
if (isRetryStrategyV2(retryStrategy)) {
|
|
297
|
-
retryStrategy = retryStrategy;
|
|
298
|
-
let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
|
|
299
|
-
let lastError = new Error();
|
|
300
|
-
let attempts = 0;
|
|
301
|
-
let totalRetryDelay = 0;
|
|
214
|
+
const omitRetryHeadersMiddleware = () => (next) => async (args) => {
|
|
302
215
|
const { request } = args;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
216
|
+
if (protocolHttp.HttpRequest.isInstance(request)) {
|
|
217
|
+
delete request.headers[utilRetry.INVOCATION_ID_HEADER];
|
|
218
|
+
delete request.headers[utilRetry.REQUEST_HEADER];
|
|
306
219
|
}
|
|
307
|
-
|
|
308
|
-
|
|
220
|
+
return next(args);
|
|
221
|
+
};
|
|
222
|
+
const omitRetryHeadersMiddlewareOptions = {
|
|
223
|
+
name: "omitRetryHeadersMiddleware",
|
|
224
|
+
tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
|
|
225
|
+
relation: "before",
|
|
226
|
+
toMiddleware: "awsAuthMiddleware",
|
|
227
|
+
override: true,
|
|
228
|
+
};
|
|
229
|
+
const getOmitRetryHeadersPlugin = (options) => ({
|
|
230
|
+
applyToStack: (clientStack) => {
|
|
231
|
+
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
const retryMiddleware = (options) => (next, context) => async (args) => {
|
|
236
|
+
let retryStrategy = await options.retryStrategy();
|
|
237
|
+
const maxAttempts = await options.maxAttempts();
|
|
238
|
+
if (isRetryStrategyV2(retryStrategy)) {
|
|
239
|
+
retryStrategy = retryStrategy;
|
|
240
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
|
|
241
|
+
let lastError = new Error();
|
|
242
|
+
let attempts = 0;
|
|
243
|
+
let totalRetryDelay = 0;
|
|
244
|
+
const { request } = args;
|
|
245
|
+
const isRequest = protocolHttp.HttpRequest.isInstance(request);
|
|
309
246
|
if (isRequest) {
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
const { response, output } = await next(args);
|
|
313
|
-
retryStrategy.recordSuccess(retryToken);
|
|
314
|
-
output.$metadata.attempts = attempts + 1;
|
|
315
|
-
output.$metadata.totalRetryDelay = totalRetryDelay;
|
|
316
|
-
return { response, output };
|
|
317
|
-
} catch (e) {
|
|
318
|
-
const retryErrorInfo = getRetryErrorInfo(e);
|
|
319
|
-
lastError = asSdkError(e);
|
|
320
|
-
if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {
|
|
321
|
-
(context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger)?.warn(
|
|
322
|
-
"An error was encountered in a non-retryable streaming request."
|
|
323
|
-
);
|
|
324
|
-
throw lastError;
|
|
247
|
+
request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
|
|
325
248
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
249
|
+
while (true) {
|
|
250
|
+
try {
|
|
251
|
+
if (isRequest) {
|
|
252
|
+
request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
|
|
253
|
+
}
|
|
254
|
+
const { response, output } = await next(args);
|
|
255
|
+
retryStrategy.recordSuccess(retryToken);
|
|
256
|
+
output.$metadata.attempts = attempts + 1;
|
|
257
|
+
output.$metadata.totalRetryDelay = totalRetryDelay;
|
|
258
|
+
return { response, output };
|
|
259
|
+
}
|
|
260
|
+
catch (e) {
|
|
261
|
+
const retryErrorInfo = getRetryErrorInfo(e);
|
|
262
|
+
lastError = asSdkError(e);
|
|
263
|
+
if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
|
|
264
|
+
(context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
265
|
+
throw lastError;
|
|
266
|
+
}
|
|
267
|
+
try {
|
|
268
|
+
retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
|
|
269
|
+
}
|
|
270
|
+
catch (refreshError) {
|
|
271
|
+
if (!lastError.$metadata) {
|
|
272
|
+
lastError.$metadata = {};
|
|
273
|
+
}
|
|
274
|
+
lastError.$metadata.attempts = attempts + 1;
|
|
275
|
+
lastError.$metadata.totalRetryDelay = totalRetryDelay;
|
|
276
|
+
throw lastError;
|
|
277
|
+
}
|
|
278
|
+
attempts = retryToken.getRetryCount();
|
|
279
|
+
const delay = retryToken.getRetryDelay();
|
|
280
|
+
totalRetryDelay += delay;
|
|
281
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
282
|
+
}
|
|
335
283
|
}
|
|
336
|
-
attempts = retryToken.getRetryCount();
|
|
337
|
-
const delay = retryToken.getRetryDelay();
|
|
338
|
-
totalRetryDelay += delay;
|
|
339
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
340
|
-
}
|
|
341
284
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}, "retryMiddleware");
|
|
349
|
-
var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2");
|
|
350
|
-
var getRetryErrorInfo = /* @__PURE__ */ __name((error) => {
|
|
351
|
-
const errorInfo = {
|
|
352
|
-
error,
|
|
353
|
-
errorType: getRetryErrorType(error)
|
|
354
|
-
};
|
|
355
|
-
const retryAfterHint = getRetryAfterHint(error.$response);
|
|
356
|
-
if (retryAfterHint) {
|
|
357
|
-
errorInfo.retryAfterHint = retryAfterHint;
|
|
358
|
-
}
|
|
359
|
-
return errorInfo;
|
|
360
|
-
}, "getRetryErrorInfo");
|
|
361
|
-
var getRetryErrorType = /* @__PURE__ */ __name((error) => {
|
|
362
|
-
if ((0, import_service_error_classification.isThrottlingError)(error)) return "THROTTLING";
|
|
363
|
-
if ((0, import_service_error_classification.isTransientError)(error)) return "TRANSIENT";
|
|
364
|
-
if ((0, import_service_error_classification.isServerError)(error)) return "SERVER_ERROR";
|
|
365
|
-
return "CLIENT_ERROR";
|
|
366
|
-
}, "getRetryErrorType");
|
|
367
|
-
var retryMiddlewareOptions = {
|
|
368
|
-
name: "retryMiddleware",
|
|
369
|
-
tags: ["RETRY"],
|
|
370
|
-
step: "finalizeRequest",
|
|
371
|
-
priority: "high",
|
|
372
|
-
override: true
|
|
285
|
+
else {
|
|
286
|
+
retryStrategy = retryStrategy;
|
|
287
|
+
if (retryStrategy?.mode)
|
|
288
|
+
context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]];
|
|
289
|
+
return retryStrategy.retry(next, args);
|
|
290
|
+
}
|
|
373
291
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
getRetryPlugin,
|
|
409
|
-
getRetryAfterHint
|
|
292
|
+
const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" &&
|
|
293
|
+
typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" &&
|
|
294
|
+
typeof retryStrategy.recordSuccess !== "undefined";
|
|
295
|
+
const getRetryErrorInfo = (error) => {
|
|
296
|
+
const errorInfo = {
|
|
297
|
+
error,
|
|
298
|
+
errorType: getRetryErrorType(error),
|
|
299
|
+
};
|
|
300
|
+
const retryAfterHint = getRetryAfterHint(error.$response);
|
|
301
|
+
if (retryAfterHint) {
|
|
302
|
+
errorInfo.retryAfterHint = retryAfterHint;
|
|
303
|
+
}
|
|
304
|
+
return errorInfo;
|
|
305
|
+
};
|
|
306
|
+
const getRetryErrorType = (error) => {
|
|
307
|
+
if (serviceErrorClassification.isThrottlingError(error))
|
|
308
|
+
return "THROTTLING";
|
|
309
|
+
if (serviceErrorClassification.isTransientError(error))
|
|
310
|
+
return "TRANSIENT";
|
|
311
|
+
if (serviceErrorClassification.isServerError(error))
|
|
312
|
+
return "SERVER_ERROR";
|
|
313
|
+
return "CLIENT_ERROR";
|
|
314
|
+
};
|
|
315
|
+
const retryMiddlewareOptions = {
|
|
316
|
+
name: "retryMiddleware",
|
|
317
|
+
tags: ["RETRY"],
|
|
318
|
+
step: "finalizeRequest",
|
|
319
|
+
priority: "high",
|
|
320
|
+
override: true,
|
|
321
|
+
};
|
|
322
|
+
const getRetryPlugin = (options) => ({
|
|
323
|
+
applyToStack: (clientStack) => {
|
|
324
|
+
clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
|
|
325
|
+
},
|
|
410
326
|
});
|
|
327
|
+
const getRetryAfterHint = (response) => {
|
|
328
|
+
if (!protocolHttp.HttpResponse.isInstance(response))
|
|
329
|
+
return;
|
|
330
|
+
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
|
|
331
|
+
if (!retryAfterHeaderName)
|
|
332
|
+
return;
|
|
333
|
+
const retryAfter = response.headers[retryAfterHeaderName];
|
|
334
|
+
const retryAfterSeconds = Number(retryAfter);
|
|
335
|
+
if (!Number.isNaN(retryAfterSeconds))
|
|
336
|
+
return new Date(retryAfterSeconds * 1000);
|
|
337
|
+
const retryAfterDate = new Date(retryAfter);
|
|
338
|
+
return retryAfterDate;
|
|
339
|
+
};
|
|
411
340
|
|
|
341
|
+
exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
|
|
342
|
+
exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS;
|
|
343
|
+
exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE;
|
|
344
|
+
exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS;
|
|
345
|
+
exports.ENV_RETRY_MODE = ENV_RETRY_MODE;
|
|
346
|
+
exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS;
|
|
347
|
+
exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS;
|
|
348
|
+
exports.StandardRetryStrategy = StandardRetryStrategy;
|
|
349
|
+
exports.defaultDelayDecider = defaultDelayDecider;
|
|
350
|
+
exports.defaultRetryDecider = defaultRetryDecider;
|
|
351
|
+
exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
|
|
352
|
+
exports.getRetryAfterHint = getRetryAfterHint;
|
|
353
|
+
exports.getRetryPlugin = getRetryPlugin;
|
|
354
|
+
exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
|
|
355
|
+
exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions;
|
|
356
|
+
exports.resolveRetryConfig = resolveRetryConfig;
|
|
357
|
+
exports.retryMiddleware = retryMiddleware;
|
|
358
|
+
exports.retryMiddlewareOptions = retryMiddlewareOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isStreamingPayload = void 0;
|
|
4
|
-
const isStreamingPayload = (request) =>
|
|
4
|
+
const isStreamingPayload = (request) => request?.body instanceof ReadableStream;
|
|
5
5
|
exports.isStreamingPayload = isStreamingPayload;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isStreamingPayload = void 0;
|
|
4
4
|
const stream_1 = require("stream");
|
|
5
|
-
const isStreamingPayload = (request) =>
|
|
6
|
-
(typeof ReadableStream !== "undefined" &&
|
|
5
|
+
const isStreamingPayload = (request) => request?.body instanceof stream_1.Readable ||
|
|
6
|
+
(typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream);
|
|
7
7
|
exports.isStreamingPayload = isStreamingPayload;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DefaultRateLimiter, RETRY_MODES } from "@smithy/util-retry";
|
|
2
2
|
import { StandardRetryStrategy } from "./StandardRetryStrategy";
|
|
3
3
|
export class AdaptiveRetryStrategy extends StandardRetryStrategy {
|
|
4
|
+
rateLimiter;
|
|
4
5
|
constructor(maxAttemptsProvider, options) {
|
|
5
6
|
const { rateLimiter, ...superOptions } = options ?? {};
|
|
6
7
|
super(maxAttemptsProvider, superOptions);
|
|
@@ -7,9 +7,13 @@ import { defaultDelayDecider } from "./delayDecider";
|
|
|
7
7
|
import { defaultRetryDecider } from "./retryDecider";
|
|
8
8
|
import { asSdkError } from "./util";
|
|
9
9
|
export class StandardRetryStrategy {
|
|
10
|
+
maxAttemptsProvider;
|
|
11
|
+
retryDecider;
|
|
12
|
+
delayDecider;
|
|
13
|
+
retryQuota;
|
|
14
|
+
mode = RETRY_MODES.STANDARD;
|
|
10
15
|
constructor(maxAttemptsProvider, options) {
|
|
11
16
|
this.maxAttemptsProvider = maxAttemptsProvider;
|
|
12
|
-
this.mode = RETRY_MODES.STANDARD;
|
|
13
17
|
this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
|
|
14
18
|
this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
|
|
15
19
|
this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-retry",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"sideEffects": false,
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@smithy/node-config-provider": "^4.
|
|
38
|
-
"@smithy/protocol-http": "^5.
|
|
39
|
-
"@smithy/service-error-classification": "^4.
|
|
40
|
-
"@smithy/smithy-client": "^4.
|
|
41
|
-
"@smithy/types": "^4.
|
|
42
|
-
"@smithy/util-middleware": "^4.
|
|
43
|
-
"@smithy/util-retry": "^4.
|
|
44
|
-
"@smithy/uuid": "^1.
|
|
37
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
38
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
39
|
+
"@smithy/service-error-classification": "^4.2.0",
|
|
40
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
41
|
+
"@smithy/types": "^4.6.0",
|
|
42
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
43
|
+
"@smithy/util-retry": "^4.2.0",
|
|
44
|
+
"@smithy/uuid": "^1.1.0",
|
|
45
45
|
"tslib": "^2.6.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
package/dist-cjs/delayDecider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
package/dist-cjs/retryDecider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
package/dist-cjs/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
package/dist-cjs/util.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|