@dxos/client-services 0.1.9 → 0.1.10
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/src/packlets/deprecated/invitations.d.ts +4 -4
- package/dist/src/packlets/deprecated/invitations.d.ts.map +1 -1
- package/dist/src/packlets/deprecated/profile.d.ts.map +1 -1
- package/dist/src/packlets/deprecated/profile.js +21 -9
- package/dist/src/packlets/deprecated/profile.js.map +1 -1
- package/dist/src/packlets/deprecated/space.js +9 -6
- package/dist/src/packlets/deprecated/space.js.map +1 -1
- package/dist/src/packlets/deprecated/system.d.ts.map +1 -1
- package/dist/src/packlets/deprecated/system.js +2 -0
- package/dist/src/packlets/deprecated/system.js.map +1 -1
- package/dist/src/packlets/devtools/devtools.d.ts +1 -1
- package/dist/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/src/packlets/devtools/network.js +3 -3
- package/dist/src/packlets/devtools/network.js.map +1 -1
- package/dist/src/packlets/identity/authenticator.js +3 -3
- package/dist/src/packlets/identity/authenticator.js.map +1 -1
- package/dist/src/packlets/identity/identity-manager.d.ts +5 -2
- package/dist/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/src/packlets/identity/identity-manager.js +13 -9
- package/dist/src/packlets/identity/identity-manager.js.map +1 -1
- package/dist/src/packlets/identity/identity.d.ts +4 -1
- package/dist/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/src/packlets/identity/identity.js +8 -2
- package/dist/src/packlets/identity/identity.js.map +1 -1
- package/dist/src/packlets/invitations/halo-invitations-handler.js +17 -17
- package/dist/src/packlets/invitations/halo-invitations-handler.js.map +1 -1
- package/dist/src/packlets/invitations/invitations-handler.d.ts +3 -1
- package/dist/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/src/packlets/invitations/invitations-handler.js.map +1 -1
- package/dist/src/packlets/invitations/invitations-proxy.js +2 -2
- package/dist/src/packlets/invitations/invitations-proxy.js.map +1 -1
- package/dist/src/packlets/invitations/invitations-service.js +12 -12
- package/dist/src/packlets/invitations/invitations-service.js.map +1 -1
- package/dist/src/packlets/invitations/invitations.d.ts +1 -1
- package/dist/src/packlets/invitations/invitations.d.ts.map +1 -1
- package/dist/src/packlets/invitations/space-invitations-handler.d.ts.map +1 -1
- package/dist/src/packlets/invitations/space-invitations-handler.js +26 -20
- package/dist/src/packlets/invitations/space-invitations-handler.js.map +1 -1
- package/dist/src/packlets/services/service-context.d.ts +3 -2
- package/dist/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/src/packlets/services/service-context.js +11 -8
- package/dist/src/packlets/services/service-context.js.map +1 -1
- package/dist/src/packlets/services/service-definitions.d.ts +1 -1
- package/dist/src/packlets/services/service-definitions.d.ts.map +1 -1
- package/dist/src/packlets/services/service-host.d.ts +2 -2
- package/dist/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/src/packlets/services/service-host.js +4 -5
- package/dist/src/packlets/services/service-host.js.map +1 -1
- package/dist/src/packlets/services/service-registry.test.js +3 -3
- package/dist/src/packlets/services/service-registry.test.js.map +1 -1
- package/dist/src/packlets/storage/storage.d.ts +1 -1
- package/dist/src/packlets/storage/storage.d.ts.map +1 -1
- package/dist/src/packlets/vault/iframe-runtime.d.ts +1 -1
- package/dist/src/packlets/vault/iframe-runtime.d.ts.map +1 -1
- package/dist/src/packlets/vault/services.d.ts +2 -2
- package/dist/src/packlets/vault/services.d.ts.map +1 -1
- package/dist/src/packlets/vault/worker-runtime.d.ts +1 -1
- package/dist/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/src/packlets/vault/worker-session.d.ts +1 -1
- package/dist/src/packlets/vault/worker-session.d.ts.map +1 -1
- package/dist/src/packlets/vault/worker-session.js +3 -3
- package/dist/src/packlets/vault/worker-session.js.map +1 -1
- package/package.json +37 -27
- package/src/packlets/deprecated/profile.ts +11 -3
- package/src/packlets/deprecated/space.ts +1 -1
- package/src/packlets/deprecated/system.ts +2 -0
- package/src/packlets/devtools/network.ts +3 -3
- package/src/packlets/identity/identity-manager.ts +14 -5
- package/src/packlets/identity/identity.ts +12 -3
- package/src/packlets/invitations/halo-invitations-handler.ts +4 -4
- package/src/packlets/invitations/invitations-handler.ts +3 -0
- package/src/packlets/invitations/invitations-service.ts +2 -2
- package/src/packlets/invitations/space-invitations-handler.ts +17 -7
- package/src/packlets/services/service-context.ts +10 -5
- package/src/packlets/services/service-host.ts +6 -7
|
@@ -36,13 +36,13 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
36
36
|
createInvitation(context, options) {
|
|
37
37
|
var _a;
|
|
38
38
|
let swarmConnection;
|
|
39
|
-
const { type, timeout = invitations_1.INVITATION_TIMEOUT } = options !== null && options !== void 0 ? options : {};
|
|
39
|
+
const { type, timeout = invitations_1.INVITATION_TIMEOUT, swarmKey } = options !== null && options !== void 0 ? options : {};
|
|
40
40
|
(0, assert_1.default)(type !== services_1.Invitation.Type.OFFLINE);
|
|
41
41
|
const identity = (_a = this._identityManager.identity) !== null && _a !== void 0 ? _a : (0, debug_1.failUndefined)();
|
|
42
42
|
const invitation = {
|
|
43
43
|
type,
|
|
44
44
|
invitationId: keys_1.PublicKey.random().toHex(),
|
|
45
|
-
swarmKey: keys_1.PublicKey.random(),
|
|
45
|
+
swarmKey: swarmKey !== null && swarmKey !== void 0 ? swarmKey : keys_1.PublicKey.random(),
|
|
46
46
|
authenticationCode: (0, credentials_1.generatePasscode)(invitations_1.AUTHENTICATION_CODE_LENGTH)
|
|
47
47
|
};
|
|
48
48
|
// TODO(burdon): Stop anything pending.
|
|
@@ -63,7 +63,7 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
63
63
|
var _a, _b;
|
|
64
64
|
(0, log_1.log)('responding with admission offer', {
|
|
65
65
|
host: identity.deviceKey
|
|
66
|
-
}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 73 });
|
|
66
|
+
}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 73, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
67
67
|
// TODO(burdon): Is this the right place to set this state?
|
|
68
68
|
(_b = (_a = observable.callback).onAuthenticating) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
69
69
|
return {
|
|
@@ -73,7 +73,7 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
75
|
authenticate: async ({ authenticationCode: code }) => {
|
|
76
|
-
(0, log_1.log)('received authentication request', { authenticationCode: code }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 87 });
|
|
76
|
+
(0, log_1.log)('received authentication request', { authenticationCode: code }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 87, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
77
77
|
authenticationCode = code;
|
|
78
78
|
},
|
|
79
79
|
// TODO(burdon): Not used: controlFeedKey, dataFeedKey.
|
|
@@ -86,7 +86,7 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
86
86
|
throw new Error('authentication code not set');
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
(0, log_1.log)('writing guest credentials', { host: identity.deviceKey, guest: credentials.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 104 });
|
|
89
|
+
(0, log_1.log)('writing guest credentials', { host: identity.deviceKey, guest: credentials.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 104, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
90
90
|
// TODO(burdon): Check if already admitted.
|
|
91
91
|
await identity.admitDevice(credentials);
|
|
92
92
|
// Updating credentials complete.
|
|
@@ -104,15 +104,15 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
104
104
|
});
|
|
105
105
|
try {
|
|
106
106
|
await peer.open();
|
|
107
|
-
(0, log_1.log)('connected', { host: identity.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 123 });
|
|
107
|
+
(0, log_1.log)('connected', { host: identity.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 123, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
108
108
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
109
109
|
const deviceKey = await complete.wait({ timeout });
|
|
110
|
-
(0, log_1.log)('admitted guest', { host: identity.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 126 });
|
|
110
|
+
(0, log_1.log)('admitted guest', { host: identity.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 126, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
111
111
|
observable.callback.onSuccess(invitation);
|
|
112
112
|
}
|
|
113
113
|
catch (err) {
|
|
114
114
|
if (!observable.cancelled) {
|
|
115
|
-
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 130 });
|
|
115
|
+
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 130, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
116
116
|
observable.callback.onError(err);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -126,7 +126,7 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
126
126
|
var _a, _b;
|
|
127
127
|
const topic = invitation.swarmKey;
|
|
128
128
|
const peerId = keys_1.PublicKey.random(); // Use anonymous key.
|
|
129
|
-
swarmConnection = await this._networkManager.
|
|
129
|
+
swarmConnection = await this._networkManager.joinSwarm({
|
|
130
130
|
topic,
|
|
131
131
|
peerId: topic,
|
|
132
132
|
protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
|
|
@@ -170,18 +170,18 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
170
170
|
if (++connectionCount > 1) {
|
|
171
171
|
throw new Error(`multiple connections detected: ${connectionCount}`);
|
|
172
172
|
}
|
|
173
|
-
(0, log_1.log)('connected', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 194 });
|
|
173
|
+
(0, log_1.log)('connected', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 194, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
174
174
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
175
175
|
// 1. Send request.
|
|
176
|
-
(0, log_1.log)('sending admission request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 198 });
|
|
176
|
+
(0, log_1.log)('sending admission request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 198, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
177
177
|
const { identityKey, haloSpaceKey, genesisFeedKey } = await peer.rpc.HaloHostService.requestAdmission();
|
|
178
178
|
// 2. Get authentication code.
|
|
179
179
|
// TODO(burdon): Test timeout (options for timeouts at different steps).
|
|
180
180
|
if (invitation.type === undefined || invitation.type === services_1.Invitation.Type.INTERACTIVE) {
|
|
181
|
-
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 204 });
|
|
181
|
+
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 204, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
182
182
|
(_d = (_c = observable.callback).onAuthenticating) === null || _d === void 0 ? void 0 : _d.call(_c, invitation);
|
|
183
183
|
const authenticationCode = await authenticated.wait({ timeout });
|
|
184
|
-
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 207 });
|
|
184
|
+
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 207, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
185
185
|
await peer.rpc.HaloHostService.authenticate({ authenticationCode });
|
|
186
186
|
}
|
|
187
187
|
// 3. Create local identity.
|
|
@@ -192,15 +192,15 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
192
192
|
haloGenesisFeedKey: genesisFeedKey
|
|
193
193
|
});
|
|
194
194
|
// 4. Send admission credentials to host (with local identity keys).
|
|
195
|
-
(0, log_1.log)('presenting admission credentials', { guest: identity.deviceKey, identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 220 });
|
|
195
|
+
(0, log_1.log)('presenting admission credentials', { guest: identity.deviceKey, identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 220, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
196
196
|
await peer.rpc.HaloHostService.presentAdmissionCredentials(identity.getAdmissionCredentials());
|
|
197
197
|
// 5. Success.
|
|
198
|
-
(0, log_1.log)('admitted by host', { guest: identity.deviceKey, identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 224 });
|
|
198
|
+
(0, log_1.log)('admitted by host', { guest: identity.deviceKey, identityKey }, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 224, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
199
199
|
complete.wake(identityKey);
|
|
200
200
|
}
|
|
201
201
|
catch (err) {
|
|
202
202
|
if (!observable.cancelled) {
|
|
203
|
-
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 228 });
|
|
203
|
+
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/halo-invitations-handler.ts", line: 228, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
204
204
|
observable.callback.onError(err);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
@@ -213,7 +213,7 @@ class HaloInvitationsHandler extends invitations_handler_1.AbstractInvitationsHa
|
|
|
213
213
|
(0, assert_1.default)(invitation.swarmKey);
|
|
214
214
|
const topic = invitation.swarmKey;
|
|
215
215
|
const peerId = keys_1.PublicKey.random(); // Use anonymous key.
|
|
216
|
-
swarmConnection = await this._networkManager.
|
|
216
|
+
swarmConnection = await this._networkManager.joinSwarm({
|
|
217
217
|
topic,
|
|
218
218
|
peerId: keys_1.PublicKey.random(),
|
|
219
219
|
protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/halo-invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA6C;AAC7C,mDAAqD;AACrD,uCAA4C;AAC5C,qCAAuC;AACvC,mCAAgC;AAChC,2DAA6G;AAC7G,mEAAuE;AACvE,+CAAyC;AACzC,yEAAwE;AACxE,mCAA+C;AAG/C,+CAOuB;AACvB,+DAAuF;AAEvF;;GAEG;AACH,qDAAqD;AACrD,MAAa,sBAAuB,SAAQ,gDAA0B;IACpE,kBAAkB;IAClB,YACE,cAA8B,EACb,gBAAiC;QAElD,KAAK,CAAC,cAAc,CAAC,CAAC;QAFL,qBAAgB,GAAhB,gBAAgB,CAAiB;IAGpD,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,OAAa,EAAE,OAA4B;;QAC1D,IAAI,eAA4C,CAAC;QACjD,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,gCAAkB,EAAE,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"halo-invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/halo-invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA6C;AAC7C,mDAAqD;AACrD,uCAA4C;AAC5C,qCAAuC;AACvC,mCAAgC;AAChC,2DAA6G;AAC7G,mEAAuE;AACvE,+CAAyC;AACzC,yEAAwE;AACxE,mCAA+C;AAG/C,+CAOuB;AACvB,+DAAuF;AAEvF;;GAEG;AACH,qDAAqD;AACrD,MAAa,sBAAuB,SAAQ,gDAA0B;IACpE,kBAAkB;IAClB,YACE,cAA8B,EACb,gBAAiC;QAElD,KAAK,CAAC,cAAc,CAAC,CAAC;QAFL,qBAAgB,GAAhB,gBAAgB,CAAiB;IAGpD,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,OAAa,EAAE,OAA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,CAAC;YAC1C,MAAM,eAAe,CAAC,KAAK,EAAE,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AA9ND,wDA8NC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { PublicKey } from '@dxos/keys';
|
|
1
2
|
import { NetworkManager } from '@dxos/network-manager';
|
|
2
3
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
4
|
import { AuthenticatingInvitationObservable, InvitationObservable } from './invitations';
|
|
4
|
-
export
|
|
5
|
+
export type InvitationsOptions = {
|
|
5
6
|
type?: Invitation.Type;
|
|
6
7
|
timeout?: number;
|
|
8
|
+
swarmKey?: PublicKey;
|
|
7
9
|
};
|
|
8
10
|
/**
|
|
9
11
|
* Common interface for Halo and Space invitation proxies and handlers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAE,kCAAkC,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEzF,
|
|
1
|
+
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAE,kCAAkC,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEzF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,IAAI;IAC1C,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,oBAAoB,CAAC;IACjF,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,kCAAkC,CAAC;CAC5G;AAED;;GAEG;AAEH,8BAAsB,0BAA0B,CAAC,CAAC,GAAG,IAAI,CAAE,YAAW,kBAAkB,CAAC,CAAC,CAAC;IAGvF,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,cAAc;IADpD,SAAS,aACY,eAAe,EAAE,cAAc;IAGpD,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,oBAAoB;IACzF,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,kCAAkC;CACpH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;
|
|
1
|
+
{"version":3,"file":"invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AA+CF;;GAEG;AACH,8CAA8C;AAC9C,MAAsB,0BAA0B;IAC9C,kBAAkB;IAClB,YACqB,eAA+B;QAA/B,oBAAe,GAAf,eAAe,CAAgB;IACjD,CAAC;CAIL;AARD,gEAQC"}
|
|
@@ -53,7 +53,7 @@ class AbstractInvitationsProxy {
|
|
|
53
53
|
break;
|
|
54
54
|
}
|
|
55
55
|
default: {
|
|
56
|
-
log_1.log.error(`Invalid state: ${invitation.state}`, {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-proxy.ts", line: 81 });
|
|
56
|
+
log_1.log.error(`Invalid state: ${invitation.state}`, {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-proxy.ts", line: 81, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}, (err) => {
|
|
@@ -106,7 +106,7 @@ class AbstractInvitationsProxy {
|
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
default: {
|
|
109
|
-
log_1.log.error(`Invalid state: ${invitation.state}`, {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-proxy.ts", line: 146 });
|
|
109
|
+
log_1.log.error(`Invalid state: ${invitation.state}`, {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-proxy.ts", line: 146, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}, (err) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-proxy.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-proxy.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA8C;AAE9C,mCAAgC;AAChC,yEAAwE;AAExE,+CAMuB;AAWvB,MAAsB,wBAAwB;IAC5C,kBAAkB;IAClB,YACmB,mBAAuC;QAAvC,wBAAmB,GAAnB,mBAAmB,CAAoB;IACvD,CAAC;IAIJ,gBAAgB,CAAC,OAAU,EAAE,OAA4B;QACvD,IAAI,YAAoB,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,0CAA4B,CA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,CAAC,SAAS,CAAC,CAAC;oBAC/B,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,WAAW,kDAAI,CAAC;oBACpC,MAAM;iBACP;gBAED,OAAO,CAAC,CAAC;oBACP,SAAG,CAAC,KAAK,CAAC,kBAAkB,UAAU,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"invitations-proxy.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-proxy.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA8C;AAE9C,mCAAgC;AAChC,yEAAwE;AAExE,+CAMuB;AAWvB,MAAsB,wBAAwB;IAC5C,kBAAkB;IAClB,YACmB,mBAAuC;QAAvC,wBAAmB,GAAnB,mBAAmB,CAAoB;IACvD,CAAC;IAIJ,gBAAgB,CAAC,OAAU,EAAE,OAA4B;QACvD,IAAI,YAAoB,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,0CAA4B,CAAC,KAAK,IAAI,EAAE;YAC7D,IAAI,YAAY,EAAE;gBAChB,MAAM,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;aACnE;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,UAAU,GAAe,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;QACrF,MAAM,MAAM,GAAuB,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAEzF,MAAM,CAAC,SAAS,CACd,CAAC,UAAsB,EAAE,EAAE;;YACzB,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAErC,QAAQ,UAAU,CAAC,KAAK,EAAE;gBACxB,KAAK,qBAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;oBAChC,IAAA,gBAAM,EAAC,UAAU,CAAC,YAAY,CAAC,CAAC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AU,CAAC,CAAC;oBACnD,MAAM;iBACP;gBAED,KAAK,qBAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBAC7B,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,SAAS,mDAAG,UAAU,CAAC,CAAC;oBAC5C,MAAM;iBACP;gBAED,KAAK,qBAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;oBAC/B,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,WAAW,kDAAI,CAAC;oBACpC,MAAM;iBACP;gBAED,OAAO,CAAC,CAAC;oBACP,SAAG,CAAC,KAAK,CAAC,kBAAkB,UAAU,CAAC,KAAK,EAAE,6SAAC,CAAC;iBACjD;aACF;QACH,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,IAAI,GAAG,EAAE;gBACP,IAAA,uBAAe,EAAC,UAAU,EAAE,GAAG,CAAC,CAAC;aAClC;QACH,CAAC,CACF,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAlID,4DAkIC"}
|
|
@@ -33,10 +33,10 @@ class AbstractInvitationsService {
|
|
|
33
33
|
return new codec_protobuf_1.Stream(({ next, close }) => {
|
|
34
34
|
const invitationsHandler = this._getInvitationsHandler();
|
|
35
35
|
const context = this.getContext(invitation);
|
|
36
|
-
(0, log_1.log)('stream opened', this.getLoggingContext(), { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 43 });
|
|
36
|
+
(0, log_1.log)('stream opened', this.getLoggingContext(), { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 43, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
37
37
|
let invitationId;
|
|
38
|
-
const { type } = invitation;
|
|
39
|
-
const observable = invitationsHandler.createInvitation(context, { type });
|
|
38
|
+
const { type, swarmKey } = invitation;
|
|
39
|
+
const observable = invitationsHandler.createInvitation(context, { type, swarmKey });
|
|
40
40
|
observable.subscribe({
|
|
41
41
|
onConnecting: (invitation) => {
|
|
42
42
|
(0, assert_1.default)(invitation.invitationId);
|
|
@@ -80,10 +80,10 @@ class AbstractInvitationsService {
|
|
|
80
80
|
return (err) => {
|
|
81
81
|
const context = this.getLoggingContext();
|
|
82
82
|
if (err) {
|
|
83
|
-
log_1.log.warn('stream closed', { ...context, err }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 92 });
|
|
83
|
+
log_1.log.warn('stream closed', { ...context, err }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 92, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
(0, log_1.log)('stream closed', context, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 94 });
|
|
86
|
+
(0, log_1.log)('stream closed', context, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 94, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
87
87
|
}
|
|
88
88
|
this._createInvitations.delete(invitation.invitationId);
|
|
89
89
|
};
|
|
@@ -91,7 +91,7 @@ class AbstractInvitationsService {
|
|
|
91
91
|
}
|
|
92
92
|
acceptInvitation(invitation, options) {
|
|
93
93
|
return new codec_protobuf_1.Stream(({ next, close }) => {
|
|
94
|
-
(0, log_1.log)('stream opened', this.getLoggingContext(), { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 104 });
|
|
94
|
+
(0, log_1.log)('stream opened', this.getLoggingContext(), { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 104, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
95
95
|
const invitationsHandler = this._getInvitationsHandler();
|
|
96
96
|
let invitationId;
|
|
97
97
|
const observable = invitationsHandler.acceptInvitation(invitation, options);
|
|
@@ -137,21 +137,21 @@ class AbstractInvitationsService {
|
|
|
137
137
|
return (err) => {
|
|
138
138
|
const context = this.getLoggingContext();
|
|
139
139
|
if (err) {
|
|
140
|
-
log_1.log.warn('stream closed', { ...context, err }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 152 });
|
|
140
|
+
log_1.log.warn('stream closed', { ...context, err }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 152, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
|
-
(0, log_1.log)('stream closed', context, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 154 });
|
|
143
|
+
(0, log_1.log)('stream closed', context, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 154, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
144
144
|
}
|
|
145
145
|
this._acceptInvitations.delete(invitation.invitationId);
|
|
146
146
|
};
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
async authenticate({ invitationId, authenticationCode }) {
|
|
150
|
-
(0, log_1.log)('authenticating...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 163 });
|
|
150
|
+
(0, log_1.log)('authenticating...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 163, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
151
151
|
(0, assert_1.default)(invitationId);
|
|
152
152
|
const observable = this._acceptInvitations.get(invitationId);
|
|
153
153
|
if (!observable) {
|
|
154
|
-
log_1.log.warn('invalid invitation', { invitationId }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 167 });
|
|
154
|
+
log_1.log.warn('invalid invitation', { invitationId }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 167, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
157
|
await observable.authenticate(authenticationCode);
|
|
@@ -159,11 +159,11 @@ class AbstractInvitationsService {
|
|
|
159
159
|
}
|
|
160
160
|
async cancelInvitation(invitation) {
|
|
161
161
|
var _a;
|
|
162
|
-
(0, log_1.log)('cancelling...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 174 });
|
|
162
|
+
(0, log_1.log)('cancelling...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 174, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
163
163
|
(0, assert_1.default)(invitation.invitationId);
|
|
164
164
|
const observable = (_a = this._createInvitations.get(invitation.invitationId)) !== null && _a !== void 0 ? _a : this._acceptInvitations.get(invitation.invitationId);
|
|
165
165
|
if (!observable) {
|
|
166
|
-
log_1.log.warn('invalid invitation', { invitationId: invitation.invitationId }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 179 });
|
|
166
|
+
log_1.log.warn('invalid invitation', { invitationId: invitation.invitationId }, { file: "packages/sdk/client-services/src/packlets/invitations/invitations-service.ts", line: 179, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
169
|
await (observable === null || observable === void 0 ? void 0 : observable.cancel());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-service.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAG5B,yDAA8C;AAC9C,mCAAgC;AAChC,yEAA+F;AAO/F;;GAEG;AACH,MAAsB,0BAA0B;IAI9C,kBAAkB;IAClB,YACmB,gBAAiC,EACjC,sBAAuD;QADvD,qBAAgB,GAAhB,gBAAgB,CAAiB;QACjC,2BAAsB,GAAtB,sBAAsB,CAAiC;QANzD,uBAAkB,GAAG,IAAI,GAAG,EAA2C,CAAC;QACxE,uBAAkB,GAAG,IAAI,GAAG,EAA8C,CAAC;IAMzF,CAAC;IAEJ,kCAAkC;IAClC,iBAAiB;;QACf,OAAO;YACL,SAAS,EAAE,MAAA,IAAI,CAAC,gBAAgB,CAAC,QAAQ,0CAAE,SAAS;SACrD,CAAC;IACJ,CAAC;IAID,gBAAgB,CAAC,UAAsB;QACrC,OAAO,IAAI,uBAAM,CAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAChD,MAAM,kBAAkB,GAA0B,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAChF,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAA,SAAG,EAAC,eAAe,EAAE,IAAI,CAAC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"invitations-service.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAG5B,yDAA8C;AAC9C,mCAAgC;AAChC,yEAA+F;AAO/F;;GAEG;AACH,MAAsB,0BAA0B;IAI9C,kBAAkB;IAClB,YACmB,gBAAiC,EACjC,sBAAuD;QADvD,qBAAgB,GAAhB,gBAAgB,CAAiB;QACjC,2BAAsB,GAAtB,sBAAsB,CAAiC;QANzD,uBAAkB,GAAG,IAAI,GAAG,EAA2C,CAAC;QACxE,uBAAkB,GAAG,IAAI,GAAG,EAA8C,CAAC;IAMzF,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ationObservableProvider extends CancellableObservableP
|
|
|
34
34
|
/**
|
|
35
35
|
* Cancelable observer.
|
|
36
36
|
*/
|
|
37
|
-
export
|
|
37
|
+
export type CancellableInvitationObservable = InvitationObservable;
|
|
38
38
|
/**
|
|
39
39
|
* Cancelable observer that relays authentication requests.
|
|
40
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,2BAA2B,EAC3B,UAAU,EACV,6BAA6B,EAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,eAAO,MAAM,kBAAkB,QAAa,CAAC;AAG7C,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7D,YAAY,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7D,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED;;GAEG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,2BAA2B;IAChF,YAAY,CAAC,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5C,WAAW,CAAC,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3C,gBAAgB,CAAC,CAAC,UAAU,EAAE,UAA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Q,UAAU,CAcvG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space-invitations-handler.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/space-invitations-handler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAyB,cAAc,EAAiC,MAAM,uBAAuB,CAAC;AAG7G,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"space-invitations-handler.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/space-invitations-handler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAyB,cAAc,EAAiC,MAAM,uBAAuB,CAAC;AAG7G,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAIxE,OAAO,EACL,gCAAgC,EAChC,oBAAoB,EAKrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEvF;;GAEG;AAEH,qBAAa,uBAAwB,SAAQ,0BAA0B,CAAC,KAAK,CAAC;IAG1E,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAFhC,cAAc,EAAE,cAAc,EACb,aAAa,EAAE,YAAY,EAC3B,eAAe,EAAE,cAAc;IAKlD;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,oBAAoB;IAgIlF;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,gCAAgC;CAiGzG"}
|
|
@@ -35,13 +35,13 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
35
35
|
*/
|
|
36
36
|
createInvitation(space, options) {
|
|
37
37
|
let swarmConnection;
|
|
38
|
-
const { type, timeout = invitations_1.INVITATION_TIMEOUT } = options !== null && options !== void 0 ? options : {};
|
|
38
|
+
const { type, timeout = invitations_1.INVITATION_TIMEOUT, swarmKey } = options !== null && options !== void 0 ? options : {};
|
|
39
39
|
(0, assert_1.default)(type !== services_1.Invitation.Type.OFFLINE);
|
|
40
40
|
(0, assert_1.default)(space);
|
|
41
41
|
const invitation = {
|
|
42
42
|
type,
|
|
43
43
|
invitationId: keys_1.PublicKey.random().toHex(),
|
|
44
|
-
swarmKey: keys_1.PublicKey.random(),
|
|
44
|
+
swarmKey: swarmKey !== null && swarmKey !== void 0 ? swarmKey : keys_1.PublicKey.random(),
|
|
45
45
|
spaceKey: space.key,
|
|
46
46
|
authenticationCode: (0, credentials_1.generatePasscode)(invitations_1.AUTHENTICATION_CODE_LENGTH)
|
|
47
47
|
};
|
|
@@ -53,19 +53,23 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
53
53
|
const complete = new async_1.Trigger();
|
|
54
54
|
const plugin = new protocol_plugin_rpc_1.RpcPlugin(async (port) => {
|
|
55
55
|
var _a, _b;
|
|
56
|
+
let guestProfile;
|
|
56
57
|
const peer = (0, rpc_1.createProtoRpcPeer)({
|
|
57
58
|
exposed: {
|
|
58
59
|
SpaceHostService: protocols_1.schema.getService('dxos.halo.invitations.SpaceHostService')
|
|
59
60
|
},
|
|
60
61
|
handlers: {
|
|
61
62
|
SpaceHostService: {
|
|
62
|
-
requestAdmission: async () => {
|
|
63
|
+
requestAdmission: async ({ profile }) => {
|
|
63
64
|
var _a, _b;
|
|
64
65
|
(0, log_1.log)('responding with admission offer', {
|
|
66
|
+
guestProfile: profile,
|
|
65
67
|
host: this._signingContext.deviceKey,
|
|
66
68
|
spaceKey: space.key
|
|
67
|
-
}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
69
|
+
}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 77, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
70
|
+
guestProfile = profile;
|
|
68
71
|
// TODO(burdon): Is this the right place to set this state?
|
|
72
|
+
// TODO(dmaretskyi): Should we expose guest's profile in this callback?
|
|
69
73
|
(_b = (_a = observable.callback).onAuthenticating) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
70
74
|
return {
|
|
71
75
|
spaceKey: space.key,
|
|
@@ -73,7 +77,7 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
73
77
|
};
|
|
74
78
|
},
|
|
75
79
|
authenticate: async ({ authenticationCode: code }) => {
|
|
76
|
-
(0, log_1.log)('received authentication request', { authenticationCode: code }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
80
|
+
(0, log_1.log)('received authentication request', { authenticationCode: code }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 95, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
77
81
|
authenticationCode = code;
|
|
78
82
|
},
|
|
79
83
|
presentAdmissionCredentials: async ({ identityKey, deviceKey, controlFeedKey, dataFeedKey }) => {
|
|
@@ -85,9 +89,9 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
85
89
|
throw new Error('authentication code not set');
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
(0, log_1.log)('writing guest credentials', { host: this._signingContext.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
92
|
+
(0, log_1.log)('writing guest credentials', { host: this._signingContext.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 111, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
89
93
|
// TODO(burdon): Check if already admitted.
|
|
90
|
-
await (0, feed_store_1.writeMessages)(space.controlPipeline.writer, await (0, credentials_1.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, deviceKey, space.key, controlFeedKey, dataFeedKey));
|
|
94
|
+
await (0, feed_store_1.writeMessages)(space.controlPipeline.writer, await (0, credentials_1.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, deviceKey, space.key, controlFeedKey, dataFeedKey, guestProfile));
|
|
91
95
|
// Updating credentials complete.
|
|
92
96
|
complete.wake(deviceKey);
|
|
93
97
|
}
|
|
@@ -103,15 +107,15 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
103
107
|
});
|
|
104
108
|
try {
|
|
105
109
|
await peer.open();
|
|
106
|
-
(0, log_1.log)('connected', { host: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
110
|
+
(0, log_1.log)('connected', { host: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 141, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
107
111
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
108
112
|
const deviceKey = await complete.wait({ timeout });
|
|
109
|
-
(0, log_1.log)('admitted guest', { host: this._signingContext.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
113
|
+
(0, log_1.log)('admitted guest', { host: this._signingContext.deviceKey, guest: deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 144, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
110
114
|
observable.callback.onSuccess(invitation);
|
|
111
115
|
}
|
|
112
116
|
catch (err) {
|
|
113
117
|
if (!observable.cancelled) {
|
|
114
|
-
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
118
|
+
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 148, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
115
119
|
observable.callback.onError(err);
|
|
116
120
|
}
|
|
117
121
|
}
|
|
@@ -125,7 +129,7 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
125
129
|
var _a, _b;
|
|
126
130
|
const topic = invitation.swarmKey;
|
|
127
131
|
const peerId = keys_1.PublicKey.random(); // Use anonymous key.
|
|
128
|
-
swarmConnection = await this._networkManager.
|
|
132
|
+
swarmConnection = await this._networkManager.joinSwarm({
|
|
129
133
|
topic,
|
|
130
134
|
peerId: topic,
|
|
131
135
|
protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
|
|
@@ -169,25 +173,27 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
169
173
|
if (++connectionCount > 1) {
|
|
170
174
|
throw new Error(`multiple connections detected: ${connectionCount}`);
|
|
171
175
|
}
|
|
172
|
-
(0, log_1.log)('connected', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
176
|
+
(0, log_1.log)('connected', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 212, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
173
177
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
174
178
|
// 1. Send request.
|
|
175
|
-
(0, log_1.log)('sending admission request', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
176
|
-
const { spaceKey, genesisFeedKey } = await peer.rpc.SpaceHostService.requestAdmission(
|
|
179
|
+
(0, log_1.log)('sending admission request', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 216, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
180
|
+
const { spaceKey, genesisFeedKey } = await peer.rpc.SpaceHostService.requestAdmission({
|
|
181
|
+
profile: this._signingContext.profile
|
|
182
|
+
});
|
|
177
183
|
// 2. Get authentication code.
|
|
178
184
|
// TODO(burdon): Test timeout (options for timeouts at different steps).
|
|
179
185
|
if (invitation.type === undefined || invitation.type === services_1.Invitation.Type.INTERACTIVE) {
|
|
180
|
-
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
186
|
+
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 224, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
181
187
|
(_d = (_c = observable.callback).onAuthenticating) === null || _d === void 0 ? void 0 : _d.call(_c, invitation);
|
|
182
188
|
const authenticationCode = await authenticated.wait({ timeout });
|
|
183
|
-
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
189
|
+
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 227, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
184
190
|
await peer.rpc.SpaceHostService.authenticate({ authenticationCode });
|
|
185
191
|
}
|
|
186
192
|
// 3. Create local space.
|
|
187
193
|
// TODO(burdon): Abandon if does not complete (otherwise retry will fail).
|
|
188
194
|
const space = await this._spaceManager.acceptSpace({ spaceKey, genesisFeedKey });
|
|
189
195
|
// 4. Send admission credentials to host (with local space keys).
|
|
190
|
-
(0, log_1.log)('presenting admission credentials', { guest: this._signingContext.deviceKey, spaceKey: space.key }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
196
|
+
(0, log_1.log)('presenting admission credentials', { guest: this._signingContext.deviceKey, spaceKey: space.key }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 236, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
191
197
|
await peer.rpc.SpaceHostService.presentAdmissionCredentials({
|
|
192
198
|
identityKey: this._signingContext.identityKey,
|
|
193
199
|
deviceKey: this._signingContext.deviceKey,
|
|
@@ -195,12 +201,12 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
195
201
|
dataFeedKey: space.dataFeedKey
|
|
196
202
|
});
|
|
197
203
|
// 5. Success.
|
|
198
|
-
(0, log_1.log)('admitted by host', { guest: this._signingContext.deviceKey, spaceKey: space.key }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
204
|
+
(0, log_1.log)('admitted by host', { guest: this._signingContext.deviceKey, spaceKey: space.key }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 245, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
199
205
|
complete.wake();
|
|
200
206
|
}
|
|
201
207
|
catch (err) {
|
|
202
208
|
if (!observable.cancelled) {
|
|
203
|
-
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
209
|
+
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 249, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation." });
|
|
204
210
|
observable.callback.onError(err);
|
|
205
211
|
}
|
|
206
212
|
}
|
|
@@ -213,7 +219,7 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
213
219
|
(0, assert_1.default)(invitation.swarmKey);
|
|
214
220
|
const topic = invitation.swarmKey;
|
|
215
221
|
const peerId = keys_1.PublicKey.random(); // Use anonymous key.
|
|
216
|
-
swarmConnection = await this._networkManager.
|
|
222
|
+
swarmConnection = await this._networkManager.joinSwarm({
|
|
217
223
|
topic,
|
|
218
224
|
peerId: keys_1.PublicKey.random(),
|
|
219
225
|
protocol: (0, network_manager_1.createProtocolFactory)(topic, peerId, [plugin]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space-invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/space-invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA6C;AAC7C,mDAAiF;AAEjF,iDAAiD;AACjD,qCAAuC;AACvC,mCAAgC;AAChC,2DAA6G;AAC7G,mEAAuE;AACvE,+CAAyC;AACzC,yEAAwE;
|
|
1
|
+
{"version":3,"file":"space-invitations-handler.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/space-invitations-handler.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAA6C;AAC7C,mDAAiF;AAEjF,iDAAiD;AACjD,qCAAuC;AACvC,mCAAgC;AAChC,2DAA6G;AAC7G,mEAAuE;AACvE,+CAAyC;AACzC,y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Message } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
8
8
|
import { Storage } from '@dxos/random-access-storage';
|
|
9
|
-
import { IdentityManager } from '../identity';
|
|
9
|
+
import { CreateIdentityOptions, IdentityManager } from '../identity';
|
|
10
10
|
import { HaloInvitationsHandler, SpaceInvitationsHandler } from '../invitations';
|
|
11
11
|
/**
|
|
12
12
|
* Shared backend for all client services.
|
|
@@ -27,7 +27,8 @@ export declare class ServiceContext {
|
|
|
27
27
|
constructor(storage: Storage, networkManager: NetworkManager, modelFactory: ModelFactory);
|
|
28
28
|
open(): Promise<void>;
|
|
29
29
|
close(): Promise<void>;
|
|
30
|
-
|
|
30
|
+
destroy(): Promise<void>;
|
|
31
|
+
createIdentity(params?: CreateIdentityOptions): Promise<import("../identity").Identity>;
|
|
31
32
|
private _initialize;
|
|
32
33
|
}
|
|
33
34
|
//# sourceMappingURL=service-context.d.ts.map
|