@aws-sdk/middleware-websocket 3.357.0 → 3.369.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/EventStreamPayloadHandler.js +1 -1
- package/dist-cjs/WebsocketSignatureV4.js +1 -1
- package/dist-cjs/get-event-signing-stream.js +1 -1
- package/dist-cjs/middleware-websocket-endpoint.js +1 -1
- package/dist-cjs/websocket-fetch-handler.js +3 -3
- package/dist-es/EventStreamPayloadHandler.js +1 -1
- package/dist-es/WebsocketSignatureV4.js +1 -1
- package/dist-es/get-event-signing-stream.js +1 -1
- package/dist-es/middleware-websocket-endpoint.js +1 -1
- package/dist-es/websocket-fetch-handler.js +3 -3
- package/dist-types/EventStreamPayloadHandler.d.ts +1 -1
- package/dist-types/WebsocketSignatureV4.d.ts +2 -2
- package/dist-types/eventstream-payload-handler-provider.d.ts +1 -1
- package/dist-types/get-event-signing-stream.d.ts +2 -2
- package/dist-types/getWebSocketPlugin.d.ts +1 -1
- package/dist-types/middleware-session-id.d.ts +1 -1
- package/dist-types/middleware-websocket-endpoint.d.ts +1 -1
- package/dist-types/ts3.4/EventStreamPayloadHandler.d.ts +1 -1
- package/dist-types/ts3.4/WebsocketSignatureV4.d.ts +2 -2
- package/dist-types/ts3.4/eventstream-payload-handler-provider.d.ts +1 -1
- package/dist-types/ts3.4/get-event-signing-stream.d.ts +2 -2
- package/dist-types/ts3.4/getWebSocketPlugin.d.ts +1 -1
- package/dist-types/ts3.4/middleware-session-id.d.ts +1 -1
- package/dist-types/ts3.4/middleware-websocket-endpoint.d.ts +1 -1
- package/dist-types/ts3.4/utils.d.ts +1 -1
- package/dist-types/ts3.4/websocket-configuration.d.ts +1 -1
- package/dist-types/ts3.4/websocket-fetch-handler.d.ts +2 -2
- package/dist-types/utils.d.ts +1 -1
- package/dist-types/websocket-configuration.d.ts +1 -1
- package/dist-types/websocket-fetch-handler.d.ts +2 -2
- package/package.json +10 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EventStreamPayloadHandler = void 0;
|
|
4
|
-
const eventstream_codec_1 = require("@
|
|
4
|
+
const eventstream_codec_1 = require("@smithy/eventstream-codec");
|
|
5
5
|
const get_event_signing_stream_1 = require("./get-event-signing-stream");
|
|
6
6
|
class EventStreamPayloadHandler {
|
|
7
7
|
constructor(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WebsocketSignatureV4 = void 0;
|
|
4
|
-
const protocol_http_1 = require("@
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
class WebsocketSignatureV4 {
|
|
7
7
|
constructor(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEventSigningTransformStream = void 0;
|
|
4
|
-
const util_hex_encoding_1 = require("@
|
|
4
|
+
const util_hex_encoding_1 = require("@smithy/util-hex-encoding");
|
|
5
5
|
const getEventSigningTransformStream = (initialSignature, messageSigner, eventStreamCodec) => {
|
|
6
6
|
let priorSignature = initialSignature;
|
|
7
7
|
const transformer = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.websocketEndpointMiddlewareOptions = exports.websocketEndpointMiddleware = void 0;
|
|
4
|
-
const protocol_http_1 = require("@
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const websocketEndpointMiddleware = (config, options) => (next) => (args) => {
|
|
6
6
|
var _a, _b, _c;
|
|
7
7
|
const { request } = args;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WebSocketFetchHandler = void 0;
|
|
4
|
-
const eventstream_serde_browser_1 = require("@aws-sdk/eventstream-serde-browser");
|
|
5
|
-
const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
|
|
6
|
-
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
4
|
const util_format_url_1 = require("@aws-sdk/util-format-url");
|
|
5
|
+
const eventstream_serde_browser_1 = require("@smithy/eventstream-serde-browser");
|
|
6
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
7
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
const DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2000;
|
|
10
10
|
class WebSocketFetchHandler {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventStreamCodec } from "@
|
|
1
|
+
import { EventStreamCodec } from "@smithy/eventstream-codec";
|
|
2
2
|
import { getEventSigningTransformStream } from "./get-event-signing-stream";
|
|
3
3
|
export class EventStreamPayloadHandler {
|
|
4
4
|
constructor(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fromHex } from "@
|
|
1
|
+
import { fromHex } from "@smithy/util-hex-encoding";
|
|
2
2
|
export const getEventSigningTransformStream = (initialSignature, messageSigner, eventStreamCodec) => {
|
|
3
3
|
let priorSignature = initialSignature;
|
|
4
4
|
const transformer = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { iterableToReadableStream, readableStreamtoIterable } from "@aws-sdk/eventstream-serde-browser";
|
|
2
|
-
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
|
|
3
|
-
import { HttpResponse } from "@aws-sdk/protocol-http";
|
|
4
1
|
import { formatUrl } from "@aws-sdk/util-format-url";
|
|
2
|
+
import { iterableToReadableStream, readableStreamtoIterable } from "@smithy/eventstream-serde-browser";
|
|
3
|
+
import { FetchHttpHandler } from "@smithy/fetch-http-handler";
|
|
4
|
+
import { HttpResponse } from "@smithy/protocol-http";
|
|
5
5
|
import { isWebSocketRequest } from "./utils";
|
|
6
6
|
const DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2000;
|
|
7
7
|
export class WebSocketFetchHandler {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Decoder, Encoder, EventStreamPayloadHandler as IEventStreamPayloadHandler, FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext, MessageSigner, MetadataBearer, Provider } from "@
|
|
1
|
+
import { Decoder, Encoder, EventStreamPayloadHandler as IEventStreamPayloadHandler, FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext, MessageSigner, MetadataBearer, Provider } from "@smithy/types";
|
|
2
2
|
export interface EventStreamPayloadHandlerOptions {
|
|
3
3
|
messageSigner: Provider<MessageSigner>;
|
|
4
4
|
utf8Encoder: Encoder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SignatureV4 as BaseSignatureV4 } from "@
|
|
2
|
-
import { HttpRequest as IHttpRequest, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments } from "@
|
|
1
|
+
import { SignatureV4 as BaseSignatureV4 } from "@smithy/signature-v4";
|
|
2
|
+
import { HttpRequest as IHttpRequest, RequestPresigner, RequestPresigningArguments, RequestSigner, RequestSigningArguments } from "@smithy/types";
|
|
3
3
|
export declare class WebsocketSignatureV4 implements RequestSigner, RequestPresigner {
|
|
4
4
|
private readonly signer;
|
|
5
5
|
constructor(options: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventStreamCodec } from "@
|
|
2
|
-
import { MessageSigner } from "@
|
|
1
|
+
import { EventStreamCodec } from "@smithy/eventstream-codec";
|
|
2
|
+
import { MessageSigner } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
4
|
* Get a transform stream that signs the eventstream
|
|
5
5
|
* Implementation replicated from @aws-sdk/eventstream-handler-node::EventSigningStream
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitializeHandlerOptions, InitializeMiddleware } from "@
|
|
1
|
+
import { InitializeHandlerOptions, InitializeMiddleware } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* Most WebSocket operations contains `SessionId` parameter in both input and
|
|
4
4
|
* output, with the same value. This middleware populates the `SessionId`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildMiddleware, RelativeMiddlewareOptions, RequestHandler } from "@
|
|
1
|
+
import { BuildMiddleware, RelativeMiddlewareOptions, RequestHandler } from "@smithy/types";
|
|
2
2
|
/**
|
|
3
3
|
* Middleware that modify the request to from http to WebSocket
|
|
4
4
|
* This middleware can only be applied to commands that supports bi-directional event streaming via WebSocket.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SignatureV4 as BaseSignatureV4 } from "@
|
|
1
|
+
import { SignatureV4 as BaseSignatureV4 } from "@smithy/signature-v4";
|
|
2
2
|
import {
|
|
3
3
|
HttpRequest as IHttpRequest,
|
|
4
4
|
RequestPresigner,
|
|
5
5
|
RequestPresigningArguments,
|
|
6
6
|
RequestSigner,
|
|
7
7
|
RequestSigningArguments,
|
|
8
|
-
} from "@
|
|
8
|
+
} from "@smithy/types";
|
|
9
9
|
export declare class WebsocketSignatureV4
|
|
10
10
|
implements RequestSigner, RequestPresigner
|
|
11
11
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EventStreamPayloadHandlerProvider } from "@
|
|
1
|
+
import { EventStreamPayloadHandlerProvider } from "@smithy/types";
|
|
2
2
|
export declare const eventStreamPayloadHandlerProvider: EventStreamPayloadHandlerProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventStreamCodec } from "@
|
|
2
|
-
import { MessageSigner } from "@
|
|
1
|
+
import { EventStreamCodec } from "@smithy/eventstream-codec";
|
|
2
|
+
import { MessageSigner } from "@smithy/types";
|
|
3
3
|
export declare const getEventSigningTransformStream: (
|
|
4
4
|
initialSignature: string,
|
|
5
5
|
messageSigner: MessageSigner,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HttpRequest } from "@
|
|
1
|
+
import { HttpRequest } from "@smithy/types";
|
|
2
2
|
export declare const isWebSocketRequest: (request: HttpRequest) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthScheme, RequestHandler, RequestSigner } from "@
|
|
1
|
+
import { AuthScheme, RequestHandler, RequestSigner } from "@smithy/types";
|
|
2
2
|
export interface WebSocketInputConfig {}
|
|
3
3
|
interface PreviouslyResolved {
|
|
4
4
|
signer: (authScheme: AuthScheme) => Promise<RequestSigner>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse } from "@
|
|
1
|
+
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import {
|
|
3
3
|
Provider,
|
|
4
4
|
RequestHandler,
|
|
5
5
|
RequestHandlerMetadata,
|
|
6
|
-
} from "@
|
|
6
|
+
} from "@smithy/types";
|
|
7
7
|
export interface WebSocketFetchHandlerOptions {
|
|
8
8
|
connectionTimeout?: number;
|
|
9
9
|
}
|
package/dist-types/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HttpRequest } from "@
|
|
1
|
+
import { HttpRequest } from "@smithy/types";
|
|
2
2
|
export declare const isWebSocketRequest: (request: HttpRequest) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HttpRequest, HttpResponse } from "@
|
|
2
|
-
import { Provider, RequestHandler, RequestHandlerMetadata } from "@
|
|
1
|
+
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
2
|
+
import { Provider, RequestHandler, RequestHandlerMetadata } from "@smithy/types";
|
|
3
3
|
export interface WebSocketFetchHandlerOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The maximum time in milliseconds that the connection phase of a request
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-websocket",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.369.0",
|
|
4
4
|
"main": "./dist-cjs/index.js",
|
|
5
5
|
"module": "./dist-es/index.js",
|
|
6
6
|
"types": "./dist-types/index.d.ts",
|
|
@@ -21,14 +21,15 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/
|
|
25
|
-
"@aws-sdk/
|
|
26
|
-
"@aws-sdk/
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
24
|
+
"@aws-sdk/middleware-signing": "3.369.0",
|
|
25
|
+
"@aws-sdk/types": "3.369.0",
|
|
26
|
+
"@aws-sdk/util-format-url": "3.369.0",
|
|
27
|
+
"@smithy/eventstream-serde-browser": "^1.0.1",
|
|
28
|
+
"@smithy/fetch-http-handler": "^1.0.1",
|
|
29
|
+
"@smithy/protocol-http": "^1.1.0",
|
|
30
|
+
"@smithy/signature-v4": "^1.0.1",
|
|
31
|
+
"@smithy/types": "^1.1.0",
|
|
32
|
+
"@smithy/util-hex-encoding": "^1.0.1",
|
|
32
33
|
"tslib": "^2.5.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|