godprotocol 1.2.21 → 1.2.22

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 (2) hide show
  1. package/Objects/Oracle.js +13 -12
  2. package/package.json +1 -1
package/Objects/Oracle.js CHANGED
@@ -205,25 +205,26 @@ class Oracle extends Handlers {
205
205
  let conf_repos = conf ? this.repo_object(conf.repositories, account) : [];
206
206
  let reps = await this.merge_repos(
207
207
  conf_repos,
208
- await this.filter_repos(path)
208
+ await this.filter_repos(`.oracle/${path}`)
209
209
  );
210
+ conf = {
211
+ ...conf,
212
+ content,
213
+ repositories: reps.map((r) => r.repo._id || r.repo.get_id()),
214
+ };
210
215
 
211
- await this.set_to_repos(
212
- `.oracle/${path}`,
213
- JSON.stringify({
214
- ...conf,
215
- content,
216
- repositories: reps.map((r) => r.repo._id || r.repo.get_id()),
217
- }),
218
- { repos: reps }
219
- );
216
+ this.configs[sli] = conf;
217
+
218
+ await this.set_to_repos(`.oracle/${path}`, JSON.stringify(conf), {
219
+ repos: reps,
220
+ });
220
221
  } else {
221
222
  conf = await this.get_config(address, true);
222
223
 
223
224
  let conf_repos = conf ? this.repo_object(conf.repositories, account) : [];
224
225
  let reps = await this.merge_repos(
225
226
  conf_repos,
226
- await this.filter_repos(path)
227
+ await this.filter_repos(`.storage/${path}`)
227
228
  );
228
229
  await this.set_to_repos(`.storage/${path}`, content, { repos: reps });
229
230
  }
@@ -243,7 +244,7 @@ class Oracle extends Handlers {
243
244
  let conf_repos = conf ? this.repo_object(conf.repositories, account) : [];
244
245
  let reps = await this.merge_repos(
245
246
  conf_repos,
246
- await this.filter_repos(path)
247
+ await this.filter_repos(`.storage/${path}`)
247
248
  );
248
249
 
249
250
  content = await this.get_from_repos(`.storage/${path}`, { repos: reps });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godprotocol",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "A distributed computing environment",
5
5
  "main": "Index.js",
6
6
  "scripts": {