@openfin/node-adapter 45.100.59 → 45.100.61

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var events = require('events');
4
- var isEqual = require('lodash/isEqual');
4
+ var esToolkit = require('es-toolkit');
5
5
  var fs = require('fs');
6
6
  var crypto = require('crypto');
7
7
  var _WS = require('ws');
@@ -4828,6 +4828,13 @@ class _WindowModule extends Base {
4828
4828
  class SystemContentTracing extends Base {
4829
4829
  /**
4830
4830
  * Gets the currently known tracing category groups.
4831
+ *
4832
+ * @example
4833
+ * ```ts
4834
+ * const categories = await fin.System.ContentTracing.getCategories();
4835
+ * const sorted = [...new Set(categories)].sort((a, b) => a.localeCompare(b));
4836
+ * console.log(`Loaded ${sorted.length} tracing categories`);
4837
+ * ```
4831
4838
  */
4832
4839
  async getCategories() {
4833
4840
  const { payload } = await this.wire.sendAction('content-tracing-get-categories');
@@ -4838,6 +4845,29 @@ class SystemContentTracing extends Base {
4838
4845
  *
4839
4846
  * Only one content tracing session may be active across the runtime at a time.
4840
4847
  * This method rejects if another identity already owns the active session.
4848
+ *
4849
+ * @example
4850
+ * ```ts
4851
+ * await fin.System.ContentTracing.startRecording({
4852
+ * recording_mode: 'record-as-much-as-possible',
4853
+ * included_categories: [
4854
+ * '*',
4855
+ * 'disabled-by-default-blink.invalidation',
4856
+ * 'disabled-by-default-cc.debug',
4857
+ * 'disabled-by-default-viz.surface_id_flow'
4858
+ * ]
4859
+ * });
4860
+ *
4861
+ * console.log('Content tracing started. Call stopRecording() when ready to collect the trace.');
4862
+ * ```
4863
+ *
4864
+ * @example
4865
+ * ```ts
4866
+ * await fin.System.ContentTracing.startRecording({
4867
+ * categoryFilter: 'electron,blink,cc',
4868
+ * traceOptions: 'record-until-full,enable-sampling'
4869
+ * });
4870
+ * ```
4841
4871
  */
4842
4872
  async startRecording(options) {
4843
4873
  await this.wire.sendAction('content-tracing-start-recording', { options });
@@ -4847,6 +4877,13 @@ class SystemContentTracing extends Base {
4847
4877
  *
4848
4878
  * The calling identity must match the identity that started the active tracing session.
4849
4879
  * This method rejects if tracing is not active or is owned by another identity.
4880
+ *
4881
+ * @example
4882
+ * ```ts
4883
+ * const tracePath = await fin.System.ContentTracing.stopRecording();
4884
+ * console.log('Trace written to:', tracePath);
4885
+ * // Load the file in chrome://tracing or https://ui.perfetto.dev/
4886
+ * ```
4850
4887
  */
4851
4888
  async stopRecording() {
4852
4889
  const { payload } = await this.wire.sendAction('content-tracing-stop-recording');
@@ -4856,6 +4893,16 @@ class SystemContentTracing extends Base {
4856
4893
  * Returns the current maximum trace buffer usage across processes.
4857
4894
  *
4858
4895
  * This method is not supported on macOS and rejects on that platform.
4896
+ *
4897
+ * @example
4898
+ * ```ts
4899
+ * try {
4900
+ * const usage = await fin.System.ContentTracing.getTraceBufferUsage();
4901
+ * console.log(`Buffer usage: ${usage.percentage}% (${usage.value})`);
4902
+ * } catch (error) {
4903
+ * console.warn('Trace buffer usage is not available on this platform.', error);
4904
+ * }
4905
+ * ```
4859
4906
  */
4860
4907
  async getTraceBufferUsage() {
4861
4908
  const { payload } = await this.wire.sendAction('content-tracing-get-trace-buffer-usage');
@@ -12881,7 +12928,7 @@ class InteropBroker extends Base {
12881
12928
  constructor(...unused) {
12882
12929
  if (unused.length) {
12883
12930
  const [_ignore1, ignore2, opts] = unused;
12884
- if (opts && typeof opts === 'object' && !isEqual(opts, args[2])) {
12931
+ if (opts && typeof opts === 'object' && !esToolkit.isEqual(opts, args[2])) {
12885
12932
  // eslint-disable-next-line no-console
12886
12933
  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.');
12887
12934
  super(args[0], args[1], opts);
@@ -14921,7 +14968,7 @@ const createV1Channel = (sessionContextGroup) => {
14921
14968
  const wrappedHandler = (context, contextMetadata) => {
14922
14969
  if (first) {
14923
14970
  first = false;
14924
- if (isEqual(currentContext, context)) {
14971
+ if (esToolkit.isEqual(currentContext, context)) {
14925
14972
  return;
14926
14973
  }
14927
14974
  }
@@ -15329,7 +15376,7 @@ class FDC3ModuleBase {
15329
15376
  const wrappedHandler = (context, contextMetadata) => {
15330
15377
  if (first) {
15331
15378
  first = false;
15332
- if (isEqual(currentContext, context)) {
15379
+ if (esToolkit.isEqual(currentContext, context)) {
15333
15380
  return;
15334
15381
  }
15335
15382
  }
@@ -17105,7 +17152,7 @@ class NodeEnvironment extends BaseEnvironment {
17105
17152
  };
17106
17153
  }
17107
17154
  getAdapterVersionSync() {
17108
- return "45.100.59";
17155
+ return "45.100.61";
17109
17156
  }
17110
17157
  observeBounds(element, onChange) {
17111
17158
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "45.100.59",
3
+ "version": "45.100.61",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -17,10 +17,10 @@
17
17
  "author": "OpenFin",
18
18
  "dependencies": {
19
19
  "@types/node": "^20.14.2",
20
- "lodash": "^4.17.21",
20
+ "es-toolkit": "^1.39.3",
21
21
  "ws": "^7.5.10",
22
22
  "tslib": "2.8.1",
23
- "@openfin/core": "45.100.59"
23
+ "@openfin/core": "45.100.61"
24
24
  },
25
25
  "scripts": {
26
26
  "prebuild": "rimraf ./out",