Skip to content

Commit 6701646

Browse files
committed
Assets for 7.0.0-beta1
1 parent 1bbe5ec commit 6701646

31 files changed

+555
-407
lines changed

Change-log.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
# 7.0.0 (2022-09-xx)
3+
# 7.0.0-beta1 (2023-01-01)
44

55
- Use latest dependencies and Node.
66
- Upgrade Typescript to 4.8 — likely to lose backward compatibility.

bundles/stomp.umd.js

+321-304
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/stomp.umd.js.map

-1
This file was deleted.

bundles/stomp.umd.min.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/stomp.umd.min.js.map

-1
This file was deleted.

esm6/augment-websocket.js

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm6/augment-websocket.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm6/client.d.ts

+29-13
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export declare class Client {
2020
* If your environment does not support WebSockets natively, please refer to
2121
* [Polyfills]{@link https://stomp-js.github.io/guide/stompjs/rx-stomp/ng2-stompjs/pollyfils-for-stompjs-v5.html}.
2222
*/
23-
brokerURL: string;
23+
brokerURL: string | undefined;
2424
/**
2525
* STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.
2626
*
@@ -52,7 +52,7 @@ export declare class Client {
5252
* };
5353
* ```
5454
*/
55-
webSocketFactory: () => IStompSocket;
55+
webSocketFactory: (() => IStompSocket) | undefined;
5656
/**
5757
* Will retry if Stomp connection is not established in specified milliseconds.
5858
* Default 0, which implies wait for ever.
@@ -113,7 +113,7 @@ export declare class Client {
113113
/**
114114
* Underlying WebSocket instance, READONLY.
115115
*/
116-
readonly webSocket: IStompSocket;
116+
get webSocket(): IStompSocket | undefined;
117117
/**
118118
* Connection headers, important keys - `login`, `passcode`, `host`.
119119
* Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for
@@ -123,7 +123,8 @@ export declare class Client {
123123
/**
124124
* Disconnection headers.
125125
*/
126-
disconnectHeaders: StompHeaders;
126+
get disconnectHeaders(): StompHeaders;
127+
set disconnectHeaders(value: StompHeaders);
127128
private _disconnectHeaders;
128129
/**
129130
* This function will be called for any unhandled messages.
@@ -153,7 +154,7 @@ export declare class Client {
153154
/**
154155
* `true` if there is a active connection with STOMP Broker
155156
*/
156-
readonly connected: boolean;
157+
get connected(): boolean;
157158
/**
158159
* Callback, invoked on before a connection connection to the STOMP broker.
159160
*
@@ -242,20 +243,19 @@ export declare class Client {
242243
/**
243244
* version of STOMP protocol negotiated with the server, READONLY
244245
*/
245-
readonly connectedVersion: string;
246+
get connectedVersion(): string | undefined;
246247
private _stompHandler;
247248
/**
248249
* if the client is active (connected or going to reconnect)
249250
*/
250-
readonly active: boolean;
251+
get active(): boolean;
251252
/**
252253
* It will be called on state change.
253254
*
254255
* When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING.
255256
*/
256257
onChangeState: (state: ActivationState) => void;
257258
private _changeState;
258-
private _resolveSocketClose;
259259
/**
260260
* Activation state.
261261
*
@@ -285,14 +285,29 @@ export declare class Client {
285285
private _schedule_reconnect;
286286
/**
287287
* Disconnect if connected and stop auto reconnect loop.
288-
* Appropriate callbacks will be invoked if underlying STOMP connection was connected.
288+
* Appropriate callbacks will be invoked if there is an underlying STOMP connection.
289289
*
290-
* This call is async, it will resolve immediately if there is no underlying active websocket,
291-
* otherwise, it will resolve after underlying websocket is properly disposed.
290+
* This call is async. It will resolve immediately if there is no underlying active websocket,
291+
* otherwise, it will resolve after the underlying websocket is properly disposed of.
292292
*
293-
* To reactivate you can call [Client#activate]{@link Client#activate}.
293+
* It is not an error to invoke this method more than once.
294+
* Each of those would resolve on completion of deactivation.
295+
*
296+
* To reactivate, you can call [Client#activate]{@link Client#activate}.
297+
*
298+
* Experimental: pass `force: true` to immediately discard the underlying connection.
299+
* This mode will skip both the STOMP and the Websocket shutdown sequences.
300+
* In some cases, browsers take a long time in the Websocket shutdown if the underlying connection had gone stale.
301+
* Using this mode can speed up.
302+
* When this mode is used, the actual Websocket may linger for a while
303+
* and the broker may not realize that the connection is no longer in use.
304+
*
305+
* It is possible to invoke this method initially without the `force` option
306+
* and subsequently, say after a wait, with the `force` option.
294307
*/
295-
deactivate(): Promise<void>;
308+
deactivate(options?: {
309+
force?: boolean;
310+
}): Promise<void>;
296311
/**
297312
* Force disconnect if there is an active connection by directly closing the underlying WebSocket.
298313
* This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.
@@ -338,6 +353,7 @@ export declare class Client {
338353
* ```
339354
*/
340355
publish(params: IPublishParams): void;
356+
private _checkConnection;
341357
/**
342358
* STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.
343359
* To request an acknowledgement, a `receipt` header needs to be sent with the actual request.

esm6/client.js

+75-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)