@naylence/runtime 0.3.5-test.965 → 0.3.5-test.967
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 +318 -201
- package/dist/browser/index.mjs +318 -201
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector.browser.js +0 -173
- package/dist/cjs/naylence/fame/connector/inpage-connector-factory.js +36 -0
- package/dist/cjs/naylence/fame/connector/inpage-connector.js +213 -18
- package/dist/cjs/naylence/fame/connector/inpage-listener.js +67 -8
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector.browser.js +0 -173
- package/dist/esm/naylence/fame/connector/inpage-connector-factory.js +36 -0
- package/dist/esm/naylence/fame/connector/inpage-connector.js +213 -18
- package/dist/esm/naylence/fame/connector/inpage-listener.js +67 -8
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +318 -201
- package/dist/node/index.mjs +318 -201
- package/dist/node/node.cjs +318 -201
- package/dist/node/node.mjs +318 -201
- package/dist/types/naylence/fame/connector/broadcast-channel-connector.browser.d.ts +0 -12
- package/dist/types/naylence/fame/connector/inpage-connector-factory.d.ts +6 -0
- package/dist/types/naylence/fame/connector/inpage-connector.d.ts +13 -0
- package/dist/types/naylence/fame/connector/inpage-listener.d.ts +4 -0
- package/dist/types/naylence/fame/grants/inpage-connection-grant.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,11 +22,6 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
22
22
|
private targetNodeId?;
|
|
23
23
|
private readonly onMsg;
|
|
24
24
|
private readonly channel;
|
|
25
|
-
private readonly seenAckKeys;
|
|
26
|
-
private readonly seenAckOrder;
|
|
27
|
-
private readonly ackDedupTtlMs;
|
|
28
|
-
private readonly ackDedupMaxEntries;
|
|
29
|
-
private readonly textDecoder;
|
|
30
25
|
private visibilityChangeListenerRegistered;
|
|
31
26
|
private visibilityChangeHandler?;
|
|
32
27
|
private static generateConnectorId;
|
|
@@ -43,18 +38,11 @@ export declare class BroadcastChannelConnector extends BaseAsyncConnector {
|
|
|
43
38
|
private _shouldAcceptMessageFromBus;
|
|
44
39
|
private _describeInboxItem;
|
|
45
40
|
private logInboxSnapshot;
|
|
46
|
-
private _shouldSkipDuplicateAck;
|
|
47
|
-
private _shouldSkipDuplicateAckFromInboxItem;
|
|
48
|
-
private _checkDuplicateAck;
|
|
49
|
-
private _extractEnvelopeFromInboxItem;
|
|
50
|
-
private _extractSenderIdFromInboxItem;
|
|
51
41
|
/**
|
|
52
42
|
* Override start() to check initial visibility state
|
|
53
43
|
*/
|
|
54
44
|
start(inboundHandler: FameEnvelopeHandler): Promise<void>;
|
|
55
45
|
setTargetNodeId(nodeId: string): void;
|
|
56
46
|
setWildcardTarget(): void;
|
|
57
|
-
private _trimSeenAcks;
|
|
58
|
-
private _extractAckDedupKey;
|
|
59
47
|
}
|
|
60
48
|
export {};
|
|
@@ -9,10 +9,14 @@ export interface InPageConnectorFactoryConfig extends ConnectorConfig, Partial<B
|
|
|
9
9
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
10
10
|
channelName?: string;
|
|
11
11
|
inboxCapacity?: number;
|
|
12
|
+
localNodeId?: string;
|
|
13
|
+
initialTargetNodeId?: string | '*';
|
|
12
14
|
}
|
|
13
15
|
export interface CreateInPageConnectorOptions {
|
|
14
16
|
systemId?: string;
|
|
15
17
|
authorization?: AuthorizationContext;
|
|
18
|
+
localNodeId?: string;
|
|
19
|
+
initialTargetNodeId?: string | '*';
|
|
16
20
|
}
|
|
17
21
|
export declare const FACTORY_META: {
|
|
18
22
|
readonly base: "ConnectorFactory";
|
|
@@ -26,5 +30,7 @@ export declare class InPageConnectorFactory extends ConnectorFactory<InPageConne
|
|
|
26
30
|
grantFromConfig(config: InPageConnectorFactoryConfig | Record<string, unknown>, _expressionEvaluationPolicy: ExpressionEvaluationPolicy): InPageConnectionGrant;
|
|
27
31
|
create(config?: InPageConnectorFactoryConfig | Record<string, unknown> | null, ...factoryArgs: unknown[]): Promise<InPageConnector>;
|
|
28
32
|
private _normalizeConfig;
|
|
33
|
+
private _normalizeNodeId;
|
|
34
|
+
private _normalizeTargetNodeId;
|
|
29
35
|
}
|
|
30
36
|
export default InPageConnectorFactory;
|
|
@@ -10,18 +10,25 @@ export interface InPageConnectorConfig extends ConnectorConfig {
|
|
|
10
10
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
11
11
|
channelName?: string;
|
|
12
12
|
inboxCapacity?: number;
|
|
13
|
+
localNodeId: string;
|
|
14
|
+
initialTargetNodeId?: string | '*';
|
|
13
15
|
}
|
|
14
16
|
type InPageInboxItem = Uint8Array | FameEnvelope | FameChannelMessage;
|
|
15
17
|
export declare class InPageConnector extends BaseAsyncConnector {
|
|
16
18
|
private readonly channelName;
|
|
17
19
|
private readonly inbox;
|
|
20
|
+
private readonly inboxCapacity;
|
|
18
21
|
private listenerRegistered;
|
|
19
22
|
private readonly connectorId;
|
|
23
|
+
private readonly localNodeId;
|
|
24
|
+
private targetNodeId?;
|
|
20
25
|
private readonly onMsg;
|
|
21
26
|
private visibilityChangeListenerRegistered;
|
|
22
27
|
private visibilityChangeHandler?;
|
|
23
28
|
private static generateConnectorId;
|
|
24
29
|
private static coercePayload;
|
|
30
|
+
private static normalizeNodeId;
|
|
31
|
+
private static normalizeTargetNodeId;
|
|
25
32
|
constructor(config: InPageConnectorConfig, baseConfig?: BaseAsyncConnectorConfig);
|
|
26
33
|
/**
|
|
27
34
|
* Override start() to check initial visibility state
|
|
@@ -32,5 +39,11 @@ export declare class InPageConnector extends BaseAsyncConnector {
|
|
|
32
39
|
protected _transportReceive(): Promise<InPageInboxItem>;
|
|
33
40
|
protected _transportClose(code: number, reason: string): Promise<void>;
|
|
34
41
|
private _normalizeInboxItem;
|
|
42
|
+
private _isWildcardTarget;
|
|
43
|
+
private _shouldAcceptMessageFromBus;
|
|
44
|
+
private _describeInboxItem;
|
|
45
|
+
private logInboxSnapshot;
|
|
46
|
+
setTargetNodeId(nodeId: string): void;
|
|
47
|
+
setWildcardTarget(): void;
|
|
35
48
|
}
|
|
36
49
|
export {};
|
|
@@ -37,5 +37,9 @@ export declare class InPageListener extends TransportListener {
|
|
|
37
37
|
private _deliverEnvelope;
|
|
38
38
|
private _buildChannelMessage;
|
|
39
39
|
private _isNodeAttachFrame;
|
|
40
|
+
private _buildConnectorConfigForSystem;
|
|
41
|
+
private _requireLocalNodeId;
|
|
42
|
+
private _normalizeNodeId;
|
|
43
|
+
private _normalizeTargetNodeId;
|
|
40
44
|
}
|
|
41
45
|
export declare function getInPageListenerInstance(): InPageListener | null;
|
|
@@ -18,6 +18,8 @@ export type InPageConnectorConfigLike = ConnectorConfig & {
|
|
|
18
18
|
type: typeof INPAGE_CONNECTOR_TYPE;
|
|
19
19
|
channelName?: string;
|
|
20
20
|
inboxCapacity?: number;
|
|
21
|
+
initialTargetNodeId?: string | '*';
|
|
22
|
+
localNodeId?: string;
|
|
21
23
|
};
|
|
22
24
|
export declare function isInPageConnectionGrant(candidate: unknown): candidate is InPageConnectionGrant;
|
|
23
25
|
export declare function normalizeInPageConnectionGrant(candidate: InPageConnectionGrantLike): InPageConnectionGrant;
|
package/dist/types/version.d.ts
CHANGED