Browse Source

use cobox-replicator package

Kieran Gibb 2 years ago
parent
commit
d5e6a75712
No known key found for this signature in database
2 changed files with 4 additions and 5 deletions
  1. 2
    3
      index.js
  2. 2
    2
      package.json

+ 2
- 3
index.js View File

@@ -2,7 +2,7 @@ const crypto = require('cobox-crypto')
2 2
 const Config = require('cobox-config')
3 3
 const constants = require('cobox-constants')
4 4
 const Store = require('cobox-group-store')
5
-const Replicator = require('cobox-group-base')
5
+const Replicator = require('cobox-replicator')
6 6
 const AdminGroup = require('cobox-admin-group')
7 7
 const mkdirp = require('mkdirp')
8 8
 const fs = require('fs')
@@ -17,10 +17,9 @@ class Application extends EventEmitter {
17 17
     super()
18 18
 
19 19
     this._id = crypto.randomBytes(2).toString('hex')
20
-    this.swarm = hyperswarm()
21 20
     this.config = config || Config(constants.storage)
22 21
     this.storage = path.join(config.root, 'admin')
23
-    this.store = Store(path.join(config.root, 'replicators'), Replicator, { config, swarm: this.hyperswarm })
22
+    this.store = Store(path.join(config.root, 'replicators'), Replicator, { config })
24 23
     this.store.seed(config.replicators.list())
25 24
 
26 25
     this.keys = loadKeys(this.storage)

+ 2
- 2
package.json View File

@@ -1,7 +1,7 @@
1 1
 {
2 2
   "name": "cobox-hub",
3 3
   "version": "0.0.1",
4
-  "description": "command hub for blind replicator device",
4
+  "description": "a command hub for replicator device",
5 5
   "main": "index.js",
6 6
   "author": "magma collective",
7 7
   "license": "AGPL-3.0-only",
@@ -18,7 +18,7 @@
18 18
     "cobox-constants": "^1.0.1",
19 19
     "cobox-crypto": "^1.2.0",
20 20
     "cobox-group-store": "^2.0.0",
21
-    "cobox-group-base": "^1.0.0",
21
+    "cobox-replicator": "^1.0.0",
22 22
     "debug": "^4.1.1",
23 23
     "kappa-core": "^6.0.0",
24 24
     "kappa-view-query": "^2.0.9",