@indra.ai/deva 1.4.15 → 1.4.17
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 +7 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -551,11 +551,11 @@ class Deva {
|
|
|
551
551
|
***************/
|
|
552
552
|
answer(packet, resolve, reject) {
|
|
553
553
|
if (!this._active) return Promise.resolve(this._messages.offline);
|
|
554
|
-
this.zone('answer', method);
|
|
555
554
|
const agent = this.agent();
|
|
556
555
|
const client = this.client();
|
|
557
556
|
// check if method exists and is of type function
|
|
558
557
|
const {method,params} = packet.q.meta;
|
|
558
|
+
this.zone('answer', method);
|
|
559
559
|
const isMethod = this.methods[method] && typeof this.methods[method] == 'function';
|
|
560
560
|
if (!isMethod) return resolve(this._methodNotFound(packet)); // resolve method not found if check if check fails
|
|
561
561
|
|
|
@@ -1454,9 +1454,12 @@ class Deva {
|
|
|
1454
1454
|
***************/
|
|
1455
1455
|
help(msg, help_dir) {
|
|
1456
1456
|
return new Promise((resolve, reject) => {
|
|
1457
|
-
this.zone('help');
|
|
1458
|
-
|
|
1459
1457
|
if (!this._active) return resolve(this._messages.offline);
|
|
1458
|
+
this.zone('help');
|
|
1459
|
+
this.feature('help');
|
|
1460
|
+
this.action('help');
|
|
1461
|
+
this.state('help');
|
|
1462
|
+
this.context('help');
|
|
1460
1463
|
|
|
1461
1464
|
const params = msg.split(' ');
|
|
1462
1465
|
let helpFile = 'main';
|
|
@@ -1467,7 +1470,7 @@ class Deva {
|
|
|
1467
1470
|
this.state('resolve', 'help');
|
|
1468
1471
|
return resolve(this.lib.fs.readFileSync(helpFile, 'utf8'));
|
|
1469
1472
|
} catch (e) {
|
|
1470
|
-
this.state('reject', '
|
|
1473
|
+
this.state('reject', 'help');
|
|
1471
1474
|
return reject(e)
|
|
1472
1475
|
}
|
|
1473
1476
|
});
|