@naylence/agent-sdk 0.3.5-test.103 → 0.3.6
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.js +98 -61
- package/dist/browser/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/esm/version.js.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -15606,7 +15606,8 @@
|
|
|
15606
15606
|
if (g.__ENV__ && typeof g.__ENV__ === 'object')
|
|
15607
15607
|
Object.assign(out, g.__ENV__);
|
|
15608
15608
|
try {
|
|
15609
|
-
//
|
|
15609
|
+
// import.meta is only available in ESM builds
|
|
15610
|
+
// @ts-ignore
|
|
15610
15611
|
const ie = (typeof ({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)) }) !== 'undefined' && undefined) || undefined;
|
|
15611
15612
|
if (ie && typeof ie === 'object')
|
|
15612
15613
|
Object.assign(out, ie);
|
|
@@ -15674,12 +15675,12 @@
|
|
|
15674
15675
|
// --- END ENV SHIM ---
|
|
15675
15676
|
|
|
15676
15677
|
// This file is auto-generated during build - do not edit manually
|
|
15677
|
-
// Generated from package.json version: 0.3.
|
|
15678
|
+
// Generated from package.json version: 0.3.7
|
|
15678
15679
|
/**
|
|
15679
15680
|
* The package version, injected at build time.
|
|
15680
15681
|
* @internal
|
|
15681
15682
|
*/
|
|
15682
|
-
const VERSION$1 = '0.3.
|
|
15683
|
+
const VERSION$1 = '0.3.7';
|
|
15683
15684
|
|
|
15684
15685
|
/**
|
|
15685
15686
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -24515,7 +24516,8 @@
|
|
|
24515
24516
|
};
|
|
24516
24517
|
let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
24517
24518
|
static generateConnectorId() {
|
|
24518
|
-
const globalCrypto = globalThis
|
|
24519
|
+
const globalCrypto = globalThis
|
|
24520
|
+
.crypto;
|
|
24519
24521
|
if (globalCrypto?.randomUUID) {
|
|
24520
24522
|
return globalCrypto.randomUUID();
|
|
24521
24523
|
}
|
|
@@ -24570,7 +24572,8 @@
|
|
|
24570
24572
|
this.listenerRegistered = false;
|
|
24571
24573
|
this.visibilityChangeListenerRegistered = false;
|
|
24572
24574
|
this.channelName =
|
|
24573
|
-
typeof config.channelName === 'string' &&
|
|
24575
|
+
typeof config.channelName === 'string' &&
|
|
24576
|
+
config.channelName.trim().length > 0
|
|
24574
24577
|
? config.channelName.trim()
|
|
24575
24578
|
: DEFAULT_CHANNEL$7;
|
|
24576
24579
|
const preferredCapacity = typeof config.inboxCapacity === 'number' &&
|
|
@@ -24612,7 +24615,8 @@
|
|
|
24612
24615
|
channel: this.channelName,
|
|
24613
24616
|
connector_id: this.connectorId,
|
|
24614
24617
|
message_type: message && typeof message === 'object'
|
|
24615
|
-
? message.constructor
|
|
24618
|
+
? (message.constructor
|
|
24619
|
+
?.name ?? typeof message)
|
|
24616
24620
|
: typeof message,
|
|
24617
24621
|
has_sender_id: Boolean(message?.senderId),
|
|
24618
24622
|
has_sender_node_id: Boolean(message?.senderNodeId),
|
|
@@ -24842,7 +24846,9 @@
|
|
|
24842
24846
|
timestamp: new Date().toISOString(),
|
|
24843
24847
|
});
|
|
24844
24848
|
}
|
|
24845
|
-
if (this.visibilityChangeListenerRegistered &&
|
|
24849
|
+
if (this.visibilityChangeListenerRegistered &&
|
|
24850
|
+
this.visibilityChangeHandler &&
|
|
24851
|
+
typeof document !== 'undefined') {
|
|
24846
24852
|
document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
|
|
24847
24853
|
this.visibilityChangeListenerRegistered = false;
|
|
24848
24854
|
this.visibilityChangeHandler = undefined;
|
|
@@ -24870,7 +24876,7 @@
|
|
|
24870
24876
|
return rawOrEnvelope;
|
|
24871
24877
|
}
|
|
24872
24878
|
_isWildcardTarget() {
|
|
24873
|
-
return this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined';
|
|
24879
|
+
return (this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined');
|
|
24874
24880
|
}
|
|
24875
24881
|
_shouldAcceptMessageFromBus(senderNodeId, targetNodeId) {
|
|
24876
24882
|
if (this._isWildcardTarget()) {
|
|
@@ -24890,7 +24896,9 @@
|
|
|
24890
24896
|
return true;
|
|
24891
24897
|
}
|
|
24892
24898
|
const expectedSender = this.targetNodeId;
|
|
24893
|
-
if (expectedSender &&
|
|
24899
|
+
if (expectedSender &&
|
|
24900
|
+
expectedSender !== '*' &&
|
|
24901
|
+
senderNodeId !== expectedSender) {
|
|
24894
24902
|
logger$_.debug('broadcast_channel_message_rejected', {
|
|
24895
24903
|
channel: this.channelName,
|
|
24896
24904
|
connector_id: this.connectorId,
|
|
@@ -25082,14 +25090,16 @@
|
|
|
25082
25090
|
type,
|
|
25083
25091
|
purpose,
|
|
25084
25092
|
};
|
|
25085
|
-
const channelValue = candidate.channelName ??
|
|
25093
|
+
const channelValue = candidate.channelName ??
|
|
25094
|
+
candidate['channel_name'];
|
|
25086
25095
|
if (channelValue !== undefined) {
|
|
25087
25096
|
if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
|
|
25088
25097
|
throw new TypeError('BroadcastChannelConnectionGrant "channelName" must be a non-empty string when provided');
|
|
25089
25098
|
}
|
|
25090
25099
|
result.channelName = channelValue.trim();
|
|
25091
25100
|
}
|
|
25092
|
-
const inboxValue = candidate.inboxCapacity ??
|
|
25101
|
+
const inboxValue = candidate.inboxCapacity ??
|
|
25102
|
+
candidate['inbox_capacity'];
|
|
25093
25103
|
if (inboxValue !== undefined) {
|
|
25094
25104
|
if (typeof inboxValue !== 'number' ||
|
|
25095
25105
|
!Number.isFinite(inboxValue) ||
|
|
@@ -25098,7 +25108,8 @@
|
|
|
25098
25108
|
}
|
|
25099
25109
|
result.inboxCapacity = Math.floor(inboxValue);
|
|
25100
25110
|
}
|
|
25101
|
-
const windowValue = candidate.initialWindow ??
|
|
25111
|
+
const windowValue = candidate.initialWindow ??
|
|
25112
|
+
candidate['initial_window'];
|
|
25102
25113
|
if (windowValue !== undefined) {
|
|
25103
25114
|
if (typeof windowValue !== 'number' ||
|
|
25104
25115
|
!Number.isFinite(windowValue) ||
|
|
@@ -25437,7 +25448,7 @@
|
|
|
25437
25448
|
const callbackGrants = this.node.gatherSupportedCallbackGrants();
|
|
25438
25449
|
logger$Z.debug('callback_grants_before_augmentation', {
|
|
25439
25450
|
count: callbackGrants.length,
|
|
25440
|
-
types: callbackGrants.map(g => g.type),
|
|
25451
|
+
types: callbackGrants.map((g) => g.type),
|
|
25441
25452
|
});
|
|
25442
25453
|
// Check if we should create a broadcast callback grant before processing connection grants
|
|
25443
25454
|
// This prevents adding duplicate broadcast grants
|
|
@@ -25451,11 +25462,12 @@
|
|
|
25451
25462
|
});
|
|
25452
25463
|
// Include admission client's connection grants as callback grants
|
|
25453
25464
|
// This ensures DirectAdmissionClient grants are available for grant selection
|
|
25454
|
-
if (welcome.frame.connectionGrants &&
|
|
25465
|
+
if (welcome.frame.connectionGrants &&
|
|
25466
|
+
Array.isArray(welcome.frame.connectionGrants)) {
|
|
25455
25467
|
for (const grant of welcome.frame.connectionGrants) {
|
|
25456
25468
|
if (grant && typeof grant === 'object') {
|
|
25457
25469
|
// Avoid duplicates by checking if grant already exists
|
|
25458
|
-
const isDuplicate = callbackGrants.some(existing => JSON.stringify(existing) === JSON.stringify(grant));
|
|
25470
|
+
const isDuplicate = callbackGrants.some((existing) => JSON.stringify(existing) === JSON.stringify(grant));
|
|
25459
25471
|
if (!isDuplicate) {
|
|
25460
25472
|
callbackGrants.push(grant);
|
|
25461
25473
|
logger$Z.debug('added_connection_grant_as_callback', {
|
|
@@ -25472,7 +25484,8 @@
|
|
|
25472
25484
|
}
|
|
25473
25485
|
// Add broadcast grant after connection grants to ensure we don't duplicate
|
|
25474
25486
|
// any broadcast grants that may have been in connectionGrants
|
|
25475
|
-
if (broadcastCallbackGrant &&
|
|
25487
|
+
if (broadcastCallbackGrant &&
|
|
25488
|
+
this.shouldAdvertiseBroadcastGrant(grant, callbackGrants)) {
|
|
25476
25489
|
callbackGrants.push(broadcastCallbackGrant);
|
|
25477
25490
|
logger$Z.debug('added_broadcast_callback_grant');
|
|
25478
25491
|
}
|
|
@@ -25481,7 +25494,7 @@
|
|
|
25481
25494
|
}
|
|
25482
25495
|
logger$Z.debug('callback_grants_after_augmentation', {
|
|
25483
25496
|
count: callbackGrants.length,
|
|
25484
|
-
types: callbackGrants.map(g => g.type),
|
|
25497
|
+
types: callbackGrants.map((g) => g.type),
|
|
25485
25498
|
});
|
|
25486
25499
|
const attachInfo = await this.attachClient.attach(this.node, this.outboundOriginType, connector, welcome.frame, this.wrappedHandler, this.getKeys() ?? undefined, callbackGrants);
|
|
25487
25500
|
this.targetSystemId = attachInfo.targetSystemId ?? null;
|
|
@@ -25723,7 +25736,8 @@
|
|
|
25723
25736
|
continue;
|
|
25724
25737
|
}
|
|
25725
25738
|
// Reset ack time if just resumed from pause (prevents immediate timeout)
|
|
25726
|
-
if (previousState === ConnectorState.PAUSED &&
|
|
25739
|
+
if (previousState === ConnectorState.PAUSED &&
|
|
25740
|
+
currentState === ConnectorState.STARTED) {
|
|
25727
25741
|
logger$Z.debug('connector_just_resumed_resetting_ack_time', {
|
|
25728
25742
|
previous_state: previousState,
|
|
25729
25743
|
current_state: currentState,
|
|
@@ -27289,7 +27303,8 @@
|
|
|
27289
27303
|
const interimHandler = async (envelope, context) => {
|
|
27290
27304
|
if (this.inHandshake) {
|
|
27291
27305
|
// Filter: only buffer frames related to our systemId or frames without systemId info
|
|
27292
|
-
const frameSystemId = envelope.frame
|
|
27306
|
+
const frameSystemId = envelope.frame
|
|
27307
|
+
?.systemId;
|
|
27293
27308
|
if (!frameSystemId || frameSystemId === this.expectedSystemId) {
|
|
27294
27309
|
this.buffer.push(envelope);
|
|
27295
27310
|
}
|
|
@@ -27485,7 +27500,8 @@
|
|
|
27485
27500
|
const deadline = Date.now() + this.timeoutMs;
|
|
27486
27501
|
while (Date.now() < deadline) {
|
|
27487
27502
|
// Allow both STARTED and PAUSED states (PAUSED = tab hidden but connection alive)
|
|
27488
|
-
if (connector.state !== ConnectorState.STARTED &&
|
|
27503
|
+
if (connector.state !== ConnectorState.STARTED &&
|
|
27504
|
+
connector.state !== ConnectorState.PAUSED) {
|
|
27489
27505
|
let errorMessage = 'Connector closed while waiting for NodeAttachAck';
|
|
27490
27506
|
if (connector.closeCode !== undefined) {
|
|
27491
27507
|
errorMessage += ` (code=${connector.closeCode}`;
|
|
@@ -27509,7 +27525,8 @@
|
|
|
27509
27525
|
if (envelope.frame.type === 'NodeAttach') {
|
|
27510
27526
|
logger$W.debug('handshake_ignoring_concurrent_attach', {
|
|
27511
27527
|
frame_type: envelope.frame.type,
|
|
27512
|
-
frame_system_id: envelope.frame?.systemId ??
|
|
27528
|
+
frame_system_id: envelope.frame?.systemId ??
|
|
27529
|
+
'unknown',
|
|
27513
27530
|
});
|
|
27514
27531
|
}
|
|
27515
27532
|
else {
|
|
@@ -28233,7 +28250,8 @@
|
|
|
28233
28250
|
else if (options &&
|
|
28234
28251
|
typeof options === 'object' &&
|
|
28235
28252
|
'encoding' in options &&
|
|
28236
|
-
typeof options.encoding ===
|
|
28253
|
+
typeof options.encoding ===
|
|
28254
|
+
'string') {
|
|
28237
28255
|
encoding = options.encoding;
|
|
28238
28256
|
}
|
|
28239
28257
|
const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
|
|
@@ -35055,7 +35073,8 @@
|
|
|
35055
35073
|
this.listenerRegistered = false;
|
|
35056
35074
|
this.visibilityChangeListenerRegistered = false;
|
|
35057
35075
|
this.channelName =
|
|
35058
|
-
typeof config.channelName === 'string' &&
|
|
35076
|
+
typeof config.channelName === 'string' &&
|
|
35077
|
+
config.channelName.trim().length > 0
|
|
35059
35078
|
? config.channelName.trim()
|
|
35060
35079
|
: DEFAULT_CHANNEL$6;
|
|
35061
35080
|
const preferredCapacity = typeof config.inboxCapacity === 'number' &&
|
|
@@ -35094,7 +35113,8 @@
|
|
|
35094
35113
|
channel: this.channelName,
|
|
35095
35114
|
connector_id: this.connectorId,
|
|
35096
35115
|
message_type: message && typeof message === 'object'
|
|
35097
|
-
? message.constructor
|
|
35116
|
+
? (message.constructor
|
|
35117
|
+
?.name ?? typeof message)
|
|
35098
35118
|
: typeof message,
|
|
35099
35119
|
has_sender_id: Boolean(message?.senderId),
|
|
35100
35120
|
has_sender_node_id: Boolean(message?.senderNodeId),
|
|
@@ -35103,7 +35123,8 @@
|
|
|
35103
35123
|
return;
|
|
35104
35124
|
}
|
|
35105
35125
|
const busMessage = message;
|
|
35106
|
-
const senderId = typeof busMessage.senderId === 'string' &&
|
|
35126
|
+
const senderId = typeof busMessage.senderId === 'string' &&
|
|
35127
|
+
busMessage.senderId.length > 0
|
|
35107
35128
|
? busMessage.senderId
|
|
35108
35129
|
: null;
|
|
35109
35130
|
const senderNodeId = InPageConnector.normalizeNodeId(busMessage.senderNodeId);
|
|
@@ -35354,7 +35375,9 @@
|
|
|
35354
35375
|
timestamp: new Date().toISOString(),
|
|
35355
35376
|
});
|
|
35356
35377
|
}
|
|
35357
|
-
if (this.visibilityChangeListenerRegistered &&
|
|
35378
|
+
if (this.visibilityChangeListenerRegistered &&
|
|
35379
|
+
this.visibilityChangeHandler &&
|
|
35380
|
+
typeof document !== 'undefined') {
|
|
35358
35381
|
document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
|
|
35359
35382
|
this.visibilityChangeListenerRegistered = false;
|
|
35360
35383
|
this.visibilityChangeHandler = undefined;
|
|
@@ -35371,7 +35394,7 @@
|
|
|
35371
35394
|
return rawOrEnvelope;
|
|
35372
35395
|
}
|
|
35373
35396
|
_isWildcardTarget() {
|
|
35374
|
-
return this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined';
|
|
35397
|
+
return (this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined');
|
|
35375
35398
|
}
|
|
35376
35399
|
_shouldAcceptMessageFromBus(senderNodeId, targetNodeId) {
|
|
35377
35400
|
if (this._isWildcardTarget()) {
|
|
@@ -35391,7 +35414,9 @@
|
|
|
35391
35414
|
return true;
|
|
35392
35415
|
}
|
|
35393
35416
|
const expectedSender = this.targetNodeId;
|
|
35394
|
-
if (expectedSender &&
|
|
35417
|
+
if (expectedSender &&
|
|
35418
|
+
expectedSender !== '*' &&
|
|
35419
|
+
senderNodeId !== expectedSender) {
|
|
35395
35420
|
logger$G.debug('inpage_message_rejected', {
|
|
35396
35421
|
channel: this.channelName,
|
|
35397
35422
|
connector_id: this.connectorId,
|
|
@@ -35758,8 +35783,8 @@
|
|
|
35758
35783
|
}
|
|
35759
35784
|
}
|
|
35760
35785
|
|
|
35761
|
-
const DEFAULT_UNCONFIGURED_MESSAGE =
|
|
35762
|
-
const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE =
|
|
35786
|
+
const DEFAULT_UNCONFIGURED_MESSAGE = 'Trust store is not configured. Set FAME_CA_CERTS to a PEM value, a file path, a data URI, or an HTTPS bundle URL.';
|
|
35787
|
+
const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE = 'TrustStoreProviderFactory';
|
|
35763
35788
|
class TrustStoreProviderFactory extends AbstractResourceFactory {
|
|
35764
35789
|
createUnconfiguredProvider(reason) {
|
|
35765
35790
|
return new NoopTrustStoreProvider(reason ?? DEFAULT_UNCONFIGURED_MESSAGE);
|
|
@@ -39370,7 +39395,8 @@
|
|
|
39370
39395
|
const hasSignature = Boolean(envelope.sec?.sig);
|
|
39371
39396
|
if (!hasSignature) {
|
|
39372
39397
|
const nodeSid = node.sid;
|
|
39373
|
-
const envelopeSid = envelope
|
|
39398
|
+
const envelopeSid = envelope
|
|
39399
|
+
.sid;
|
|
39374
39400
|
const isLocalUnsignedSelfEnvelope = localContext.originType === DeliveryOriginType.LOCAL &&
|
|
39375
39401
|
typeof nodeSid === 'string' &&
|
|
39376
39402
|
nodeSid.length > 0 &&
|
|
@@ -42350,14 +42376,16 @@
|
|
|
42350
42376
|
type,
|
|
42351
42377
|
purpose,
|
|
42352
42378
|
};
|
|
42353
|
-
const channelValue = candidate.channelName ??
|
|
42379
|
+
const channelValue = candidate.channelName ??
|
|
42380
|
+
candidate['channel_name'];
|
|
42354
42381
|
if (channelValue !== undefined) {
|
|
42355
42382
|
if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
|
|
42356
42383
|
throw new TypeError('InPageConnectionGrant "channelName" must be a non-empty string when provided');
|
|
42357
42384
|
}
|
|
42358
42385
|
result.channelName = channelValue.trim();
|
|
42359
42386
|
}
|
|
42360
|
-
const inboxValue = candidate.inboxCapacity ??
|
|
42387
|
+
const inboxValue = candidate.inboxCapacity ??
|
|
42388
|
+
candidate['inbox_capacity'];
|
|
42361
42389
|
if (inboxValue !== undefined) {
|
|
42362
42390
|
if (typeof inboxValue !== 'number' ||
|
|
42363
42391
|
!Number.isFinite(inboxValue) ||
|
|
@@ -42895,7 +42923,8 @@
|
|
|
42895
42923
|
const normalized = this._normalizeConfig(config);
|
|
42896
42924
|
const options = (factoryArgs[0] ?? {});
|
|
42897
42925
|
const normalizedLocalNodeFromConfig = this._normalizeNodeId(normalized.localNodeId);
|
|
42898
|
-
const localNodeId = this._normalizeNodeId(options.localNodeId) ??
|
|
42926
|
+
const localNodeId = this._normalizeNodeId(options.localNodeId) ??
|
|
42927
|
+
normalizedLocalNodeFromConfig;
|
|
42899
42928
|
if (!localNodeId) {
|
|
42900
42929
|
throw new Error('InPageConnectorFactory requires a localNodeId from config or create() options');
|
|
42901
42930
|
}
|
|
@@ -43071,10 +43100,12 @@
|
|
|
43071
43100
|
type: BROADCAST_CHANNEL_CONNECTOR_TYPE,
|
|
43072
43101
|
};
|
|
43073
43102
|
const channelCandidate = record.channelName ?? record['channel_name'];
|
|
43074
|
-
if (typeof channelCandidate === 'string' &&
|
|
43103
|
+
if (typeof channelCandidate === 'string' &&
|
|
43104
|
+
channelCandidate.trim().length > 0) {
|
|
43075
43105
|
config.channelName = channelCandidate.trim();
|
|
43076
43106
|
}
|
|
43077
|
-
const inboxCandidate = record.inboxCapacity ??
|
|
43107
|
+
const inboxCandidate = record.inboxCapacity ??
|
|
43108
|
+
record['inbox_capacity'];
|
|
43078
43109
|
if (typeof inboxCandidate === 'number' &&
|
|
43079
43110
|
Number.isFinite(inboxCandidate) &&
|
|
43080
43111
|
inboxCandidate > 0) {
|
|
@@ -43098,9 +43129,11 @@
|
|
|
43098
43129
|
throw new Error('BroadcastChannelConnectorFactory requires a configuration');
|
|
43099
43130
|
}
|
|
43100
43131
|
const normalized = this._normalizeConfig(config);
|
|
43101
|
-
const options = (factoryArgs[0] ??
|
|
43132
|
+
const options = (factoryArgs[0] ??
|
|
43133
|
+
{});
|
|
43102
43134
|
const normalizedLocalNodeFromConfig = this._normalizeNodeId(normalized.localNodeId);
|
|
43103
|
-
const localNodeId = this._normalizeNodeId(options.localNodeId) ??
|
|
43135
|
+
const localNodeId = this._normalizeNodeId(options.localNodeId) ??
|
|
43136
|
+
normalizedLocalNodeFromConfig;
|
|
43104
43137
|
if (!localNodeId) {
|
|
43105
43138
|
throw new Error('BroadcastChannelConnectorFactory requires a localNodeId from config or create() options');
|
|
43106
43139
|
}
|
|
@@ -43592,7 +43625,9 @@
|
|
|
43592
43625
|
typeof channelCandidate === 'string' && channelCandidate.trim().length > 0
|
|
43593
43626
|
? channelCandidate.trim()
|
|
43594
43627
|
: DEFAULT_CHANNEL$3;
|
|
43595
|
-
const normalizedCapacity = typeof inboxCandidate === 'number' &&
|
|
43628
|
+
const normalizedCapacity = typeof inboxCandidate === 'number' &&
|
|
43629
|
+
Number.isFinite(inboxCandidate) &&
|
|
43630
|
+
inboxCandidate > 0
|
|
43596
43631
|
? Math.floor(inboxCandidate)
|
|
43597
43632
|
: DEFAULT_INBOX_CAPACITY$3;
|
|
43598
43633
|
this._inboxCapacity = normalizedCapacity;
|
|
@@ -43867,7 +43902,8 @@
|
|
|
43867
43902
|
if (grant.type === INPAGE_CONNECTION_GRANT_TYPE) {
|
|
43868
43903
|
return inPageGrantToConnectorConfig(grant);
|
|
43869
43904
|
}
|
|
43870
|
-
if (typeof grant
|
|
43905
|
+
if (typeof grant
|
|
43906
|
+
?.toConnectorConfig === 'function') {
|
|
43871
43907
|
return grant.toConnectorConfig();
|
|
43872
43908
|
}
|
|
43873
43909
|
throw new Error(`Unsupported grant type: ${grant.type}`);
|
|
@@ -44021,7 +44057,9 @@
|
|
|
44021
44057
|
: DEFAULT_CHANNEL$2;
|
|
44022
44058
|
const rawInbox = record.inboxCapacity ?? record['inbox_capacity'];
|
|
44023
44059
|
let inboxCapacity = DEFAULT_INBOX_CAPACITY$2;
|
|
44024
|
-
if (typeof rawInbox === 'number' &&
|
|
44060
|
+
if (typeof rawInbox === 'number' &&
|
|
44061
|
+
Number.isFinite(rawInbox) &&
|
|
44062
|
+
rawInbox > 0) {
|
|
44025
44063
|
inboxCapacity = Math.floor(rawInbox);
|
|
44026
44064
|
}
|
|
44027
44065
|
else if (typeof rawInbox === 'string') {
|
|
@@ -44049,9 +44087,7 @@
|
|
|
44049
44087
|
}
|
|
44050
44088
|
async create(config, ...factoryArgs) {
|
|
44051
44089
|
const normalized = normalizeConfig$r(config);
|
|
44052
|
-
const [{ InPageListener }] = await Promise.all([
|
|
44053
|
-
getInPageListenerModule(),
|
|
44054
|
-
]);
|
|
44090
|
+
const [{ InPageListener }] = await Promise.all([getInPageListenerModule()]);
|
|
44055
44091
|
return new InPageListener({
|
|
44056
44092
|
channelName: normalized.channelName,
|
|
44057
44093
|
inboxCapacity: normalized.inboxCapacity,
|
|
@@ -44069,9 +44105,7 @@
|
|
|
44069
44105
|
const logger$o = getLogger('naylence.fame.connector.broadcast_channel_listener');
|
|
44070
44106
|
const DEFAULT_CHANNEL$1 = 'naylence-fabric';
|
|
44071
44107
|
const DEFAULT_INBOX_CAPACITY$1 = 2048;
|
|
44072
|
-
const RESPONSE_TYPE_MASK = FameResponseType.ACK |
|
|
44073
|
-
FameResponseType.REPLY |
|
|
44074
|
-
FameResponseType.STREAM;
|
|
44108
|
+
const RESPONSE_TYPE_MASK = FameResponseType.ACK | FameResponseType.REPLY | FameResponseType.STREAM;
|
|
44075
44109
|
const isBrowserEnvironment$1 = () => typeof window !== 'undefined' &&
|
|
44076
44110
|
typeof BroadcastChannel !== 'undefined' &&
|
|
44077
44111
|
typeof MessageEvent !== 'undefined';
|
|
@@ -44285,9 +44319,7 @@
|
|
|
44285
44319
|
return null;
|
|
44286
44320
|
}
|
|
44287
44321
|
})();
|
|
44288
|
-
if (error instanceof ZodError &&
|
|
44289
|
-
decoded &&
|
|
44290
|
-
decoded.length > 0) {
|
|
44322
|
+
if (error instanceof ZodError && decoded && decoded.length > 0) {
|
|
44291
44323
|
try {
|
|
44292
44324
|
const reparsed = JSON.parse(decoded);
|
|
44293
44325
|
const candidate = reparsed.rtype;
|
|
@@ -44635,7 +44667,9 @@
|
|
|
44635
44667
|
: DEFAULT_CHANNEL;
|
|
44636
44668
|
const rawInbox = record.inboxCapacity ?? record['inbox_capacity'];
|
|
44637
44669
|
let inboxCapacity = DEFAULT_INBOX_CAPACITY;
|
|
44638
|
-
if (typeof rawInbox === 'number' &&
|
|
44670
|
+
if (typeof rawInbox === 'number' &&
|
|
44671
|
+
Number.isFinite(rawInbox) &&
|
|
44672
|
+
rawInbox > 0) {
|
|
44639
44673
|
inboxCapacity = Math.floor(rawInbox);
|
|
44640
44674
|
}
|
|
44641
44675
|
else if (typeof rawInbox === 'string') {
|
|
@@ -48121,19 +48155,23 @@
|
|
|
48121
48155
|
normalized.clientSecretConfig = normalizeSecretSource(clientSecretSource);
|
|
48122
48156
|
}
|
|
48123
48157
|
const audienceCandidate = candidate.audience ?? candidate.aud;
|
|
48124
|
-
if (typeof audienceCandidate === 'string' &&
|
|
48158
|
+
if (typeof audienceCandidate === 'string' &&
|
|
48159
|
+
audienceCandidate.trim().length > 0) {
|
|
48125
48160
|
normalized.audience = audienceCandidate.trim();
|
|
48126
48161
|
}
|
|
48127
48162
|
const codeChallengeMethod = candidate.codeChallengeMethod ?? candidate.code_challenge_method;
|
|
48128
|
-
if (typeof codeChallengeMethod === 'string' &&
|
|
48163
|
+
if (typeof codeChallengeMethod === 'string' &&
|
|
48164
|
+
codeChallengeMethod.trim().length > 0) {
|
|
48129
48165
|
normalized.codeChallengeMethod = codeChallengeMethod.trim();
|
|
48130
48166
|
}
|
|
48131
48167
|
const codeVerifierLength = candidate.codeVerifierLength ?? candidate.code_verifier_length;
|
|
48132
|
-
if (typeof codeVerifierLength === 'number' &&
|
|
48168
|
+
if (typeof codeVerifierLength === 'number' &&
|
|
48169
|
+
Number.isFinite(codeVerifierLength)) {
|
|
48133
48170
|
normalized.codeVerifierLength = codeVerifierLength;
|
|
48134
48171
|
}
|
|
48135
48172
|
const clockSkewSeconds = candidate.clockSkewSeconds ?? candidate.clock_skew_seconds;
|
|
48136
|
-
if (typeof clockSkewSeconds === 'number' &&
|
|
48173
|
+
if (typeof clockSkewSeconds === 'number' &&
|
|
48174
|
+
Number.isFinite(clockSkewSeconds)) {
|
|
48137
48175
|
normalized.clockSkewSeconds = clockSkewSeconds;
|
|
48138
48176
|
}
|
|
48139
48177
|
const loginHintParam = candidate.loginHintParam ?? candidate.login_hint_param;
|
|
@@ -48178,8 +48216,8 @@
|
|
|
48178
48216
|
options.audience = normalized.audience;
|
|
48179
48217
|
}
|
|
48180
48218
|
if (normalized.codeChallengeMethod) {
|
|
48181
|
-
options.codeChallengeMethod =
|
|
48182
|
-
.toUpperCase();
|
|
48219
|
+
options.codeChallengeMethod =
|
|
48220
|
+
normalized.codeChallengeMethod.toUpperCase();
|
|
48183
48221
|
}
|
|
48184
48222
|
if (normalized.codeVerifierLength) {
|
|
48185
48223
|
options.codeVerifierLength = normalized.codeVerifierLength;
|
|
@@ -49936,14 +49974,14 @@
|
|
|
49936
49974
|
|
|
49937
49975
|
const FACTORY_META$d = {
|
|
49938
49976
|
base: TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE,
|
|
49939
|
-
key:
|
|
49977
|
+
key: 'NoopTrustStoreProvider',
|
|
49940
49978
|
isDefault: true,
|
|
49941
49979
|
priority: 10,
|
|
49942
49980
|
};
|
|
49943
49981
|
class NoopTrustStoreProviderFactory extends TrustStoreProviderFactory {
|
|
49944
49982
|
constructor() {
|
|
49945
49983
|
super(...arguments);
|
|
49946
|
-
this.type =
|
|
49984
|
+
this.type = 'NoopTrustStoreProvider';
|
|
49947
49985
|
this.isDefault = true;
|
|
49948
49986
|
this.priority = 10;
|
|
49949
49987
|
}
|
|
@@ -53337,8 +53375,7 @@
|
|
|
53337
53375
|
const scopes = normalizeScopes(camel.scopes) ??
|
|
53338
53376
|
normalizeScopes(snake.scopes ?? snake.scope) ??
|
|
53339
53377
|
DEFAULT_SCOPES.slice();
|
|
53340
|
-
const audience = coerceString(camel.audience) ??
|
|
53341
|
-
coerceString(snake.audience ?? snake.aud);
|
|
53378
|
+
const audience = coerceString(camel.audience) ?? coerceString(snake.audience ?? snake.aud);
|
|
53342
53379
|
const fetchImpl = (camel.fetchImpl ?? snake.fetch_impl);
|
|
53343
53380
|
const clockSkewSeconds = coerceNumber(camel.clockSkewSeconds) ??
|
|
53344
53381
|
coerceNumber(snake.clock_skew_seconds) ??
|