@aws-sdk/core 3.973.25 → 3.973.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 CHANGED
@@ -30,6 +30,22 @@ More information can be found at: https://a.co/c895JFp`);
30
30
  }
31
31
  };
32
32
 
33
+ const longPollMiddleware = () => (next, context) => async (args) => {
34
+ context.__retryLongPoll = true;
35
+ return next(args);
36
+ };
37
+ const longPollMiddlewareOptions = {
38
+ name: "longPollMiddleware",
39
+ tags: ["RETRY"],
40
+ step: "initialize",
41
+ override: true,
42
+ };
43
+ const getLongPollPlugin = (options) => ({
44
+ applyToStack: (clientStack) => {
45
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
46
+ },
47
+ });
48
+
33
49
  function setCredentialFeature(credentials, feature, value) {
34
50
  if (!credentials.$source) {
35
51
  credentials.$source = {};
@@ -2229,6 +2245,7 @@ exports._toStr = _toStr;
2229
2245
  exports.awsExpectUnion = awsExpectUnion;
2230
2246
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
2231
2247
  exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
2248
+ exports.getLongPollPlugin = getLongPollPlugin;
2232
2249
  exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
2233
2250
  exports.loadRestXmlErrorCode = loadRestXmlErrorCode;
2234
2251
  exports.parseJsonBody = parseJsonBody;
@@ -16,6 +16,22 @@ More information can be found at: https://a.co/c895JFp`);
16
16
  }
17
17
  };
18
18
 
19
+ const longPollMiddleware = () => (next, context) => async (args) => {
20
+ context.__retryLongPoll = true;
21
+ return next(args);
22
+ };
23
+ const longPollMiddlewareOptions = {
24
+ name: "longPollMiddleware",
25
+ tags: ["RETRY"],
26
+ step: "initialize",
27
+ override: true,
28
+ };
29
+ const getLongPollPlugin = (options) => ({
30
+ applyToStack: (clientStack) => {
31
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
32
+ },
33
+ });
34
+
19
35
  function setCredentialFeature(credentials, feature, value) {
20
36
  if (!credentials.$source) {
21
37
  credentials.$source = {};
@@ -45,6 +61,7 @@ function setTokenFeature(token, feature, value) {
45
61
  }
46
62
 
47
63
  exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
64
+ exports.getLongPollPlugin = getLongPollPlugin;
48
65
  exports.setCredentialFeature = setCredentialFeature;
49
66
  exports.setFeature = setFeature;
50
67
  exports.setTokenFeature = setTokenFeature;
@@ -1,4 +1,5 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export { getLongPollPlugin } from "./longPollMiddleware";
2
3
  export * from "./setCredentialFeature";
3
4
  export * from "./setFeature";
4
5
  export * from "./setTokenFeature";
@@ -0,0 +1,15 @@
1
+ export const longPollMiddleware = () => (next, context) => async (args) => {
2
+ context.__retryLongPoll = true;
3
+ return next(args);
4
+ };
5
+ export const longPollMiddlewareOptions = {
6
+ name: "longPollMiddleware",
7
+ tags: ["RETRY"],
8
+ step: "initialize",
9
+ override: true,
10
+ };
11
+ export const getLongPollPlugin = (options) => ({
12
+ applyToStack: (clientStack) => {
13
+ clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
14
+ },
15
+ });
@@ -1,4 +1,5 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export { getLongPollPlugin } from "./longPollMiddleware";
2
3
  export * from "./setCredentialFeature";
3
4
  export * from "./setFeature";
4
5
  export * from "./setTokenFeature";
@@ -0,0 +1,14 @@
1
+ import type { HandlerExecutionContext, InitializeHandler, InitializeHandlerOptions, MetadataBearer, Pluggable } from "@smithy/types";
2
+ /**
3
+ * This middleware is attached to operations designated as long-polling.
4
+ * @internal
5
+ */
6
+ export declare const longPollMiddleware: () => <Output extends MetadataBearer = MetadataBearer>(next: InitializeHandler<any, Output>, context: HandlerExecutionContext) => InitializeHandler<any, Output>;
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare const longPollMiddlewareOptions: InitializeHandlerOptions;
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const getLongPollPlugin: (options: {}) => Pluggable<any, any>;
@@ -1,4 +1,5 @@
1
1
  export * from "./emitWarningIfUnsupportedVersion";
2
+ export { getLongPollPlugin } from "./longPollMiddleware";
2
3
  export * from "./setCredentialFeature";
3
4
  export * from "./setFeature";
4
5
  export * from "./setTokenFeature";
@@ -0,0 +1,15 @@
1
+ import {
2
+ HandlerExecutionContext,
3
+ InitializeHandler,
4
+ InitializeHandlerOptions,
5
+ MetadataBearer,
6
+ Pluggable,
7
+ } from "@smithy/types";
8
+ export declare const longPollMiddleware: () => <
9
+ Output extends MetadataBearer = MetadataBearer
10
+ >(
11
+ next: InitializeHandler<any, Output>,
12
+ context: HandlerExecutionContext
13
+ ) => InitializeHandler<any, Output>;
14
+ export declare const longPollMiddlewareOptions: InitializeHandlerOptions;
15
+ export declare const getLongPollPlugin: (options: {}) => Pluggable<any, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.973.25",
3
+ "version": "3.973.27",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
@@ -81,17 +81,17 @@
81
81
  },
82
82
  "license": "Apache-2.0",
83
83
  "dependencies": {
84
- "@aws-sdk/types": "^3.973.6",
85
- "@aws-sdk/xml-builder": "^3.972.16",
86
- "@smithy/core": "^3.23.12",
87
- "@smithy/node-config-provider": "^4.3.12",
88
- "@smithy/property-provider": "^4.2.12",
89
- "@smithy/protocol-http": "^5.3.12",
90
- "@smithy/signature-v4": "^5.3.12",
91
- "@smithy/smithy-client": "^4.12.7",
92
- "@smithy/types": "^4.13.1",
84
+ "@aws-sdk/types": "^3.973.7",
85
+ "@aws-sdk/xml-builder": "^3.972.17",
86
+ "@smithy/core": "^3.23.14",
87
+ "@smithy/node-config-provider": "^4.3.13",
88
+ "@smithy/property-provider": "^4.2.13",
89
+ "@smithy/protocol-http": "^5.3.13",
90
+ "@smithy/signature-v4": "^5.3.13",
91
+ "@smithy/smithy-client": "^4.12.9",
92
+ "@smithy/types": "^4.14.0",
93
93
  "@smithy/util-base64": "^4.3.2",
94
- "@smithy/util-middleware": "^4.2.12",
94
+ "@smithy/util-middleware": "^4.2.13",
95
95
  "@smithy/util-utf8": "^4.2.2",
96
96
  "tslib": "^2.6.2"
97
97
  },