@indra.ai/deva 1.6.30 → 1.6.32

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/index.js CHANGED
@@ -581,8 +581,6 @@ class Deva {
581
581
  Done(resolve, reject) {
582
582
  try {
583
583
  delete this._client.features; // delete the features key when done.
584
- const client = this.client();
585
- this.lib.setClient(client, 'sha256');
586
584
  this.state('Done', 'Done');
587
585
  return resolve(client); // resolve an empty pr
588
586
  } catch (e) {
@@ -913,7 +911,6 @@ class Deva {
913
911
  init(client) {
914
912
  // set client
915
913
  this._active = Date.now();
916
- this.lib.setClient(this.lib.hash(client, 'sha256'));
917
914
 
918
915
  const agent = this.agent();
919
916
 
@@ -1127,6 +1124,8 @@ class Deva {
1127
1124
  data.md5 = this.lib.hash(data);
1128
1125
  data.sha256 = this.lib.hash(data, 'sha256');
1129
1126
  data.sha512 = this.lib.hash(data, 'sha512');
1127
+
1128
+ this.lib.setClient(data.sha256); // set the client for the library when everything is ready.
1130
1129
 
1131
1130
  this.state('ready', data.id.uid);
1132
1131
  this.talk(config.events.ready, data);
package/lib/index.js CHANGED
@@ -119,7 +119,7 @@ class LIB {
119
119
 
120
120
  const {meta, agent, client, text} = q;
121
121
  const agent_hash = this.hash(agent, 'sha256');
122
- const client_hash = this.hash(client, 'sha256');
122
+ const client_hash = client.sha256;
123
123
 
124
124
  const {key, method, params} = meta;
125
125
  const opts = this.copy(params); // copy the params and set as opts.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 45958588982385560000,
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.6.30",
4
+ "version": "1.6.32",
5
5
  "description": "The Deva Core",
6
6
  "main": "index.js",
7
7
  "license": "VLA:45958588982385558603 LICENSE.md",