@dxos/client-services 0.1.58-main.fa022ee → 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.
Files changed (60) hide show
  1. package/dist/lib/browser/{chunk-SNPC4XOB.mjs → chunk-XWHMUFQW.mjs} +108 -78
  2. package/dist/lib/browser/chunk-XWHMUFQW.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +5 -6
  4. package/dist/lib/browser/index.mjs.map +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/packlets/testing/index.mjs +3 -3
  7. package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
  8. package/dist/lib/node/index.cjs +109 -80
  9. package/dist/lib/node/index.cjs.map +4 -4
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node/packlets/testing/index.cjs +107 -77
  12. package/dist/lib/node/packlets/testing/index.cjs.map +4 -4
  13. package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
  14. package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
  15. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +1 -1
  16. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
  17. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +1 -1
  18. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  19. package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
  20. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  21. package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
  22. package/dist/types/src/packlets/services/service-host.d.ts +1 -0
  23. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  24. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  25. package/dist/types/src/packlets/spaces/data-space.d.ts +1 -1
  26. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  27. package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -1
  28. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  29. package/dist/types/src/packlets/testing/test-builder.d.ts +1 -1
  30. package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
  31. package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
  32. package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
  33. package/dist/types/src/version.d.ts +1 -1
  34. package/package.json +35 -34
  35. package/src/packlets/devices/devices-service.test.ts +1 -1
  36. package/src/packlets/devtools/devtools.ts +1 -1
  37. package/src/packlets/identity/authenticator.ts +1 -4
  38. package/src/packlets/identity/identity-manager.test.ts +1 -1
  39. package/src/packlets/identity/identity-service.test.ts +1 -1
  40. package/src/packlets/identity/identity.test.ts +1 -1
  41. package/src/packlets/invitations/device-invitation-protocol.ts +1 -1
  42. package/src/packlets/invitations/space-invitation-protocol.ts +1 -1
  43. package/src/packlets/network/network-service.test.ts +1 -1
  44. package/src/packlets/network/network-service.ts +4 -1
  45. package/src/packlets/services/diagnostics.ts +2 -2
  46. package/src/packlets/services/service-context.ts +5 -11
  47. package/src/packlets/services/service-host.test.ts +3 -3
  48. package/src/packlets/services/service-host.ts +42 -6
  49. package/src/packlets/services/service-registry.test.ts +1 -1
  50. package/src/packlets/spaces/data-space-manager.test.ts +1 -1
  51. package/src/packlets/spaces/data-space-manager.ts +1 -1
  52. package/src/packlets/spaces/data-space.ts +1 -1
  53. package/src/packlets/spaces/spaces-service.test.ts +1 -1
  54. package/src/packlets/spaces/spaces-service.ts +1 -1
  55. package/src/packlets/storage/storage.ts +9 -9
  56. package/src/packlets/testing/test-builder.ts +3 -3
  57. package/src/packlets/vault/iframe-host-runtime.ts +1 -1
  58. package/src/packlets/vault/worker-runtime.ts +9 -6
  59. package/src/version.ts +1 -1
  60. package/dist/lib/browser/chunk-SNPC4XOB.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
- storageType: typeof window === 'undefined' ? StorageType.NODE : StorageType.WEBFS,
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(
@@ -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 && storageType === StorageDriver.RAM) {
24
+ if (persistent && dataStore === StorageDriver.RAM) {
25
25
  throw new InvalidConfigError('RAM storage cannot be used in persistent mode.');
26
26
  }
27
- if (!persistent && storageType !== undefined && storageType !== StorageDriver.RAM) {
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 && keyStorage === StorageDriver.RAM) {
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 && keyStorage !== StorageDriver.RAM && keyStorage !== undefined) {
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(storageType) : StorageType.RAM,
40
- root: `${path}/`,
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
- storageType?: StorageType;
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 = { storageType: StorageType.RAM },
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.storageType }));
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
- // prettier-ignore
38
- constructor(
39
- private readonly _configProvider: () => MaybePromise<Config>
40
- ) {
41
- this._clientServices = new ClientServicesHost({ callbacks: { onReset: async () => { self.close(); } } });
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.fa022ee";
1
+ export const DXOS_VERSION = "0.1.58-main.fc3ea9b";