@dxos/client-services 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549

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 (40) hide show
  1. package/dist/lib/browser/{chunk-HJH6BNTN.mjs → chunk-NXGWBEOK.mjs} +137 -100
  2. package/dist/lib/browser/chunk-NXGWBEOK.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/testing/index.mjs +1 -1
  6. package/dist/lib/node-esm/{chunk-ONQM6RQH.mjs → chunk-AO4R6IID.mjs} +137 -100
  7. package/dist/lib/node-esm/chunk-AO4R6IID.mjs.map +7 -0
  8. package/dist/lib/node-esm/index.mjs +1 -1
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/lib/node-esm/testing/index.mjs +1 -1
  11. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +2 -2
  12. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
  13. package/dist/types/src/packlets/invitations/invitation-guest-extenstion.d.ts.map +1 -1
  14. package/dist/types/src/packlets/invitations/invitation-host-extension.d.ts.map +1 -1
  15. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +2 -3
  16. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
  17. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +2 -2
  18. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  19. package/dist/types/src/packlets/space-export/space-archive-writer.d.ts.map +1 -1
  20. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  21. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  22. package/dist/types/src/version.d.ts +1 -1
  23. package/dist/types/tsconfig.tsbuildinfo +1 -1
  24. package/package.json +37 -37
  25. package/src/packlets/invitations/device-invitation-protocol.ts +3 -3
  26. package/src/packlets/invitations/invitation-guest-extenstion.ts +6 -4
  27. package/src/packlets/invitations/invitation-host-extension.ts +6 -4
  28. package/src/packlets/invitations/invitation-protocol.ts +2 -3
  29. package/src/packlets/invitations/invitations-handler.ts +1 -1
  30. package/src/packlets/invitations/space-invitation-protocol.ts +7 -13
  31. package/src/packlets/space-export/space-archive-reader.ts +1 -1
  32. package/src/packlets/space-export/space-archive-writer.ts +1 -0
  33. package/src/packlets/spaces/data-space-manager.ts +10 -6
  34. package/src/packlets/spaces/data-space.ts +1 -1
  35. package/src/packlets/spaces/notarization-plugin.ts +2 -2
  36. package/src/packlets/spaces/spaces-service.ts +10 -7
  37. package/src/packlets/storage/storage.ts +4 -4
  38. package/src/version.ts +1 -1
  39. package/dist/lib/browser/chunk-HJH6BNTN.mjs.map +0 -7
  40. package/dist/lib/node-esm/chunk-ONQM6RQH.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client-services",
3
- "version": "0.8.4-main.72ec0f3",
3
+ "version": "0.8.4-main.7ace549",
4
4
  "description": "DXOS client services implementation",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -48,47 +48,47 @@
48
48
  "@obsidize/tar-browserify": "^5.2.0",
49
49
  "cbor-x": "^1.5.4",
50
50
  "platform": "^1.3.6",
51
- "@dxos/async": "0.8.4-main.72ec0f3",
52
- "@dxos/client-protocol": "0.8.4-main.72ec0f3",
53
- "@dxos/config": "0.8.4-main.72ec0f3",
54
- "@dxos/context": "0.8.4-main.72ec0f3",
55
- "@dxos/credentials": "0.8.4-main.72ec0f3",
56
- "@dxos/codec-protobuf": "0.8.4-main.72ec0f3",
57
- "@dxos/debug": "0.8.4-main.72ec0f3",
58
- "@dxos/crypto": "0.8.4-main.72ec0f3",
59
- "@dxos/echo": "0.8.4-main.72ec0f3",
60
- "@dxos/echo-db": "0.8.4-main.72ec0f3",
61
- "@dxos/echo-pipeline": "0.8.4-main.72ec0f3",
62
- "@dxos/echo-protocol": "0.8.4-main.72ec0f3",
63
- "@dxos/feed-store": "0.8.4-main.72ec0f3",
64
- "@dxos/edge-client": "0.8.4-main.72ec0f3",
65
- "@dxos/indexing": "0.8.4-main.72ec0f3",
66
- "@dxos/invariant": "0.8.4-main.72ec0f3",
67
- "@dxos/keyring": "0.8.4-main.72ec0f3",
68
- "@dxos/lock-file": "0.8.4-main.72ec0f3",
69
- "@dxos/messaging": "0.8.4-main.72ec0f3",
70
- "@dxos/keys": "0.8.4-main.72ec0f3",
71
- "@dxos/kv-store": "0.8.4-main.72ec0f3",
72
- "@dxos/network-manager": "0.8.4-main.72ec0f3",
73
- "@dxos/node-std": "0.8.4-main.72ec0f3",
74
- "@dxos/protocols": "0.8.4-main.72ec0f3",
75
- "@dxos/random-access-storage": "0.8.4-main.72ec0f3",
76
- "@dxos/rpc": "0.8.4-main.72ec0f3",
77
- "@dxos/log": "0.8.4-main.72ec0f3",
78
- "@dxos/teleport": "0.8.4-main.72ec0f3",
79
- "@dxos/teleport-extension-gossip": "0.8.4-main.72ec0f3",
80
- "@dxos/teleport-extension-object-sync": "0.8.4-main.72ec0f3",
81
- "@dxos/timeframe": "0.8.4-main.72ec0f3",
82
- "@dxos/tracing": "0.8.4-main.72ec0f3",
83
- "@dxos/websocket-rpc": "0.8.4-main.72ec0f3",
84
- "@dxos/util": "0.8.4-main.72ec0f3"
51
+ "@dxos/async": "0.8.4-main.7ace549",
52
+ "@dxos/client-protocol": "0.8.4-main.7ace549",
53
+ "@dxos/codec-protobuf": "0.8.4-main.7ace549",
54
+ "@dxos/config": "0.8.4-main.7ace549",
55
+ "@dxos/context": "0.8.4-main.7ace549",
56
+ "@dxos/credentials": "0.8.4-main.7ace549",
57
+ "@dxos/crypto": "0.8.4-main.7ace549",
58
+ "@dxos/debug": "0.8.4-main.7ace549",
59
+ "@dxos/echo": "0.8.4-main.7ace549",
60
+ "@dxos/echo-db": "0.8.4-main.7ace549",
61
+ "@dxos/echo-protocol": "0.8.4-main.7ace549",
62
+ "@dxos/echo-pipeline": "0.8.4-main.7ace549",
63
+ "@dxos/edge-client": "0.8.4-main.7ace549",
64
+ "@dxos/feed-store": "0.8.4-main.7ace549",
65
+ "@dxos/indexing": "0.8.4-main.7ace549",
66
+ "@dxos/invariant": "0.8.4-main.7ace549",
67
+ "@dxos/keyring": "0.8.4-main.7ace549",
68
+ "@dxos/keys": "0.8.4-main.7ace549",
69
+ "@dxos/kv-store": "0.8.4-main.7ace549",
70
+ "@dxos/lock-file": "0.8.4-main.7ace549",
71
+ "@dxos/log": "0.8.4-main.7ace549",
72
+ "@dxos/messaging": "0.8.4-main.7ace549",
73
+ "@dxos/node-std": "0.8.4-main.7ace549",
74
+ "@dxos/protocols": "0.8.4-main.7ace549",
75
+ "@dxos/rpc": "0.8.4-main.7ace549",
76
+ "@dxos/teleport": "0.8.4-main.7ace549",
77
+ "@dxos/network-manager": "0.8.4-main.7ace549",
78
+ "@dxos/random-access-storage": "0.8.4-main.7ace549",
79
+ "@dxos/teleport-extension-gossip": "0.8.4-main.7ace549",
80
+ "@dxos/teleport-extension-object-sync": "0.8.4-main.7ace549",
81
+ "@dxos/tracing": "0.8.4-main.7ace549",
82
+ "@dxos/util": "0.8.4-main.7ace549",
83
+ "@dxos/websocket-rpc": "0.8.4-main.7ace549",
84
+ "@dxos/timeframe": "0.8.4-main.7ace549"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@types/platform": "^1.3.4",
88
88
  "@types/readable-stream": "^2.3.9",
89
89
  "get-port-please": "^3.1.1",
90
- "@dxos/signal": "0.8.4-main.72ec0f3",
91
- "@dxos/test-utils": "0.8.4-main.72ec0f3"
90
+ "@dxos/signal": "0.8.4-main.7ace549",
91
+ "@dxos/test-utils": "0.8.4-main.7ace549"
92
92
  },
93
93
  "publishConfig": {
94
94
  "access": "public"
@@ -6,7 +6,7 @@ import { getCredentialAssertion } from '@dxos/credentials';
6
6
  import { invariant } from '@dxos/invariant';
7
7
  import { type Keyring } from '@dxos/keyring';
8
8
  import { type PublicKey } from '@dxos/keys';
9
- import { AlreadyJoinedError, type ApiError } from '@dxos/protocols';
9
+ import { AlreadyJoinedError } from '@dxos/protocols';
10
10
  import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
11
11
  import type { DeviceProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
12
12
  import {
@@ -32,7 +32,7 @@ export class DeviceInvitationProtocol implements InvitationProtocol {
32
32
  };
33
33
  }
34
34
 
35
- checkCanInviteNewMembers(): ApiError | undefined {
35
+ checkCanInviteNewMembers(): Error | undefined {
36
36
  return undefined;
37
37
  }
38
38
 
@@ -71,7 +71,7 @@ export class DeviceInvitationProtocol implements InvitationProtocol {
71
71
  try {
72
72
  const identity = this._getIdentity();
73
73
  if (identity) {
74
- return new AlreadyJoinedError('Currently only one identity per client is supported.');
74
+ return new AlreadyJoinedError({ message: 'Currently only one identity per client is supported.' });
75
75
  }
76
76
  } catch {
77
77
  // No identity.
@@ -97,10 +97,12 @@ export class InvitationGuestExtension
97
97
  await cancelWithContext(this._ctx, this._remoteOptionsTrigger.wait({ timeout: OPTIONS_TIMEOUT }));
98
98
  log.verbose('options received');
99
99
  if (this._remoteOptions?.role !== InvitationOptions.Role.HOST) {
100
- throw new InvalidInvitationExtensionRoleError(undefined, {
101
- expected: InvitationOptions.Role.HOST,
102
- remoteOptions: this._remoteOptions,
103
- remotePeerId: context.remotePeerId,
100
+ throw new InvalidInvitationExtensionRoleError({
101
+ context: {
102
+ expected: InvitationOptions.Role.HOST,
103
+ remoteOptions: this._remoteOptions,
104
+ remotePeerId: context.remotePeerId,
105
+ },
104
106
  });
105
107
  }
106
108
 
@@ -245,10 +245,12 @@ export class InvitationHostExtension
245
245
  await cancelWithContext(this._ctx, this._remoteOptionsTrigger.wait({ timeout: OPTIONS_TIMEOUT }));
246
246
  log.verbose('options received');
247
247
  if (this._remoteOptions?.role !== InvitationOptions.Role.GUEST) {
248
- throw new InvalidInvitationExtensionRoleError(undefined, {
249
- expected: InvitationOptions.Role.GUEST,
250
- remoteOptions: this._remoteOptions,
251
- remotePeerId: context.remotePeerId,
248
+ throw new InvalidInvitationExtensionRoleError({
249
+ context: {
250
+ expected: InvitationOptions.Role.GUEST,
251
+ remoteOptions: this._remoteOptions,
252
+ remotePeerId: context.remotePeerId,
253
+ },
252
254
  });
253
255
  }
254
256
  this._callbacks.onStateUpdate(Invitation.State.CONNECTED);
@@ -3,7 +3,6 @@
3
3
  //
4
4
 
5
5
  import { type PublicKey } from '@dxos/keys';
6
- import type { ApiError } from '@dxos/protocols';
7
6
  import type { Invitation } from '@dxos/protocols/proto/dxos/client/services';
8
7
  import type { DeviceProfileDocument, ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
9
8
  import type {
@@ -26,7 +25,7 @@ export interface InvitationProtocol {
26
25
  // Host
27
26
  //
28
27
 
29
- checkCanInviteNewMembers(): ApiError | undefined;
28
+ checkCanInviteNewMembers(): Error | undefined;
30
29
 
31
30
  /**
32
31
  * Protocol-specific information to include in the invitation.
@@ -58,7 +57,7 @@ export interface InvitationProtocol {
58
57
  *
59
58
  * For example, the guest may already be a member of the space.
60
59
  */
61
- checkInvitation(invitation: Partial<Invitation>): ApiError | undefined;
60
+ checkInvitation(invitation: Partial<Invitation>): Error | undefined;
62
61
 
63
62
  /**
64
63
  * Get profile information to send to the host to identify the guest.
@@ -503,7 +503,7 @@ export class InvitationsHandler {
503
503
  const checkInvitation = (protocol: InvitationProtocol, invitation: Partial<Invitation>) => {
504
504
  const expiresOn = getExpirationTime(invitation);
505
505
  if (expiresOn && expiresOn.getTime() < Date.now()) {
506
- return new InvalidInvitationError('Invitation already expired.');
506
+ return new InvalidInvitationError({ message: 'Invitation already expired.' });
507
507
  }
508
508
  return protocol.checkInvitation(invitation);
509
509
  };
@@ -12,13 +12,7 @@ import { invariant } from '@dxos/invariant';
12
12
  import { type Keyring } from '@dxos/keyring';
13
13
  import { type PublicKey } from '@dxos/keys';
14
14
  import { log } from '@dxos/log';
15
- import {
16
- AlreadyJoinedError,
17
- type ApiError,
18
- AuthorizationError,
19
- InvalidInvitationError,
20
- SpaceNotFoundError,
21
- } from '@dxos/protocols';
15
+ import { AlreadyJoinedError, AuthorizationError, InvalidInvitationError, SpaceNotFoundError } from '@dxos/protocols';
22
16
  import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
23
17
  import { type ProfileDocument, SpaceMember } from '@dxos/protocols/proto/dxos/halo/credentials';
24
18
  import {
@@ -48,16 +42,16 @@ export class SpaceInvitationProtocol implements InvitationProtocol {
48
42
  };
49
43
  }
50
44
 
51
- checkCanInviteNewMembers(): ApiError | undefined {
45
+ checkCanInviteNewMembers(): Error | undefined {
52
46
  if (this._spaceKey == null) {
53
- return new InvalidInvitationError('No spaceKey was provided for a space invitation.');
47
+ return new InvalidInvitationError({ message: 'No spaceKey was provided for a space invitation.' });
54
48
  }
55
49
  const space = this._spaceManager.spaces.get(this._spaceKey);
56
50
  if (space == null) {
57
51
  return new SpaceNotFoundError(this._spaceKey);
58
52
  }
59
53
  if (!space?.inner.spaceState.hasMembershipManagementPermission(this._signingContext.identityKey)) {
60
- return new AuthorizationError('No member management permission.');
54
+ return new AuthorizationError({ message: 'No member management permission.' });
61
55
  }
62
56
  return undefined;
63
57
  }
@@ -148,10 +142,10 @@ export class SpaceInvitationProtocol implements InvitationProtocol {
148
142
 
149
143
  checkInvitation(invitation: Partial<Invitation>): InvalidInvitationError | AlreadyJoinedError | undefined {
150
144
  if (invitation.spaceKey == null) {
151
- return new InvalidInvitationError('No spaceKey was provided for a space invitation.');
145
+ return new InvalidInvitationError({ message: 'No spaceKey was provided for a space invitation.' });
152
146
  }
153
147
  if (this._spaceManager.spaces.has(invitation.spaceKey)) {
154
- return new AlreadyJoinedError('Already joined space.');
148
+ return new AlreadyJoinedError({ message: 'Already joined space.' });
155
149
  }
156
150
  }
157
151
 
@@ -184,7 +178,7 @@ export class SpaceInvitationProtocol implements InvitationProtocol {
184
178
  invariant(credential.subject.id.equals(this._signingContext.identityKey));
185
179
 
186
180
  if (this._spaceManager.spaces.has(assertion.spaceKey)) {
187
- throw new AlreadyJoinedError('Already joined space.');
181
+ throw new AlreadyJoinedError({ message: 'Already joined space.' });
188
182
  }
189
183
 
190
184
  // Create local space.
@@ -29,6 +29,6 @@ export const extractSpaceArchive = async (archive: SpaceArchive): Promise<Extrac
29
29
  documents[documentId] = entry.content ?? failedInvariant();
30
30
  }
31
31
 
32
- log.info('extracted space archive', { metadata, documents });
32
+ log('extracted space archive', { metadata, documents });
33
33
  return { metadata, documents };
34
34
  };
@@ -76,6 +76,7 @@ export class SpaceArchiveWriter extends Resource {
76
76
  const binary = this._archive.toUint8Array();
77
77
 
78
78
  return {
79
+ // TODO(wittjosiah): Factor out file name construction.
79
80
  filename: `${new Date().toISOString()}-${this._meta.spaceId}.tar`,
80
81
  contents: binary,
81
82
  };
@@ -6,7 +6,7 @@ import { type Doc } from '@automerge/automerge';
6
6
  import { type AutomergeUrl, type DocHandle, type DocumentId, interpretAsDocumentId } from '@automerge/automerge-repo';
7
7
 
8
8
  import { Event, synchronized, trackLeaks } from '@dxos/async';
9
- import { PropertiesType, TYPE_PROPERTIES } from '@dxos/client-protocol';
9
+ import { SpaceProperties } from '@dxos/client-protocol';
10
10
  import { Context, LifecycleState, Resource, cancelWithContext } from '@dxos/context';
11
11
  import {
12
12
  type CredentialSigner,
@@ -15,7 +15,8 @@ import {
15
15
  createAdmissionCredentials,
16
16
  getCredentialAssertion,
17
17
  } from '@dxos/credentials';
18
- import { ObjectId, getTypeReference } from '@dxos/echo/internal';
18
+ import { Type } from '@dxos/echo';
19
+ import { getTypeReference } from '@dxos/echo/internal';
19
20
  import {
20
21
  AuthStatus,
21
22
  CredentialServerExtension,
@@ -42,7 +43,7 @@ import type { EdgeConnection, EdgeHttpClient } from '@dxos/edge-client';
42
43
  import { type FeedStore, writeMessages } from '@dxos/feed-store';
43
44
  import { assertArgument, assertState, failedInvariant, invariant } from '@dxos/invariant';
44
45
  import { type Keyring } from '@dxos/keyring';
45
- import { PublicKey, type SpaceId } from '@dxos/keys';
46
+ import { ObjectId, PublicKey, type SpaceId } from '@dxos/keys';
46
47
  import { log } from '@dxos/log';
47
48
  import { AlreadyJoinedError, trace as Trace } from '@dxos/protocols';
48
49
  import { Invitation, SpaceState } from '@dxos/protocols/proto/dxos/client/services';
@@ -184,7 +185,7 @@ export class DataSpaceManager extends Resource {
184
185
  await rootHandle?.whenReady();
185
186
  const rootDoc = rootHandle?.doc();
186
187
 
187
- const properties = rootDoc && findInlineObjectOfType(rootDoc, TYPE_PROPERTIES);
188
+ const properties = rootDoc && findInlineObjectOfType(rootDoc, Type.getTypename(SpaceProperties));
188
189
 
189
190
  return {
190
191
  key: space.key.toHex(),
@@ -342,9 +343,12 @@ export class DataSpaceManager extends Resource {
342
343
  log.warn('waiting for space root to be ready', { spaceId: space.id });
343
344
  await space.databaseRoot.handle.whenReady();
344
345
  }
345
- const [_, properties] = findInlineObjectOfType(space.databaseRoot.doc()!, TYPE_PROPERTIES) ?? [];
346
+
347
+ const [_, properties] =
348
+ findInlineObjectOfType(space.databaseRoot.doc()!, Type.getTypename(SpaceProperties)) ?? [];
346
349
  return properties?.data?.[DEFAULT_SPACE_KEY] === this._signingContext.identityKey.toHex();
347
350
  }
351
+
348
352
  case SpaceDocVersion.LEGACY: {
349
353
  throw new Error('Legacy space version is not supported');
350
354
  }
@@ -362,7 +366,7 @@ export class DataSpaceManager extends Resource {
362
366
  // TODO(dmaretskyi): Better API for low-level data access.
363
367
  const properties: ObjectStructure = {
364
368
  system: {
365
- type: encodeReference(getTypeReference(PropertiesType)!),
369
+ type: encodeReference(getTypeReference(SpaceProperties)!),
366
370
  },
367
371
  data: {
368
372
  [DEFAULT_SPACE_KEY]: this._signingContext.identityKey.toHex(),
@@ -331,7 +331,7 @@ export class DataSpace {
331
331
  @trace.span({ showInBrowserTimeline: true })
332
332
  async initializeDataPipeline(): Promise<void> {
333
333
  if (this._state !== SpaceState.SPACE_CONTROL_ONLY) {
334
- throw new SystemError('Invalid operation');
334
+ throw new SystemError({ message: 'Invalid operation' });
335
335
  }
336
336
 
337
337
  this._state = SpaceState.SPACE_INITIALIZING;
@@ -392,10 +392,10 @@ export class NotarizationPlugin extends Resource implements CredentialProcessor
392
392
  }
393
393
 
394
394
  const handleEdgeError = (error: any) => {
395
- if (!(error instanceof EdgeCallFailedError) || error.errorData) {
395
+ if (!(error instanceof EdgeCallFailedError) || error.data) {
396
396
  log.catch(error);
397
397
  } else {
398
- log.info('Edge notarization failure', { reason: error.reason });
398
+ log.info('Edge notarization failure', { message: error.message });
399
399
  }
400
400
  };
401
401
 
@@ -88,7 +88,7 @@ export class SpacesServiceImpl implements SpacesService {
88
88
  await space.deactivate();
89
89
  break;
90
90
  default:
91
- throw new ApiError('Invalid space state');
91
+ throw new ApiError({ message: 'Invalid space state' });
92
92
  }
93
93
  }
94
94
 
@@ -104,9 +104,12 @@ export class SpacesServiceImpl implements SpacesService {
104
104
  throw new SpaceNotFoundError(request.spaceKey);
105
105
  }
106
106
  if (!space.spaceState.hasMembershipManagementPermission(identity.identityKey)) {
107
- throw new AuthorizationError('No member management permission.', {
108
- spaceKey: space.key,
109
- role: space.spaceState.getMemberRole(identity.identityKey),
107
+ throw new AuthorizationError({
108
+ message: 'No member management permission.',
109
+ context: {
110
+ spaceKey: space.key,
111
+ role: space.spaceState.getMemberRole(identity.identityKey),
112
+ },
110
113
  });
111
114
  }
112
115
  const credentials = await createAdmissionCredentials(
@@ -368,9 +371,9 @@ export class SpacesServiceImpl implements SpacesService {
368
371
 
369
372
  private _requireIdentity() {
370
373
  if (!this._identityManager.identity) {
371
- throw new IdentityNotInitializedError(
372
- 'This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo',
373
- );
374
+ throw new IdentityNotInitializedError({
375
+ message: 'This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo',
376
+ });
374
377
  }
375
378
  return this._identityManager.identity;
376
379
  }
@@ -14,16 +14,16 @@ import StorageDriver = Runtime.Client.Storage.StorageDriver;
14
14
  export const createStorageObjects = (config: Runtime.Client.Storage) => {
15
15
  const { persistent = false, keyStore, dataStore } = config ?? {};
16
16
  if (persistent && dataStore === StorageDriver.RAM) {
17
- throw new InvalidConfigError('RAM storage cannot be used in persistent mode.');
17
+ throw new InvalidConfigError({ message: 'RAM storage cannot be used in persistent mode.' });
18
18
  }
19
19
  if (!persistent && dataStore !== undefined && dataStore !== StorageDriver.RAM) {
20
- throw new InvalidConfigError('Cannot use a persistent storage in not persistent mode.');
20
+ throw new InvalidConfigError({ message: 'Cannot use a persistent storage in not persistent mode.' });
21
21
  }
22
22
  if (persistent && keyStore === StorageDriver.RAM) {
23
- throw new InvalidConfigError('RAM key storage cannot be used in persistent mode.');
23
+ throw new InvalidConfigError({ message: 'RAM key storage cannot be used in persistent mode.' });
24
24
  }
25
25
  if (!persistent && keyStore !== StorageDriver.RAM && keyStore !== undefined) {
26
- throw new InvalidConfigError('Cannot use a persistent key storage in not persistent mode.');
26
+ throw new InvalidConfigError({ message: 'Cannot use a persistent key storage in not persistent mode.' });
27
27
  }
28
28
 
29
29
  return {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const DXOS_VERSION = "0.8.4-main.72ec0f3";
1
+ export const DXOS_VERSION = "0.8.4-main.7ace549";