@stomp/stompjs 5.0.0-beta.4 → 5.0.2
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 +8 -8
- package/bundles/stomp.umd.js +310 -65
- package/bundles/stomp.umd.js.map +1 -1
- package/bundles/stomp.umd.min.js +1 -1
- package/bundles/stomp.umd.min.js.map +1 -1
- package/esm5/byte.d.ts +3 -1
- package/esm5/byte.js +3 -1
- package/esm5/byte.js.map +1 -1
- package/esm5/client.d.ts +12 -9
- package/esm5/client.js +25 -7
- package/esm5/client.js.map +1 -1
- package/esm5/compatibility/compat-client.d.ts +5 -3
- package/esm5/compatibility/compat-client.js +11 -34
- package/esm5/compatibility/compat-client.js.map +1 -1
- package/esm5/compatibility/heartbeat-info.d.ts +12 -0
- package/esm5/compatibility/heartbeat-info.js +35 -0
- package/esm5/compatibility/heartbeat-info.js.map +1 -0
- package/esm5/compatibility/stomp.d.ts +25 -2
- package/esm5/compatibility/stomp.js +29 -5
- package/esm5/compatibility/stomp.js.map +1 -1
- package/esm5/frame.d.ts +10 -3
- package/esm5/frame.js +9 -5
- package/esm5/frame.js.map +1 -1
- package/esm5/index.js +5 -0
- package/esm5/index.js.map +1 -1
- package/esm5/message.d.ts +7 -5
- package/esm5/message.js +29 -0
- package/esm5/message.js.map +1 -1
- package/esm5/parser.d.ts +5 -3
- package/esm5/parser.js +6 -3
- package/esm5/parser.js.map +1 -1
- package/esm5/stomp-config.d.ts +6 -4
- package/esm5/stomp-config.js +13 -0
- package/esm5/stomp-config.js.map +1 -1
- package/esm5/stomp-handler.d.ts +9 -7
- package/esm5/stomp-handler.js +43 -36
- package/esm5/stomp-handler.js.map +1 -1
- package/esm5/stomp-headers.d.ts +3 -1
- package/esm5/stomp-headers.js +15 -0
- package/esm5/stomp-headers.js.map +1 -1
- package/esm5/stomp-subscription.d.ts +6 -4
- package/esm5/stomp-subscription.js +11 -0
- package/esm5/stomp-subscription.js.map +1 -1
- package/esm5/transaction.d.ts +3 -1
- package/esm5/transaction.js +13 -0
- package/esm5/transaction.js.map +1 -1
- package/esm5/types.d.ts +38 -14
- package/esm5/versions.d.ts +11 -3
- package/esm5/versions.js +11 -3
- package/esm5/versions.js.map +1 -1
- package/esm6/byte.d.ts +3 -1
- package/esm6/byte.js +3 -1
- package/esm6/byte.js.map +1 -1
- package/esm6/client.d.ts +12 -9
- package/esm6/client.js +27 -9
- package/esm6/client.js.map +1 -1
- package/esm6/compatibility/compat-client.d.ts +5 -3
- package/esm6/compatibility/compat-client.js +11 -34
- package/esm6/compatibility/compat-client.js.map +1 -1
- package/esm6/compatibility/heartbeat-info.d.ts +12 -0
- package/esm6/compatibility/heartbeat-info.js +33 -0
- package/esm6/compatibility/heartbeat-info.js.map +1 -0
- package/esm6/compatibility/stomp.d.ts +25 -2
- package/esm6/compatibility/stomp.js +31 -7
- package/esm6/compatibility/stomp.js.map +1 -1
- package/esm6/frame.d.ts +10 -3
- package/esm6/frame.js +10 -6
- package/esm6/frame.js.map +1 -1
- package/esm6/index.js +5 -0
- package/esm6/index.js.map +1 -1
- package/esm6/message.d.ts +7 -5
- package/esm6/message.js +29 -0
- package/esm6/message.js.map +1 -1
- package/esm6/parser.d.ts +5 -3
- package/esm6/parser.js +6 -3
- package/esm6/parser.js.map +1 -1
- package/esm6/stomp-config.d.ts +6 -4
- package/esm6/stomp-config.js +13 -0
- package/esm6/stomp-config.js.map +1 -1
- package/esm6/stomp-handler.d.ts +9 -7
- package/esm6/stomp-handler.js +46 -39
- package/esm6/stomp-handler.js.map +1 -1
- package/esm6/stomp-headers.d.ts +3 -1
- package/esm6/stomp-headers.js +15 -0
- package/esm6/stomp-headers.js.map +1 -1
- package/esm6/stomp-subscription.d.ts +6 -4
- package/esm6/stomp-subscription.js +11 -0
- package/esm6/stomp-subscription.js.map +1 -1
- package/esm6/transaction.d.ts +3 -1
- package/esm6/transaction.js +13 -0
- package/esm6/transaction.js.map +1 -1
- package/esm6/types.d.ts +38 -14
- package/esm6/versions.d.ts +11 -3
- package/esm6/versions.js +11 -3
- package/esm6/versions.js.map +1 -1
- package/package.json +4 -5
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { Versions } from
|
|
2
|
-
import { CompatClient } from
|
|
1
|
+
import { Versions } from '../versions';
|
|
2
|
+
import { CompatClient } from './compat-client';
|
|
3
3
|
/**
|
|
4
4
|
* STOMP Class, acts like a factory to create {@link Client}.
|
|
5
|
+
*
|
|
6
|
+
* Part of `@stomp/stompjs`.
|
|
7
|
+
*
|
|
8
|
+
* **Deprecated**
|
|
9
|
+
*
|
|
10
|
+
* It will be removed in next major version. Please switch to {@link Client}.
|
|
5
11
|
*/
|
|
6
12
|
var Stomp = /** @class */ (function () {
|
|
7
13
|
function Stomp() {
|
|
@@ -14,6 +20,11 @@ var Stomp = /** @class */ (function () {
|
|
|
14
20
|
* var url = "ws://localhost:61614/stomp";
|
|
15
21
|
* var client = Stomp.client(url);
|
|
16
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* **Deprecated**
|
|
25
|
+
*
|
|
26
|
+
* It will be removed in next major version. Please switch to {@link Client}
|
|
27
|
+
* using [Client#brokerURL]{@link Client#brokerURL}.
|
|
17
28
|
*/
|
|
18
29
|
Stomp.client = function (url, protocols) {
|
|
19
30
|
// This is a hack to allow another implementation than the standard
|
|
@@ -31,18 +42,19 @@ var Stomp = /** @class */ (function () {
|
|
|
31
42
|
if (protocols == null) {
|
|
32
43
|
protocols = Versions.default.protocolVersions();
|
|
33
44
|
}
|
|
34
|
-
var
|
|
45
|
+
var wsFn = function () {
|
|
35
46
|
var klass = Stomp.WebSocketClass || WebSocket;
|
|
36
47
|
return new klass(url, protocols);
|
|
37
48
|
};
|
|
38
|
-
return new CompatClient(
|
|
49
|
+
return new CompatClient(wsFn);
|
|
39
50
|
};
|
|
40
51
|
/**
|
|
41
52
|
* This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user
|
|
42
53
|
* specify the WebSocket to use (either a standard HTML5 WebSocket or
|
|
43
54
|
* a similar object).
|
|
44
55
|
*
|
|
45
|
-
* In order to support reconnection, the function Client._connect should be callable more than once.
|
|
56
|
+
* In order to support reconnection, the function Client._connect should be callable more than once.
|
|
57
|
+
* While reconnecting
|
|
46
58
|
* a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function
|
|
47
59
|
* alternatively allows passing a function that should return a new instance of the underlying socket.
|
|
48
60
|
*
|
|
@@ -51,10 +63,15 @@ var Stomp = /** @class */ (function () {
|
|
|
51
63
|
* return new WebSocket('ws://localhost:15674/ws')
|
|
52
64
|
* });
|
|
53
65
|
* ```
|
|
66
|
+
*
|
|
67
|
+
* **Deprecated**
|
|
68
|
+
*
|
|
69
|
+
* It will be removed in next major version. Please switch to {@link Client}
|
|
70
|
+
* using [Client#webSocketFactory]{@link Client#webSocketFactory}.
|
|
54
71
|
*/
|
|
55
72
|
Stomp.over = function (ws) {
|
|
56
|
-
var
|
|
57
|
-
return new CompatClient(
|
|
73
|
+
var wsFn = typeof (ws) === 'function' ? ws : function () { return ws; };
|
|
74
|
+
return new CompatClient(wsFn);
|
|
58
75
|
};
|
|
59
76
|
/**
|
|
60
77
|
* In case you need to use a non standard class for WebSocket.
|
|
@@ -66,7 +83,14 @@ var Stomp = /** @class */ (function () {
|
|
|
66
83
|
* Stomp = StompJs.Stomp;
|
|
67
84
|
* Stomp.WebSocketClass = require('websocket').w3cwebsocket;
|
|
68
85
|
* ```
|
|
86
|
+
*
|
|
87
|
+
* **Deprecated**
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
* It will be removed in next major version. Please switch to {@link Client}
|
|
91
|
+
* using [Client#webSocketFactory]{@link Client#webSocketFactory}.
|
|
69
92
|
*/
|
|
93
|
+
// tslint:disable-next-line:variable-name
|
|
70
94
|
Stomp.WebSocketClass = null;
|
|
71
95
|
return Stomp;
|
|
72
96
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stomp.js","sourceRoot":"","sources":["../../src/compatibility/stomp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"stomp.js","sourceRoot":"","sources":["../../src/compatibility/stomp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;;GAQG;AACH;IAAA;IAoFA,CAAC;IA/DC;;;;;;;;;;;;;OAaG;IACW,YAAM,GAApB,UAAqB,GAAW,EAAE,SAAoB;QACpD,mEAAmE;QACnE,yBAAyB;QACzB,EAAE;QACF,iDAAiD;QACjD,EAAE;QACF,0CAA0C;QAC1C,EAAE;QACF,oCAAoC;QACpC,EAAE;QACF,mEAAmE;QACnE,WAAW;QAEX,yCAAyC;QACzC,IAAI,SAAS,IAAI,IAAI,EAAE;YAAE,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;SAAE;QAC3E,IAAM,IAAI,GAAG;YACX,IAAM,KAAK,GAAG,KAAK,CAAC,cAAc,IAAI,SAAS,CAAC;YAChD,OAAO,IAAI,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACW,UAAI,GAAlB,UAAmB,EAAO;QACxB,IAAM,IAAI,GAAG,OAAM,CAAC,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC;QAEvD,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAlFD;;;;;;;;;;;;;;;;OAgBG;IACH,yCAAyC;IAC3B,oBAAc,GAAQ,IAAI,CAAC;IAiE3C,YAAC;CAAA,AApFD,IAoFC;SApFY,KAAK"}
|
package/esm6/frame.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { StompHeaders } from
|
|
2
|
-
import {
|
|
1
|
+
import { StompHeaders } from './stomp-headers';
|
|
2
|
+
import { IRawFrameType } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Frame class represents a STOMP frame. Many of the callbacks pass the Frame received from
|
|
5
5
|
* the STOMP broker. For advanced usage you might need to access [headers]{@link Frame#headers}.
|
|
6
6
|
*
|
|
7
|
+
* Part of `@stomp/stompjs`.
|
|
8
|
+
*
|
|
7
9
|
* {@link Message} is an extended Frame.
|
|
8
10
|
*/
|
|
9
11
|
export declare class Frame {
|
|
@@ -15,6 +17,9 @@ export declare class Frame {
|
|
|
15
17
|
* Headers, key value pairs.
|
|
16
18
|
*/
|
|
17
19
|
headers: StompHeaders;
|
|
20
|
+
/**
|
|
21
|
+
* Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
|
|
22
|
+
*/
|
|
18
23
|
isBinaryBody: boolean;
|
|
19
24
|
/**
|
|
20
25
|
* body of the frame
|
|
@@ -46,7 +51,7 @@ export declare class Frame {
|
|
|
46
51
|
*
|
|
47
52
|
* @internal
|
|
48
53
|
*/
|
|
49
|
-
static fromRawFrame(rawFrame:
|
|
54
|
+
static fromRawFrame(rawFrame: IRawFrameType, escapeHeaderValues: boolean): Frame;
|
|
50
55
|
/**
|
|
51
56
|
* @internal
|
|
52
57
|
*/
|
|
@@ -55,6 +60,8 @@ export declare class Frame {
|
|
|
55
60
|
* serialize this Frame in a format suitable to be passed to WebSocket.
|
|
56
61
|
* If the body is string the output will be string.
|
|
57
62
|
* If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
58
65
|
*/
|
|
59
66
|
serialize(): string | ArrayBuffer;
|
|
60
67
|
private serializeCmdAndHeaders;
|
package/esm6/frame.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BYTE } from './byte';
|
|
2
2
|
/**
|
|
3
3
|
* Frame class represents a STOMP frame. Many of the callbacks pass the Frame received from
|
|
4
4
|
* the STOMP broker. For advanced usage you might need to access [headers]{@link Frame#headers}.
|
|
5
5
|
*
|
|
6
|
+
* Part of `@stomp/stompjs`.
|
|
7
|
+
*
|
|
6
8
|
* {@link Message} is an extended Frame.
|
|
7
9
|
*/
|
|
8
10
|
var Frame = /** @class */ (function () {
|
|
@@ -14,7 +16,7 @@ var Frame = /** @class */ (function () {
|
|
|
14
16
|
function Frame(params) {
|
|
15
17
|
var command = params.command, headers = params.headers, body = params.body, binaryBody = params.binaryBody, escapeHeaderValues = params.escapeHeaderValues, skipContentLengthHeader = params.skipContentLengthHeader;
|
|
16
18
|
this.command = command;
|
|
17
|
-
this.headers = headers || {};
|
|
19
|
+
this.headers = Object.assign({}, headers || {});
|
|
18
20
|
if (binaryBody) {
|
|
19
21
|
this._binaryBody = binaryBody;
|
|
20
22
|
this.isBinaryBody = true;
|
|
@@ -88,6 +90,8 @@ var Frame = /** @class */ (function () {
|
|
|
88
90
|
* serialize this Frame in a format suitable to be passed to WebSocket.
|
|
89
91
|
* If the body is string the output will be string.
|
|
90
92
|
* If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
91
95
|
*/
|
|
92
96
|
Frame.prototype.serialize = function () {
|
|
93
97
|
var cmdAndHeaders = this.serializeCmdAndHeaders();
|
|
@@ -95,7 +99,7 @@ var Frame = /** @class */ (function () {
|
|
|
95
99
|
return Frame.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;
|
|
96
100
|
}
|
|
97
101
|
else {
|
|
98
|
-
return cmdAndHeaders + this._body +
|
|
102
|
+
return cmdAndHeaders + this._body + BYTE.NULL;
|
|
99
103
|
}
|
|
100
104
|
};
|
|
101
105
|
Frame.prototype.serializeCmdAndHeaders = function () {
|
|
@@ -116,7 +120,7 @@ var Frame = /** @class */ (function () {
|
|
|
116
120
|
if (this.isBinaryBody || (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {
|
|
117
121
|
lines.push("content-length:" + this.bodyLength());
|
|
118
122
|
}
|
|
119
|
-
return lines.join(
|
|
123
|
+
return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;
|
|
120
124
|
};
|
|
121
125
|
Frame.prototype.isBodyEmpty = function () {
|
|
122
126
|
return this.bodyLength() === 0;
|
|
@@ -154,13 +158,13 @@ var Frame = /** @class */ (function () {
|
|
|
154
158
|
* Escape header values
|
|
155
159
|
*/
|
|
156
160
|
Frame.hdrValueEscape = function (str) {
|
|
157
|
-
return str.replace(/\\/g,
|
|
161
|
+
return str.replace(/\\/g, '\\\\').replace(/\r/g, '\\r').replace(/\n/g, '\\n').replace(/:/g, '\\c');
|
|
158
162
|
};
|
|
159
163
|
/**
|
|
160
164
|
* UnEscape header values
|
|
161
165
|
*/
|
|
162
166
|
Frame.hdrValueUnEscape = function (str) {
|
|
163
|
-
return str.replace(/\\r/g,
|
|
167
|
+
return str.replace(/\\r/g, '\r').replace(/\\n/g, '\n').replace(/\\c/g, ':').replace(/\\\\/g, '\\');
|
|
164
168
|
};
|
|
165
169
|
return Frame;
|
|
166
170
|
}());
|
package/esm6/frame.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../src/frame.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../src/frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAI5B;;;;;;;GAOG;AACH;IAyCE;;;;OAIG;IACH,eAAY,MAGX;QACQ,IAAA,wBAAO,EAAE,wBAAO,EAAE,kBAAI,EAAE,8BAAU,EAAE,8CAA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AC;IAED;;OAEG;IACY,sBAAgB,GAA/B,UAAgC,GAAW;QACzC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACrG,CAAC;IACH,YAAC;AAAD,CAAC,AAlMD,IAkMC"}
|
package/esm6/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from './client';
|
|
2
2
|
export * from './frame';
|
|
3
|
+
export * from './message';
|
|
3
4
|
export * from './parser';
|
|
5
|
+
export * from './stomp-config';
|
|
6
|
+
export * from './stomp-headers';
|
|
7
|
+
export * from './stomp-subscription';
|
|
8
|
+
export * from './transaction';
|
|
4
9
|
export * from './versions';
|
|
5
10
|
// Compatibility code
|
|
6
11
|
export * from './compatibility/compat-client';
|
package/esm6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,qBAAqB;AACrB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC"}
|
package/esm6/message.d.ts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { Frame } from
|
|
2
|
-
import { StompHeaders } from
|
|
1
|
+
import { Frame } from './frame';
|
|
2
|
+
import { StompHeaders } from './stomp-headers';
|
|
3
3
|
/**
|
|
4
4
|
* Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
|
|
5
5
|
* and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
|
|
6
6
|
* Since it is an extended {@link Frame}, you can access [headers]{@link Frame#headers}
|
|
7
7
|
* and [body]{@link Frame#body} as properties.
|
|
8
8
|
*
|
|
9
|
+
* Part of `@stomp/stompjs`.
|
|
10
|
+
*
|
|
9
11
|
* See [Client#subscribe]{@link Client#subscribe} for example.
|
|
10
12
|
*/
|
|
11
|
-
export
|
|
13
|
+
export declare class Message extends Frame {
|
|
12
14
|
/**
|
|
13
15
|
* When subscribing with manual acknowledgement, call this method on the message to ACK the message.
|
|
14
16
|
*
|
|
15
17
|
* See [Client#ack]{@link Client#ack} for an example.
|
|
16
18
|
*/
|
|
17
|
-
ack(headers?: StompHeaders)
|
|
19
|
+
ack: (headers?: StompHeaders) => void;
|
|
18
20
|
/**
|
|
19
21
|
* When subscribing with manual acknowledgement, call this method on the message to NACK the message.
|
|
20
22
|
*
|
|
21
23
|
* See [Client#nack]{@link Client#nack} for an example.
|
|
22
24
|
*/
|
|
23
|
-
nack(headers?: StompHeaders)
|
|
25
|
+
nack: (headers?: StompHeaders) => void;
|
|
24
26
|
}
|
package/esm6/message.js
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
3
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
4
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
5
|
+
return function (d, b) {
|
|
6
|
+
extendStatics(d, b);
|
|
7
|
+
function __() { this.constructor = d; }
|
|
8
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
import { Frame } from './frame';
|
|
12
|
+
/**
|
|
13
|
+
* Instance of Message will be passed to [subscription callback]{@link Client#subscribe}
|
|
14
|
+
* and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.
|
|
15
|
+
* Since it is an extended {@link Frame}, you can access [headers]{@link Frame#headers}
|
|
16
|
+
* and [body]{@link Frame#body} as properties.
|
|
17
|
+
*
|
|
18
|
+
* Part of `@stomp/stompjs`.
|
|
19
|
+
*
|
|
20
|
+
* See [Client#subscribe]{@link Client#subscribe} for example.
|
|
21
|
+
*/
|
|
22
|
+
var Message = /** @class */ (function (_super) {
|
|
23
|
+
__extends(Message, _super);
|
|
24
|
+
function Message() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
return Message;
|
|
28
|
+
}(Frame));
|
|
29
|
+
export { Message };
|
|
1
30
|
//# sourceMappingURL=message.js.map
|
package/esm6/message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;GASG;AACH;IAA6B,2BAAK;IAAlC;;IAcA,CAAC;IAAD,cAAC;AAAD,CAAC,AAdD,CAA6B,KAAK,GAcjC"}
|
package/esm6/parser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IRawFrameType } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* This is an evented, rec descent parser.
|
|
4
4
|
* A stream of Octets can be passed and whenever it recognizes
|
|
@@ -37,10 +37,12 @@ import { RawFrameType } from './types';
|
|
|
37
37
|
*
|
|
38
38
|
* Check the parser.spec.js to understand cases that this parser is supposed to handle.
|
|
39
39
|
*
|
|
40
|
+
* Part of `@stomp/stompjs`.
|
|
41
|
+
*
|
|
40
42
|
* @internal
|
|
41
43
|
*/
|
|
42
44
|
export declare class Parser {
|
|
43
|
-
onFrame: (rawFrame:
|
|
45
|
+
onFrame: (rawFrame: IRawFrameType) => void;
|
|
44
46
|
onIncomingPing: () => void;
|
|
45
47
|
private readonly _encoder;
|
|
46
48
|
private readonly _decoder;
|
|
@@ -49,7 +51,7 @@ export declare class Parser {
|
|
|
49
51
|
private _headerKey;
|
|
50
52
|
private _bodyBytesRemaining;
|
|
51
53
|
private _onByte;
|
|
52
|
-
constructor(onFrame: (rawFrame:
|
|
54
|
+
constructor(onFrame: (rawFrame: IRawFrameType) => void, onIncomingPing: () => void);
|
|
53
55
|
parseChunk(segment: string | ArrayBuffer): void;
|
|
54
56
|
private _collectFrame;
|
|
55
57
|
private _collectCommand;
|
package/esm6/parser.js
CHANGED
|
@@ -52,6 +52,8 @@ var COLON = 58;
|
|
|
52
52
|
*
|
|
53
53
|
* Check the parser.spec.js to understand cases that this parser is supposed to handle.
|
|
54
54
|
*
|
|
55
|
+
* Part of `@stomp/stompjs`.
|
|
56
|
+
*
|
|
55
57
|
* @internal
|
|
56
58
|
*/
|
|
57
59
|
var Parser = /** @class */ (function () {
|
|
@@ -71,6 +73,7 @@ var Parser = /** @class */ (function () {
|
|
|
71
73
|
else {
|
|
72
74
|
chunk = this._encoder.encode(segment);
|
|
73
75
|
}
|
|
76
|
+
// tslint:disable-next-line:prefer-for-of
|
|
74
77
|
for (var i = 0; i < chunk.length; i++) {
|
|
75
78
|
var byte = chunk[i];
|
|
76
79
|
this._onByte(byte);
|
|
@@ -139,10 +142,10 @@ var Parser = /** @class */ (function () {
|
|
|
139
142
|
};
|
|
140
143
|
Parser.prototype._setupCollectBody = function () {
|
|
141
144
|
var contentLengthHeader = this._results.headers.filter(function (header) {
|
|
142
|
-
return header[0] ===
|
|
145
|
+
return header[0] === 'content-length';
|
|
143
146
|
})[0];
|
|
144
147
|
if (contentLengthHeader) {
|
|
145
|
-
this._bodyBytesRemaining = parseInt(contentLengthHeader[1]);
|
|
148
|
+
this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);
|
|
146
149
|
this._onByte = this._collectBodyFixedSize;
|
|
147
150
|
}
|
|
148
151
|
else {
|
|
@@ -185,7 +188,7 @@ var Parser = /** @class */ (function () {
|
|
|
185
188
|
this._results = {
|
|
186
189
|
command: undefined,
|
|
187
190
|
headers: [],
|
|
188
|
-
binaryBody: undefined
|
|
191
|
+
binaryBody: undefined
|
|
189
192
|
};
|
|
190
193
|
this._token = [];
|
|
191
194
|
this._headerKey = undefined;
|
package/esm6/parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,IAAM,IAAI,GAAG,CAAC,CAAC;AACf;;GAEG;AACH,IAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,IAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,IAAM,KAAK,GAAG,EAAE,CAAC;AAEjB
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,IAAM,IAAI,GAAG,CAAC,CAAC;AACf;;GAEG;AACH,IAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,IAAM,EAAE,GAAG,EAAE,CAAC;AACd;;GAEG;AACH,IAAM,KAAK,GAAG,EAAE,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH;IAYE,gBAA0B,OAA0C,EAAS,cAA0B;QAA7E,YAAO,GAAP,OAAO,CAAmC;QAAS,mBAAc,GAAd,cAAc,CAAY;QAXtF,aAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QAC7B,aAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QAItC,WAA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AAkB,EAAE,CAAC,CAAC;IACzD,CAAC;IAEO,mCAAkB,GAA1B;QACE,IAAM,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,2BAAU,GAAlB;QACE,IAAI,CAAC,QAAQ,GAAG;YACd,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,SAAS;SACtB,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC;IACpC,CAAC;IAEH,aAAC;AAAD,CAAC,AAzKD,IAyKC"}
|
package/esm6/stomp-config.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { StompHeaders } from
|
|
2
|
-
import {
|
|
3
|
-
import { Versions } from
|
|
1
|
+
import { StompHeaders } from './stomp-headers';
|
|
2
|
+
import { closeEventCallbackType, debugFnType, frameCallbackType, messageCallbackType } from './types';
|
|
3
|
+
import { Versions } from './versions';
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for STOMP Client, each key corresponds to
|
|
6
6
|
* field by the same name in {@link Client}. This can be passed to
|
|
7
7
|
* the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
|
|
8
|
+
*
|
|
9
|
+
* Part of `@stomp/stompjs`.
|
|
8
10
|
*/
|
|
9
|
-
export
|
|
11
|
+
export declare class StompConfig {
|
|
10
12
|
/**
|
|
11
13
|
* See [Client#brokerURL]{@link Client#brokerURL}.
|
|
12
14
|
*/
|
package/esm6/stomp-config.js
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for STOMP Client, each key corresponds to
|
|
3
|
+
* field by the same name in {@link Client}. This can be passed to
|
|
4
|
+
* the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.
|
|
5
|
+
*
|
|
6
|
+
* Part of `@stomp/stompjs`.
|
|
7
|
+
*/
|
|
8
|
+
var StompConfig = /** @class */ (function () {
|
|
9
|
+
function StompConfig() {
|
|
10
|
+
}
|
|
11
|
+
return StompConfig;
|
|
12
|
+
}());
|
|
13
|
+
export { StompConfig };
|
|
1
14
|
//# sourceMappingURL=stomp-config.js.map
|
package/esm6/stomp-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stomp-config.js","sourceRoot":"","sources":["../src/stomp-config.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"stomp-config.js","sourceRoot":"","sources":["../src/stomp-config.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH;IAAA;IAqFA,CAAC;IAAD,kBAAC;AAAD,CAAC,AArFD,IAqFC"}
|
package/esm6/stomp-handler.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Client } from './client';
|
|
2
|
-
import {
|
|
3
|
-
import { StompHeaders } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { StompConfig } from './stomp-config';
|
|
3
|
+
import { StompHeaders } from './stomp-headers';
|
|
4
|
+
import { StompSubscription } from './stomp-subscription';
|
|
5
|
+
import { Transaction } from './transaction';
|
|
6
|
+
import { closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, messageCallbackType } from './types';
|
|
7
|
+
import { Versions } from './versions';
|
|
8
8
|
/**
|
|
9
9
|
* The STOMP protocol handler
|
|
10
10
|
*
|
|
11
|
+
* Part of `@stomp/stompjs`.
|
|
12
|
+
*
|
|
11
13
|
* @internal
|
|
12
14
|
*/
|
|
13
15
|
export declare class StompHandler {
|
|
@@ -46,7 +48,7 @@ export declare class StompHandler {
|
|
|
46
48
|
private _transmit;
|
|
47
49
|
dispose(): void;
|
|
48
50
|
private _cleanUp;
|
|
49
|
-
publish(params:
|
|
51
|
+
publish(params: IPublishParams): void;
|
|
50
52
|
watchForReceipt(receiptId: string, callback: frameCallbackType): void;
|
|
51
53
|
subscribe(destination: string, callback: messageCallbackType, headers?: StompHeaders): StompSubscription;
|
|
52
54
|
unsubscribe(id: string, headers?: StompHeaders): void;
|