@dxos/client-services 0.1.0
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/LICENSE +21 -0
- package/README.md +20 -0
- package/dist/src/errors.d.ts +8 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +21 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +26 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/packlets/devtools/devtools-host-events.d.ts +5 -0
- package/dist/src/packlets/devtools/devtools-host-events.d.ts.map +1 -0
- package/dist/src/packlets/devtools/devtools-host-events.js +14 -0
- package/dist/src/packlets/devtools/devtools-host-events.js.map +1 -0
- package/dist/src/packlets/devtools/feeds.d.ts +11 -0
- package/dist/src/packlets/devtools/feeds.d.ts.map +1 -0
- package/dist/src/packlets/devtools/feeds.js +72 -0
- package/dist/src/packlets/devtools/feeds.js.map +1 -0
- package/dist/src/packlets/devtools/index.d.ts +5 -0
- package/dist/src/packlets/devtools/index.d.ts.map +1 -0
- package/dist/src/packlets/devtools/index.js +24 -0
- package/dist/src/packlets/devtools/index.js.map +1 -0
- package/dist/src/packlets/devtools/network.d.ts +19 -0
- package/dist/src/packlets/devtools/network.d.ts.map +1 -0
- package/dist/src/packlets/devtools/network.js +79 -0
- package/dist/src/packlets/devtools/network.js.map +1 -0
- package/dist/src/packlets/devtools/spaces.d.ts +5 -0
- package/dist/src/packlets/devtools/spaces.d.ts.map +1 -0
- package/dist/src/packlets/devtools/spaces.js +38 -0
- package/dist/src/packlets/devtools/spaces.js.map +1 -0
- package/dist/src/packlets/identity/authenticator.d.ts +7 -0
- package/dist/src/packlets/identity/authenticator.d.ts.map +1 -0
- package/dist/src/packlets/identity/authenticator.js +40 -0
- package/dist/src/packlets/identity/authenticator.js.map +1 -0
- package/dist/src/packlets/identity/authenticator.test.d.ts +2 -0
- package/dist/src/packlets/identity/authenticator.test.d.ts.map +1 -0
- package/dist/src/packlets/identity/authenticator.test.js +32 -0
- package/dist/src/packlets/identity/authenticator.test.js.map +1 -0
- package/dist/src/packlets/identity/identity-manager.d.ts +35 -0
- package/dist/src/packlets/identity/identity-manager.d.ts.map +1 -0
- package/dist/src/packlets/identity/identity-manager.js +151 -0
- package/dist/src/packlets/identity/identity-manager.js.map +1 -0
- package/dist/src/packlets/identity/identity-manager.test.d.ts +2 -0
- package/dist/src/packlets/identity/identity-manager.test.d.ts.map +1 -0
- package/dist/src/packlets/identity/identity-manager.test.js +92 -0
- package/dist/src/packlets/identity/identity-manager.test.js.map +1 -0
- package/dist/src/packlets/identity/identity.d.ts +43 -0
- package/dist/src/packlets/identity/identity.d.ts.map +1 -0
- package/dist/src/packlets/identity/identity.js +74 -0
- package/dist/src/packlets/identity/identity.js.map +1 -0
- package/dist/src/packlets/identity/identity.test.d.ts +2 -0
- package/dist/src/packlets/identity/identity.test.d.ts.map +1 -0
- package/dist/src/packlets/identity/identity.test.js +258 -0
- package/dist/src/packlets/identity/identity.test.js.map +1 -0
- package/dist/src/packlets/identity/index.d.ts +4 -0
- package/dist/src/packlets/identity/index.d.ts.map +1 -0
- package/dist/src/packlets/identity/index.js +23 -0
- package/dist/src/packlets/identity/index.js.map +1 -0
- package/dist/src/packlets/invitations/common.d.ts +35 -0
- package/dist/src/packlets/invitations/common.d.ts.map +1 -0
- package/dist/src/packlets/invitations/common.js +12 -0
- package/dist/src/packlets/invitations/common.js.map +1 -0
- package/dist/src/packlets/invitations/halo-invitations.d.ts +23 -0
- package/dist/src/packlets/invitations/halo-invitations.d.ts.map +1 -0
- package/dist/src/packlets/invitations/halo-invitations.js +150 -0
- package/dist/src/packlets/invitations/halo-invitations.js.map +1 -0
- package/dist/src/packlets/invitations/index.d.ts +5 -0
- package/dist/src/packlets/invitations/index.d.ts.map +1 -0
- package/dist/src/packlets/invitations/index.js +24 -0
- package/dist/src/packlets/invitations/index.js.map +1 -0
- package/dist/src/packlets/invitations/invitation-wrapper.d.ts +36 -0
- package/dist/src/packlets/invitations/invitation-wrapper.d.ts.map +1 -0
- package/dist/src/packlets/invitations/invitation-wrapper.js +104 -0
- package/dist/src/packlets/invitations/invitation-wrapper.js.map +1 -0
- package/dist/src/packlets/invitations/observable.test.d.ts +2 -0
- package/dist/src/packlets/invitations/observable.test.d.ts.map +1 -0
- package/dist/src/packlets/invitations/observable.test.js +43 -0
- package/dist/src/packlets/invitations/observable.test.js.map +1 -0
- package/dist/src/packlets/invitations/space-invitations.d.ts +25 -0
- package/dist/src/packlets/invitations/space-invitations.d.ts.map +1 -0
- package/dist/src/packlets/invitations/space-invitations.js +136 -0
- package/dist/src/packlets/invitations/space-invitations.js.map +1 -0
- package/dist/src/packlets/services/impl/devtools.d.ts +34 -0
- package/dist/src/packlets/services/impl/devtools.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/devtools.js +77 -0
- package/dist/src/packlets/services/impl/devtools.js.map +1 -0
- package/dist/src/packlets/services/impl/halo.d.ts +20 -0
- package/dist/src/packlets/services/impl/halo.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/halo.js +93 -0
- package/dist/src/packlets/services/impl/halo.js.map +1 -0
- package/dist/src/packlets/services/impl/index.d.ts +6 -0
- package/dist/src/packlets/services/impl/index.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/index.js +26 -0
- package/dist/src/packlets/services/impl/index.js.map +1 -0
- package/dist/src/packlets/services/impl/party.d.ts +25 -0
- package/dist/src/packlets/services/impl/party.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/party.js +265 -0
- package/dist/src/packlets/services/impl/party.js.map +1 -0
- package/dist/src/packlets/services/impl/profile.d.ts +19 -0
- package/dist/src/packlets/services/impl/profile.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/profile.js +120 -0
- package/dist/src/packlets/services/impl/profile.js.map +1 -0
- package/dist/src/packlets/services/impl/system.d.ts +9 -0
- package/dist/src/packlets/services/impl/system.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/system.js +20 -0
- package/dist/src/packlets/services/impl/system.js.map +1 -0
- package/dist/src/packlets/services/impl/tracing.d.ts +12 -0
- package/dist/src/packlets/services/impl/tracing.d.ts.map +1 -0
- package/dist/src/packlets/services/impl/tracing.js +22 -0
- package/dist/src/packlets/services/impl/tracing.js.map +1 -0
- package/dist/src/packlets/services/index.d.ts +6 -0
- package/dist/src/packlets/services/index.d.ts.map +1 -0
- package/dist/src/packlets/services/index.js +25 -0
- package/dist/src/packlets/services/index.js.map +1 -0
- package/dist/src/packlets/services/service-context.d.ts +36 -0
- package/dist/src/packlets/services/service-context.d.ts.map +1 -0
- package/dist/src/packlets/services/service-context.js +112 -0
- package/dist/src/packlets/services/service-context.js.map +1 -0
- package/dist/src/packlets/services/service-factory.d.ts +15 -0
- package/dist/src/packlets/services/service-factory.d.ts.map +1 -0
- package/dist/src/packlets/services/service-factory.js +25 -0
- package/dist/src/packlets/services/service-factory.js.map +1 -0
- package/dist/src/packlets/services/service-host.d.ts +27 -0
- package/dist/src/packlets/services/service-host.d.ts.map +1 -0
- package/dist/src/packlets/services/service-host.js +78 -0
- package/dist/src/packlets/services/service-host.js.map +1 -0
- package/dist/src/packlets/services/service-host.test.d.ts +2 -0
- package/dist/src/packlets/services/service-host.test.d.ts.map +1 -0
- package/dist/src/packlets/services/service-host.test.js +78 -0
- package/dist/src/packlets/services/service-host.test.js.map +1 -0
- package/dist/src/packlets/services/services.d.ts +19 -0
- package/dist/src/packlets/services/services.d.ts.map +1 -0
- package/dist/src/packlets/services/services.js +19 -0
- package/dist/src/packlets/services/services.js.map +1 -0
- package/dist/src/packlets/services/signer.d.ts +9 -0
- package/dist/src/packlets/services/signer.d.ts.map +1 -0
- package/dist/src/packlets/services/signer.js +6 -0
- package/dist/src/packlets/services/signer.js.map +1 -0
- package/dist/src/packlets/services/testing/halo.test.d.ts +2 -0
- package/dist/src/packlets/services/testing/halo.test.d.ts.map +1 -0
- package/dist/src/packlets/services/testing/halo.test.js +34 -0
- package/dist/src/packlets/services/testing/halo.test.js.map +1 -0
- package/dist/src/packlets/services/testing/spaces.test.d.ts +2 -0
- package/dist/src/packlets/services/testing/spaces.test.d.ts.map +1 -0
- package/dist/src/packlets/services/testing/spaces.test.js +68 -0
- package/dist/src/packlets/services/testing/spaces.test.js.map +1 -0
- package/dist/src/packlets/services/testing/testing.d.ts +8 -0
- package/dist/src/packlets/services/testing/testing.d.ts.map +1 -0
- package/dist/src/packlets/services/testing/testing.js +23 -0
- package/dist/src/packlets/services/testing/testing.js.map +1 -0
- package/dist/src/packlets/storage/index.d.ts +2 -0
- package/dist/src/packlets/storage/index.d.ts.map +1 -0
- package/dist/src/packlets/storage/index.js +21 -0
- package/dist/src/packlets/storage/index.js.map +1 -0
- package/dist/src/packlets/storage/storage.d.ts +7 -0
- package/dist/src/packlets/storage/storage.d.ts.map +1 -0
- package/dist/src/packlets/storage/storage.js +89 -0
- package/dist/src/packlets/storage/storage.js.map +1 -0
- package/package.json +61 -0
- package/src/errors.ts +19 -0
- package/src/index.ts +11 -0
- package/src/packlets/devtools/devtools-host-events.ts +8 -0
- package/src/packlets/devtools/feeds.ts +91 -0
- package/src/packlets/devtools/index.ts +8 -0
- package/src/packlets/devtools/network.ts +89 -0
- package/src/packlets/devtools/spaces.ts +50 -0
- package/src/packlets/identity/authenticator.test.ts +32 -0
- package/src/packlets/identity/authenticator.ts +49 -0
- package/src/packlets/identity/identity-manager.test.ts +121 -0
- package/src/packlets/identity/identity-manager.ts +207 -0
- package/src/packlets/identity/identity.test.ts +295 -0
- package/src/packlets/identity/identity.ts +109 -0
- package/src/packlets/identity/index.ts +7 -0
- package/src/packlets/invitations/common.ts +48 -0
- package/src/packlets/invitations/halo-invitations.ts +162 -0
- package/src/packlets/invitations/index.ts +8 -0
- package/src/packlets/invitations/invitation-wrapper.ts +140 -0
- package/src/packlets/invitations/observable.test.ts +67 -0
- package/src/packlets/invitations/space-invitations.ts +159 -0
- package/src/packlets/services/impl/devtools.ts +141 -0
- package/src/packlets/services/impl/halo.ts +107 -0
- package/src/packlets/services/impl/index.ts +11 -0
- package/src/packlets/services/impl/party.ts +305 -0
- package/src/packlets/services/impl/profile.ts +141 -0
- package/src/packlets/services/impl/system.ts +19 -0
- package/src/packlets/services/impl/tracing.ts +21 -0
- package/src/packlets/services/index.ts +9 -0
- package/src/packlets/services/service-context.ts +151 -0
- package/src/packlets/services/service-factory.ts +35 -0
- package/src/packlets/services/service-host.test.ts +88 -0
- package/src/packlets/services/service-host.ts +101 -0
- package/src/packlets/services/services.ts +39 -0
- package/src/packlets/services/signer.ts +13 -0
- package/src/packlets/services/testing/halo.test.ts +40 -0
- package/src/packlets/services/testing/spaces.test.ts +87 -0
- package/src/packlets/services/testing/testing.ts +28 -0
- package/src/packlets/storage/index.ts +5 -0
- package/src/packlets/storage/storage.ts +97 -0
- package/src/typings.d.ts +5 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { expect } from 'chai';
|
|
6
|
+
|
|
7
|
+
import { MemorySignalManagerContext } from '@dxos/messaging';
|
|
8
|
+
import { ObjectModel } from '@dxos/object-model';
|
|
9
|
+
import { afterTest } from '@dxos/testutils';
|
|
10
|
+
|
|
11
|
+
import { createServiceContext } from './testing';
|
|
12
|
+
|
|
13
|
+
describe('services/spaces', function () {
|
|
14
|
+
it('space genesis', async function () {
|
|
15
|
+
const peer = await createServiceContext();
|
|
16
|
+
await peer.open();
|
|
17
|
+
afterTest(() => peer.close());
|
|
18
|
+
|
|
19
|
+
await peer.createIdentity();
|
|
20
|
+
|
|
21
|
+
const space = await peer.spaceManager!.createSpace();
|
|
22
|
+
expect(space.database).not.to.be.undefined;
|
|
23
|
+
expect(peer.spaceManager!.spaces.has(space.key)).to.be.true;
|
|
24
|
+
await space.close();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('space genesis with database', async function () {
|
|
28
|
+
const peer = await createServiceContext();
|
|
29
|
+
await peer.open();
|
|
30
|
+
afterTest(() => peer.close());
|
|
31
|
+
|
|
32
|
+
await peer.createIdentity();
|
|
33
|
+
const space = await peer.spaceManager!.createSpace();
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
const item = await space.database!.createItem<ObjectModel>({ type: 'test' });
|
|
37
|
+
void item.model.set('name', 'test');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
const [item] = space.database!.select({ type: 'test' }).exec().entities;
|
|
42
|
+
expect(item.model.get('name')).to.eq('test');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
await space.close();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('create and accepts space invitations', async function () {
|
|
49
|
+
const signalContext = new MemorySignalManagerContext();
|
|
50
|
+
|
|
51
|
+
const peer1 = await createServiceContext({ signalContext });
|
|
52
|
+
const peer2 = await createServiceContext({ signalContext });
|
|
53
|
+
|
|
54
|
+
await peer1.open();
|
|
55
|
+
await peer2.open();
|
|
56
|
+
afterTest(() => peer1.close());
|
|
57
|
+
afterTest(() => peer2.close());
|
|
58
|
+
|
|
59
|
+
await peer1.createIdentity();
|
|
60
|
+
await peer2.createIdentity();
|
|
61
|
+
|
|
62
|
+
const space1 = await peer1.spaceManager!.createSpace();
|
|
63
|
+
const invitation = await peer1.createInvitation(space1.key);
|
|
64
|
+
|
|
65
|
+
const space2 = await peer2.acceptInvitation(invitation);
|
|
66
|
+
expect(space1.key).to.deep.eq(space2.key);
|
|
67
|
+
|
|
68
|
+
// TODO(burdon): Write multiple items.
|
|
69
|
+
|
|
70
|
+
{
|
|
71
|
+
// Check item replicated from 1 => 2.
|
|
72
|
+
const item1 = await space1.database!.createItem({ type: 'dxos.example.1' });
|
|
73
|
+
const item2 = await space2.database!.waitForItem({ type: 'dxos.example.1' });
|
|
74
|
+
expect(item1.id).to.eq(item2.id);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
{
|
|
78
|
+
// Check item replicated from 2 => 1.
|
|
79
|
+
const item1 = await space2.database!.createItem({ type: 'dxos.example.2' });
|
|
80
|
+
const item2 = await space1.database!.waitForItem({ type: 'dxos.example.2' });
|
|
81
|
+
expect(item1.id).to.eq(item2.id);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
await space1.close();
|
|
85
|
+
await space2.close();
|
|
86
|
+
});
|
|
87
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { MemorySignalManager, MemorySignalManagerContext } from '@dxos/messaging';
|
|
6
|
+
import { ModelFactory } from '@dxos/model-factory';
|
|
7
|
+
import { MemoryTransportFactory, NetworkManager } from '@dxos/network-manager';
|
|
8
|
+
import { ObjectModel } from '@dxos/object-model';
|
|
9
|
+
import { createStorage, Storage, StorageType } from '@dxos/random-access-storage';
|
|
10
|
+
|
|
11
|
+
import { ServiceContext } from '../service-context';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Create test builder.
|
|
14
|
+
export const createServiceContext = async ({
|
|
15
|
+
signalContext = new MemorySignalManagerContext(),
|
|
16
|
+
storage = createStorage({ type: StorageType.RAM })
|
|
17
|
+
}: {
|
|
18
|
+
signalContext?: MemorySignalManagerContext;
|
|
19
|
+
storage?: Storage;
|
|
20
|
+
} = {}) => {
|
|
21
|
+
const networkManager = new NetworkManager({
|
|
22
|
+
signalManager: new MemorySignalManager(signalContext),
|
|
23
|
+
transportFactory: MemoryTransportFactory
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const modelFactory = new ModelFactory().registerModel(ObjectModel);
|
|
27
|
+
return new ServiceContext(storage, networkManager, modelFactory);
|
|
28
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2021 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import jsondown from 'jsondown';
|
|
6
|
+
import leveljs from 'level-js';
|
|
7
|
+
import memdown from 'memdown';
|
|
8
|
+
|
|
9
|
+
import { Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
10
|
+
import { createStorage, StorageType } from '@dxos/random-access-storage';
|
|
11
|
+
import { isNode } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
import StorageDriver = Runtime.Client.Storage.StorageDriver;
|
|
14
|
+
import { InvalidConfigurationError } from '../../errors';
|
|
15
|
+
|
|
16
|
+
export type KeyStorageType = 'ram' | 'leveljs' | 'jsondown';
|
|
17
|
+
|
|
18
|
+
// TODO(burdon): Factor out.
|
|
19
|
+
export const createStorageObjects = (config: Runtime.Client.Storage) => {
|
|
20
|
+
const {
|
|
21
|
+
path = 'dxos/storage', // TODO(burdon): Factor out const.
|
|
22
|
+
storageType,
|
|
23
|
+
keyStorage,
|
|
24
|
+
persistent = false
|
|
25
|
+
} = config ?? {};
|
|
26
|
+
|
|
27
|
+
if (persistent && storageType === StorageDriver.RAM) {
|
|
28
|
+
throw new InvalidConfigurationError('RAM storage cannot be used in persistent mode.');
|
|
29
|
+
}
|
|
30
|
+
if (!persistent && storageType !== undefined && storageType !== StorageDriver.RAM) {
|
|
31
|
+
throw new InvalidConfigurationError('Cannot use a persistent storage in not persistent mode.');
|
|
32
|
+
}
|
|
33
|
+
if (persistent && keyStorage === StorageDriver.RAM) {
|
|
34
|
+
throw new InvalidConfigurationError('RAM key storage cannot be used in persistent mode.');
|
|
35
|
+
}
|
|
36
|
+
if (!persistent && keyStorage !== StorageDriver.RAM && keyStorage !== undefined) {
|
|
37
|
+
throw new InvalidConfigurationError('Cannot use a persistent key storage in not persistent mode.');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
storage: createStorage({
|
|
42
|
+
type: persistent ? toStorageType(storageType) : StorageType.RAM,
|
|
43
|
+
root: `${path}/`
|
|
44
|
+
}),
|
|
45
|
+
keyStorage: createKeyStorage(`${path}/keystore`, persistent ? toKeyStorageType(keyStorage) : 'ram')
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// TODO(burdon): Factor out.
|
|
50
|
+
const createKeyStorage = (path: string, type?: KeyStorageType) => {
|
|
51
|
+
const defaultedType = type ?? (isNode() ? 'jsondown' : 'leveljs');
|
|
52
|
+
|
|
53
|
+
switch (defaultedType) {
|
|
54
|
+
case 'leveljs':
|
|
55
|
+
return leveljs(path);
|
|
56
|
+
case 'jsondown':
|
|
57
|
+
return jsondown(path);
|
|
58
|
+
case 'ram':
|
|
59
|
+
return memdown();
|
|
60
|
+
default:
|
|
61
|
+
throw new InvalidConfigurationError(`Invalid key storage type: ${defaultedType}`);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const toStorageType = (type: StorageDriver | undefined): StorageType | undefined => {
|
|
66
|
+
switch (type) {
|
|
67
|
+
case undefined:
|
|
68
|
+
return undefined;
|
|
69
|
+
case StorageDriver.RAM:
|
|
70
|
+
return StorageType.RAM;
|
|
71
|
+
case StorageDriver.CHROME:
|
|
72
|
+
return StorageType.CHROME;
|
|
73
|
+
case StorageDriver.FIREFOX:
|
|
74
|
+
return StorageType.FIREFOX;
|
|
75
|
+
case StorageDriver.IDB:
|
|
76
|
+
return StorageType.IDB;
|
|
77
|
+
case StorageDriver.NODE:
|
|
78
|
+
return StorageType.NODE;
|
|
79
|
+
default:
|
|
80
|
+
throw new Error(`Invalid storage type: ${StorageDriver[type]}`);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const toKeyStorageType = (type: StorageDriver | undefined): KeyStorageType | undefined => {
|
|
85
|
+
switch (type) {
|
|
86
|
+
case undefined:
|
|
87
|
+
return undefined;
|
|
88
|
+
case StorageDriver.RAM:
|
|
89
|
+
return 'ram';
|
|
90
|
+
case StorageDriver.LEVELJS:
|
|
91
|
+
return 'leveljs';
|
|
92
|
+
case StorageDriver.JSONDOWN:
|
|
93
|
+
return 'jsondown';
|
|
94
|
+
default:
|
|
95
|
+
throw new Error(`Invalid key storage type: ${StorageDriver[type]}`);
|
|
96
|
+
}
|
|
97
|
+
};
|