@persistica/flux-agent 0.0.26 → 0.0.28

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/index.js CHANGED
@@ -265,6 +265,7 @@ var FluxRemoteClient = class {
265
265
  constructor(iceConnection) {
266
266
  this.iceConnection = iceConnection;
267
267
  }
268
+ iceConnection;
268
269
  /**
269
270
  * Calls a remote procedure on the connected client.
270
271
  */
@@ -320,6 +321,8 @@ var ICEConnection = class {
320
321
  this._fluxWebSocketClientConnection.registerMethod("acceptAnswer", this.acceptAnswer.bind(this));
321
322
  this._fluxWebSocketClientConnection.registerMethod("answerAcceptedByInitiator", this.answerAcceptedByInitiator.bind(this));
322
323
  }
324
+ _fluxWebSocketClientConnection;
325
+ _stateChange;
323
326
  //extends RPCServer<'createOffer' | 'acceptOffer' | 'acceptAnswer'> {
324
327
  peerConnection = new RTCPeerConnection(peerConnectionConfig);
325
328
  dataChannel;
@@ -408,6 +411,9 @@ var FluxAgentNetworkConnection = class {
408
411
  console.warn("\u2757WebRTC is not available in this environment.");
409
412
  }
410
413
  }
414
+ _fluxWebSocketConnection;
415
+ _fluxWebSocketClientConnection;
416
+ _webRTCStateChange;
411
417
  iceConnection;
412
418
  connectedChannelSet = /* @__PURE__ */ new Set();
413
419
  /**
@@ -491,6 +497,8 @@ var FluxNetworkChannel = class {
491
497
  this._channelName = _channelName;
492
498
  this._fluxWebSocketConnection = _fluxWebSocketConnection;
493
499
  }
500
+ _channelName;
501
+ _fluxWebSocketConnection;
494
502
  /**
495
503
  * Broadcasts a message to the channel.
496
504
  */
@@ -653,6 +661,11 @@ var FluxWebSocketConnection = class {
653
661
  );
654
662
  this.interceptPackageTypeMessages("isReady", this.readyInterceptor);
655
663
  }
664
+ fluxInstanceId;
665
+ onReconnectCallback;
666
+ stateManager;
667
+ token;
668
+ options;
656
669
  // ****************************************************************************
657
670
  // *** State
658
671
  // ****************************************************************************
@@ -1195,10 +1208,10 @@ var FluxClientData = class {
1195
1208
  var DEFAULT_FLUX_DOMAIN = "https://mesh.persistica.io";
1196
1209
  var FluxAgent = class {
1197
1210
  id = nanoid();
1211
+ networkId;
1198
1212
  fluxWebSocketConnection;
1199
1213
  fluxClientData = new FluxClientData();
1200
1214
  stateManager = new StateManager();
1201
- networkId;
1202
1215
  options;
1203
1216
  constructor(networkId, options) {
1204
1217
  if (!validateNetworkIdOrThrow(networkId)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persistica/flux-agent",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "Persistica Flux Agent",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -1,11 +1,12 @@
1
+ import { type TNetworkId_S } from '@flux/shared/types';
1
2
  import type { TMessageCallback } from '@flux/shared/ws';
2
3
  import type { FluxAgentNetworkConnection } from '@flux/shared/connection';
3
4
  export declare class FluxAgent {
4
5
  readonly id: string;
6
+ readonly networkId: TNetworkId_S;
5
7
  private fluxWebSocketConnection;
6
8
  private readonly fluxClientData;
7
9
  private readonly stateManager;
8
- private readonly networkId;
9
10
  private readonly options;
10
11
  constructor(networkId: string, options?: {
11
12
  domain?: string;
@@ -8,5 +8,5 @@ import type { FluxWebSocketConnection } from '../../../../../libs/flux/shared/co
8
8
  export declare class FluxInterface {
9
9
  private readonly socketConnection;
10
10
  constructor(socketConnection: FluxWebSocketConnection);
11
- messageReport(packageStatus: Omit<IPackageStatus, 'txNode'>): void;
11
+ messageReport(_packageStatus: Omit<IPackageStatus, 'txNode'>): void;
12
12
  }