@stomp/stompjs 7.0.0-beta2 → 7.0.0-beta4
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/README.md +11 -18
- package/bundles/package.json +6 -0
- package/bundles/stomp.umd.js +47 -47
- package/bundles/stomp.umd.js.map +1 -1
- package/bundles/stomp.umd.min.js +1 -1
- package/esm6/client.d.ts +45 -41
- package/esm6/client.js +34 -31
- package/esm6/client.js.map +1 -1
- package/esm6/compatibility/compat-client.d.ts +1 -1
- package/esm6/compatibility/compat-client.js +1 -1
- package/esm6/i-message.d.ts +2 -2
- package/esm6/parser.js +3 -3
- package/esm6/parser.js.map +1 -1
- package/esm6/stomp-config.d.ts +1 -4
- package/esm6/stomp-config.js +0 -3
- package/esm6/stomp-config.js.map +1 -1
- package/esm6/stomp-handler.js +6 -6
- package/esm6/stomp-handler.js.map +1 -1
- package/esm6/types.d.ts +10 -9
- package/esm6/types.js.map +1 -1
- package/esm6/versions.d.ts +3 -3
- package/esm6/versions.js +3 -3
- package/package.json +9 -6
- package/src/client.ts +46 -42
- package/src/compatibility/compat-client.ts +1 -1
- package/src/i-message.ts +2 -2
- package/src/parser.ts +3 -3
- package/src/stomp-config.ts +1 -4
- package/src/stomp-handler.ts +6 -6
- package/src/types.ts +10 -9
- package/src/versions.ts +3 -3
package/src/types.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { StompHeaders } from './stomp-headers.js';
|
|
|
4
4
|
import { Versions } from './versions.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* This callback will receive a `string` as parameter.
|
|
7
|
+
* This callback will receive a `string` as a parameter.
|
|
8
8
|
*
|
|
9
9
|
* Part of `@stomp/stompjs`.
|
|
10
10
|
*/
|
|
@@ -22,7 +22,7 @@ export type messageCallbackType = (message: IMessage) => void;
|
|
|
22
22
|
*
|
|
23
23
|
* Part of `@stomp/stompjs`.
|
|
24
24
|
*/
|
|
25
|
-
export type frameCallbackType = (
|
|
25
|
+
export type frameCallbackType = ((frame: IFrame) => void) | (() => void);
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* This callback will receive a [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}
|
|
@@ -64,7 +64,7 @@ export interface IPublishParams {
|
|
|
64
64
|
*/
|
|
65
65
|
binaryBody?: Uint8Array;
|
|
66
66
|
/**
|
|
67
|
-
* By default a `content-length` header will be added in the Frame to the broker.
|
|
67
|
+
* By default, a `content-length` header will be added in the Frame to the broker.
|
|
68
68
|
* Set it to `true` for the header to be skipped.
|
|
69
69
|
*/
|
|
70
70
|
skipContentLengthHeader?: boolean;
|
|
@@ -110,17 +110,18 @@ export interface IStompSocketMessageEvent {
|
|
|
110
110
|
* @internal
|
|
111
111
|
*/
|
|
112
112
|
export interface IStompSocket {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
url: string;
|
|
114
|
+
onclose: ((ev?: any) => any) | undefined | null;
|
|
115
|
+
onerror: ((ev: any) => any) | undefined | null;
|
|
116
|
+
onmessage: ((ev: IStompSocketMessageEvent) => any) | undefined | null;
|
|
117
|
+
onopen: ((ev?: any) => any) | undefined | null;
|
|
118
|
+
terminate?: (() => any) | undefined | null;
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
121
|
* Returns a string that indicates how binary data from the socket is exposed to scripts:
|
|
121
122
|
* We support only 'arraybuffer'.
|
|
122
123
|
*/
|
|
123
|
-
binaryType
|
|
124
|
+
binaryType?: string;
|
|
124
125
|
|
|
125
126
|
/**
|
|
126
127
|
* Returns the state of the socket connection. It can have the values of StompSocketState.
|
package/src/versions.ts
CHANGED
|
@@ -27,10 +27,10 @@ export class Versions {
|
|
|
27
27
|
]);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Takes an array of
|
|
30
|
+
* Takes an array of versions, typical elements '1.2', '1.1', or '1.0'
|
|
31
31
|
*
|
|
32
|
-
* You will an instance
|
|
33
|
-
* STOMP handshake.
|
|
32
|
+
* You will be creating an instance of this class if you want to override
|
|
33
|
+
* supported versions to be declared during STOMP handshake.
|
|
34
34
|
*/
|
|
35
35
|
constructor(public versions: string[]) {}
|
|
36
36
|
|