@dxos/client-services 0.1.10 → 0.1.11
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/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/packlets/deprecated/space.d.ts.map +1 -1
- package/dist/src/packlets/deprecated/space.js +21 -21
- package/dist/src/packlets/deprecated/space.js.map +1 -1
- package/dist/src/packlets/deprecated/system.d.ts +3 -1
- package/dist/src/packlets/deprecated/system.d.ts.map +1 -1
- package/dist/src/packlets/deprecated/system.js +3 -4
- package/dist/src/packlets/deprecated/system.js.map +1 -1
- package/dist/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/src/packlets/devtools/feeds.js +2 -1
- package/dist/src/packlets/devtools/feeds.js.map +1 -1
- package/dist/src/packlets/devtools/spaces.d.ts.map +1 -1
- package/dist/src/packlets/devtools/spaces.js +2 -1
- package/dist/src/packlets/devtools/spaces.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.js +5 -5
- package/dist/src/packlets/identity/identity-manager.js.map +1 -1
- package/dist/src/packlets/identity/identity.js +1 -1
- package/dist/src/packlets/identity/identity.js.map +1 -1
- package/dist/src/packlets/invitations/halo-invitations-handler.d.ts +2 -2
- package/dist/src/packlets/invitations/halo-invitations-handler.d.ts.map +1 -1
- package/dist/src/packlets/invitations/halo-invitations-handler.js +13 -13
- package/dist/src/packlets/invitations/halo-invitations-handler.js.map +1 -1
- package/dist/src/packlets/invitations/invitations-handler.d.ts +3 -3
- package/dist/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/src/packlets/invitations/invitations-proxy.d.ts +2 -2
- package/dist/src/packlets/invitations/invitations-proxy.d.ts.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 +10 -10
- package/dist/src/packlets/invitations/invitations-service.js.map +1 -1
- package/dist/src/packlets/invitations/invitations.d.ts +6 -9
- package/dist/src/packlets/invitations/invitations.d.ts.map +1 -1
- package/dist/src/packlets/invitations/invitations.js +6 -5
- package/dist/src/packlets/invitations/invitations.js.map +1 -1
- package/dist/src/packlets/invitations/space-invitations-handler.d.ts +2 -2
- package/dist/src/packlets/invitations/space-invitations-handler.d.ts.map +1 -1
- package/dist/src/packlets/invitations/space-invitations-handler.js +15 -13
- package/dist/src/packlets/invitations/space-invitations-handler.js.map +1 -1
- package/dist/src/packlets/services/service-context.d.ts +1 -1
- package/dist/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/src/packlets/services/service-context.js +10 -6
- package/dist/src/packlets/services/service-context.js.map +1 -1
- package/dist/src/packlets/services/service-host.d.ts +6 -2
- package/dist/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/src/packlets/services/service-host.js +33 -25
- package/dist/src/packlets/services/service-host.js.map +1 -1
- package/dist/src/packlets/services/service-proxy.d.ts.map +1 -1
- package/dist/src/packlets/services/service-proxy.js +1 -1
- package/dist/src/packlets/services/service-proxy.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.map +1 -1
- package/dist/src/packlets/storage/storage.js +6 -6
- package/dist/src/packlets/storage/storage.js.map +1 -1
- package/dist/src/packlets/testing/test-builder.js +1 -1
- package/dist/src/packlets/testing/test-builder.js.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 +28 -28
- package/src/index.ts +0 -2
- package/src/packlets/deprecated/space.ts +21 -20
- package/src/packlets/deprecated/system.ts +4 -4
- package/src/packlets/devtools/feeds.ts +2 -1
- package/src/packlets/devtools/spaces.ts +2 -1
- package/src/packlets/invitations/halo-invitations-handler.ts +2 -2
- package/src/packlets/invitations/invitations-handler.ts +3 -3
- package/src/packlets/invitations/invitations-proxy.ts +2 -2
- package/src/packlets/invitations/invitations.ts +6 -11
- package/src/packlets/invitations/space-invitations-handler.ts +4 -2
- package/src/packlets/services/service-context.ts +7 -2
- package/src/packlets/services/service-host.ts +42 -29
- package/src/packlets/services/service-proxy.ts +1 -1
- package/src/packlets/storage/storage.ts +6 -6
- package/src/packlets/testing/test-builder.ts +1 -1
- package/testing.d.ts +11 -0
- package/testing.js +5 -0
- package/dist/src/errors.d.ts +0 -8
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js +0 -21
- package/dist/src/errors.js.map +0 -1
- package/src/errors.ts +0 -19
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAEpG,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,+BAA+B,CAAC;IAC5F,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,+BAA+B;IACpG,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,kCAAkC;CACpH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
2
|
-
import { AuthenticatingInvitationObservable,
|
|
2
|
+
import { AuthenticatingInvitationObservable, CancellableInvitationObservable, InvitationsService } from './invitations';
|
|
3
3
|
import { InvitationsOptions, InvitationsHandler } from './invitations-handler';
|
|
4
4
|
/**
|
|
5
5
|
* Adapts invitations service observable to client/service stream.
|
|
@@ -12,7 +12,7 @@ export declare abstract class AbstractInvitationsProxy<T = void> implements Invi
|
|
|
12
12
|
private readonly _invitationsService;
|
|
13
13
|
constructor(_invitationsService: InvitationsService);
|
|
14
14
|
abstract getInvitationOptions(context: T): Invitation;
|
|
15
|
-
createInvitation(context: T, options?: InvitationsOptions):
|
|
15
|
+
createInvitation(context: T, options?: InvitationsOptions): CancellableInvitationObservable;
|
|
16
16
|
acceptInvitation(invitation: Invitation, options?: InvitationsOptions): AuthenticatingInvitationObservable;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=invitations-proxy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-proxy.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-proxy.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,OAAO,EACL,kCAAkC,EAElC,
|
|
1
|
+
{"version":3,"file":"invitations-proxy.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations-proxy.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,OAAO,EACL,kCAAkC,EAElC,+BAA+B,EAE/B,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IACvE,oBAAoB,CAAC,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;CAC9C;AAED,8BAAsB,wBAAwB,CAAC,CAAC,GAAG,IAAI,CAAE,YAAW,gBAAgB,CAAC,CAAC,CAAC;IAGnF,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAAnB,mBAAmB,EAAE,kBAAkB;IAG1D,QAAQ,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,GAAG,UAAU;IAErD,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,+BAA+B;IA0D3F,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,kCAAkC;CAgE3G"}
|
|
@@ -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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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,M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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,
|
|
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,EA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,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,WAAW,mDAAG,UAAU,CAAC,CAAC;oBAC9C,MAAM;iBACP;gBAED,KAAK,qBAAU,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;oBACpC,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,gBAAgB,mDAAG,UAAU,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,kVAAC,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,7 +33,7 @@ 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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
37
37
|
let invitationId;
|
|
38
38
|
const { type, swarmKey } = invitation;
|
|
39
39
|
const observable = invitationsHandler.createInvitation(context, { type, swarmKey });
|
|
@@ -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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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, 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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
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,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,uBAA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CAAC;IACL,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAyB;QAC5E,IAAA,SAAG,EAAC,mBAAmB,oVAAC,CAAC;QACzB,IAAA,gBAAM,EAAC,YAAY,CAAC,CAAC;QACrB,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC7D,IAAI,CAAC,UAAU,EAAE;YACf,SAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,YAAY,EAAE,gVAAC,CAAC;SAClD;aAAM;YACL,MAAM,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;SACnD;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,UAAsB;;QAC3C,IAAA,SAAG,EAAC,eAAe,oVAAC,CAAC;QACrB,IAAA,gBAAM,EAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QAChC,MAAM,UAAU,GACd,MAAA,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,mCAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QAC/G,IAAI,CAAC,UAAU,EAAE;YACf,SAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,EAAE,gVAAC,CAAC;SAC3E;aAAM;YACL,MAAM,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAE,CAAA,CAAC;SAC5B;IACH,CAAC;CACF;AApKD,gEAoKC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsyncEvents, CancellableObservable, CancellableObservableEvents,
|
|
1
|
+
import { AsyncEvents, CancellableObservable, CancellableObservableEvents, CancellableObservableProvider } from '@dxos/async';
|
|
2
2
|
import type { Stream } from '@dxos/codec-protobuf';
|
|
3
3
|
import { AuthenticationRequest, CancelInvitationRequest, Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
4
|
export declare const AUTHENTICATION_CODE_LENGTH = 6;
|
|
@@ -23,18 +23,14 @@ export interface InvitationEvents extends AsyncEvents, CancellableObservableEven
|
|
|
23
23
|
* Base class for all invitation observables and providers.
|
|
24
24
|
* Observable that supports inspection of the current value.
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface CancellableInvitationObservable extends CancellableObservable<InvitationEvents> {
|
|
27
27
|
get invitation(): Invitation | undefined;
|
|
28
28
|
}
|
|
29
|
-
export declare class InvitationObservableProvider extends CancellableObservableProvider<InvitationEvents> implements
|
|
29
|
+
export declare class InvitationObservableProvider extends CancellableObservableProvider<InvitationEvents> implements CancellableInvitationObservable {
|
|
30
30
|
private _invitation?;
|
|
31
31
|
get invitation(): Invitation | undefined;
|
|
32
32
|
setInvitation(invitation: Invitation): void;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Cancelable observer.
|
|
36
|
-
*/
|
|
37
|
-
export type CancellableInvitationObservable = InvitationObservable;
|
|
38
34
|
/**
|
|
39
35
|
* Cancelable observer that relays authentication requests.
|
|
40
36
|
*/
|
|
@@ -51,8 +47,9 @@ export declare class AuthenticatingInvitationProvider extends InvitationObservab
|
|
|
51
47
|
authenticate(authenticationCode: string): Promise<void>;
|
|
52
48
|
}
|
|
53
49
|
/**
|
|
54
|
-
*
|
|
50
|
+
* Testing util to wrap non-authenticating observable with promise.
|
|
51
|
+
* Don't use this in production code.
|
|
55
52
|
* @deprecated
|
|
56
53
|
*/
|
|
57
|
-
export declare const
|
|
54
|
+
export declare const wrapObservable: (observable: CancellableInvitationObservable) => Promise<Invitation>;
|
|
58
55
|
//# sourceMappingURL=invitations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,qBAA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CAC1C;AAED,qBAAa,4BACX,SAAQ,6BAA6B,CAAC,gBAAgB,CACtD,YAAW,+BAA+B;IAE1C,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAEvC;IAED,aAAa,CAAC,UAAU,EAAE,UAAU;CAGrC;AAED;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,+BAA+B;IACzF,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,qBAAa,gCACX,SAAQ,4BACR,YAAW,kCAAkC;IAI3C,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,uCAAuC;IAK9D,YAAY,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9D;AAED;;;;GAIG;AAEH,eAAO,MAAM,cAAc,eAAsB,+BAA+B,KAAG,QAAQ,UAAU,CAcpG,CAAC"}
|
|
@@ -6,7 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.wrapObservable = exports.AuthenticatingInvitationProvider = exports.InvitationObservableProvider = exports.ON_CLOSE_DELAY = exports.INVITATION_TIMEOUT = exports.AUTHENTICATION_CODE_LENGTH = void 0;
|
|
10
10
|
const assert_1 = __importDefault(require("assert"));
|
|
11
11
|
const async_1 = require("@dxos/async");
|
|
12
12
|
const services_1 = require("@dxos/protocols/proto/dxos/client/services");
|
|
@@ -35,11 +35,12 @@ class AuthenticatingInvitationProvider extends InvitationObservableProvider {
|
|
|
35
35
|
}
|
|
36
36
|
exports.AuthenticatingInvitationProvider = AuthenticatingInvitationProvider;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Testing util to wrap non-authenticating observable with promise.
|
|
39
|
+
* Don't use this in production code.
|
|
39
40
|
* @deprecated
|
|
40
41
|
*/
|
|
41
|
-
// TODO(burdon):
|
|
42
|
-
const
|
|
42
|
+
// TODO(burdon): Throw error if auth requested.
|
|
43
|
+
const wrapObservable = async (observable) => {
|
|
43
44
|
return new Promise((resolve, reject) => {
|
|
44
45
|
const unsubscribe = observable.subscribe({
|
|
45
46
|
onSuccess: (invitation) => {
|
|
@@ -54,5 +55,5 @@ const invitationObservable = async (observable) => {
|
|
|
54
55
|
});
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
|
-
exports.
|
|
58
|
+
exports.wrapObservable = wrapObservable;
|
|
58
59
|
//# sourceMappingURL=invitations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,
|
|
1
|
+
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../../../../src/packlets/invitations/invitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,oDAA4B;AAE5B,uCAKqB;AAErB,yEAAwH;AAE3G,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAE/B,QAAA,kBAAkB,GAAG,CAAC,GAAG,KAAM,CAAC,CAAC,UAAU;AAExD,0DAA0D;AAC7C,QAAA,cAAc,GAAG,GAAG,CAAC;AA4BlC,MAAa,4BACX,SAAQ,qCAA+C;IAKvD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;CACF;AAbD,oEAaC;AAcD,MAAa,gCACX,SAAQ,4BAA4B;IAGpC,kBAAkB;IAClB,YACmB,QAAiD;QAElE,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QAFrB,aAAQ,GAAR,QAAQ,CAAyC;IAGpE,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,kBAA0B;QAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC1D,CAAC;CACF;AAdD,4EAcC;AAED;;;;GAIG;AACH,+CAA+C;AACxC,MAAM,cAAc,GAAG,KAAK,EAAE,UAA2C,EAAuB,EAAE;IACvG,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC;YACvC,SAAS,EAAE,CAAC,UAAsB,EAAE,EAAE;gBACpC,IAAA,gBAAM,EAAC,UAAU,CAAC,KAAK,KAAK,qBAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACtD,WAAW,EAAE,CAAC;gBACd,OAAO,CAAC,UAAU,CAAC,CAAC;YACtB,CAAC;YACD,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;gBACtB,WAAW,EAAE,CAAC;gBACd,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,cAAc,kBAczB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SigningContext, Space, SpaceManager } from '@dxos/echo-db';
|
|
2
2
|
import { NetworkManager } from '@dxos/network-manager';
|
|
3
3
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
-
import { AuthenticatingInvitationProvider,
|
|
4
|
+
import { AuthenticatingInvitationProvider, CancellableInvitationObservable } from './invitations';
|
|
5
5
|
import { AbstractInvitationsHandler, InvitationsOptions } from './invitations-handler';
|
|
6
6
|
/**
|
|
7
7
|
* Handles the life-cycle of Space invitations between peers.
|
|
@@ -13,7 +13,7 @@ export declare class SpaceInvitationsHandler extends AbstractInvitationsHandler<
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates an invitation and listens for a join request from the invited (guest) peer.
|
|
15
15
|
*/
|
|
16
|
-
createInvitation(space: Space, options?: InvitationsOptions):
|
|
16
|
+
createInvitation(space: Space, options?: InvitationsOptions): CancellableInvitationObservable;
|
|
17
17
|
/**
|
|
18
18
|
* Waits for the host peer (inviter) to accept our join request.
|
|
19
19
|
* The local guest peer (invitee) then sends the local space invitation to the host,
|
|
@@ -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;AAIxE,OAAO,EACL,gCAAgC,EAChC,
|
|
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,+BAA+B,EAKhC,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,+BAA+B;IAkI7F;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,gCAAgC;CAiGzG"}
|
|
@@ -66,7 +66,7 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
66
66
|
guestProfile: profile,
|
|
67
67
|
host: this._signingContext.deviceKey,
|
|
68
68
|
spaceKey: space.key
|
|
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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
70
70
|
guestProfile = profile;
|
|
71
71
|
// TODO(burdon): Is this the right place to set this state?
|
|
72
72
|
// TODO(dmaretskyi): Should we expose guest's profile in this callback?
|
|
@@ -77,7 +77,7 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
77
77
|
};
|
|
78
78
|
},
|
|
79
79
|
authenticate: async ({ authenticationCode: code }) => {
|
|
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." });
|
|
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.", callSite: (fn, args) => fn(...args) });
|
|
81
81
|
authenticationCode = code;
|
|
82
82
|
},
|
|
83
83
|
presentAdmissionCredentials: async ({ identityKey, deviceKey, controlFeedKey, dataFeedKey }) => {
|
|
@@ -86,10 +86,12 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
86
86
|
if (invitation.type === undefined || invitation.type === services_1.Invitation.Type.INTERACTIVE) {
|
|
87
87
|
if (invitation.authenticationCode === undefined ||
|
|
88
88
|
authenticationCode !== invitation.authenticationCode) {
|
|
89
|
+
invitation.authenticationCode &&
|
|
90
|
+
log_1.log.error('bad auth code', { code: authenticationCode, expected: invitation.authenticationCode }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 108, 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.", callSite: (fn, args) => fn(...args) });
|
|
89
91
|
throw new Error('authentication code not set');
|
|
90
92
|
}
|
|
91
93
|
}
|
|
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:
|
|
94
|
+
(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: 113, 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.", callSite: (fn, args) => fn(...args) });
|
|
93
95
|
// TODO(burdon): Check if already admitted.
|
|
94
96
|
await (0, feed_store_1.writeMessages)(space.controlPipeline.writer, await (0, credentials_1.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, deviceKey, space.key, controlFeedKey, dataFeedKey, guestProfile));
|
|
95
97
|
// Updating credentials complete.
|
|
@@ -107,15 +109,15 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
107
109
|
});
|
|
108
110
|
try {
|
|
109
111
|
await peer.open();
|
|
110
|
-
(0, log_1.log)('connected', { host: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
112
|
+
(0, log_1.log)('connected', { host: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 143, 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.", callSite: (fn, args) => fn(...args) });
|
|
111
113
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
112
114
|
const deviceKey = await complete.wait({ timeout });
|
|
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:
|
|
115
|
+
(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: 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.", callSite: (fn, args) => fn(...args) });
|
|
114
116
|
observable.callback.onSuccess(invitation);
|
|
115
117
|
}
|
|
116
118
|
catch (err) {
|
|
117
119
|
if (!observable.cancelled) {
|
|
118
|
-
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
120
|
+
log_1.log.error('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 150, 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.", callSite: (fn, args) => fn(...args) });
|
|
119
121
|
observable.callback.onError(err);
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -173,27 +175,27 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
173
175
|
if (++connectionCount > 1) {
|
|
174
176
|
throw new Error(`multiple connections detected: ${connectionCount}`);
|
|
175
177
|
}
|
|
176
|
-
(0, log_1.log)('connected', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
178
|
+
(0, log_1.log)('connected', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 214, 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.", callSite: (fn, args) => fn(...args) });
|
|
177
179
|
(_b = (_a = observable.callback).onConnected) === null || _b === void 0 ? void 0 : _b.call(_a, invitation);
|
|
178
180
|
// 1. Send request.
|
|
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:
|
|
181
|
+
(0, log_1.log)('sending admission request', { guest: this._signingContext.deviceKey }, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 218, 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.", callSite: (fn, args) => fn(...args) });
|
|
180
182
|
const { spaceKey, genesisFeedKey } = await peer.rpc.SpaceHostService.requestAdmission({
|
|
181
183
|
profile: this._signingContext.profile
|
|
182
184
|
});
|
|
183
185
|
// 2. Get authentication code.
|
|
184
186
|
// TODO(burdon): Test timeout (options for timeouts at different steps).
|
|
185
187
|
if (invitation.type === undefined || invitation.type === services_1.Invitation.Type.INTERACTIVE) {
|
|
186
|
-
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
188
|
+
(0, log_1.log)('guest waiting for authentication code...', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 226, 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.", callSite: (fn, args) => fn(...args) });
|
|
187
189
|
(_d = (_c = observable.callback).onAuthenticating) === null || _d === void 0 ? void 0 : _d.call(_c, invitation);
|
|
188
190
|
const authenticationCode = await authenticated.wait({ timeout });
|
|
189
|
-
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
191
|
+
(0, log_1.log)('sending authentication request', {}, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 229, 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.", callSite: (fn, args) => fn(...args) });
|
|
190
192
|
await peer.rpc.SpaceHostService.authenticate({ authenticationCode });
|
|
191
193
|
}
|
|
192
194
|
// 3. Create local space.
|
|
193
195
|
// TODO(burdon): Abandon if does not complete (otherwise retry will fail).
|
|
194
196
|
const space = await this._spaceManager.acceptSpace({ spaceKey, genesisFeedKey });
|
|
195
197
|
// 4. Send admission credentials to host (with local space keys).
|
|
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:
|
|
198
|
+
(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: 238, 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.", callSite: (fn, args) => fn(...args) });
|
|
197
199
|
await peer.rpc.SpaceHostService.presentAdmissionCredentials({
|
|
198
200
|
identityKey: this._signingContext.identityKey,
|
|
199
201
|
deviceKey: this._signingContext.deviceKey,
|
|
@@ -201,12 +203,12 @@ class SpaceInvitationsHandler extends invitations_handler_1.AbstractInvitationsH
|
|
|
201
203
|
dataFeedKey: space.dataFeedKey
|
|
202
204
|
});
|
|
203
205
|
// 5. Success.
|
|
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:
|
|
206
|
+
(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: 247, 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.", callSite: (fn, args) => fn(...args) });
|
|
205
207
|
complete.wake();
|
|
206
208
|
}
|
|
207
209
|
catch (err) {
|
|
208
210
|
if (!observable.cancelled) {
|
|
209
|
-
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line:
|
|
211
|
+
log_1.log.warn('failed', err, { file: "packages/sdk/client-services/src/packlets/invitations/space-invitations-handler.ts", line: 251, 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.", callSite: (fn, args) => fn(...args) });
|
|
210
212
|
observable.callback.onError(err);
|
|
211
213
|
}
|
|
212
214
|
}
|
|
@@ -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;AA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IAAI,eAAO,EAAa,CAAC;QAC1C,MAAM,MAAM,GAAG,IAAI,+BAAS,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;;YAC1C,IAAI,YAAyC,CAAC;YAE9C,MAAM,IAAI,GAAG,IAAA,wBAAkB,EAAC;gBAC9B,OAAO,EAAE;oBACP,gBAAgB,EAAE,kBAAM,CAAC,UAAU,CAAC,wCAAwC,CAAC;iBAC9E;gBACD,QAAQ,EAAE;oBACR,gBAAgB,EAAE;wBAChB,gBAAgB,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;;4BACtC,IAAA,SAAG,EAAC,iCAAiC,EAAE;gCACrC,YAAY,EAAE,OAAO;gCACrB,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,SAAS;gCACpC,QAAQ,EAAE,KAAK,CAAC,GAAG;6BACpB,
|
|
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;AAExE,mCAA+C;AAE/C,+CAOuB;AACvB,+DAAuF;AAEvF;;GAEG;AACH,qDAAqD;AACrD,MAAa,uBAAwB,SAAQ,gDAAiC;IAC5E,YACE,cAA8B,EACb,aAA2B,EAC3B,eAA+B;QAEhD,KAAK,CAAC,cAAc,CAAC,CAAC;QAHL,kBAAa,GAAb,aAAa,CAAc;QAC3B,oBAAe,GAAf,eAAe,CAAgB;IAGlD,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,KAAY,EAAE,OAA4B;QACzD,IAAI,eAA4C,CAAC;QACjD,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,gCAAkB,EAAE,QAAQ,EAA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M,IAAI,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,KAAK,IAAI,EAAE;;YACpB,IAAA,gBAAM,EAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC5B,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC;YAClC,MAAM,MAAM,GAAG,gBAAS,CAAC,MAAM,EAAE,CAAC,CAAC,qBAAqB;YACxD,eAAe,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;gBACrD,KAAK;gBACL,MAAM,EAAE,gBAAS,CAAC,MAAM,EAAE;gBAC1B,QAAQ,EAAE,IAAA,uCAAqB,EAAC,KAAK,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;gBACxD,QAAQ,EAAE,IAAI,8BAAY,CAAC,KAAK,CAAC;aAClC,CAAC,CAAC;YAEH,MAAA,MAAA,UAAU,CAAC,QAAQ,EAAC,YAAY,mDAAG,UAAU,CAAC,CAAC;YAC/C,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACtB,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAC1C,MAAM,eAAe,CAAC,KAAK,EAAE,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AApPD,0DAoPC"}
|
|
@@ -27,7 +27,7 @@ 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
|
+
reset(): Promise<void>;
|
|
31
31
|
createIdentity(params?: CreateIdentityOptions): Promise<import("../identity").Identity>;
|
|
32
32
|
private _initialize;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-context.d.ts","sourceRoot":"","sources":["../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAIL,wBAAwB,EACxB,aAAa,EACb,YAAY,EAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAe,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEjF;;GAEG;
|
|
1
|
+
{"version":3,"file":"service-context.d.ts","sourceRoot":"","sources":["../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAIL,wBAAwB,EACxB,aAAa,EACb,YAAY,EAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAe,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEjF;;GAEG;AAGH,qBAAa,cAAc;aAeP,OAAO,EAAE,OAAO;aAChB,cAAc,EAAE,cAAc;aAC9B,YAAY,EAAE,YAAY;IAhB5C,SAAgB,WAAW,gBAAiB;IAC5C,SAAgB,wBAAwB,2BAAkC;IAC1E,SAAgB,aAAa,EAAE,aAAa,CAAC;IAC7C,SAAgB,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAClD,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,eAAe,EAAE,eAAe,CAAC;IACjD,SAAgB,eAAe,EAAE,sBAAsB,CAAC;IAGjD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;gBAIhC,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY;IA4BtC,IAAI;IASJ,KAAK;IAUL,KAAK;IAOL,cAAc,CAAC,MAAM,GAAE,qBAA0B;YASzC,WAAW;CA2B1B"}
|
|
@@ -42,25 +42,29 @@ class ServiceContext {
|
|
|
42
42
|
this.haloInvitations = new invitations_1.HaloInvitationsHandler(this.networkManager, this.identityManager);
|
|
43
43
|
}
|
|
44
44
|
async open() {
|
|
45
|
-
(0, log_1.log)('opening...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line:
|
|
45
|
+
(0, log_1.log)('opening...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 78, 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.", callSite: (fn, args) => fn(...args) });
|
|
46
46
|
await this.identityManager.open();
|
|
47
47
|
if (this.identityManager.identity) {
|
|
48
48
|
await this._initialize();
|
|
49
49
|
}
|
|
50
|
-
(0, log_1.log)('opened', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line:
|
|
50
|
+
(0, log_1.log)('opened', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 83, 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.", callSite: (fn, args) => fn(...args) });
|
|
51
51
|
}
|
|
52
52
|
async close() {
|
|
53
53
|
var _a;
|
|
54
|
-
(0, log_1.log)('closing...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line:
|
|
54
|
+
(0, log_1.log)('closing...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.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.", callSite: (fn, args) => fn(...args) });
|
|
55
55
|
await this.identityManager.close();
|
|
56
56
|
await ((_a = this.spaceManager) === null || _a === void 0 ? void 0 : _a.close());
|
|
57
57
|
await this.feedStore.close();
|
|
58
58
|
await this.networkManager.close();
|
|
59
59
|
this.dataServiceSubscriptions.clear();
|
|
60
|
-
(0, log_1.log)('closed', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line:
|
|
60
|
+
(0, log_1.log)('closed', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 93, 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.", callSite: (fn, args) => fn(...args) });
|
|
61
|
+
}
|
|
62
|
+
async reset() {
|
|
63
|
+
(0, log_1.log)('resetting...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 97, 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.", callSite: (fn, args) => fn(...args) });
|
|
64
|
+
await this.close();
|
|
65
|
+
await this.storage.reset();
|
|
66
|
+
(0, log_1.log)('reset', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 100, 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.", callSite: (fn, args) => fn(...args) });
|
|
61
67
|
}
|
|
62
|
-
// TODO(burdon): Rename.
|
|
63
|
-
async destroy() { }
|
|
64
68
|
async createIdentity(params = {}) {
|
|
65
69
|
const identity = await this.identityManager.createIdentity(params);
|
|
66
70
|
this.dataServiceSubscriptions.registerSpace(identity.haloSpaceKey, identity.haloDatabase.createDataServiceHost());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-context.js","sourceRoot":"","sources":["../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uCAAsC;AACtC,uCAA4C;AAC5C,2CAQuB;AACvB,iDAA0D;AAC1D,2CAAwC;AACxC,mCAAgC;AAMhC,0CAAqE;AACrE,gDAAiF;AAEjF;;GAEG;
|
|
1
|
+
{"version":3,"file":"service-context.js","sourceRoot":"","sources":["../../../../src/packlets/services/service-context.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,uCAAsC;AACtC,uCAA4C;AAC5C,2CAQuB;AACvB,iDAA0D;AAC1D,2CAAwC;AACxC,mCAAgC;AAMhC,0CAAqE;AACrE,gDAAiF;AAEjF;;GAEG;AAEH,sFAAsF;AACtF,MAAa,cAAc;IAazB,kBAAkB;IAClB,YACkB,OAAgB,EAChB,cAA8B,EAC9B,YAA0B;QAF1B,YAAO,GAAP,OAAO,CAAS;QAChB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,iBAAY,GAAZ,YAAY,CAAc;QAhB5B,gBAAW,GAAG,IAAI,eAAO,EAAE,CAAC;QAC5B,6BAAwB,GAAG,IAAI,kCAAwB,EAAE,CAAC;QAiBxE,2CAA2C;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAa,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,OAA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;YACvD,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,cAAc;SACf,CAAC,CAAC;QAEH,MAAM,YAAY,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,IAAI,qCAAuB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAC5G,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;CACF;AA3GD,wCA2GC"}
|
|
@@ -12,13 +12,17 @@ type ClientServicesHostParams = {
|
|
|
12
12
|
* Remote service implementation.
|
|
13
13
|
*/
|
|
14
14
|
export declare class ClientServicesHost implements ClientServicesProvider {
|
|
15
|
-
private
|
|
16
|
-
private
|
|
15
|
+
private _serviceContext;
|
|
16
|
+
private _serviceRegistry;
|
|
17
|
+
private readonly _config;
|
|
18
|
+
private readonly _modelFactory;
|
|
19
|
+
private readonly _networkManager;
|
|
17
20
|
constructor({ config, modelFactory, networkManager }: ClientServicesHostParams);
|
|
18
21
|
get descriptors(): import("@dxos/rpc").ServiceBundle<ClientServices>;
|
|
19
22
|
get services(): ClientServices;
|
|
20
23
|
open(): Promise<void>;
|
|
21
24
|
close(): Promise<void>;
|
|
25
|
+
_initialize(): Promise<void>;
|
|
22
26
|
}
|
|
23
27
|
export {};
|
|
24
28
|
//# sourceMappingURL=service-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-host.d.ts","sourceRoot":"","sources":["../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAWvD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAuB,MAAM,uBAAuB,CA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