@openfin/remote-adapter 44.101.1 → 44.101.3
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/remote-adapter.js +59 -6
- package/package.json +3 -3
package/out/remote-adapter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var esToolkit = require('es-toolkit');
|
|
4
4
|
var events = require('events');
|
|
5
5
|
var bridge = require('./bridge-5fdcb9b1.js');
|
|
6
6
|
var crypto = require('crypto');
|
|
@@ -966,7 +966,7 @@ class InteropBroker extends Base {
|
|
|
966
966
|
constructor(...unused) {
|
|
967
967
|
if (unused.length) {
|
|
968
968
|
const [_ignore1, ignore2, opts] = unused;
|
|
969
|
-
if (opts && typeof opts === 'object' && !isEqual(opts, args[2])) {
|
|
969
|
+
if (opts && typeof opts === 'object' && !esToolkit.isEqual(opts, args[2])) {
|
|
970
970
|
// eslint-disable-next-line no-console
|
|
971
971
|
console.warn('You have modified the parameters of the InteropOverride constructor. This behavior is deprecated and will be removed in a future version. You can modify these options in your manifest. Please consult our Interop docs for guidance on migrating to the new override scheme.');
|
|
972
972
|
super(args[0], args[1], opts);
|
|
@@ -7392,6 +7392,13 @@ class WebSocketTransport extends events.EventEmitter {
|
|
|
7392
7392
|
class SystemContentTracing extends Base {
|
|
7393
7393
|
/**
|
|
7394
7394
|
* Gets the currently known tracing category groups.
|
|
7395
|
+
*
|
|
7396
|
+
* @example
|
|
7397
|
+
* ```ts
|
|
7398
|
+
* const categories = await fin.System.ContentTracing.getCategories();
|
|
7399
|
+
* const sorted = [...new Set(categories)].sort((a, b) => a.localeCompare(b));
|
|
7400
|
+
* console.log(`Loaded ${sorted.length} tracing categories`);
|
|
7401
|
+
* ```
|
|
7395
7402
|
*/
|
|
7396
7403
|
async getCategories() {
|
|
7397
7404
|
const { payload } = await this.wire.sendAction('content-tracing-get-categories');
|
|
@@ -7402,6 +7409,29 @@ class SystemContentTracing extends Base {
|
|
|
7402
7409
|
*
|
|
7403
7410
|
* Only one content tracing session may be active across the runtime at a time.
|
|
7404
7411
|
* This method rejects if another identity already owns the active session.
|
|
7412
|
+
*
|
|
7413
|
+
* @example
|
|
7414
|
+
* ```ts
|
|
7415
|
+
* await fin.System.ContentTracing.startRecording({
|
|
7416
|
+
* recording_mode: 'record-as-much-as-possible',
|
|
7417
|
+
* included_categories: [
|
|
7418
|
+
* '*',
|
|
7419
|
+
* 'disabled-by-default-blink.invalidation',
|
|
7420
|
+
* 'disabled-by-default-cc.debug',
|
|
7421
|
+
* 'disabled-by-default-viz.surface_id_flow'
|
|
7422
|
+
* ]
|
|
7423
|
+
* });
|
|
7424
|
+
*
|
|
7425
|
+
* console.log('Content tracing started. Call stopRecording() when ready to collect the trace.');
|
|
7426
|
+
* ```
|
|
7427
|
+
*
|
|
7428
|
+
* @example
|
|
7429
|
+
* ```ts
|
|
7430
|
+
* await fin.System.ContentTracing.startRecording({
|
|
7431
|
+
* categoryFilter: 'electron,blink,cc',
|
|
7432
|
+
* traceOptions: 'record-until-full,enable-sampling'
|
|
7433
|
+
* });
|
|
7434
|
+
* ```
|
|
7405
7435
|
*/
|
|
7406
7436
|
async startRecording(options) {
|
|
7407
7437
|
await this.wire.sendAction('content-tracing-start-recording', { options });
|
|
@@ -7411,6 +7441,13 @@ class SystemContentTracing extends Base {
|
|
|
7411
7441
|
*
|
|
7412
7442
|
* The calling identity must match the identity that started the active tracing session.
|
|
7413
7443
|
* This method rejects if tracing is not active or is owned by another identity.
|
|
7444
|
+
*
|
|
7445
|
+
* @example
|
|
7446
|
+
* ```ts
|
|
7447
|
+
* const tracePath = await fin.System.ContentTracing.stopRecording();
|
|
7448
|
+
* console.log('Trace written to:', tracePath);
|
|
7449
|
+
* // Load the file in chrome://tracing or https://ui.perfetto.dev/
|
|
7450
|
+
* ```
|
|
7414
7451
|
*/
|
|
7415
7452
|
async stopRecording() {
|
|
7416
7453
|
const { payload } = await this.wire.sendAction('content-tracing-stop-recording');
|
|
@@ -7420,6 +7457,16 @@ class SystemContentTracing extends Base {
|
|
|
7420
7457
|
* Returns the current maximum trace buffer usage across processes.
|
|
7421
7458
|
*
|
|
7422
7459
|
* This method is not supported on macOS and rejects on that platform.
|
|
7460
|
+
*
|
|
7461
|
+
* @example
|
|
7462
|
+
* ```ts
|
|
7463
|
+
* try {
|
|
7464
|
+
* const usage = await fin.System.ContentTracing.getTraceBufferUsage();
|
|
7465
|
+
* console.log(`Buffer usage: ${usage.percentage}% (${usage.value})`);
|
|
7466
|
+
* } catch (error) {
|
|
7467
|
+
* console.warn('Trace buffer usage is not available on this platform.', error);
|
|
7468
|
+
* }
|
|
7469
|
+
* ```
|
|
7423
7470
|
*/
|
|
7424
7471
|
async getTraceBufferUsage() {
|
|
7425
7472
|
const { payload } = await this.wire.sendAction('content-tracing-get-trace-buffer-usage');
|
|
@@ -7516,13 +7563,15 @@ class System extends EmitterBase {
|
|
|
7516
7563
|
* * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
|
7517
7564
|
* * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
|
|
7518
7565
|
* * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
|
|
7566
|
+
* * windowState: clears data written for windows using `saveWindowState`; after clearing, previously saved bounds and state will not be restored until new state is written
|
|
7519
7567
|
* @example
|
|
7520
7568
|
* ```js
|
|
7521
7569
|
* const clearCacheOptions = {
|
|
7522
7570
|
* appcache: true,
|
|
7523
7571
|
* cache: true,
|
|
7524
7572
|
* cookies: true,
|
|
7525
|
-
* localStorage: true
|
|
7573
|
+
* localStorage: true,
|
|
7574
|
+
* windowState: true
|
|
7526
7575
|
* };
|
|
7527
7576
|
* fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
|
|
7528
7577
|
* ```
|
|
@@ -7551,12 +7600,16 @@ class System extends EmitterBase {
|
|
|
7551
7600
|
*
|
|
7552
7601
|
* @param options - Optional configuration for what data to clear
|
|
7553
7602
|
*
|
|
7603
|
+
* @remarks Set `windowState: true` to also clear data written for windows using `saveWindowState`.
|
|
7604
|
+
* After this data is cleared, previously saved bounds and state will not be restored until new state is written again.
|
|
7605
|
+
*
|
|
7554
7606
|
* @example
|
|
7555
7607
|
* ```js
|
|
7556
7608
|
* // Clear only cookies and localStorage for a specific origin
|
|
7557
7609
|
* await fin.System.clearCacheData({
|
|
7558
7610
|
* dataTypes: ['cookies', 'localStorage'],
|
|
7559
|
-
* origins: ['http://localhost:8081']
|
|
7611
|
+
* origins: ['http://localhost:8081'],
|
|
7612
|
+
* windowState: true
|
|
7560
7613
|
* });
|
|
7561
7614
|
*
|
|
7562
7615
|
* // Clear everything except for a specific origin
|
|
@@ -15382,7 +15435,7 @@ const createV1Channel = (sessionContextGroup) => {
|
|
|
15382
15435
|
const wrappedHandler = (context, contextMetadata) => {
|
|
15383
15436
|
if (first) {
|
|
15384
15437
|
first = false;
|
|
15385
|
-
if (isEqual(currentContext, context)) {
|
|
15438
|
+
if (esToolkit.isEqual(currentContext, context)) {
|
|
15386
15439
|
return;
|
|
15387
15440
|
}
|
|
15388
15441
|
}
|
|
@@ -15790,7 +15843,7 @@ class FDC3ModuleBase {
|
|
|
15790
15843
|
const wrappedHandler = (context, contextMetadata) => {
|
|
15791
15844
|
if (first) {
|
|
15792
15845
|
first = false;
|
|
15793
|
-
if (isEqual(currentContext, context)) {
|
|
15846
|
+
if (esToolkit.isEqual(currentContext, context)) {
|
|
15794
15847
|
return;
|
|
15795
15848
|
}
|
|
15796
15849
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/remote-adapter",
|
|
3
|
-
"version": "44.101.
|
|
3
|
+
"version": "44.101.3",
|
|
4
4
|
"description": "Establish intermachine runtime connections using webRTC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"private": false,
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"types": "./out/remote-adapter.d.ts",
|
|
15
15
|
"author": "OpenFin",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"
|
|
17
|
+
"es-toolkit": "^1.39.3",
|
|
18
18
|
"tslib": "2.8.1",
|
|
19
|
-
"@openfin/core": "44.101.
|
|
19
|
+
"@openfin/core": "44.101.3"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prebuild": "rimraf ./out",
|