@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
|
@@ -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,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
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;AAEH,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;IAWL,OAAO;IAEP,cAAc,CAAC,MAAM,GAAE,qBAA0B;YASzC,WAAW;CA2B1B"}
|
|
@@ -42,25 +42,27 @@ 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: 77 });
|
|
45
|
+
(0, log_1.log)('opening...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.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." });
|
|
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: 82 });
|
|
50
|
+
(0, log_1.log)('opened', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 82, 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." });
|
|
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: 86 });
|
|
54
|
+
(0, log_1.log)('closing...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.ts", line: 86, 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." });
|
|
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
|
-
await this.networkManager.
|
|
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: 92 });
|
|
60
|
+
(0, log_1.log)('closed', {}, { file: "packages/sdk/client-services/src/packlets/services/service-context.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." });
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
// TODO(burdon): Rename.
|
|
63
|
+
async destroy() { }
|
|
64
|
+
async createIdentity(params = {}) {
|
|
65
|
+
const identity = await this.identityManager.createIdentity(params);
|
|
64
66
|
this.dataServiceSubscriptions.registerSpace(identity.haloSpaceKey, identity.haloDatabase.createDataServiceHost());
|
|
65
67
|
await this._initialize();
|
|
66
68
|
return identity;
|
|
@@ -74,7 +76,8 @@ class ServiceContext {
|
|
|
74
76
|
credentialAuthenticator: echo_db_1.MOCK_AUTH_VERIFIER,
|
|
75
77
|
credentialSigner: identity.getIdentityCredentialSigner(),
|
|
76
78
|
identityKey: identity.identityKey,
|
|
77
|
-
deviceKey: identity.deviceKey
|
|
79
|
+
deviceKey: identity.deviceKey,
|
|
80
|
+
profile: identity.profileDocument
|
|
78
81
|
};
|
|
79
82
|
// Create in constructor (avoid all of these private variables).
|
|
80
83
|
const spaceManager = new echo_db_1.SpaceManager({
|
|
@@ -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,
|
|
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;AACH,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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,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;AAvGD,wCAuGC"}
|
|
@@ -3,7 +3,7 @@ import { HaloInvitationsService, SpaceInvitationsService, SpacesService, Devices
|
|
|
3
3
|
import { DevtoolsHost, TracingService } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
4
4
|
import { DataService } from '@dxos/protocols/proto/dxos/echo/service';
|
|
5
5
|
import { ServiceBundle } from '@dxos/rpc';
|
|
6
|
-
export
|
|
6
|
+
export type ClientServices = {
|
|
7
7
|
HaloInvitationsService: HaloInvitationsService;
|
|
8
8
|
DevicesService: DevicesService;
|
|
9
9
|
SpaceInvitationsService: SpaceInvitationsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-definitions.d.ts","sourceRoot":"","sources":["../../../../src/packlets/services/service-definitions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACf,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAuB,aAAa,EAAE,MAAM,WAAW,CAAC;AAM/D,
|
|
1
|
+
{"version":3,"file":"service-definitions.d.ts","sourceRoot":"","sources":["../../../../src/packlets/services/service-definitions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACf,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAuB,aAAa,EAAE,MAAM,WAAW,CAAC;AAM/D,MAAM,MAAM,cAAc,GAAG;IAC3B,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,cAAc,EAAE,cAAc,CAAC;IAE/B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,aAAa,EAAE,aAAa,CAAC;IAG7B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,cAAc,CAAC;IAEzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,+BAa9B,CAAC"}
|
|
@@ -2,12 +2,12 @@ import { Config } from '@dxos/config';
|
|
|
2
2
|
import { ModelFactory } from '@dxos/model-factory';
|
|
3
3
|
import { NetworkManager } from '@dxos/network-manager';
|
|
4
4
|
import { ClientServicesProvider, ClientServices } from './service-definitions';
|
|
5
|
-
declare
|
|
5
|
+
export declare const createDefaultModelFactory: () => ModelFactory;
|
|
6
|
+
type ClientServicesHostParams = {
|
|
6
7
|
config: Config;
|
|
7
8
|
modelFactory?: ModelFactory;
|
|
8
9
|
networkManager: NetworkManager;
|
|
9
10
|
};
|
|
10
|
-
export declare const createDefaultModelFactory: () => ModelFactory;
|
|
11
11
|
/**
|
|
12
12
|
* Remote service implementation.
|
|
13
13
|
*/
|
|
@@ -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,CAAC;
|
|
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,CAAC;AAKpG,eAAO,MAAM,yBAAyB,oBAErC,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,qBAAa,kBAAmB,YAAW,sBAAsB;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkC;gBAEvD,EACV,MAAM,EACN,YAA0C,EAE1C,cAAc,EACf,EAAE,wBAAwB;IAuC3B,IAAI,WAAW,sDAEd;IAED,IAAI,QAAQ,mBAEX;IAEK,IAAI;IAOJ,KAAK;CAMZ"}
|
|
@@ -28,7 +28,6 @@ exports.createDefaultModelFactory = createDefaultModelFactory;
|
|
|
28
28
|
/**
|
|
29
29
|
* Remote service implementation.
|
|
30
30
|
*/
|
|
31
|
-
// TODO(burdon): Reconcile Host/Backend, etc.
|
|
32
31
|
class ClientServicesHost {
|
|
33
32
|
constructor({ config, modelFactory = (0, exports.createDefaultModelFactory)(),
|
|
34
33
|
// TODO(burdon): Create ApolloLink abstraction (see Client).
|
|
@@ -65,16 +64,16 @@ class ClientServicesHost {
|
|
|
65
64
|
async open() {
|
|
66
65
|
var _a;
|
|
67
66
|
const deviceKey = (_a = this._serviceContext.identityManager.identity) === null || _a === void 0 ? void 0 : _a.deviceKey;
|
|
68
|
-
(0, log_1.log)('opening...', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line:
|
|
67
|
+
(0, log_1.log)('opening...', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.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." });
|
|
69
68
|
await this._serviceContext.open();
|
|
70
|
-
(0, log_1.log)('opened', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line:
|
|
69
|
+
(0, log_1.log)('opened', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line: 99, 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." });
|
|
71
70
|
}
|
|
72
71
|
async close() {
|
|
73
72
|
var _a;
|
|
74
73
|
const deviceKey = (_a = this._serviceContext.identityManager.identity) === null || _a === void 0 ? void 0 : _a.deviceKey;
|
|
75
|
-
(0, log_1.log)('closing...', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line:
|
|
74
|
+
(0, log_1.log)('closing...', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.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." });
|
|
76
75
|
await this._serviceContext.close();
|
|
77
|
-
(0, log_1.log)('closed', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line:
|
|
76
|
+
(0, log_1.log)('closed', { deviceKey }, { file: "packages/sdk/client-services/src/packlets/services/service-host.ts", line: 106, 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." });
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
exports.ClientServicesHost = ClientServicesHost;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-host.js","sourceRoot":"","sources":["../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAGF,uCAAoC;AACpC,2CAAgD;AAChD,mCAAgC;AAChC,uDAAmD;AAEnD,qDAAiD;AACjD,iDAA6C;AAE7C,8CAA4G;AAC5G,0CAAsE;AACtE,2EAAsE;AACtE,gDAAyF;AACzF,sCAA8C;AAC9C,wCAAkD;AAClD,uDAAmD;AACnD,+DAAoG;AACpG,yDAAqD;
|
|
1
|
+
{"version":3,"file":"service-host.js","sourceRoot":"","sources":["../../../../src/packlets/services/service-host.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAGF,uCAAoC;AACpC,2CAAgD;AAChD,mCAAgC;AAChC,uDAAmD;AAEnD,qDAAiD;AACjD,iDAA6C;AAE7C,8CAA4G;AAC5G,0CAAsE;AACtE,2EAAsE;AACtE,gDAAyF;AACzF,sCAA8C;AAC9C,wCAAkD;AAClD,uDAAmD;AACnD,+DAAoG;AACpG,yDAAqD;AAErD,sCAAsC;AACtC,2CAA2C;AACpC,MAAM,yBAAyB,GAAG,GAAG,EAAE;I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AC;IAC/B,CAAC;CACF;AArED,gDAqEC"}
|
|
@@ -40,16 +40,16 @@ describe('service registry', function () {
|
|
|
40
40
|
handlers: serviceRegistry.services,
|
|
41
41
|
port: serverPort
|
|
42
42
|
});
|
|
43
|
-
(0, log_1.log)('opening...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 60 });
|
|
43
|
+
(0, log_1.log)('opening...', {}, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 60, 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." });
|
|
44
44
|
await Promise.all([proxy.open(), server.open()]);
|
|
45
|
-
(0, log_1.log)('open', {}, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 62 });
|
|
45
|
+
(0, log_1.log)('open', {}, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 62, 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." });
|
|
46
46
|
const done = new async_1.Trigger(); // createRpcServer
|
|
47
47
|
{
|
|
48
48
|
const spaceInvitationsProxy = new invitations_1.SpaceInvitationsProxy(proxy.rpc.SpaceInvitationsService);
|
|
49
49
|
const observer = spaceInvitationsProxy.createInvitation(space.key);
|
|
50
50
|
observer.subscribe({
|
|
51
51
|
onConnecting: (invitation) => {
|
|
52
|
-
(0, log_1.log)('connecting', invitation, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 71 });
|
|
52
|
+
(0, log_1.log)('connecting', invitation, { file: "packages/sdk/client-services/src/packlets/services/service-registry.test.ts", line: 71, 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." });
|
|
53
53
|
void observer.cancel();
|
|
54
54
|
},
|
|
55
55
|
onCancelled: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-registry.test.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AM,GAAG,IAAA,wBAAkB,EAAC;YAChC,OAAO,EAAE,eAAe,CAAC,WAAW;YACpC,QAAQ,EAAE,eAAe,CAAC,QAAQ;YAClC,IAAI,EAAE,UAAU;SACjB,CAAC,CAAC;QAEH,IAAA,SAAG,EAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"service-registry.test.js","sourceRoot":"","sources":["../../../../src/packlets/services/service-registry.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,oDAA4B;AAE5B,uCAAsC;AACtC,mCAAgC;AAChC,+CAAyC;AAEzC,mCAAuF;AAEvF,gDAAoF;AACpF,wCAAkD;AAClD,yDAAqD;AAQrD,MAAM,aAAa,GAAG,IAAA,yBAAmB,EAAe;IACtD,uBAAuB,EAAE,kBAAM,CAAC,UAAU,CAAC,8CAA8C,CAAC;CAC3F,CAAC,CAAC;AAEH,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,EAAE,CAAC,2BAA2B,EAAE,KAAK;QACnC,MAAM,cAAc,GAAG,IAAA,8BAAoB,GAAE,CAAC;QAC9C,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,cAAc,CAAC,cAAc,EAAE,CAAC;QAEtC,IAAA,gBAAM,EAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QACpC,IAAA,gBAAM,EAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAE9D,MAAM,eAAe,GAAG,IAAI,kCAAe,CAAC,aAAa,EAAE;YACzD,uBAAuB,EAAE,IAAI,yCAA2B,CACtD,cAAc,CAAC,eAAe,EAC9B,GAAG,EAAE,CAAC,cAAc,CAAC,gBAAiB,EACtC,GAAG,EAAE,CAAC,cAAc,CAAC,YAAa,CACnC;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,IAA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I,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1C,CAAC;aACF,CAAC,CAAC;SACJ;QAED,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAElB,+CAA+C;QAC/C,8EAA8E;QAC9E,qBAAqB;QACrB,sDAAsD;QACtD,gCAAgC;QAChC,iBAAiB;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
2
|
-
export
|
|
2
|
+
export type KeyStorageType = 'ram' | 'leveljs' | 'jsondown';
|
|
3
3
|
export declare const createStorageObjects: (config: Runtime.Client.Storage) => {
|
|
4
4
|
storage: import("@dxos/random-access-storage").Storage;
|
|
5
5
|
keyStorage: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/packlets/storage/storage.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAO5D,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/packlets/storage/storage.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAO5D,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAG5D,eAAO,MAAM,oBAAoB,WAAY,QAAQ,MAAM,QAAQ;;;CA4BlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe-runtime.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/iframe-runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AAKtE,
|
|
1
|
+
{"version":3,"file":"iframe-runtime.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/iframe-runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AAKtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IACtC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgC;gBAEtD,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,mBAAmB;IAwBvE,IAAI,CAAC,MAAM,EAAE,MAAM;IAKnB,KAAK;CAIZ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { IframeService, WorkerService } from '@dxos/protocols/proto/dxos/iframe';
|
|
2
2
|
import type { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
|
|
3
3
|
import { ServiceBundle } from '@dxos/rpc';
|
|
4
|
-
export
|
|
4
|
+
export type IframeServiceBundle = {
|
|
5
5
|
IframeService: IframeService;
|
|
6
6
|
BridgeService: BridgeService;
|
|
7
7
|
};
|
|
8
8
|
export declare const iframeServiceBundle: ServiceBundle<IframeServiceBundle>;
|
|
9
|
-
export
|
|
9
|
+
export type WorkerServiceBundle = {
|
|
10
10
|
WorkerService: WorkerService;
|
|
11
11
|
};
|
|
12
12
|
export declare const workerServiceBundle: ServiceBundle<WorkerServiceBundle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/services.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/services.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAGlE,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAElE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-runtime.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/worker-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,
|
|
1
|
+
{"version":3,"file":"worker-runtime.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/worker-runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAa;IAUtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IATlC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqC;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAC3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4B;IACrD,OAAO,CAAC,qBAAqB,CAAC,CAAgB;IAC9C,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,OAAO,CAAU;gBAIN,eAAe,EAAE,MAAM,YAAY,CAAC,MAAM,CAAC;IAGxD,KAAK;IAsBL,IAAI;IAKV;;OAEG;IACG,aAAa,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,mBAAmB;IA0BhE;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAmBzB"}
|
|
@@ -3,7 +3,7 @@ import { BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
|
|
|
3
3
|
import { RpcPort } from '@dxos/rpc';
|
|
4
4
|
import { Callback } from '@dxos/util';
|
|
5
5
|
import { ClientServicesHost } from '../services';
|
|
6
|
-
export
|
|
6
|
+
export type WorkerSessionParams = {
|
|
7
7
|
getServices: () => Promise<ClientServicesHost>;
|
|
8
8
|
systemPort: RpcPort;
|
|
9
9
|
appPort: RpcPort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-session.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/worker-session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtE,
|
|
1
|
+
{"version":3,"file":"worker-session.d.ts","sourceRoot":"","sources":["../../../../src/packlets/vault/worker-session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAuB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC/C,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE;QACR,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IACjE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8C;IACvE,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,SAAgB,OAAO,iBAAsB,QAAQ,IAAI,CAAC,EAAI;IAEvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,aAAa,CAAC;gBAEzB,EACV,WAAW,EACX,UAAU,EACV,OAAO,EACP,OAEC,EACF,EAAE,mBAAmB;IAiDhB,IAAI;IAkBJ,KAAK;CAaZ"}
|
|
@@ -52,7 +52,7 @@ class WorkerSession {
|
|
|
52
52
|
await this.close();
|
|
53
53
|
}
|
|
54
54
|
catch (err) {
|
|
55
|
-
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.ts", line: 83 });
|
|
55
|
+
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.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." });
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -75,7 +75,7 @@ class WorkerSession {
|
|
|
75
75
|
await this.close();
|
|
76
76
|
}
|
|
77
77
|
catch (err) {
|
|
78
|
-
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.ts", line: 108 });
|
|
78
|
+
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.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." });
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}, this._options.heartbeatInterval);
|
|
@@ -85,7 +85,7 @@ class WorkerSession {
|
|
|
85
85
|
await this.onClose.callIfSet();
|
|
86
86
|
}
|
|
87
87
|
catch (err) {
|
|
88
|
-
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.ts", line: 118 });
|
|
88
|
+
log_1.log.catch(err, {}, { file: "packages/sdk/client-services/src/packlets/vault/worker-session.ts", line: 118, 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
89
|
}
|
|
90
90
|
if (this._heartbeatTimer !== undefined) {
|
|
91
91
|
clearInterval(this._heartbeatTimer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-session.js","sourceRoot":"","sources":["../../../../src/packlets/vault/worker-session.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0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CAAC,EAAE,OAAO,EAAE,IAAK,EAAE,CAAC,CAAC;QAElD,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;YAC5C,IAAI;gBACF,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;aACrD;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI;oBACF,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;iBACpB;gBAAC,OAAO,GAAQ,EAAE;oBACjB,SAAG,CAAC,KAAK,CAAC,GAAG,oSAAC,CAAC;iBAChB;aACF;QACH,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI;YACF,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;SAChC;QAAC,OAAO,GAAQ,EAAE;YACjB,SAAG,CAAC,KAAK,CAAC,GAAG,oSAAC,CAAC;SAChB;QAED,IAAI,IAAI,CAAC,eAAe,KAAK,SAAS,EAAE;YACtC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACrC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AApGD,sCAoGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,45 +16,55 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@dxos/async": "0.1.9",
|
|
20
|
-
"@dxos/codec-protobuf": "0.1.9",
|
|
21
|
-
"@dxos/config": "0.1.9",
|
|
22
|
-
"@dxos/credentials": "0.1.9",
|
|
23
|
-
"@dxos/crypto": "0.1.9",
|
|
24
|
-
"@dxos/debug": "0.1.9",
|
|
25
|
-
"@dxos/echo-db": "0.1.9",
|
|
26
|
-
"@dxos/feed-store": "0.1.9",
|
|
27
|
-
"@dxos/keyring": "0.1.9",
|
|
28
|
-
"@dxos/keys": "0.1.9",
|
|
29
|
-
"@dxos/log": "0.1.9",
|
|
30
|
-
"@dxos/messaging": "0.1.9",
|
|
31
|
-
"@dxos/model-factory": "0.1.9",
|
|
32
|
-
"@dxos/network-manager": "0.1.9",
|
|
33
|
-
"@dxos/object-model": "0.1.9",
|
|
34
|
-
"@dxos/protocol-plugin-rpc": "0.1.9",
|
|
35
|
-
"@dxos/protocols": "0.1.9",
|
|
36
|
-
"@dxos/random-access-storage": "0.1.9",
|
|
37
|
-
"@dxos/rpc": "0.1.9",
|
|
38
|
-
"@dxos/text-model": "0.1.9",
|
|
39
|
-
"@dxos/timeframe": "0.1.9",
|
|
40
|
-
"@dxos/util": "0.1.9",
|
|
41
19
|
"abstract-leveldown": "~7.0.0",
|
|
42
20
|
"assert": "^2.0.0",
|
|
43
21
|
"base-x": "~3.0.9",
|
|
44
22
|
"jsondown": "dxos/jsondown#main",
|
|
45
23
|
"level-js": "^5.0.2",
|
|
46
|
-
"memdown": "^5.1.0"
|
|
24
|
+
"memdown": "^5.1.0",
|
|
25
|
+
"@dxos/async": "0.1.10",
|
|
26
|
+
"@dxos/codec-protobuf": "0.1.10",
|
|
27
|
+
"@dxos/config": "0.1.10",
|
|
28
|
+
"@dxos/credentials": "0.1.10",
|
|
29
|
+
"@dxos/crypto": "0.1.10",
|
|
30
|
+
"@dxos/debug": "0.1.10",
|
|
31
|
+
"@dxos/echo-db": "0.1.10",
|
|
32
|
+
"@dxos/feed-store": "0.1.10",
|
|
33
|
+
"@dxos/keyring": "0.1.10",
|
|
34
|
+
"@dxos/keys": "0.1.10",
|
|
35
|
+
"@dxos/log": "0.1.10",
|
|
36
|
+
"@dxos/messaging": "0.1.10",
|
|
37
|
+
"@dxos/model-factory": "0.1.10",
|
|
38
|
+
"@dxos/network-manager": "0.1.10",
|
|
39
|
+
"@dxos/object-model": "0.1.10",
|
|
40
|
+
"@dxos/protocol-plugin-rpc": "0.1.10",
|
|
41
|
+
"@dxos/protocols": "0.1.10",
|
|
42
|
+
"@dxos/random-access-storage": "0.1.10",
|
|
43
|
+
"@dxos/rpc": "0.1.10",
|
|
44
|
+
"@dxos/text-model": "0.1.10",
|
|
45
|
+
"@dxos/timeframe": "0.1.10",
|
|
46
|
+
"@dxos/util": "0.1.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@dxos/signal": "0.1.9",
|
|
50
|
-
"@dxos/testutils": "0.1.9",
|
|
51
49
|
"@types/level-js": "~4.0.1",
|
|
52
50
|
"@types/memdown": "^3.0.0",
|
|
53
|
-
"@types/readable-stream": "^2.3.9"
|
|
51
|
+
"@types/readable-stream": "^2.3.9",
|
|
52
|
+
"@dxos/testutils": "0.1.10",
|
|
53
|
+
"@dxos/signal": "0.1.10"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
+
"beast": {
|
|
59
|
+
"classDiagrams": [
|
|
60
|
+
{
|
|
61
|
+
"root": "src/packlets/services/service-host.ts",
|
|
62
|
+
"dependencies": [
|
|
63
|
+
"@dxos/echo-db"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
58
68
|
"scripts": {
|
|
59
69
|
"check": "true"
|
|
60
70
|
}
|
|
@@ -30,7 +30,9 @@ export class ProfileServiceImpl implements ProfileService {
|
|
|
30
30
|
next({
|
|
31
31
|
profile: this.context.identityManager.identity
|
|
32
32
|
? {
|
|
33
|
-
identityKey: this.context.identityManager.identity.identityKey
|
|
33
|
+
identityKey: this.context.identityManager.identity.identityKey,
|
|
34
|
+
deviceKey: this.context.identityManager.identity.deviceKey,
|
|
35
|
+
displayName: this.context.identityManager.identity.profileDocument?.displayName
|
|
34
36
|
}
|
|
35
37
|
: undefined
|
|
36
38
|
});
|
|
@@ -41,8 +43,14 @@ export class ProfileServiceImpl implements ProfileService {
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
async createProfile(request: CreateProfileRequest): Promise<Profile> {
|
|
44
|
-
await this.context.createIdentity(
|
|
45
|
-
|
|
46
|
+
await this.context.createIdentity({
|
|
47
|
+
displayName: request.displayName
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
identityKey: this.context.identityManager.identity!.identityKey,
|
|
51
|
+
deviceKey: this.context.identityManager.identity!.deviceKey,
|
|
52
|
+
displayName: this.context.identityManager.identity!.profileDocument?.displayName
|
|
53
|
+
};
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
async recoverProfile(request: RecoverProfileRequest): Promise<Profile> {
|
|
@@ -106,7 +106,7 @@ export class SpaceServiceImpl implements SpaceService {
|
|
|
106
106
|
identityKey: member.key,
|
|
107
107
|
profile: {
|
|
108
108
|
identityKey: member.key,
|
|
109
|
-
displayName: humanize(member.key)
|
|
109
|
+
displayName: member.assertion.profile?.displayName ?? humanize(member.key)
|
|
110
110
|
}
|
|
111
111
|
}))
|
|
112
112
|
})
|
|
@@ -12,6 +12,7 @@ import { SystemService } from '@dxos/protocols/proto/dxos/client';
|
|
|
12
12
|
export class SystemServiceImpl implements SystemService {
|
|
13
13
|
constructor(private readonly _config: Config) {}
|
|
14
14
|
|
|
15
|
+
// TODO(burdon): Remove.
|
|
15
16
|
async initSession() {
|
|
16
17
|
// Ok.
|
|
17
18
|
}
|
|
@@ -20,6 +21,7 @@ export class SystemServiceImpl implements SystemService {
|
|
|
20
21
|
return this._config.values;
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// TODO(burdon): Reset ServiceContext
|
|
23
25
|
async reset(request: any) {
|
|
24
26
|
todo();
|
|
25
27
|
}
|
|
@@ -19,14 +19,14 @@ export const subscribeToNetworkStatus = ({ networkManager }: { networkManager: N
|
|
|
19
19
|
new Stream<SubscribeToSignalStatusResponse>(({ next, close }) => {
|
|
20
20
|
const update = () => {
|
|
21
21
|
try {
|
|
22
|
-
const status = networkManager.
|
|
22
|
+
const status = networkManager.signalManager.getStatus();
|
|
23
23
|
next({ servers: status });
|
|
24
24
|
} catch (err: any) {
|
|
25
25
|
close(err);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
networkManager.
|
|
29
|
+
networkManager.signalManager.statusChanged.on(update);
|
|
30
30
|
update();
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ export const subscribeToSignalTrace = ({ networkManager }: { networkManager: Net
|
|
|
34
34
|
new Stream<SubscribeToSignalTraceResponse>(({ next }) => {
|
|
35
35
|
next({ events: [] });
|
|
36
36
|
const trace: CommandTrace[] = [];
|
|
37
|
-
networkManager.
|
|
37
|
+
networkManager.signalManager.commandTrace.on((msg) => {
|
|
38
38
|
trace.push(msg);
|
|
39
39
|
next({ events: trace.map((msg) => JSON.stringify(msg)) });
|
|
40
40
|
});
|
|
@@ -38,6 +38,10 @@ export type JoinIdentityParams = {
|
|
|
38
38
|
haloGenesisFeedKey: PublicKey;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
export type CreateIdentityOptions = {
|
|
42
|
+
displayName?: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
41
45
|
// TODO(dmaretskyi): Rename: represents the peer's state machine.
|
|
42
46
|
export class IdentityManager {
|
|
43
47
|
readonly stateUpdate = new Event();
|
|
@@ -74,7 +78,7 @@ export class IdentityManager {
|
|
|
74
78
|
await this._identity?.close();
|
|
75
79
|
}
|
|
76
80
|
|
|
77
|
-
async createIdentity() {
|
|
81
|
+
async createIdentity({ displayName }: CreateIdentityOptions = {}) {
|
|
78
82
|
assert(!this._identity, 'Identity already exists.');
|
|
79
83
|
log('creating identity...');
|
|
80
84
|
|
|
@@ -107,12 +111,17 @@ export class IdentityManager {
|
|
|
107
111
|
identityRecord.haloSpace.spaceKey,
|
|
108
112
|
identityRecord.haloSpace.writeDataFeedKey,
|
|
109
113
|
AdmittedFeed.Designation.DATA
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
// Device authorization (writes device chain).
|
|
113
|
-
await generator.createDeviceAuthorization(identityRecord.deviceKey)
|
|
114
|
+
)
|
|
114
115
|
];
|
|
115
116
|
|
|
117
|
+
if (displayName) {
|
|
118
|
+
credentials.push(await generator.createProfileCredential({ displayName }));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Device authorization (writes device chain).
|
|
122
|
+
// NOTE: This credential is written last. This is a hack to make sure that display name is set before identity is "ready".
|
|
123
|
+
credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
|
|
124
|
+
|
|
116
125
|
for (const credential of credentials) {
|
|
117
126
|
await identity.controlPipeline.writer.write({
|
|
118
127
|
'@type': 'dxos.echo.feed.CredentialsMessage',
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
DeviceStateMachine,
|
|
10
10
|
CredentialSigner,
|
|
11
11
|
createCredentialSignerWithKey,
|
|
12
|
-
createCredentialSignerWithChain
|
|
12
|
+
createCredentialSignerWithChain,
|
|
13
|
+
ProfileStateMachine
|
|
13
14
|
} from '@dxos/credentials';
|
|
14
15
|
import { Signer } from '@dxos/crypto';
|
|
15
16
|
import { failUndefined } from '@dxos/debug';
|
|
@@ -18,7 +19,7 @@ import { writeMessages } from '@dxos/feed-store';
|
|
|
18
19
|
import { PublicKey } from '@dxos/keys';
|
|
19
20
|
import { log } from '@dxos/log';
|
|
20
21
|
import { TypedMessage } from '@dxos/protocols';
|
|
21
|
-
import { AdmittedFeed } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
22
|
+
import { AdmittedFeed, ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
22
23
|
import { HaloAdmissionCredentials } from '@dxos/protocols/proto/dxos/halo/invitations';
|
|
23
24
|
import { ComplexSet } from '@dxos/util';
|
|
24
25
|
|
|
@@ -36,6 +37,7 @@ export class Identity {
|
|
|
36
37
|
private readonly _space: Space;
|
|
37
38
|
private readonly _signer: Signer;
|
|
38
39
|
private readonly _deviceStateMachine: DeviceStateMachine;
|
|
40
|
+
private readonly _profileStateMachine: ProfileStateMachine;
|
|
39
41
|
|
|
40
42
|
public readonly identityKey: PublicKey;
|
|
41
43
|
public readonly deviceKey: PublicKey;
|
|
@@ -50,10 +52,13 @@ export class Identity {
|
|
|
50
52
|
this.deviceKey = deviceKey;
|
|
51
53
|
|
|
52
54
|
this._deviceStateMachine = new DeviceStateMachine(this.identityKey, this.deviceKey);
|
|
55
|
+
this._profileStateMachine = new ProfileStateMachine(this.identityKey);
|
|
53
56
|
|
|
54
|
-
//
|
|
57
|
+
// Process halo-specific credentials.
|
|
55
58
|
this._space.onCredentialProcessed.set(async (credential) => {
|
|
59
|
+
// Save device keychain credential when processed by the space state machine.
|
|
56
60
|
await this._deviceStateMachine.process(credential);
|
|
61
|
+
await this._profileStateMachine.process(credential);
|
|
57
62
|
this.stateUpdate.emit();
|
|
58
63
|
});
|
|
59
64
|
}
|
|
@@ -77,6 +82,10 @@ export class Identity {
|
|
|
77
82
|
// TODO(dmaretskyi): Should we also wait for our feeds to be admitted?
|
|
78
83
|
}
|
|
79
84
|
|
|
85
|
+
get profileDocument(): ProfileDocument | undefined {
|
|
86
|
+
return this._profileStateMachine.profile;
|
|
87
|
+
}
|
|
88
|
+
|
|
80
89
|
/**
|
|
81
90
|
* @test-only
|
|
82
91
|
*/
|