@indra.ai/deva 1.6.31 → 1.6.33
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 +3 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -581,10 +581,8 @@ 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
|
-
return resolve(
|
|
585
|
+
return resolve(this._client); // resolve an empty pr
|
|
588
586
|
} catch (e) {
|
|
589
587
|
this.state('catch', 'Done');
|
|
590
588
|
return this.err(e, false, reject);
|
|
@@ -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);
|