Browse Source

remove identities from config

Kieran Gibb 1 year ago
parent
commit
37940b41a3
No known key found for this signature in database
2 changed files with 1 additions and 20 deletions
  1. 0
    14
      example.yaml
  2. 1
    6
      index.js

+ 0
- 14
example.yaml View File

@@ -18,17 +18,3 @@ replicators:
18 18
   byName:
19 19
     replicator-a: *ref_1
20 20
     replicator-b: *ref_2
21
-
22
-identities:
23
-  byKey:
24
-    736a1f0369923a5f1c8710ca1713bedccd8d051c42fe28b0bb031640f5293e4c: &ref_3
25
-      name: Alice
26
-      publicKey: 736a1f0369923a5f1c8710ca1713bedccd8d051c42fe28b0bb031640f5293e4c
27
-      secretKey: 7790efea443b9ebee384939bbd3f43d2841212790a0180342aca16a63f199431
28
-    ed49273be24fac7fce884a2908708e15abfb84b608b0084808968b4c75870218: &ref_4
29
-      name: bob
30
-      publicKey: ed49273be24fac7fce884a2908708e15abfb84b608b0084808968b4c75870218
31
-      secretKey: 54ddf6b77f306749737e8115efd31ffd1e4636d1336888cdfaf9dc2f91d45c7d
32
-  byName:
33
-    Alice: *ref_3
34
-    bob: *ref_4

+ 1
- 6
index.js View File

@@ -19,8 +19,7 @@ const MapHandler = require('./lib/map-handler')
19 19
 const defaultConfig = (options = {}) => ({
20 20
   options,
21 21
   groups: { byKey: {}, byName: {} },
22
-  replicators: { byKey: {}, byName: {} },
23
-  identities: { byKey: {}, byName: {} }
22
+  replicators: { byKey: {}, byName: {} }
24 23
 })
25 24
 
26 25
 // filename-safe date (probably there is a better way to do this)
@@ -40,7 +39,6 @@ class CoBoxConfig {
40 39
       fs.writeFileSync(this.storage, yaml.safeDump(defaultConfig(), { sortKeys: true }))
41 40
       this._groups = config.groups
42 41
       this._replicators = config.replicators
43
-      this._identities = config.identities
44 42
       this._options = config.options
45 43
     } else {
46 44
       this.load()
@@ -59,7 +57,6 @@ class CoBoxConfig {
59 57
     this.log = this.logger('cobox-config')
60 58
     this.groups = KeyHandler(this._groups)
61 59
     this.replicators = KeyHandler(this._replicators)
62
-    this.identities = KeyHandler(this._identities)
63 60
     this.options = MapHandler(this._options)
64 61
   }
65 62
 
@@ -68,7 +65,6 @@ class CoBoxConfig {
68 65
       var config = defaultConfig()
69 66
       config.groups = this._groups
70 67
       config.replicators = this._replicators
71
-      config.identities = this._identities
72 68
       config.options = this._options
73 69
 
74 70
       fs.writeFileSync(this.storage, yaml.safeDump(config, { sortKeys: true }))
@@ -83,7 +79,6 @@ class CoBoxConfig {
83 79
     try {
84 80
       const config = yaml.safeLoad(fs.readFileSync(this.storage, 'utf8'))
85 81
       this._groups = config.groups
86
-      this._identities = config.identities
87 82
       this._replicators = config.replicators
88 83
       this._options = config.options
89 84
       return true