@dxos/echo-pipeline 0.3.11-main.00a28cb → 0.3.11-main.0999ea0
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/lib/browser/{chunk-44D2XTQP.mjs → chunk-PB5T4DLC.mjs} +151 -23
- package/dist/lib/browser/{chunk-44D2XTQP.mjs.map → chunk-PB5T4DLC.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +2 -2
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node/{chunk-PZONK23P.cjs → chunk-WGNVVL2H.cjs} +149 -25
- package/dist/lib/node/{chunk-PZONK23P.cjs.map → chunk-WGNVVL2H.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +26 -28
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +17 -17
- package/dist/lib/node/testing/index.cjs.map +3 -3
- package/dist/types/src/automerge/automerge-host.d.ts +24 -2
- package/dist/types/src/automerge/automerge-host.d.ts.map +1 -1
- package/dist/types/src/automerge/index.d.ts +1 -1
- package/dist/types/src/automerge/index.d.ts.map +1 -1
- package/dist/types/src/space/space-manager.d.ts +2 -2
- package/dist/types/src/space/space-manager.d.ts.map +1 -1
- package/package.json +33 -33
- package/src/automerge/automerge-host.test.ts +291 -34
- package/src/automerge/automerge-host.ts +110 -16
- package/src/automerge/index.ts +1 -1
- package/src/space/space-manager.ts +3 -3
- package/src/testing/test-agent-builder.ts +1 -1
|
@@ -42,7 +42,7 @@ export type ConstructSpaceParams = {
|
|
|
42
42
|
/**
|
|
43
43
|
* Called when connection auth passed successful.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
onAuthorizedConnection: (session: Teleport) => void;
|
|
46
46
|
onAuthFailure?: (session: Teleport) => void;
|
|
47
47
|
};
|
|
48
48
|
|
|
@@ -93,7 +93,7 @@ export class SpaceManager {
|
|
|
93
93
|
async constructSpace({
|
|
94
94
|
metadata,
|
|
95
95
|
swarmIdentity,
|
|
96
|
-
|
|
96
|
+
onAuthorizedConnection,
|
|
97
97
|
onAuthFailure,
|
|
98
98
|
memberKey,
|
|
99
99
|
}: ConstructSpaceParams) {
|
|
@@ -108,7 +108,7 @@ export class SpaceManager {
|
|
|
108
108
|
topic: spaceKey,
|
|
109
109
|
swarmIdentity,
|
|
110
110
|
networkManager: this._networkManager,
|
|
111
|
-
onSessionAuth:
|
|
111
|
+
onSessionAuth: onAuthorizedConnection,
|
|
112
112
|
onAuthFailure,
|
|
113
113
|
blobStore: this._blobStore,
|
|
114
114
|
});
|
|
@@ -189,7 +189,7 @@ export class TestAgent {
|
|
|
189
189
|
credentialAuthenticator: MOCK_AUTH_VERIFIER,
|
|
190
190
|
},
|
|
191
191
|
memberKey: identityKey,
|
|
192
|
-
|
|
192
|
+
onAuthorizedConnection: (session) => {
|
|
193
193
|
session.addExtension(
|
|
194
194
|
'dxos.mesh.teleport.gossip',
|
|
195
195
|
this.createGossip().createExtension({ remotePeerId: session.remotePeerId }),
|