@dxos/client-services 0.1.58-main.f5feb2a → 0.1.58-main.fc3ea9b
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-L426VUEE.mjs → chunk-XWHMUFQW.mjs} +109 -79
- package/dist/lib/browser/chunk-XWHMUFQW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -6
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +3 -3
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +110 -81
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +108 -78
- package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
- package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/authenticator.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/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/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts +1 -0
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
- package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts +1 -1
- package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -34
- package/src/packlets/devices/devices-service.test.ts +1 -1
- package/src/packlets/devtools/devtools.ts +1 -1
- package/src/packlets/identity/authenticator.ts +1 -4
- package/src/packlets/identity/identity-manager.test.ts +1 -1
- package/src/packlets/identity/identity-service.test.ts +1 -1
- package/src/packlets/identity/identity.test.ts +1 -1
- package/src/packlets/invitations/device-invitation-protocol.ts +1 -1
- package/src/packlets/invitations/space-invitation-protocol.ts +1 -1
- package/src/packlets/network/network-service.test.ts +1 -1
- package/src/packlets/network/network-service.ts +4 -1
- package/src/packlets/services/diagnostics.ts +2 -2
- package/src/packlets/services/service-context.ts +5 -11
- package/src/packlets/services/service-host.test.ts +3 -3
- package/src/packlets/services/service-host.ts +42 -6
- package/src/packlets/services/service-registry.test.ts +1 -1
- package/src/packlets/spaces/data-space-manager.test.ts +1 -1
- package/src/packlets/spaces/data-space-manager.ts +1 -1
- package/src/packlets/spaces/data-space.ts +1 -1
- package/src/packlets/spaces/spaces-service.test.ts +1 -1
- package/src/packlets/spaces/spaces-service.ts +2 -2
- package/src/packlets/storage/storage.ts +9 -9
- package/src/packlets/testing/test-builder.ts +3 -3
- package/src/packlets/vault/iframe-host-runtime.ts +1 -1
- package/src/packlets/vault/worker-runtime.ts +9 -6
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-L426VUEE.mjs.map +0 -7
|
@@ -14,9 +14,9 @@ import { SystemService, SystemStatus } from '@dxos/protocols/proto/dxos/client/s
|
|
|
14
14
|
import { createLinkedPorts, createProtoRpcPeer, createServiceBundle } from '@dxos/rpc';
|
|
15
15
|
import { describe, test } from '@dxos/test';
|
|
16
16
|
|
|
17
|
+
import { ServiceRegistry } from './service-registry';
|
|
17
18
|
import { SystemServiceImpl } from '../system';
|
|
18
19
|
import { createServiceContext } from '../testing';
|
|
19
|
-
import { ServiceRegistry } from './service-registry';
|
|
20
20
|
|
|
21
21
|
// TODO(burdon): Create TestService (that doesn't require peers).
|
|
22
22
|
|
|
@@ -164,7 +164,7 @@ describe('DataSpaceManager', () => {
|
|
|
164
164
|
afterTest(async () => builder.destroy());
|
|
165
165
|
|
|
166
166
|
const peer = builder.createPeer({
|
|
167
|
-
|
|
167
|
+
dataStore: typeof window === 'undefined' ? StorageType.NODE : StorageType.WEBFS,
|
|
168
168
|
});
|
|
169
169
|
await peer.createIdentity();
|
|
170
170
|
await openAndClose(peer.dataSpaceManager);
|
|
@@ -20,9 +20,9 @@ import { Gossip, Presence } from '@dxos/teleport-extension-gossip';
|
|
|
20
20
|
import { Timeframe } from '@dxos/timeframe';
|
|
21
21
|
import { ComplexMap, deferFunction, forEachAsync } from '@dxos/util';
|
|
22
22
|
|
|
23
|
-
import { createAuthProvider } from '../identity';
|
|
24
23
|
import { DataSpace } from './data-space';
|
|
25
24
|
import { spaceGenesis } from './genesis';
|
|
25
|
+
import { createAuthProvider } from '../identity';
|
|
26
26
|
|
|
27
27
|
export interface SigningContext {
|
|
28
28
|
identityKey: PublicKey;
|
|
@@ -22,9 +22,9 @@ import { Timeframe } from '@dxos/timeframe';
|
|
|
22
22
|
import { trace } from '@dxos/tracing';
|
|
23
23
|
import { ComplexSet } from '@dxos/util';
|
|
24
24
|
|
|
25
|
-
import { TrustedKeySetAuthVerifier } from '../identity';
|
|
26
25
|
import { SigningContext } from './data-space-manager';
|
|
27
26
|
import { NotarizationPlugin } from './notarization-plugin';
|
|
27
|
+
import { TrustedKeySetAuthVerifier } from '../identity';
|
|
28
28
|
|
|
29
29
|
export type DataSpaceCallbacks = {
|
|
30
30
|
/**
|
|
@@ -11,9 +11,9 @@ import { PublicKey } from '@dxos/keys';
|
|
|
11
11
|
import { Space, SpacesService } from '@dxos/protocols/proto/dxos/client/services';
|
|
12
12
|
import { afterEach, afterTest, beforeEach, describe, test } from '@dxos/test';
|
|
13
13
|
|
|
14
|
+
import { SpacesServiceImpl } from './spaces-service';
|
|
14
15
|
import { ServiceContext } from '../services';
|
|
15
16
|
import { createServiceContext } from '../testing';
|
|
16
|
-
import { SpacesServiceImpl } from './spaces-service';
|
|
17
17
|
|
|
18
18
|
chai.use(chaiAsPromised);
|
|
19
19
|
|
|
@@ -27,9 +27,9 @@ import { Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
|
27
27
|
import { GossipMessage } from '@dxos/protocols/proto/dxos/mesh/teleport/gossip';
|
|
28
28
|
import { Provider } from '@dxos/util';
|
|
29
29
|
|
|
30
|
-
import { IdentityManager } from '../identity';
|
|
31
30
|
import { DataSpace } from './data-space';
|
|
32
31
|
import { DataSpaceManager } from './data-space-manager';
|
|
32
|
+
import { IdentityManager } from '../identity';
|
|
33
33
|
|
|
34
34
|
export class SpacesServiceImpl implements SpacesService {
|
|
35
35
|
constructor(
|
|
@@ -99,7 +99,7 @@ export class SpacesServiceImpl implements SpacesService {
|
|
|
99
99
|
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx, () => scheduler.trigger()));
|
|
100
100
|
|
|
101
101
|
// Pipeline progress.
|
|
102
|
-
space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger());
|
|
102
|
+
subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
103
103
|
if (space.dataPipeline.pipelineState) {
|
|
104
104
|
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
105
105
|
}
|
|
@@ -15,29 +15,29 @@ import StorageDriver = Runtime.Client.Storage.StorageDriver;
|
|
|
15
15
|
// TODO(burdon): Factor out.
|
|
16
16
|
export const createStorageObjects = (config: Runtime.Client.Storage) => {
|
|
17
17
|
const {
|
|
18
|
-
path = isNode() ? DX_DATA : 'dxos/storage', // TODO(burdon): Factor out const.
|
|
19
|
-
storageType,
|
|
20
|
-
keyStorage,
|
|
21
18
|
persistent = false,
|
|
19
|
+
keyStore,
|
|
20
|
+
dataStore,
|
|
21
|
+
dataRoot = isNode() ? DX_DATA : 'dxos/storage', // TODO(burdon): Factor out const.
|
|
22
22
|
} = config ?? {};
|
|
23
23
|
|
|
24
|
-
if (persistent &&
|
|
24
|
+
if (persistent && dataStore === StorageDriver.RAM) {
|
|
25
25
|
throw new InvalidConfigError('RAM storage cannot be used in persistent mode.');
|
|
26
26
|
}
|
|
27
|
-
if (!persistent &&
|
|
27
|
+
if (!persistent && dataStore !== undefined && dataStore !== StorageDriver.RAM) {
|
|
28
28
|
throw new InvalidConfigError('Cannot use a persistent storage in not persistent mode.');
|
|
29
29
|
}
|
|
30
|
-
if (persistent &&
|
|
30
|
+
if (persistent && keyStore === StorageDriver.RAM) {
|
|
31
31
|
throw new InvalidConfigError('RAM key storage cannot be used in persistent mode.');
|
|
32
32
|
}
|
|
33
|
-
if (!persistent &&
|
|
33
|
+
if (!persistent && keyStore !== StorageDriver.RAM && keyStore !== undefined) {
|
|
34
34
|
throw new InvalidConfigError('Cannot use a persistent key storage in not persistent mode.');
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return {
|
|
38
38
|
storage: createStorage({
|
|
39
|
-
type: persistent ? toStorageType(
|
|
40
|
-
root: `${
|
|
39
|
+
type: persistent ? toStorageType(dataStore) : StorageType.RAM,
|
|
40
|
+
root: `${dataRoot}/`,
|
|
41
41
|
}),
|
|
42
42
|
};
|
|
43
43
|
};
|
|
@@ -94,7 +94,7 @@ export class TestBuilder {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export type TestPeerOpts = {
|
|
97
|
-
|
|
97
|
+
dataStore?: StorageType;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
export type TestPeerProps = {
|
|
@@ -115,7 +115,7 @@ export class TestPeer {
|
|
|
115
115
|
|
|
116
116
|
constructor(
|
|
117
117
|
private readonly signalContext: MemorySignalManagerContext,
|
|
118
|
-
private readonly opts: TestPeerOpts = {
|
|
118
|
+
private readonly opts: TestPeerOpts = { dataStore: StorageType.RAM },
|
|
119
119
|
) {}
|
|
120
120
|
|
|
121
121
|
get props() {
|
|
@@ -123,7 +123,7 @@ export class TestPeer {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
get storage() {
|
|
126
|
-
return (this._props.storage ??= createStorage({ type: this.opts.
|
|
126
|
+
return (this._props.storage ??= createStorage({ type: this.opts.dataStore }));
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
get keyring() {
|
|
@@ -12,9 +12,9 @@ import { createSimplePeerTransportFactory, TransportFactory } from '@dxos/networ
|
|
|
12
12
|
import { RpcPort } from '@dxos/rpc';
|
|
13
13
|
import { getAsyncValue, MaybePromise, Provider } from '@dxos/util';
|
|
14
14
|
|
|
15
|
+
import { ShellRuntimeImpl } from './shell-runtime';
|
|
15
16
|
import { ClientServicesHost } from '../services';
|
|
16
17
|
import { ClientRpcServer, ClientRpcServerParams } from '../services/client-rpc-server';
|
|
17
|
-
import { ShellRuntimeImpl } from './shell-runtime';
|
|
18
18
|
|
|
19
19
|
const LOCK_KEY = 'DXOS_RESOURCE_LOCK';
|
|
20
20
|
|
|
@@ -11,8 +11,8 @@ import { SimplePeerTransportProxyFactory } from '@dxos/network-manager';
|
|
|
11
11
|
import { RpcPort } from '@dxos/rpc';
|
|
12
12
|
import { MaybePromise } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import { ClientServicesHost } from '../services';
|
|
15
14
|
import { WorkerSession } from './worker-session';
|
|
15
|
+
import { ClientServicesHost } from '../services';
|
|
16
16
|
|
|
17
17
|
// NOTE: Keep as RpcPorts to avoid dependency on @dxos/rpc-tunnel so we don't depend on browser-specific apis.
|
|
18
18
|
export type CreateSessionParams = {
|
|
@@ -34,11 +34,14 @@ export class WorkerRuntime {
|
|
|
34
34
|
private _sessionForNetworking?: WorkerSession; // TODO(burdon): Expose to client QueryStatusResponse.
|
|
35
35
|
private _config!: Config;
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
constructor(private readonly _configProvider: () => MaybePromise<Config>) {
|
|
38
|
+
this._clientServices = new ClientServicesHost({
|
|
39
|
+
callbacks: {
|
|
40
|
+
onReset: async () => {
|
|
41
|
+
self.close();
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
get host() {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.1.58-main.
|
|
1
|
+
export const DXOS_VERSION = "0.1.58-main.fc3ea9b";
|