@signalwire/js 4.0.0-dev-20260416142417 → 4.0.0-dev-20260416174405
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/browser.mjs +63 -25
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +65 -24
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +18 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +80 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +16 -15
- package/dist/index.mjs.map +1 -1
- package/dist/operators/index.cjs +1 -1
- package/dist/operators/index.mjs +1 -1
- package/dist/{operators-BwHr2-zw.mjs → operators-B1xH6k06.mjs} +50 -13
- package/dist/operators-B1xH6k06.mjs.map +1 -0
- package/dist/{operators-C3TtzZHH.cjs → operators-BT3jl--r.cjs} +67 -12
- package/dist/operators-BT3jl--r.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/operators-BwHr2-zw.mjs.map +0 -1
- package/dist/operators-C3TtzZHH.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_operators = require('./operators-
|
|
1
|
+
const require_operators = require('./operators-BT3jl--r.cjs');
|
|
2
2
|
let jwt_decode = require("jwt-decode");
|
|
3
3
|
let rxjs = require("rxjs");
|
|
4
4
|
let uuid = require("uuid");
|
|
@@ -9630,11 +9630,10 @@ var WebSocketController = class WebSocketController extends Destroyable {
|
|
|
9630
9630
|
}
|
|
9631
9631
|
send(data) {
|
|
9632
9632
|
if (this._status$.value === "connected" && this.socket?.readyState === 1) {
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
}
|
|
9633
|
+
logger$3.wsTraffic({
|
|
9634
|
+
type: "send",
|
|
9635
|
+
raw: data
|
|
9636
|
+
});
|
|
9638
9637
|
this.socket.send(data);
|
|
9639
9638
|
} else this.messageQueue.push(data);
|
|
9640
9639
|
}
|
|
@@ -9697,11 +9696,10 @@ var WebSocketController = class WebSocketController extends Destroyable {
|
|
|
9697
9696
|
this.handleConnectionError();
|
|
9698
9697
|
}
|
|
9699
9698
|
handleMessage(event) {
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
}
|
|
9699
|
+
logger$3.wsTraffic({
|
|
9700
|
+
type: "recv",
|
|
9701
|
+
raw: event.data
|
|
9702
|
+
});
|
|
9705
9703
|
this._incomingMessages$.next(event);
|
|
9706
9704
|
}
|
|
9707
9705
|
handleConnectionError() {
|
|
@@ -10002,6 +10000,9 @@ var SignalWire = class extends Destroyable {
|
|
|
10002
10000
|
if (this._options.webSocketConstructor) this._deps.WebSocket = this._options.webSocketConstructor;
|
|
10003
10001
|
if (this._options.savePreferences) this.preferences.enableSavePreferences(this._deps.storage);
|
|
10004
10002
|
if (this._options.webRTCApiProvider) this._deps.webRTCApiProvider = this._options.webRTCApiProvider;
|
|
10003
|
+
if (this._options.logger !== void 0) require_operators.setLogger(this._options.logger);
|
|
10004
|
+
if (this._options.logLevel) require_operators.setLogLevel(this._options.logLevel);
|
|
10005
|
+
if (this._options.debug) require_operators.setDebugOptions(this._options.debug);
|
|
10005
10006
|
this._deviceController = this._deps.deviceController;
|
|
10006
10007
|
if (!this._options.skipDeviceMonitoring) this._deviceController.enableDeviceMonitoring();
|
|
10007
10008
|
this.subscribeTo(this._deviceController.errors$, (error) => {
|
|
@@ -10078,7 +10079,7 @@ var SignalWire = class extends Destroyable {
|
|
|
10078
10079
|
if (_credentials.expiry_at && credentialProvider?.refresh) this.scheduleCredentialRefresh(credentialProvider, _credentials.expiry_at);
|
|
10079
10080
|
this._deps.credential = _credentials;
|
|
10080
10081
|
this.persistCredential(_credentials);
|
|
10081
|
-
if (this.isConnected && this._clientSession
|
|
10082
|
+
if (this.isConnected && this._clientSession.authenticated && _credentials.token) try {
|
|
10082
10083
|
await this._clientSession.reauthenticate(_credentials.token);
|
|
10083
10084
|
logger$1.info("[SignalWire] Session refreshed with new credentials.");
|
|
10084
10085
|
} catch (error) {
|
|
@@ -10156,9 +10157,9 @@ var SignalWire = class extends Destroyable {
|
|
|
10156
10157
|
* unexpectedly (e.g. network change, server restart). Reconnection uses an
|
|
10157
10158
|
* **exponential back-off** strategy:
|
|
10158
10159
|
*
|
|
10159
|
-
* - First retry after `reconnectDelayMin` (default **1 s**).
|
|
10160
|
+
* - First retry after `reconnectDelayMin` (default **0.1 s**).
|
|
10160
10161
|
* - Each subsequent retry doubles the delay up to `reconnectDelayMax`
|
|
10161
|
-
* (default **
|
|
10162
|
+
* (default **3 s**).
|
|
10162
10163
|
* - The delay resets to `reconnectDelayMin` once a connection succeeds.
|
|
10163
10164
|
* - A per-attempt `connectionTimeout` (default **10 s**) aborts the
|
|
10164
10165
|
* attempt and schedules the next retry if the server does not respond.
|
|
@@ -10920,5 +10921,8 @@ exports.WebRTCCall = WebRTCCall;
|
|
|
10920
10921
|
exports.embeddableCall = embeddableCall;
|
|
10921
10922
|
exports.isSelfParticipant = isSelfParticipant;
|
|
10922
10923
|
exports.ready = ready;
|
|
10924
|
+
exports.setDebugOptions = require_operators.setDebugOptions;
|
|
10925
|
+
exports.setLogLevel = require_operators.setLogLevel;
|
|
10926
|
+
exports.setLogger = require_operators.setLogger;
|
|
10923
10927
|
exports.version = version;
|
|
10924
10928
|
//# sourceMappingURL=index.cjs.map
|