@naylence/runtime 0.3.5-test.952 → 0.3.5-test.953
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/index.cjs +52 -2
- package/dist/browser/index.mjs +52 -2
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector.browser.js +18 -0
- package/dist/cjs/naylence/fame/connector/inpage-connector.js +18 -0
- package/dist/cjs/naylence/fame/node/admission/default-node-attach-client.js +14 -0
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector.browser.js +18 -0
- package/dist/esm/naylence/fame/connector/inpage-connector.js +18 -0
- package/dist/esm/naylence/fame/node/admission/default-node-attach-client.js +14 -0
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +52 -2
- package/dist/node/index.mjs +52 -2
- package/dist/node/node.cjs +52 -2
- package/dist/node/node.mjs +52 -2
- package/dist/types/naylence/fame/connector/broadcast-channel-connector.browser.d.ts +6 -1
- package/dist/types/naylence/fame/connector/inpage-connector.d.ts +6 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/browser/index.cjs
CHANGED
|
@@ -98,12 +98,12 @@ installProcessEnvShim();
|
|
|
98
98
|
// --- END ENV SHIM ---
|
|
99
99
|
|
|
100
100
|
// This file is auto-generated during build - do not edit manually
|
|
101
|
-
// Generated from package.json version: 0.3.5-test.
|
|
101
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
102
102
|
/**
|
|
103
103
|
* The package version, injected at build time.
|
|
104
104
|
* @internal
|
|
105
105
|
*/
|
|
106
|
-
const VERSION = '0.3.5-test.
|
|
106
|
+
const VERSION = '0.3.5-test.953';
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -10381,6 +10381,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
10381
10381
|
});
|
|
10382
10382
|
}
|
|
10383
10383
|
}
|
|
10384
|
+
/**
|
|
10385
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
10386
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
10387
|
+
*/
|
|
10388
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
10389
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
10390
|
+
throw new Error('Invalid remote node ID');
|
|
10391
|
+
}
|
|
10392
|
+
const oldValue = this.remoteNodeId;
|
|
10393
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
10394
|
+
logger$_.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
10395
|
+
channel: this.channelName,
|
|
10396
|
+
connector_id: this.connectorId,
|
|
10397
|
+
local_node_id: this.localNodeId,
|
|
10398
|
+
old_remote_node_id: oldValue,
|
|
10399
|
+
new_remote_node_id: this.remoteNodeId,
|
|
10400
|
+
});
|
|
10401
|
+
}
|
|
10384
10402
|
_trimSeenAcks(now) {
|
|
10385
10403
|
while (this.seenAckOrder.length > 0) {
|
|
10386
10404
|
const candidate = this.seenAckOrder[0];
|
|
@@ -12844,6 +12862,20 @@ class DefaultNodeAttachClient {
|
|
|
12844
12862
|
if (!targetSystemId) {
|
|
12845
12863
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
12846
12864
|
}
|
|
12865
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
12866
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
12867
|
+
const updatableConnector = connector;
|
|
12868
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
12869
|
+
try {
|
|
12870
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
12871
|
+
}
|
|
12872
|
+
catch (error) {
|
|
12873
|
+
logger$W.debug('connector_remote_node_id_update_failed', {
|
|
12874
|
+
target_system_id: targetSystemId,
|
|
12875
|
+
error: error instanceof Error ? error.message : String(error),
|
|
12876
|
+
});
|
|
12877
|
+
}
|
|
12878
|
+
}
|
|
12847
12879
|
try {
|
|
12848
12880
|
if (this.replicaStickinessManager) {
|
|
12849
12881
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -20856,6 +20888,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
20856
20888
|
}
|
|
20857
20889
|
return rawOrEnvelope;
|
|
20858
20890
|
}
|
|
20891
|
+
/**
|
|
20892
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
20893
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
20894
|
+
*/
|
|
20895
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
20896
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
20897
|
+
throw new Error('Invalid remote node ID');
|
|
20898
|
+
}
|
|
20899
|
+
const oldValue = this.remoteNodeId;
|
|
20900
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
20901
|
+
logger$G.debug('inpage_connector_remote_node_id_updated', {
|
|
20902
|
+
channel: this.channelName,
|
|
20903
|
+
connector_id: this.connectorId,
|
|
20904
|
+
local_node_id: this.localNodeId,
|
|
20905
|
+
old_remote_node_id: oldValue,
|
|
20906
|
+
new_remote_node_id: this.remoteNodeId,
|
|
20907
|
+
});
|
|
20908
|
+
}
|
|
20859
20909
|
}
|
|
20860
20910
|
|
|
20861
20911
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
package/dist/browser/index.mjs
CHANGED
|
@@ -96,12 +96,12 @@ installProcessEnvShim();
|
|
|
96
96
|
// --- END ENV SHIM ---
|
|
97
97
|
|
|
98
98
|
// This file is auto-generated during build - do not edit manually
|
|
99
|
-
// Generated from package.json version: 0.3.5-test.
|
|
99
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
100
100
|
/**
|
|
101
101
|
* The package version, injected at build time.
|
|
102
102
|
* @internal
|
|
103
103
|
*/
|
|
104
|
-
const VERSION = '0.3.5-test.
|
|
104
|
+
const VERSION = '0.3.5-test.953';
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -10379,6 +10379,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
10379
10379
|
});
|
|
10380
10380
|
}
|
|
10381
10381
|
}
|
|
10382
|
+
/**
|
|
10383
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
10384
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
10385
|
+
*/
|
|
10386
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
10387
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
10388
|
+
throw new Error('Invalid remote node ID');
|
|
10389
|
+
}
|
|
10390
|
+
const oldValue = this.remoteNodeId;
|
|
10391
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
10392
|
+
logger$_.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
10393
|
+
channel: this.channelName,
|
|
10394
|
+
connector_id: this.connectorId,
|
|
10395
|
+
local_node_id: this.localNodeId,
|
|
10396
|
+
old_remote_node_id: oldValue,
|
|
10397
|
+
new_remote_node_id: this.remoteNodeId,
|
|
10398
|
+
});
|
|
10399
|
+
}
|
|
10382
10400
|
_trimSeenAcks(now) {
|
|
10383
10401
|
while (this.seenAckOrder.length > 0) {
|
|
10384
10402
|
const candidate = this.seenAckOrder[0];
|
|
@@ -12842,6 +12860,20 @@ class DefaultNodeAttachClient {
|
|
|
12842
12860
|
if (!targetSystemId) {
|
|
12843
12861
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
12844
12862
|
}
|
|
12863
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
12864
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
12865
|
+
const updatableConnector = connector;
|
|
12866
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
12867
|
+
try {
|
|
12868
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
12869
|
+
}
|
|
12870
|
+
catch (error) {
|
|
12871
|
+
logger$W.debug('connector_remote_node_id_update_failed', {
|
|
12872
|
+
target_system_id: targetSystemId,
|
|
12873
|
+
error: error instanceof Error ? error.message : String(error),
|
|
12874
|
+
});
|
|
12875
|
+
}
|
|
12876
|
+
}
|
|
12845
12877
|
try {
|
|
12846
12878
|
if (this.replicaStickinessManager) {
|
|
12847
12879
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -20854,6 +20886,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
20854
20886
|
}
|
|
20855
20887
|
return rawOrEnvelope;
|
|
20856
20888
|
}
|
|
20889
|
+
/**
|
|
20890
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
20891
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
20892
|
+
*/
|
|
20893
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
20894
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
20895
|
+
throw new Error('Invalid remote node ID');
|
|
20896
|
+
}
|
|
20897
|
+
const oldValue = this.remoteNodeId;
|
|
20898
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
20899
|
+
logger$G.debug('inpage_connector_remote_node_id_updated', {
|
|
20900
|
+
channel: this.channelName,
|
|
20901
|
+
connector_id: this.connectorId,
|
|
20902
|
+
local_node_id: this.localNodeId,
|
|
20903
|
+
old_remote_node_id: oldValue,
|
|
20904
|
+
new_remote_node_id: this.remoteNodeId,
|
|
20905
|
+
});
|
|
20906
|
+
}
|
|
20857
20907
|
}
|
|
20858
20908
|
|
|
20859
20909
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
|
@@ -492,6 +492,24 @@ class BroadcastChannelConnector extends base_async_connector_js_1.BaseAsyncConne
|
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
497
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
498
|
+
*/
|
|
499
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
500
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
501
|
+
throw new Error('Invalid remote node ID');
|
|
502
|
+
}
|
|
503
|
+
const oldValue = this.remoteNodeId;
|
|
504
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
505
|
+
logger.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
506
|
+
channel: this.channelName,
|
|
507
|
+
connector_id: this.connectorId,
|
|
508
|
+
local_node_id: this.localNodeId,
|
|
509
|
+
old_remote_node_id: oldValue,
|
|
510
|
+
new_remote_node_id: this.remoteNodeId,
|
|
511
|
+
});
|
|
512
|
+
}
|
|
495
513
|
_trimSeenAcks(now) {
|
|
496
514
|
while (this.seenAckOrder.length > 0) {
|
|
497
515
|
const candidate = this.seenAckOrder[0];
|
|
@@ -393,5 +393,23 @@ class InPageConnector extends base_async_connector_js_1.BaseAsyncConnector {
|
|
|
393
393
|
}
|
|
394
394
|
return rawOrEnvelope;
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
398
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
399
|
+
*/
|
|
400
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
401
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
402
|
+
throw new Error('Invalid remote node ID');
|
|
403
|
+
}
|
|
404
|
+
const oldValue = this.remoteNodeId;
|
|
405
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
406
|
+
logger.debug('inpage_connector_remote_node_id_updated', {
|
|
407
|
+
channel: this.channelName,
|
|
408
|
+
connector_id: this.connectorId,
|
|
409
|
+
local_node_id: this.localNodeId,
|
|
410
|
+
old_remote_node_id: oldValue,
|
|
411
|
+
new_remote_node_id: this.remoteNodeId,
|
|
412
|
+
});
|
|
413
|
+
}
|
|
396
414
|
}
|
|
397
415
|
exports.InPageConnector = InPageConnector;
|
|
@@ -166,6 +166,20 @@ class DefaultNodeAttachClient {
|
|
|
166
166
|
if (!targetSystemId) {
|
|
167
167
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
168
168
|
}
|
|
169
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
170
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
171
|
+
const updatableConnector = connector;
|
|
172
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
173
|
+
try {
|
|
174
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
logger.debug('connector_remote_node_id_update_failed', {
|
|
178
|
+
target_system_id: targetSystemId,
|
|
179
|
+
error: error instanceof Error ? error.message : String(error),
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
169
183
|
try {
|
|
170
184
|
if (this.replicaStickinessManager) {
|
|
171
185
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated during build - do not edit manually
|
|
3
|
-
// Generated from package.json version: 0.3.5-test.
|
|
3
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.VERSION = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* The package version, injected at build time.
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
exports.VERSION = '0.3.5-test.
|
|
10
|
+
exports.VERSION = '0.3.5-test.953';
|
|
@@ -489,6 +489,24 @@ export class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
494
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
495
|
+
*/
|
|
496
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
497
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
498
|
+
throw new Error('Invalid remote node ID');
|
|
499
|
+
}
|
|
500
|
+
const oldValue = this.remoteNodeId;
|
|
501
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
502
|
+
logger.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
503
|
+
channel: this.channelName,
|
|
504
|
+
connector_id: this.connectorId,
|
|
505
|
+
local_node_id: this.localNodeId,
|
|
506
|
+
old_remote_node_id: oldValue,
|
|
507
|
+
new_remote_node_id: this.remoteNodeId,
|
|
508
|
+
});
|
|
509
|
+
}
|
|
492
510
|
_trimSeenAcks(now) {
|
|
493
511
|
while (this.seenAckOrder.length > 0) {
|
|
494
512
|
const candidate = this.seenAckOrder[0];
|
|
@@ -390,4 +390,22 @@ export class InPageConnector extends BaseAsyncConnector {
|
|
|
390
390
|
}
|
|
391
391
|
return rawOrEnvelope;
|
|
392
392
|
}
|
|
393
|
+
/**
|
|
394
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
395
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
396
|
+
*/
|
|
397
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
398
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
399
|
+
throw new Error('Invalid remote node ID');
|
|
400
|
+
}
|
|
401
|
+
const oldValue = this.remoteNodeId;
|
|
402
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
403
|
+
logger.debug('inpage_connector_remote_node_id_updated', {
|
|
404
|
+
channel: this.channelName,
|
|
405
|
+
connector_id: this.connectorId,
|
|
406
|
+
local_node_id: this.localNodeId,
|
|
407
|
+
old_remote_node_id: oldValue,
|
|
408
|
+
new_remote_node_id: this.remoteNodeId,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
393
411
|
}
|
|
@@ -163,6 +163,20 @@ export class DefaultNodeAttachClient {
|
|
|
163
163
|
if (!targetSystemId) {
|
|
164
164
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
165
165
|
}
|
|
166
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
167
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
168
|
+
const updatableConnector = connector;
|
|
169
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
170
|
+
try {
|
|
171
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
logger.debug('connector_remote_node_id_update_failed', {
|
|
175
|
+
target_system_id: targetSystemId,
|
|
176
|
+
error: error instanceof Error ? error.message : String(error),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
166
180
|
try {
|
|
167
181
|
if (this.replicaStickinessManager) {
|
|
168
182
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
package/dist/esm/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated during build - do not edit manually
|
|
2
|
-
// Generated from package.json version: 0.3.5-test.
|
|
2
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
3
3
|
/**
|
|
4
4
|
* The package version, injected at build time.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.3.5-test.
|
|
7
|
+
export const VERSION = '0.3.5-test.953';
|
package/dist/node/index.cjs
CHANGED
|
@@ -14,12 +14,12 @@ var fastify = require('fastify');
|
|
|
14
14
|
var websocketPlugin = require('@fastify/websocket');
|
|
15
15
|
|
|
16
16
|
// This file is auto-generated during build - do not edit manually
|
|
17
|
-
// Generated from package.json version: 0.3.5-test.
|
|
17
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
18
18
|
/**
|
|
19
19
|
* The package version, injected at build time.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = '0.3.5-test.
|
|
22
|
+
const VERSION = '0.3.5-test.953';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -10297,6 +10297,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
10297
10297
|
});
|
|
10298
10298
|
}
|
|
10299
10299
|
}
|
|
10300
|
+
/**
|
|
10301
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
10302
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
10303
|
+
*/
|
|
10304
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
10305
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
10306
|
+
throw new Error('Invalid remote node ID');
|
|
10307
|
+
}
|
|
10308
|
+
const oldValue = this.remoteNodeId;
|
|
10309
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
10310
|
+
logger$_.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
10311
|
+
channel: this.channelName,
|
|
10312
|
+
connector_id: this.connectorId,
|
|
10313
|
+
local_node_id: this.localNodeId,
|
|
10314
|
+
old_remote_node_id: oldValue,
|
|
10315
|
+
new_remote_node_id: this.remoteNodeId,
|
|
10316
|
+
});
|
|
10317
|
+
}
|
|
10300
10318
|
_trimSeenAcks(now) {
|
|
10301
10319
|
while (this.seenAckOrder.length > 0) {
|
|
10302
10320
|
const candidate = this.seenAckOrder[0];
|
|
@@ -12760,6 +12778,20 @@ class DefaultNodeAttachClient {
|
|
|
12760
12778
|
if (!targetSystemId) {
|
|
12761
12779
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
12762
12780
|
}
|
|
12781
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
12782
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
12783
|
+
const updatableConnector = connector;
|
|
12784
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
12785
|
+
try {
|
|
12786
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
12787
|
+
}
|
|
12788
|
+
catch (error) {
|
|
12789
|
+
logger$W.debug('connector_remote_node_id_update_failed', {
|
|
12790
|
+
target_system_id: targetSystemId,
|
|
12791
|
+
error: error instanceof Error ? error.message : String(error),
|
|
12792
|
+
});
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12763
12795
|
try {
|
|
12764
12796
|
if (this.replicaStickinessManager) {
|
|
12765
12797
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -20772,6 +20804,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
20772
20804
|
}
|
|
20773
20805
|
return rawOrEnvelope;
|
|
20774
20806
|
}
|
|
20807
|
+
/**
|
|
20808
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
20809
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
20810
|
+
*/
|
|
20811
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
20812
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
20813
|
+
throw new Error('Invalid remote node ID');
|
|
20814
|
+
}
|
|
20815
|
+
const oldValue = this.remoteNodeId;
|
|
20816
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
20817
|
+
logger$G.debug('inpage_connector_remote_node_id_updated', {
|
|
20818
|
+
channel: this.channelName,
|
|
20819
|
+
connector_id: this.connectorId,
|
|
20820
|
+
local_node_id: this.localNodeId,
|
|
20821
|
+
old_remote_node_id: oldValue,
|
|
20822
|
+
new_remote_node_id: this.remoteNodeId,
|
|
20823
|
+
});
|
|
20824
|
+
}
|
|
20775
20825
|
}
|
|
20776
20826
|
|
|
20777
20827
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
package/dist/node/index.mjs
CHANGED
|
@@ -13,12 +13,12 @@ import fastify from 'fastify';
|
|
|
13
13
|
import websocketPlugin from '@fastify/websocket';
|
|
14
14
|
|
|
15
15
|
// This file is auto-generated during build - do not edit manually
|
|
16
|
-
// Generated from package.json version: 0.3.5-test.
|
|
16
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
17
17
|
/**
|
|
18
18
|
* The package version, injected at build time.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
const VERSION = '0.3.5-test.
|
|
21
|
+
const VERSION = '0.3.5-test.953';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -10296,6 +10296,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
10296
10296
|
});
|
|
10297
10297
|
}
|
|
10298
10298
|
}
|
|
10299
|
+
/**
|
|
10300
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
10301
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
10302
|
+
*/
|
|
10303
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
10304
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
10305
|
+
throw new Error('Invalid remote node ID');
|
|
10306
|
+
}
|
|
10307
|
+
const oldValue = this.remoteNodeId;
|
|
10308
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
10309
|
+
logger$_.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
10310
|
+
channel: this.channelName,
|
|
10311
|
+
connector_id: this.connectorId,
|
|
10312
|
+
local_node_id: this.localNodeId,
|
|
10313
|
+
old_remote_node_id: oldValue,
|
|
10314
|
+
new_remote_node_id: this.remoteNodeId,
|
|
10315
|
+
});
|
|
10316
|
+
}
|
|
10299
10317
|
_trimSeenAcks(now) {
|
|
10300
10318
|
while (this.seenAckOrder.length > 0) {
|
|
10301
10319
|
const candidate = this.seenAckOrder[0];
|
|
@@ -12759,6 +12777,20 @@ class DefaultNodeAttachClient {
|
|
|
12759
12777
|
if (!targetSystemId) {
|
|
12760
12778
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
12761
12779
|
}
|
|
12780
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
12781
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
12782
|
+
const updatableConnector = connector;
|
|
12783
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
12784
|
+
try {
|
|
12785
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
12786
|
+
}
|
|
12787
|
+
catch (error) {
|
|
12788
|
+
logger$W.debug('connector_remote_node_id_update_failed', {
|
|
12789
|
+
target_system_id: targetSystemId,
|
|
12790
|
+
error: error instanceof Error ? error.message : String(error),
|
|
12791
|
+
});
|
|
12792
|
+
}
|
|
12793
|
+
}
|
|
12762
12794
|
try {
|
|
12763
12795
|
if (this.replicaStickinessManager) {
|
|
12764
12796
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -20771,6 +20803,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
20771
20803
|
}
|
|
20772
20804
|
return rawOrEnvelope;
|
|
20773
20805
|
}
|
|
20806
|
+
/**
|
|
20807
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
20808
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
20809
|
+
*/
|
|
20810
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
20811
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
20812
|
+
throw new Error('Invalid remote node ID');
|
|
20813
|
+
}
|
|
20814
|
+
const oldValue = this.remoteNodeId;
|
|
20815
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
20816
|
+
logger$G.debug('inpage_connector_remote_node_id_updated', {
|
|
20817
|
+
channel: this.channelName,
|
|
20818
|
+
connector_id: this.connectorId,
|
|
20819
|
+
local_node_id: this.localNodeId,
|
|
20820
|
+
old_remote_node_id: oldValue,
|
|
20821
|
+
new_remote_node_id: this.remoteNodeId,
|
|
20822
|
+
});
|
|
20823
|
+
}
|
|
20774
20824
|
}
|
|
20775
20825
|
|
|
20776
20826
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
package/dist/node/node.cjs
CHANGED
|
@@ -5478,12 +5478,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
|
|
|
5478
5478
|
}
|
|
5479
5479
|
|
|
5480
5480
|
// This file is auto-generated during build - do not edit manually
|
|
5481
|
-
// Generated from package.json version: 0.3.5-test.
|
|
5481
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
5482
5482
|
/**
|
|
5483
5483
|
* The package version, injected at build time.
|
|
5484
5484
|
* @internal
|
|
5485
5485
|
*/
|
|
5486
|
-
const VERSION = '0.3.5-test.
|
|
5486
|
+
const VERSION = '0.3.5-test.953';
|
|
5487
5487
|
|
|
5488
5488
|
/**
|
|
5489
5489
|
* Fame errors module - Fame protocol specific error classes
|
|
@@ -12050,6 +12050,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
12050
12050
|
});
|
|
12051
12051
|
}
|
|
12052
12052
|
}
|
|
12053
|
+
/**
|
|
12054
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
12055
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
12056
|
+
*/
|
|
12057
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
12058
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
12059
|
+
throw new Error('Invalid remote node ID');
|
|
12060
|
+
}
|
|
12061
|
+
const oldValue = this.remoteNodeId;
|
|
12062
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
12063
|
+
logger$10.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
12064
|
+
channel: this.channelName,
|
|
12065
|
+
connector_id: this.connectorId,
|
|
12066
|
+
local_node_id: this.localNodeId,
|
|
12067
|
+
old_remote_node_id: oldValue,
|
|
12068
|
+
new_remote_node_id: this.remoteNodeId,
|
|
12069
|
+
});
|
|
12070
|
+
}
|
|
12053
12071
|
_trimSeenAcks(now) {
|
|
12054
12072
|
while (this.seenAckOrder.length > 0) {
|
|
12055
12073
|
const candidate = this.seenAckOrder[0];
|
|
@@ -14468,6 +14486,20 @@ class DefaultNodeAttachClient {
|
|
|
14468
14486
|
if (!targetSystemId) {
|
|
14469
14487
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
14470
14488
|
}
|
|
14489
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
14490
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
14491
|
+
const updatableConnector = connector;
|
|
14492
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
14493
|
+
try {
|
|
14494
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
14495
|
+
}
|
|
14496
|
+
catch (error) {
|
|
14497
|
+
logger$Y.debug('connector_remote_node_id_update_failed', {
|
|
14498
|
+
target_system_id: targetSystemId,
|
|
14499
|
+
error: error instanceof Error ? error.message : String(error),
|
|
14500
|
+
});
|
|
14501
|
+
}
|
|
14502
|
+
}
|
|
14471
14503
|
try {
|
|
14472
14504
|
if (this.replicaStickinessManager) {
|
|
14473
14505
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -21966,6 +21998,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
21966
21998
|
}
|
|
21967
21999
|
return rawOrEnvelope;
|
|
21968
22000
|
}
|
|
22001
|
+
/**
|
|
22002
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
22003
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
22004
|
+
*/
|
|
22005
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
22006
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
22007
|
+
throw new Error('Invalid remote node ID');
|
|
22008
|
+
}
|
|
22009
|
+
const oldValue = this.remoteNodeId;
|
|
22010
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
22011
|
+
logger$J.debug('inpage_connector_remote_node_id_updated', {
|
|
22012
|
+
channel: this.channelName,
|
|
22013
|
+
connector_id: this.connectorId,
|
|
22014
|
+
local_node_id: this.localNodeId,
|
|
22015
|
+
old_remote_node_id: oldValue,
|
|
22016
|
+
new_remote_node_id: this.remoteNodeId,
|
|
22017
|
+
});
|
|
22018
|
+
}
|
|
21969
22019
|
}
|
|
21970
22020
|
|
|
21971
22021
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
package/dist/node/node.mjs
CHANGED
|
@@ -5477,12 +5477,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
|
|
|
5477
5477
|
}
|
|
5478
5478
|
|
|
5479
5479
|
// This file is auto-generated during build - do not edit manually
|
|
5480
|
-
// Generated from package.json version: 0.3.5-test.
|
|
5480
|
+
// Generated from package.json version: 0.3.5-test.953
|
|
5481
5481
|
/**
|
|
5482
5482
|
* The package version, injected at build time.
|
|
5483
5483
|
* @internal
|
|
5484
5484
|
*/
|
|
5485
|
-
const VERSION = '0.3.5-test.
|
|
5485
|
+
const VERSION = '0.3.5-test.953';
|
|
5486
5486
|
|
|
5487
5487
|
/**
|
|
5488
5488
|
* Fame errors module - Fame protocol specific error classes
|
|
@@ -12049,6 +12049,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
|
|
|
12049
12049
|
});
|
|
12050
12050
|
}
|
|
12051
12051
|
}
|
|
12052
|
+
/**
|
|
12053
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
12054
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
12055
|
+
*/
|
|
12056
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
12057
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
12058
|
+
throw new Error('Invalid remote node ID');
|
|
12059
|
+
}
|
|
12060
|
+
const oldValue = this.remoteNodeId;
|
|
12061
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
12062
|
+
logger$10.debug('broadcast_channel_connector_remote_node_id_updated', {
|
|
12063
|
+
channel: this.channelName,
|
|
12064
|
+
connector_id: this.connectorId,
|
|
12065
|
+
local_node_id: this.localNodeId,
|
|
12066
|
+
old_remote_node_id: oldValue,
|
|
12067
|
+
new_remote_node_id: this.remoteNodeId,
|
|
12068
|
+
});
|
|
12069
|
+
}
|
|
12052
12070
|
_trimSeenAcks(now) {
|
|
12053
12071
|
while (this.seenAckOrder.length > 0) {
|
|
12054
12072
|
const candidate = this.seenAckOrder[0];
|
|
@@ -14467,6 +14485,20 @@ class DefaultNodeAttachClient {
|
|
|
14467
14485
|
if (!targetSystemId) {
|
|
14468
14486
|
throw new Error('Target system ID must be set in NodeAttachAckFrame on success');
|
|
14469
14487
|
}
|
|
14488
|
+
// Update connector's remote node ID if it supports it (e.g., BroadcastChannelConnector, InPageConnector)
|
|
14489
|
+
// This allows upstream connectors to switch from wildcard '*' to specific node addressing
|
|
14490
|
+
const updatableConnector = connector;
|
|
14491
|
+
if (typeof updatableConnector.updateRemoteNodeId === 'function') {
|
|
14492
|
+
try {
|
|
14493
|
+
updatableConnector.updateRemoteNodeId(targetSystemId);
|
|
14494
|
+
}
|
|
14495
|
+
catch (error) {
|
|
14496
|
+
logger$Y.debug('connector_remote_node_id_update_failed', {
|
|
14497
|
+
target_system_id: targetSystemId,
|
|
14498
|
+
error: error instanceof Error ? error.message : String(error),
|
|
14499
|
+
});
|
|
14500
|
+
}
|
|
14501
|
+
}
|
|
14470
14502
|
try {
|
|
14471
14503
|
if (this.replicaStickinessManager) {
|
|
14472
14504
|
this.replicaStickinessManager.accept(ackFrame.stickiness ?? null);
|
|
@@ -21965,6 +21997,24 @@ class InPageConnector extends BaseAsyncConnector {
|
|
|
21965
21997
|
}
|
|
21966
21998
|
return rawOrEnvelope;
|
|
21967
21999
|
}
|
|
22000
|
+
/**
|
|
22001
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
22002
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
22003
|
+
*/
|
|
22004
|
+
updateRemoteNodeId(newRemoteNodeId) {
|
|
22005
|
+
if (typeof newRemoteNodeId !== 'string' || newRemoteNodeId.trim().length === 0) {
|
|
22006
|
+
throw new Error('Invalid remote node ID');
|
|
22007
|
+
}
|
|
22008
|
+
const oldValue = this.remoteNodeId;
|
|
22009
|
+
this.remoteNodeId = newRemoteNodeId.trim();
|
|
22010
|
+
logger$J.debug('inpage_connector_remote_node_id_updated', {
|
|
22011
|
+
channel: this.channelName,
|
|
22012
|
+
connector_id: this.connectorId,
|
|
22013
|
+
local_node_id: this.localNodeId,
|
|
22014
|
+
old_remote_node_id: oldValue,
|
|
22015
|
+
new_remote_node_id: this.remoteNodeId,
|
|
22016
|
+
});
|
|
22017
|
+
}
|
|
21968
22018
|
}
|
|
21969
22019
|
|
|
21970
22020
|
const RPC_REGISTRY = Symbol('naylence.rpc.registry');
|
|
@@ -25,7 +25,7 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
25
25
|
private visibilityChangeListenerRegistered;
|
|
26
26
|
private visibilityChangeHandler?;
|
|
27
27
|
private readonly localNodeId;
|
|
28
|
-
private
|
|
28
|
+
private remoteNodeId;
|
|
29
29
|
private static generateConnectorId;
|
|
30
30
|
private static coercePayload;
|
|
31
31
|
constructor(config: BroadcastChannelConnectorConfig, baseConfig?: BaseAsyncConnectorConfig);
|
|
@@ -43,6 +43,11 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
43
43
|
* Override start() to check initial visibility state
|
|
44
44
|
*/
|
|
45
45
|
start(inboundHandler: FameEnvelopeHandler): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
48
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
49
|
+
*/
|
|
50
|
+
updateRemoteNodeId(newRemoteNodeId: string): void;
|
|
46
51
|
private _trimSeenAcks;
|
|
47
52
|
private _extractAckDedupKey;
|
|
48
53
|
}
|
|
@@ -23,7 +23,7 @@ export declare class InPageConnector extends BaseAsyncConnector {
|
|
|
23
23
|
private visibilityChangeListenerRegistered;
|
|
24
24
|
private visibilityChangeHandler?;
|
|
25
25
|
private readonly localNodeId;
|
|
26
|
-
private
|
|
26
|
+
private remoteNodeId;
|
|
27
27
|
private static generateConnectorId;
|
|
28
28
|
private static coercePayload;
|
|
29
29
|
constructor(config: InPageConnectorConfig, baseConfig?: BaseAsyncConnectorConfig);
|
|
@@ -36,5 +36,10 @@ export declare class InPageConnector extends BaseAsyncConnector {
|
|
|
36
36
|
protected _transportReceive(): Promise<InPageInboxItem>;
|
|
37
37
|
protected _transportClose(code: number, reason: string): Promise<void>;
|
|
38
38
|
private _normalizeInboxItem;
|
|
39
|
+
/**
|
|
40
|
+
* Update the remote node ID after learning it from NodeAttachAck
|
|
41
|
+
* This allows upstream connectors to switch from wildcard to specific addressing
|
|
42
|
+
*/
|
|
43
|
+
updateRemoteNodeId(newRemoteNodeId: string): void;
|
|
39
44
|
}
|
|
40
45
|
export {};
|
package/dist/types/version.d.ts
CHANGED