@dxos/client 2.33.8-dev.8609bc45 → 2.33.9-dev.002e8917
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +98368 -0
- package/dist/src/api/client.d.ts +2 -2
- package/dist/src/api/client.d.ts.map +1 -1
- package/dist/src/api/client.js +3 -3
- package/dist/src/api/client.js.map +1 -1
- package/dist/src/api/client.test.js +4 -4
- package/dist/src/api/client.test.js.map +1 -1
- package/dist/src/api/invitations/invitation-proxy.js +4 -4
- package/dist/src/api/invitations/invitation-proxy.js.map +1 -1
- package/dist/src/api/invitations/invitation-request.js +2 -2
- package/dist/src/api/invitations/invitation-request.js.map +1 -1
- package/dist/src/api/proxies/echo-proxy.js +4 -4
- package/dist/src/api/proxies/echo-proxy.js.map +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts +4 -4
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/index.d.ts +3 -0
- package/dist/src/proto/index.d.ts.map +1 -0
- package/dist/src/proto/index.js +35 -0
- package/dist/src/proto/index.js.map +1 -0
- package/dist/src/proto/substitutions.d.ts +2 -2
- package/dist/src/proto/substitutions.d.ts.map +1 -1
- package/dist/src/proto/substitutions.js +1 -2
- package/dist/src/proto/substitutions.js.map +1 -1
- package/dist/src/services/impl/halo.d.ts.map +1 -1
- package/dist/src/services/impl/halo.js +14 -12
- package/dist/src/services/impl/halo.js.map +1 -1
- package/dist/src/services/impl/party.js +6 -6
- package/dist/src/services/impl/party.js.map +1 -1
- package/dist/src/services/impl/profile.d.ts.map +1 -1
- package/dist/src/services/impl/profile.js +6 -5
- package/dist/src/services/impl/profile.js.map +1 -1
- package/dist/src/services/impl/types.d.ts +1 -1
- package/dist/src/services/impl/types.d.ts.map +1 -1
- package/dist/src/services/services.test.js +2 -2
- package/dist/src/services/services.test.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +37 -22
- package/src/api/client.test.ts +2 -2
- package/src/api/client.ts +2 -2
- package/src/api/invitations/invitation-proxy.ts +1 -1
- package/src/api/invitations/invitation-request.ts +1 -1
- package/src/api/proxies/echo-proxy.ts +3 -3
- package/src/index.ts +13 -3
- package/src/proto/gen/google/protobuf.ts +4 -4
- package/src/proto/index.ts +6 -0
- package/src/proto/substitutions.ts +1 -2
- package/src/services/impl/halo.ts +3 -1
- package/src/services/impl/party.ts +1 -1
- package/src/services/impl/profile.ts +2 -1
- package/src/services/impl/types.ts +1 -1
- package/src/services/services.test.ts +1 -1
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client",
|
|
3
|
-
"version": "2.33.
|
|
3
|
+
"version": "2.33.9-dev.002e8917",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "DXOS.org",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"types": "dist/src/index.d.ts",
|
|
8
|
+
"browser": {
|
|
9
|
+
"./dist/src/index.js": "./dist/browser.js",
|
|
10
|
+
"node:assert": "assert"
|
|
11
|
+
},
|
|
8
12
|
"files": [
|
|
9
13
|
"dist",
|
|
10
14
|
"src"
|
|
11
15
|
],
|
|
12
16
|
"dependencies": {
|
|
13
|
-
"@dxos/async": "2.33.
|
|
14
|
-
"@dxos/codec-protobuf": "2.33.
|
|
15
|
-
"@dxos/config": "2.33.
|
|
16
|
-
"@dxos/
|
|
17
|
-
"@dxos/
|
|
18
|
-
"@dxos/
|
|
19
|
-
"@dxos/
|
|
20
|
-
"@dxos/
|
|
21
|
-
"@dxos/feed-store": "2.33.8-dev.8609bc45",
|
|
22
|
-
"@dxos/model-factory": "2.33.8-dev.8609bc45",
|
|
23
|
-
"@dxos/network-manager": "2.33.8-dev.8609bc45",
|
|
24
|
-
"@dxos/object-model": "2.33.8-dev.8609bc45",
|
|
25
|
-
"@dxos/protocols": "2.33.8-dev.8609bc45",
|
|
26
|
-
"@dxos/rpc": "2.33.8-dev.8609bc45",
|
|
27
|
-
"@dxos/util": "2.33.8-dev.8609bc45",
|
|
17
|
+
"@dxos/async": "2.33.9-dev.002e8917",
|
|
18
|
+
"@dxos/codec-protobuf": "2.33.9-dev.002e8917",
|
|
19
|
+
"@dxos/config": "2.33.9-dev.002e8917",
|
|
20
|
+
"@dxos/debug": "2.33.9-dev.002e8917",
|
|
21
|
+
"@dxos/model-factory": "2.33.9-dev.002e8917",
|
|
22
|
+
"@dxos/protocols": "2.33.9-dev.002e8917",
|
|
23
|
+
"@dxos/rpc": "2.33.9-dev.002e8917",
|
|
24
|
+
"@dxos/util": "2.33.9-dev.002e8917",
|
|
28
25
|
"abstract-leveldown": "~7.0.0",
|
|
29
26
|
"assert": "^2.0.0",
|
|
30
27
|
"debug": "^4.3.3",
|
|
@@ -37,12 +34,20 @@
|
|
|
37
34
|
"uuid": "^8.3.2"
|
|
38
35
|
},
|
|
39
36
|
"devDependencies": {
|
|
37
|
+
"@dxos/credentials": "2.33.9-dev.002e8917",
|
|
38
|
+
"@dxos/crypto": "2.33.9-dev.002e8917",
|
|
39
|
+
"@dxos/echo-db": "2.33.9-dev.002e8917",
|
|
40
|
+
"@dxos/echo-protocol": "2.33.9-dev.002e8917",
|
|
40
41
|
"@dxos/eslint-plugin": "~1.0.34",
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
42
|
+
"@dxos/feed-store": "2.33.9-dev.002e8917",
|
|
43
|
+
"@dxos/network-manager": "2.33.9-dev.002e8917",
|
|
44
|
+
"@dxos/object-model": "2.33.9-dev.002e8917",
|
|
45
|
+
"@dxos/protocols-toolchain": "2.33.8",
|
|
46
|
+
"@dxos/random-access-multi-storage": "2.33.9-dev.002e8917",
|
|
47
|
+
"@dxos/testutils": "2.33.8",
|
|
48
|
+
"@koush/wrtc": "^0.5.3",
|
|
44
49
|
"@types/debug": "^4.1.7",
|
|
45
|
-
"@types/jest": "^
|
|
50
|
+
"@types/jest": "^28.1.6",
|
|
46
51
|
"@types/level-js": "~4.0.1",
|
|
47
52
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
48
53
|
"@types/memdown": "^3.0.0",
|
|
@@ -52,6 +57,7 @@
|
|
|
52
57
|
"@types/uuid": "~8.3.3",
|
|
53
58
|
"eslint": "^7.12.1",
|
|
54
59
|
"expect": "~27.0.2",
|
|
60
|
+
"jsonify": "^0.0.0",
|
|
55
61
|
"mocha": "~8.4.0",
|
|
56
62
|
"typescript": "^4.7.2",
|
|
57
63
|
"wait-for-expect": "^3.0.2"
|
|
@@ -60,12 +66,21 @@
|
|
|
60
66
|
"access": "public"
|
|
61
67
|
},
|
|
62
68
|
"toolchain": {
|
|
69
|
+
"bundlePackages": [
|
|
70
|
+
"@dxos/credentials",
|
|
71
|
+
"@dxos/crypto",
|
|
72
|
+
"@dxos/echo-db",
|
|
73
|
+
"@dxos/echo-protocol",
|
|
74
|
+
"@dxos/feed-store",
|
|
75
|
+
"@dxos/network-manager",
|
|
76
|
+
"@dxos/object-model"
|
|
77
|
+
],
|
|
63
78
|
"testingFramework": "mocha"
|
|
64
79
|
},
|
|
65
80
|
"scripts": {
|
|
66
81
|
"prebuild": "node -p \"'export const DXOS_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
|
|
67
|
-
"build": "npm run prebuild && toolchain
|
|
68
|
-
"build:test": "toolchain build:test",
|
|
82
|
+
"build": "npm run prebuild && toolchain bundle:library",
|
|
83
|
+
"build:test": "toolchain build:test --bundle",
|
|
69
84
|
"lint": "toolchain lint",
|
|
70
85
|
"test": "toolchain test"
|
|
71
86
|
}
|
package/src/api/client.test.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
6
5
|
import expect from 'expect';
|
|
7
6
|
import { it as test } from 'mocha';
|
|
7
|
+
import assert from 'node:assert';
|
|
8
8
|
import waitForExpect from 'wait-for-expect';
|
|
9
9
|
|
|
10
10
|
import { sleep, waitForCondition } from '@dxos/async';
|
|
@@ -12,9 +12,9 @@ import { ConfigObject } from '@dxos/config';
|
|
|
12
12
|
import { generateSeedPhrase, keyPairFromSeedPhrase } from '@dxos/credentials';
|
|
13
13
|
import { throwUnhandledRejection } from '@dxos/debug';
|
|
14
14
|
import { InvitationDescriptor } from '@dxos/echo-db';
|
|
15
|
-
import { Timeframe } from '@dxos/echo-protocol';
|
|
16
15
|
import { TestModel } from '@dxos/model-factory';
|
|
17
16
|
import { ObjectModel } from '@dxos/object-model';
|
|
17
|
+
import { Timeframe } from '@dxos/protocols';
|
|
18
18
|
import { createBundledRpcServer, createLinkedPorts } from '@dxos/rpc';
|
|
19
19
|
import { afterTest } from '@dxos/testutils';
|
|
20
20
|
|
package/src/api/client.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2020 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
6
5
|
import debug from 'debug';
|
|
6
|
+
import assert from 'node:assert';
|
|
7
7
|
|
|
8
8
|
import { synchronized } from '@dxos/async';
|
|
9
9
|
import { Config, ConfigObject } from '@dxos/config';
|
|
@@ -65,10 +65,10 @@ export class Client {
|
|
|
65
65
|
private readonly _options: ClientOptions;
|
|
66
66
|
private readonly _mode: Runtime.Client.Mode;
|
|
67
67
|
|
|
68
|
+
private _initialized = false;
|
|
68
69
|
private _serviceProvider!: ClientServiceProvider;
|
|
69
70
|
private _halo!: HaloProxy;
|
|
70
71
|
private _echo!: EchoProxy;
|
|
71
|
-
private _initialized = false;
|
|
72
72
|
|
|
73
73
|
// TODO(burdon): Expose some kind of stable ID (e.g., from HALO).
|
|
74
74
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
5
|
+
import assert from 'node:assert';
|
|
6
6
|
|
|
7
7
|
import { Event, latch } from '@dxos/async';
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
@@ -54,8 +54,8 @@ export class EchoProxy implements Echo {
|
|
|
54
54
|
private readonly _serviceProvider: ClientServiceProvider,
|
|
55
55
|
private readonly _haloProxy: HaloProxy
|
|
56
56
|
) {
|
|
57
|
-
this._modelFactory =
|
|
58
|
-
|
|
57
|
+
this._modelFactory = _serviceProvider instanceof ClientServiceHost
|
|
58
|
+
? _serviceProvider.echo.modelFactory : new ModelFactory();
|
|
59
59
|
|
|
60
60
|
this._modelFactory.registerModel(ObjectModel); // Register object-model by default.
|
|
61
61
|
}
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { generateSeedPhrase } from '@dxos/credentials';
|
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
PARTY_ITEM_TYPE, // TODO(burdon): Remove?
|
|
9
|
+
TYPE_SCHEMA,
|
|
9
10
|
Entity,
|
|
10
11
|
Item,
|
|
11
12
|
Link,
|
|
@@ -17,7 +18,11 @@ export {
|
|
|
17
18
|
InvitationDescriptorType,
|
|
18
19
|
OpenProgress,
|
|
19
20
|
PartyMember,
|
|
20
|
-
ResultSet
|
|
21
|
+
ResultSet,
|
|
22
|
+
Schema,
|
|
23
|
+
SchemaDef,
|
|
24
|
+
SchemaField,
|
|
25
|
+
SchemaRef
|
|
21
26
|
} from '@dxos/echo-db';
|
|
22
27
|
|
|
23
28
|
export {
|
|
@@ -26,13 +31,18 @@ export {
|
|
|
26
31
|
} from '@dxos/echo-protocol';
|
|
27
32
|
|
|
28
33
|
export {
|
|
29
|
-
ObjectModel
|
|
34
|
+
ObjectModel,
|
|
35
|
+
OrderedList
|
|
30
36
|
} from '@dxos/object-model';
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
// TODO(wittjosiah): Remove.
|
|
39
|
+
export {
|
|
40
|
+
NetworkManager
|
|
41
|
+
} from '@dxos/network-manager';
|
|
33
42
|
|
|
34
43
|
export * from './api';
|
|
35
44
|
export * from './devtools';
|
|
45
|
+
export * from './proto';
|
|
36
46
|
export * from './services';
|
|
37
47
|
export * from './util';
|
|
38
48
|
export * from './version';
|
|
@@ -13,14 +13,14 @@ import * as dxos_halo_keys from "../dxos/halo/keys";
|
|
|
13
13
|
import * as dxos_rpc from "../dxos/rpc";
|
|
14
14
|
export interface Empty {
|
|
15
15
|
}
|
|
16
|
-
export interface Timestamp {
|
|
17
|
-
seconds?: string;
|
|
18
|
-
nanos?: number;
|
|
19
|
-
}
|
|
20
16
|
export interface Any {
|
|
21
17
|
type_url?: string;
|
|
22
18
|
value?: Uint8Array;
|
|
23
19
|
}
|
|
20
|
+
export interface Timestamp {
|
|
21
|
+
seconds?: string;
|
|
22
|
+
nanos?: number;
|
|
23
|
+
}
|
|
24
24
|
export interface FileDescriptorSet {
|
|
25
25
|
file?: FileDescriptorProto[];
|
|
26
26
|
}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { anySubstitutions, timestampSubstitutions } from '@dxos/codec-protobuf';
|
|
6
6
|
import { codec, Message } from '@dxos/credentials';
|
|
7
|
-
import { timeframeSubstitutions } from '@dxos/echo-protocol';
|
|
8
7
|
import type { ConnectionEvent } from '@dxos/network-manager';
|
|
9
|
-
import { publicKeySubstitutions } from '@dxos/protocols';
|
|
8
|
+
import { publicKeySubstitutions, timeframeSubstitutions } from '@dxos/protocols';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
...timestampSubstitutions,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
5
|
+
import assert from 'node:assert';
|
|
6
6
|
|
|
7
7
|
import { Stream } from '@dxos/codec-protobuf';
|
|
8
8
|
import { ECHO } from '@dxos/echo-db';
|
|
@@ -47,6 +47,8 @@ export class HaloService implements IHaloService {
|
|
|
47
47
|
assert(await this.echo.halo.keyring.getKey(request.keyRecord.publicKey), 'Key not inserted correctly.');
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
// TODO(burdon): subscribeToContacts or just query/contacts with subscription object.
|
|
51
|
+
// ResultSet vs Stream?
|
|
50
52
|
subscribeContacts (): Stream<Contacts> {
|
|
51
53
|
if (this.echo.halo.identity) {
|
|
52
54
|
return resultSetToStream(this.echo.halo.queryContacts(), (contacts): Contacts => ({ contacts }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import assert from 'assert';
|
|
5
|
+
import assert from 'node:assert';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
7
|
|
|
8
8
|
import { latch } from '@dxos/async';
|
|
@@ -30,6 +30,7 @@ import { CreateServicesOpts, InviteeInvitation, InviteeInvitations } from './typ
|
|
|
30
30
|
export class ProfileService implements IProfileService {
|
|
31
31
|
private inviteeInvitations: InviteeInvitations = new Map();
|
|
32
32
|
|
|
33
|
+
// TODO(burdon): Pass in HALO.
|
|
33
34
|
constructor (
|
|
34
35
|
private readonly echo: ECHO
|
|
35
36
|
) {}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Config } from '@dxos/config';
|
|
6
|
-
import { KeyRecord } from '@dxos/credentials';
|
|
7
6
|
import { ECHO } from '@dxos/echo-db';
|
|
8
7
|
|
|
9
8
|
import { SignRequest, SignResponse } from '../../proto/gen/dxos/client';
|
|
9
|
+
import { KeyRecord } from '../../proto/gen/dxos/halo/keys';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Signer plugin.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "2.33.
|
|
1
|
+
export const DXOS_VERSION = "2.33.8";
|