@dxos/client-services 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{chunk-OCFDRCSN.mjs → chunk-FZDVFED2.mjs} +2385 -1808
- package/dist/lib/browser/chunk-FZDVFED2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +143 -99
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +69 -40
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-D7F3FYZS.mjs → chunk-JDTIU3EP.mjs} +2382 -1804
- package/dist/lib/node-esm/chunk-JDTIU3EP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +143 -99
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +69 -40
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts +1 -1
- package/dist/types/src/packlets/agents/edge-agent-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/devtools.d.ts +18 -18
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts +1 -1
- package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts +1 -1
- package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/browser-diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics-broadcast.d.ts.map +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts +1 -1
- package/dist/types/src/packlets/diagnostics/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/contacts-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts +1 -1
- package/dist/types/src/packlets/identity/default-space-state-machine.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts +1 -1
- package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +1 -1
- package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts +1 -1
- package/dist/types/src/packlets/invitations/edge-invitation-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/index.d.ts +1 -1
- package/dist/types/src/packlets/invitations/index.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +1 -1
- package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +1 -1
- package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/utils.d.ts.map +1 -1
- package/dist/types/src/packlets/locks/index.d.ts +1 -1
- package/dist/types/src/packlets/locks/index.d.ts.map +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts +1 -1
- package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
- package/dist/types/src/packlets/network/network-service.d.ts +2 -2
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts +3 -3
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts +1 -1
- package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts +2 -2
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +4 -4
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +2 -2
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/profile-archive.d.ts.map +1 -1
- package/dist/types/src/packlets/storage/storage.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +2 -2
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/worker/worker-session.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +41 -39
- package/src/packlets/agents/edge-agent-manager.ts +2 -2
- package/src/packlets/agents/edge-agent-service.ts +2 -2
- package/src/packlets/devices/devices-service.test.ts +4 -3
- package/src/packlets/devices/devices-service.ts +1 -1
- package/src/packlets/devtools/devtools.ts +28 -27
- package/src/packlets/devtools/feeds.ts +2 -2
- package/src/packlets/devtools/network.ts +1 -1
- package/src/packlets/diagnostics/browser-diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-broadcast.ts +1 -1
- package/src/packlets/diagnostics/diagnostics-collector.ts +1 -1
- package/src/packlets/diagnostics/diagnostics.ts +1 -1
- package/src/packlets/identity/authenticator.node.test.ts +1 -1
- package/src/packlets/identity/authenticator.ts +1 -1
- package/src/packlets/identity/contacts-service.ts +3 -2
- package/src/packlets/identity/default-space-state-machine.ts +1 -1
- package/src/packlets/identity/identity-manager.test.ts +3 -3
- package/src/packlets/identity/identity-manager.ts +3 -3
- package/src/packlets/identity/identity-service.test.ts +3 -2
- package/src/packlets/identity/identity-service.ts +2 -1
- package/src/packlets/identity/identity.test.ts +5 -5
- package/src/packlets/identity/identity.ts +7 -6
- package/src/packlets/invitations/device-invitation-protocol.test.ts +4 -4
- package/src/packlets/invitations/device-invitation-protocol.ts +2 -1
- package/src/packlets/invitations/edge-invitation-handler.ts +1 -1
- package/src/packlets/invitations/index.ts +1 -1
- package/src/packlets/invitations/invitation-guest-extenstion.ts +1 -1
- package/src/packlets/invitations/invitation-host-extension.ts +2 -2
- package/src/packlets/invitations/invitation-protocol.ts +1 -1
- package/src/packlets/invitations/invitations-handler.test.ts +302 -292
- package/src/packlets/invitations/invitations-handler.ts +3 -3
- package/src/packlets/invitations/invitations-manager.ts +3 -3
- package/src/packlets/invitations/invitations-service.ts +1 -1
- package/src/packlets/invitations/space-invitation-protocol.test.ts +9 -9
- package/src/packlets/invitations/space-invitation-protocol.ts +3 -2
- package/src/packlets/invitations/utils.ts +1 -1
- package/src/packlets/locks/browser.ts +1 -1
- package/src/packlets/locks/index.ts +1 -1
- package/src/packlets/logging/logging-service.ts +3 -2
- package/src/packlets/logging/logging.test.ts +1 -1
- package/src/packlets/network/network-service.test.ts +4 -3
- package/src/packlets/network/network-service.ts +2 -2
- package/src/packlets/services/client-rpc-server.ts +1 -1
- package/src/packlets/services/service-context.test.ts +1 -1
- package/src/packlets/services/service-context.ts +9 -8
- package/src/packlets/services/service-host.test.ts +3 -2
- package/src/packlets/services/service-host.ts +19 -10
- package/src/packlets/services/service-registry.test.ts +2 -1
- package/src/packlets/space-export/space-archive-reader.ts +1 -1
- package/src/packlets/space-export/space-archive-writer.ts +4 -4
- package/src/packlets/space-export/tar.test.ts +1 -1
- package/src/packlets/spaces/automerge-space-state.ts +1 -1
- package/src/packlets/spaces/data-space-manager.ts +21 -16
- package/src/packlets/spaces/data-space.ts +9 -8
- package/src/packlets/spaces/edge-feed-replicator.test.ts +2 -2
- package/src/packlets/spaces/edge-feed-replicator.ts +1 -1
- package/src/packlets/spaces/notarization-plugin.test.ts +1 -1
- package/src/packlets/spaces/notarization-plugin.ts +3 -3
- package/src/packlets/spaces/spaces-service.test.ts +3 -2
- package/src/packlets/spaces/spaces-service.ts +17 -16
- package/src/packlets/storage/profile-archive.ts +1 -1
- package/src/packlets/storage/storage.ts +3 -4
- package/src/packlets/system/system-service.test.ts +1 -1
- package/src/packlets/system/system-service.ts +4 -4
- package/src/packlets/testing/invitation-utils.ts +1 -1
- package/src/packlets/testing/test-builder.ts +3 -3
- package/src/packlets/worker/worker-runtime.ts +2 -1
- package/src/packlets/worker/worker-session.ts +4 -4
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-OCFDRCSN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D7F3FYZS.mjs.map +0 -7
|
@@ -11,14 +11,14 @@ import { Context, ContextDisposedError, cancelWithContext } from '@dxos/context'
|
|
|
11
11
|
import type { SpecificCredential } from '@dxos/credentials';
|
|
12
12
|
import { timed, warnAfterTimeout } from '@dxos/debug';
|
|
13
13
|
import {
|
|
14
|
-
type EchoHost,
|
|
15
14
|
type DatabaseRoot,
|
|
16
|
-
|
|
15
|
+
type EchoHost,
|
|
16
|
+
FIND_PARAMS,
|
|
17
17
|
type MetadataStore,
|
|
18
18
|
type Space,
|
|
19
|
-
|
|
19
|
+
createMappedFeedWriter,
|
|
20
20
|
} from '@dxos/echo-pipeline';
|
|
21
|
-
import {
|
|
21
|
+
import { type DatabaseDirectory, SpaceDocVersion } from '@dxos/echo-protocol';
|
|
22
22
|
import type { EdgeConnection, EdgeHttpClient } from '@dxos/edge-client';
|
|
23
23
|
import { type FeedStore, type FeedWrapper } from '@dxos/feed-store';
|
|
24
24
|
import { failedInvariant, invariant } from '@dxos/invariant';
|
|
@@ -28,31 +28,32 @@ import { log } from '@dxos/log';
|
|
|
28
28
|
import { CancelledError, SystemError } from '@dxos/protocols';
|
|
29
29
|
import {
|
|
30
30
|
type CreateEpochRequest,
|
|
31
|
-
SpaceState,
|
|
32
31
|
type Space as SpaceProto,
|
|
32
|
+
SpaceState,
|
|
33
33
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
34
34
|
import { type Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
35
35
|
import { type FeedMessage } from '@dxos/protocols/proto/dxos/echo/feed';
|
|
36
36
|
import { type SpaceCache } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
37
37
|
import {
|
|
38
38
|
AdmittedFeed,
|
|
39
|
-
SpaceMember,
|
|
40
39
|
type Credential,
|
|
41
40
|
type Epoch,
|
|
42
41
|
type ProfileDocument,
|
|
42
|
+
SpaceMember,
|
|
43
43
|
} from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
44
44
|
import { type GossipMessage } from '@dxos/protocols/proto/dxos/mesh/teleport/gossip';
|
|
45
45
|
import { type Gossip, type Presence } from '@dxos/teleport-extension-gossip';
|
|
46
46
|
import { Timeframe } from '@dxos/timeframe';
|
|
47
47
|
import { trace } from '@dxos/tracing';
|
|
48
|
-
import { CallbackCollection, ComplexSet
|
|
48
|
+
import { type AsyncCallback, CallbackCollection, ComplexSet } from '@dxos/util';
|
|
49
|
+
|
|
50
|
+
import { TrustedKeySetAuthVerifier } from '../identity';
|
|
49
51
|
|
|
50
52
|
import { AutomergeSpaceState } from './automerge-space-state';
|
|
51
53
|
import { type SigningContext } from './data-space-manager';
|
|
52
54
|
import { EdgeFeedReplicator } from './edge-feed-replicator';
|
|
53
55
|
import { runEpochMigration } from './epoch-migrations';
|
|
54
56
|
import { NotarizationPlugin } from './notarization-plugin';
|
|
55
|
-
import { TrustedKeySetAuthVerifier } from '../identity';
|
|
56
57
|
|
|
57
58
|
export type DataSpaceCallbacks = {
|
|
58
59
|
/**
|
|
@@ -6,10 +6,10 @@ import { decode as decodeCbor, encode as encodeCbor } from 'cbor-x';
|
|
|
6
6
|
import { getPort } from 'get-port-please';
|
|
7
7
|
import { describe, expect, onTestFinished, test, vi } from 'vitest';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { Trigger, sleep } from '@dxos/async';
|
|
10
10
|
import { Context } from '@dxos/context';
|
|
11
11
|
import { valueEncoding } from '@dxos/echo-pipeline';
|
|
12
|
-
import {
|
|
12
|
+
import { EdgeClient, EdgeIdentityChangedError, createEphemeralEdgeIdentity } from '@dxos/edge-client';
|
|
13
13
|
import { createTestEdgeWsServer } from '@dxos/edge-client/testing';
|
|
14
14
|
import { FeedFactory, FeedStore, type FeedWrapper } from '@dxos/feed-store';
|
|
15
15
|
import { Keyring } from '@dxos/keyring';
|
|
@@ -15,8 +15,8 @@ import { log, logInfo } from '@dxos/log';
|
|
|
15
15
|
import { EdgeService } from '@dxos/protocols';
|
|
16
16
|
import { buf } from '@dxos/protocols/buf';
|
|
17
17
|
import {
|
|
18
|
-
MessageSchema as RouterMessageSchema,
|
|
19
18
|
type Message as RouterMessage,
|
|
19
|
+
MessageSchema as RouterMessageSchema,
|
|
20
20
|
} from '@dxos/protocols/buf/dxos/edge/messenger_pb';
|
|
21
21
|
import type { FeedBlock, ProtocolMessage } from '@dxos/protocols/feed-replication';
|
|
22
22
|
import { EdgeStatus } from '@dxos/protocols/proto/dxos/client/services';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { describe, expect, onTestFinished, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { Context } from '@dxos/context';
|
|
8
8
|
import { CredentialGenerator } from '@dxos/credentials';
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { DeferredTask, Event,
|
|
6
|
-
import { type Context,
|
|
5
|
+
import { DeferredTask, Event, TimeoutError, Trigger, scheduleMicroTask, scheduleTask, sleep } from '@dxos/async';
|
|
6
|
+
import { type Context, Resource, rejectOnDispose } from '@dxos/context';
|
|
7
7
|
import { type CredentialProcessor, verifyCredential } from '@dxos/credentials';
|
|
8
8
|
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
9
9
|
import { type FeedWriter } from '@dxos/feed-store';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
11
|
import { PublicKey } from '@dxos/keys';
|
|
12
12
|
import { type SpaceId } from '@dxos/keys';
|
|
13
|
-
import {
|
|
13
|
+
import { log, logInfo } from '@dxos/log';
|
|
14
14
|
import { EdgeCallFailedError } from '@dxos/protocols';
|
|
15
15
|
import { schema } from '@dxos/protocols/proto';
|
|
16
16
|
import { type Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { afterEach,
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, onTestFinished, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { Trigger } from '@dxos/async';
|
|
8
8
|
import { Context } from '@dxos/context';
|
|
9
9
|
import { PublicKey } from '@dxos/keys';
|
|
10
10
|
import { type Space, type SpacesService } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
11
|
|
|
12
|
-
import { SpacesServiceImpl } from './spaces-service';
|
|
13
12
|
import { type ServiceContext } from '../services';
|
|
14
13
|
import { createServiceContext } from '../testing';
|
|
15
14
|
|
|
15
|
+
import { SpacesServiceImpl } from './spaces-service';
|
|
16
|
+
|
|
16
17
|
describe('SpacesService', () => {
|
|
17
18
|
let serviceContext: ServiceContext;
|
|
18
19
|
let spacesService: SpacesService;
|
|
@@ -19,44 +19,45 @@ import { assertArgument, assertState, invariant } from '@dxos/invariant';
|
|
|
19
19
|
import { SpaceId } from '@dxos/keys';
|
|
20
20
|
import { log } from '@dxos/log';
|
|
21
21
|
import {
|
|
22
|
-
encodeError,
|
|
23
22
|
ApiError,
|
|
24
23
|
AuthorizationError,
|
|
25
24
|
IdentityNotInitializedError,
|
|
26
25
|
SpaceNotFoundError,
|
|
26
|
+
encodeError,
|
|
27
27
|
} from '@dxos/protocols';
|
|
28
28
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
type AdmitContactRequest,
|
|
30
|
+
type ContactAdmission,
|
|
31
31
|
type CreateEpochRequest,
|
|
32
|
+
type CreateEpochResponse,
|
|
33
|
+
type ExportSpaceRequest,
|
|
34
|
+
type ExportSpaceResponse,
|
|
35
|
+
type ImportSpaceRequest,
|
|
36
|
+
type ImportSpaceResponse,
|
|
37
|
+
type JoinBySpaceKeyRequest,
|
|
38
|
+
type JoinSpaceResponse,
|
|
32
39
|
type PostMessageRequest,
|
|
33
40
|
type QueryCredentialsRequest,
|
|
34
41
|
type QuerySpacesResponse,
|
|
35
42
|
type Space,
|
|
43
|
+
SpaceMember,
|
|
44
|
+
SpaceState,
|
|
36
45
|
type SpacesService,
|
|
37
46
|
type SubscribeMessagesRequest,
|
|
47
|
+
type UpdateMemberRoleRequest,
|
|
38
48
|
type UpdateSpaceRequest,
|
|
39
49
|
type WriteCredentialsRequest,
|
|
40
|
-
type UpdateMemberRoleRequest,
|
|
41
|
-
type AdmitContactRequest,
|
|
42
|
-
type ContactAdmission,
|
|
43
|
-
type JoinSpaceResponse,
|
|
44
|
-
type JoinBySpaceKeyRequest,
|
|
45
|
-
type CreateEpochResponse,
|
|
46
|
-
type ExportSpaceResponse,
|
|
47
|
-
type ExportSpaceRequest,
|
|
48
|
-
type ImportSpaceRequest,
|
|
49
|
-
type ImportSpaceResponse,
|
|
50
50
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
51
51
|
import { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
52
52
|
import { type GossipMessage } from '@dxos/protocols/proto/dxos/mesh/teleport/gossip';
|
|
53
53
|
import { trace } from '@dxos/tracing';
|
|
54
54
|
import { type Provider } from '@dxos/util';
|
|
55
55
|
|
|
56
|
+
import { type IdentityManager } from '../identity';
|
|
57
|
+
import { SpaceArchiveWriter, extractSpaceArchive } from '../space-export';
|
|
58
|
+
|
|
56
59
|
import { type DataSpace } from './data-space';
|
|
57
60
|
import { type DataSpaceManager } from './data-space-manager';
|
|
58
|
-
import { type IdentityManager } from '../identity';
|
|
59
|
-
import { extractSpaceArchive, SpaceArchiveWriter } from '../space-export';
|
|
60
61
|
|
|
61
62
|
export class SpacesServiceImpl implements SpacesService {
|
|
62
63
|
constructor(
|
|
@@ -266,7 +267,7 @@ export class SpacesServiceImpl implements SpacesService {
|
|
|
266
267
|
|
|
267
268
|
async exportSpace(request: ExportSpaceRequest): Promise<ExportSpaceResponse> {
|
|
268
269
|
await using writer = await new SpaceArchiveWriter().open();
|
|
269
|
-
assertArgument(SpaceId.isValid(request.spaceId), 'Invalid space ID');
|
|
270
|
+
assertArgument(SpaceId.isValid(request.spaceId), 'spaceId', 'Invalid space ID');
|
|
270
271
|
|
|
271
272
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
272
273
|
const space = dataSpaceManager.getSpaceById(request.spaceId) ?? raise(new Error('Space not found'));
|
|
@@ -7,7 +7,7 @@ import { cbor } from '@automerge/automerge-repo';
|
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
import type { LevelDB } from '@dxos/kv-store';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
|
-
import {
|
|
10
|
+
import { type ProfileArchive, ProfileArchiveEntryType } from '@dxos/protocols';
|
|
11
11
|
import type { Storage } from '@dxos/random-access-storage';
|
|
12
12
|
import { arrayToBuffer } from '@dxos/util';
|
|
13
13
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
1
|
//
|
|
4
2
|
// Copyright 2023 DXOS.org
|
|
5
3
|
//
|
|
6
4
|
|
|
7
5
|
import { InvalidConfigError } from '@dxos/protocols';
|
|
8
6
|
import { Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
9
|
-
import {
|
|
7
|
+
import { StorageType, createStorage } from '@dxos/random-access-storage';
|
|
10
8
|
|
|
11
|
-
import StorageDriver = Runtime.Client.Storage.StorageDriver;
|
|
12
9
|
import { getRootPath } from './util';
|
|
13
10
|
|
|
11
|
+
import StorageDriver = Runtime.Client.Storage.StorageDriver;
|
|
12
|
+
|
|
14
13
|
// TODO(burdon): Factor out.
|
|
15
14
|
export const createStorageObjects = (config: Runtime.Client.Storage) => {
|
|
16
15
|
const { persistent = false, keyStore, dataStore } = config ?? {};
|
|
@@ -6,7 +6,7 @@ import { beforeEach, describe, expect, test } from 'vitest';
|
|
|
6
6
|
|
|
7
7
|
import { Event, Trigger } from '@dxos/async';
|
|
8
8
|
import { Config } from '@dxos/config';
|
|
9
|
-
import { type SystemService, SystemStatus
|
|
9
|
+
import { type QueryStatusResponse, type SystemService, SystemStatus } from '@dxos/protocols/proto/dxos/client/services';
|
|
10
10
|
|
|
11
11
|
import { SystemServiceImpl } from './system-service';
|
|
12
12
|
|
|
@@ -7,14 +7,14 @@ import { Stream } from '@dxos/codec-protobuf/stream';
|
|
|
7
7
|
import { type Config } from '@dxos/config';
|
|
8
8
|
import {
|
|
9
9
|
GetDiagnosticsRequest,
|
|
10
|
+
type Platform,
|
|
11
|
+
type QueryStatusRequest,
|
|
12
|
+
type QueryStatusResponse,
|
|
10
13
|
type SystemService,
|
|
11
14
|
type SystemStatus,
|
|
12
15
|
type UpdateStatusRequest,
|
|
13
|
-
type QueryStatusRequest,
|
|
14
|
-
type QueryStatusResponse,
|
|
15
|
-
type Platform,
|
|
16
16
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
17
|
-
import {
|
|
17
|
+
import { type MaybePromise, jsonKeyReplacer } from '@dxos/util';
|
|
18
18
|
|
|
19
19
|
import { type Diagnostics } from '../diagnostics';
|
|
20
20
|
import { getPlatform } from '../services/platform';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Trigger } from '@dxos/async';
|
|
6
|
-
import {
|
|
6
|
+
import { type AuthenticatingInvitation, type CancellableInvitation, InvitationEncoder } from '@dxos/client-protocol';
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
9
|
import { type DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Config } from '@dxos/config';
|
|
6
6
|
import { Context } from '@dxos/context';
|
|
7
|
-
import {
|
|
7
|
+
import { CredentialGenerator, createCredentialSignerWithChain } from '@dxos/credentials';
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
9
|
-
import { EchoHost, MetadataStore, SpaceManager, valueEncoding
|
|
9
|
+
import { EchoHost, MeshEchoReplicator, MetadataStore, SpaceManager, valueEncoding } from '@dxos/echo-pipeline';
|
|
10
10
|
import { FeedFactory, FeedStore } from '@dxos/feed-store';
|
|
11
11
|
import { Keyring } from '@dxos/keyring';
|
|
12
12
|
import { type LevelDB } from '@dxos/kv-store';
|
|
@@ -14,7 +14,7 @@ import { createTestLevel } from '@dxos/kv-store/testing';
|
|
|
14
14
|
import { MemorySignalManager, MemorySignalManagerContext, type SignalManager } from '@dxos/messaging';
|
|
15
15
|
import { MemoryTransportFactory, SwarmNetworkManager } from '@dxos/network-manager';
|
|
16
16
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
17
|
-
import {
|
|
17
|
+
import { type Storage, StorageType, createStorage } from '@dxos/random-access-storage';
|
|
18
18
|
import { BlobStore } from '@dxos/teleport-extension-object-sync';
|
|
19
19
|
|
|
20
20
|
import { InvitationsHandler, InvitationsManager, SpaceInvitationProtocol } from '../invitations';
|
|
@@ -18,9 +18,10 @@ import { RtcTransportProxyFactory } from '@dxos/network-manager';
|
|
|
18
18
|
import { type RpcPort } from '@dxos/rpc';
|
|
19
19
|
import { type MaybePromise } from '@dxos/util';
|
|
20
20
|
|
|
21
|
-
import { WorkerSession } from './worker-session';
|
|
22
21
|
import { ClientServicesHost } from '../services';
|
|
23
22
|
|
|
23
|
+
import { WorkerSession } from './worker-session';
|
|
24
|
+
|
|
24
25
|
// NOTE: Keep as RpcPorts to avoid dependency on @dxos/rpc-tunnel so we don't depend on browser-specific apis.
|
|
25
26
|
export type CreateSessionParams = {
|
|
26
27
|
appPort: RpcPort;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Trigger, asyncTimeout } from '@dxos/async';
|
|
6
6
|
import {
|
|
7
|
-
iframeServiceBundle,
|
|
8
7
|
type IframeServiceBundle,
|
|
9
8
|
PROXY_CONNECTION_TIMEOUT,
|
|
9
|
+
iframeServiceBundle,
|
|
10
10
|
workerServiceBundle,
|
|
11
11
|
} from '@dxos/client-protocol';
|
|
12
12
|
import { invariant } from '@dxos/invariant';
|
|
13
13
|
import { log, logInfo } from '@dxos/log';
|
|
14
14
|
import { type BridgeService } from '@dxos/protocols/proto/dxos/mesh/bridge';
|
|
15
|
-
import {
|
|
15
|
+
import { type ProtoRpcPeer, type RpcPort, createProtoRpcPeer } from '@dxos/rpc';
|
|
16
16
|
import { Callback, type MaybePromise } from '@dxos/util';
|
|
17
17
|
|
|
18
|
-
import {
|
|
18
|
+
import { ClientRpcServer, type ClientRpcServerParams, type ClientServicesHost } from '../services';
|
|
19
19
|
|
|
20
20
|
export type WorkerSessionParams = {
|
|
21
21
|
serviceHost: ClientServicesHost;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.8.4-main.
|
|
1
|
+
export const DXOS_VERSION = "0.8.4-main.a4bbb77";
|