@indra.ai/deva 1.1.68 → 1.1.70
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 +4 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -952,7 +952,7 @@ class Deva {
|
|
|
952
952
|
packet.q.meta.hash = this.hash(packet.q, 'sha256');
|
|
953
953
|
|
|
954
954
|
this.action(_action);
|
|
955
|
-
this.talk('devacore:question', packet); // global question event make sure to copy data.
|
|
955
|
+
this.talk('devacore:question', this.copy(packet)); // global question event make sure to copy data.
|
|
956
956
|
|
|
957
957
|
if (isAsk) { // isAsk check if the question isAsk and talk
|
|
958
958
|
this.state('ask');
|
|
@@ -1031,9 +1031,9 @@ class Deva {
|
|
|
1031
1031
|
|
|
1032
1032
|
|
|
1033
1033
|
this.action('answer_talk');
|
|
1034
|
-
this.talk('devacore:answer', packet); // talk the answer with a copy of the data
|
|
1034
|
+
this.talk('devacore:answer', this.copy(packet)); // talk the answer with a copy of the data
|
|
1035
1035
|
|
|
1036
|
-
return resolve(packet); // resolve the packet to the caller.
|
|
1036
|
+
return resolve(this.copy(packet)); // resolve the packet to the caller.
|
|
1037
1037
|
}).catch(err => { // catch any errors in the method
|
|
1038
1038
|
this.action('error');
|
|
1039
1039
|
return this.error(err, packet, reject); // return this.error with err, packet, reject
|
|
@@ -1426,7 +1426,6 @@ class Deva {
|
|
|
1426
1426
|
created: Date.now(),
|
|
1427
1427
|
};
|
|
1428
1428
|
_data.hash = this.hash(_data, 'sha256');
|
|
1429
|
-
console.log('fature --------');
|
|
1430
1429
|
this.talk('devacore:feature', _data);
|
|
1431
1430
|
} catch (e) {
|
|
1432
1431
|
return this.error(e);
|
|
@@ -1968,7 +1967,7 @@ class Deva {
|
|
|
1968
1967
|
data,
|
|
1969
1968
|
created: Date.now(),
|
|
1970
1969
|
}
|
|
1971
|
-
this.talk('devacore:error', _data);
|
|
1970
|
+
this.talk('devacore:error', this.copy(_data));
|
|
1972
1971
|
|
|
1973
1972
|
const hasOnError = this.onError && typeof this.onError === 'function' ? true : false;
|
|
1974
1973
|
if (hasOnError) return this.onError(err, data, reject);
|