@openfin/core 45.100.76 → 45.100.77
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/out/mock-alpha.d.ts +1 -2
- package/out/mock-beta.d.ts +1 -2
- package/out/mock-public.d.ts +1 -2
- package/out/stub.d.ts +1 -2
- package/out/stub.js +33 -4
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -3215,9 +3215,8 @@ declare type ClearDataOptions = {
|
|
|
3215
3215
|
* - `indexedDB` - IndexedDB
|
|
3216
3216
|
* - `localStorage` - Local Storage
|
|
3217
3217
|
* - `serviceWorkers` - Service Workers
|
|
3218
|
-
* - `webSQL` - WebSQL
|
|
3219
3218
|
*/
|
|
3220
|
-
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'
|
|
3219
|
+
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'>;
|
|
3221
3220
|
/**
|
|
3222
3221
|
* Clear data for only these origins. Cannot be used with excludeOrigins.
|
|
3223
3222
|
* Example: ['http://localhost:8081', 'https://example.com']
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -3215,9 +3215,8 @@ declare type ClearDataOptions = {
|
|
|
3215
3215
|
* - `indexedDB` - IndexedDB
|
|
3216
3216
|
* - `localStorage` - Local Storage
|
|
3217
3217
|
* - `serviceWorkers` - Service Workers
|
|
3218
|
-
* - `webSQL` - WebSQL
|
|
3219
3218
|
*/
|
|
3220
|
-
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'
|
|
3219
|
+
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'>;
|
|
3221
3220
|
/**
|
|
3222
3221
|
* Clear data for only these origins. Cannot be used with excludeOrigins.
|
|
3223
3222
|
* Example: ['http://localhost:8081', 'https://example.com']
|
package/out/mock-public.d.ts
CHANGED
|
@@ -3215,9 +3215,8 @@ declare type ClearDataOptions = {
|
|
|
3215
3215
|
* - `indexedDB` - IndexedDB
|
|
3216
3216
|
* - `localStorage` - Local Storage
|
|
3217
3217
|
* - `serviceWorkers` - Service Workers
|
|
3218
|
-
* - `webSQL` - WebSQL
|
|
3219
3218
|
*/
|
|
3220
|
-
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'
|
|
3219
|
+
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'>;
|
|
3221
3220
|
/**
|
|
3222
3221
|
* Clear data for only these origins. Cannot be used with excludeOrigins.
|
|
3223
3222
|
* Example: ['http://localhost:8081', 'https://example.com']
|
package/out/stub.d.ts
CHANGED
|
@@ -3271,9 +3271,8 @@ declare type ClearDataOptions = {
|
|
|
3271
3271
|
* - `indexedDB` - IndexedDB
|
|
3272
3272
|
* - `localStorage` - Local Storage
|
|
3273
3273
|
* - `serviceWorkers` - Service Workers
|
|
3274
|
-
* - `webSQL` - WebSQL
|
|
3275
3274
|
*/
|
|
3276
|
-
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'
|
|
3275
|
+
dataTypes?: Array<'backgroundFetch' | 'cache' | 'cookies' | 'downloads' | 'fileSystems' | 'indexedDB' | 'localStorage' | 'serviceWorkers'>;
|
|
3277
3276
|
/**
|
|
3278
3277
|
* Clear data for only these origins. Cannot be used with excludeOrigins.
|
|
3279
3278
|
* Example: ['http://localhost:8081', 'https://example.com']
|
package/out/stub.js
CHANGED
|
@@ -7909,7 +7909,16 @@ class RTCEndpoint {
|
|
|
7909
7909
|
const promise = new Promise((resolve, reject) => {
|
|
7910
7910
|
this.responseMap.set(messageId, { resolve, reject });
|
|
7911
7911
|
});
|
|
7912
|
-
|
|
7912
|
+
try {
|
|
7913
|
+
this.rtc.channels.request.send(JSON.stringify({ action, payload, messageId }));
|
|
7914
|
+
}
|
|
7915
|
+
catch {
|
|
7916
|
+
// Chromium 149+ throws TypeError for messages exceeding
|
|
7917
|
+
// RTCSctpTransport.maxMessageSize instead of passing them to
|
|
7918
|
+
// the SCTP layer (which would close the channel and fire onclose).
|
|
7919
|
+
// Replicate the pre-149 close-and-disconnect behavior.
|
|
7920
|
+
this.disconnectOnSendFailure();
|
|
7921
|
+
}
|
|
7913
7922
|
return promise;
|
|
7914
7923
|
};
|
|
7915
7924
|
this.close = () => {
|
|
@@ -7951,7 +7960,7 @@ class RTCEndpoint {
|
|
|
7951
7960
|
if (__classPrivateFieldGet$i(this, _RTCEndpoint_processAction, "f")) {
|
|
7952
7961
|
try {
|
|
7953
7962
|
const res = await __classPrivateFieldGet$i(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
|
|
7954
|
-
this.
|
|
7963
|
+
this.sendResponse(JSON.stringify({
|
|
7955
7964
|
messageId,
|
|
7956
7965
|
payload: res,
|
|
7957
7966
|
success: true
|
|
@@ -7961,7 +7970,7 @@ class RTCEndpoint {
|
|
|
7961
7970
|
// Check if RTCDataChannel is open before sending, error gets swallowed here in the case where
|
|
7962
7971
|
// client dispatched then closed or disconnected before the dispatch resolves.
|
|
7963
7972
|
if (this.rtc.channels.response.readyState === 'open') {
|
|
7964
|
-
this.
|
|
7973
|
+
this.sendResponse(JSON.stringify({
|
|
7965
7974
|
messageId,
|
|
7966
7975
|
error: errorToPOJO(error),
|
|
7967
7976
|
success: false
|
|
@@ -7971,7 +7980,7 @@ class RTCEndpoint {
|
|
|
7971
7980
|
// Check if RTCDataChannel is open for same reason as catch block above.
|
|
7972
7981
|
}
|
|
7973
7982
|
else if (this.rtc.channels.response.readyState === 'open') {
|
|
7974
|
-
this.
|
|
7983
|
+
this.sendResponse(JSON.stringify({
|
|
7975
7984
|
messageId,
|
|
7976
7985
|
success: false,
|
|
7977
7986
|
error: 'Connection not ready.'
|
|
@@ -8004,6 +8013,26 @@ class RTCEndpoint {
|
|
|
8004
8013
|
}
|
|
8005
8014
|
__classPrivateFieldSet$h(this, _RTCEndpoint_processAction, listener, "f");
|
|
8006
8015
|
}
|
|
8016
|
+
sendResponse(data) {
|
|
8017
|
+
try {
|
|
8018
|
+
this.rtc.channels.response.send(data);
|
|
8019
|
+
}
|
|
8020
|
+
catch {
|
|
8021
|
+
this.disconnectOnSendFailure();
|
|
8022
|
+
}
|
|
8023
|
+
}
|
|
8024
|
+
disconnectOnSendFailure() {
|
|
8025
|
+
// Clear onclose handlers to prevent double-firing the disconnect cascade
|
|
8026
|
+
// (closing channels below would otherwise re-trigger them).
|
|
8027
|
+
Object.values(this.rtc.channels).forEach((dc) => {
|
|
8028
|
+
dc.onclose = null;
|
|
8029
|
+
});
|
|
8030
|
+
[...this.responseMap.values()].forEach((p) => p.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
|
|
8031
|
+
this.close();
|
|
8032
|
+
if (__classPrivateFieldGet$i(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
8033
|
+
__classPrivateFieldGet$i(this, _RTCEndpoint_disconnectListener, "f").call(this);
|
|
8034
|
+
}
|
|
8035
|
+
}
|
|
8007
8036
|
get connected() {
|
|
8008
8037
|
return this.rtc.rtcClient.connectionState === 'connected';
|
|
8009
8038
|
}
|