From 1838d093bc46f1b317d1311328e556d237f791d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?haz=C3=A641?= Date: Wed, 6 Nov 2019 21:25:02 +0100 Subject: [PATCH 1/3] Expose modules in OrbitDB object so we can grab them from OrbitDB without reimporting them. Related to https://github.com/orbitdb/orbit-db/issues/715 --- src/OrbitDB.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OrbitDB.js b/src/OrbitDB.js index 6648cf8..bc3fdab 100644 --- a/src/OrbitDB.js +++ b/src/OrbitDB.js @@ -56,6 +56,13 @@ class OrbitDB { // testing with orbit-db-access-controller AccessControllers = options.AccessControllers || AccessControllers } + + static get Pubsub () { return Pubsub; } + static get Cache () { return Cache; } + static get Keystore () { return Keystore; } + static get Identities () { return Identities; } + static get AccessControllers () { return AccessControllers; } + static get Storage () { return Storage; } get cache () { return this.caches[this.directory].cache } From ff4adf40176c98a014fe9be4e956264d57865fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?haz=C3=A641?= Date: Wed, 6 Nov 2019 22:30:38 +0100 Subject: [PATCH 2/3] More exposes --- src/OrbitDB.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/OrbitDB.js b/src/OrbitDB.js index bc3fdab..fbb0f8d 100644 --- a/src/OrbitDB.js +++ b/src/OrbitDB.js @@ -56,13 +56,20 @@ class OrbitDB { // testing with orbit-db-access-controller AccessControllers = options.AccessControllers || AccessControllers } - - static get Pubsub () { return Pubsub; } - static get Cache () { return Cache; } - static get Keystore () { return Keystore; } - static get Identities () { return Identities; } - static get AccessControllers () { return AccessControllers; } - static get Storage () { return Storage; } + + static get Pubsub () { return Pubsub } + static get Cache () { return Cache } + static get Keystore () { return Keystore } + static get Identities () { return Identities } + static get AccessControllers () { return AccessControllers } + static get Storage () { return Storage } + static get OrbitDBAddress () { return OrbitDBAddress } + + static get EventStore () { return EventStore } + static get FeedStore () { return FeedStore } + static get KeyValueStore () { return KeyValueStore } + static get CounterStore () { return CounterStore; } + static get DocumentStore () { return DocumentStore; } get cache () { return this.caches[this.directory].cache } From 839855fbe353de0195cdcf03870df0c62ca4be04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?haz=C3=A641?= Date: Wed, 6 Nov 2019 22:31:54 +0100 Subject: [PATCH 3/3] Normalize ; --- src/OrbitDB.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OrbitDB.js b/src/OrbitDB.js index fbb0f8d..3b0559e 100644 --- a/src/OrbitDB.js +++ b/src/OrbitDB.js @@ -68,8 +68,8 @@ class OrbitDB { static get EventStore () { return EventStore } static get FeedStore () { return FeedStore } static get KeyValueStore () { return KeyValueStore } - static get CounterStore () { return CounterStore; } - static get DocumentStore () { return DocumentStore; } + static get CounterStore () { return CounterStore } + static get DocumentStore () { return DocumentStore } get cache () { return this.caches[this.directory].cache }