@indra.ai/deva 1.1.107 → 1.1.108
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/config.json +0 -1
- package/index.js +3 -4
- package/package.json +1 -1
package/config.json
CHANGED
package/index.js
CHANGED
|
@@ -1013,7 +1013,7 @@ class Deva {
|
|
|
1013
1013
|
data.hash = this.hash(data);
|
|
1014
1014
|
this.action(data.value)
|
|
1015
1015
|
const hasOnDone = this.onDone && typeof this.onDone === 'function' ? true : false;
|
|
1016
|
-
return hasOnDone ? this.onDone(data) :
|
|
1016
|
+
return hasOnDone ? this.onDone(data) : Promise.resolve(data);
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
/**************
|
|
@@ -1029,7 +1029,6 @@ class Deva {
|
|
|
1029
1029
|
***************/
|
|
1030
1030
|
finish(packet, resolve) {
|
|
1031
1031
|
if (!this._active) return Promise.resolve(this._messages.states.offline);
|
|
1032
|
-
this.state('finish');
|
|
1033
1032
|
this.action('finish');
|
|
1034
1033
|
const hasOnFinish = this.onFinish && typeof this.onFinish === 'function' ? true : false;
|
|
1035
1034
|
if (hasOnFinish) return this.onFinish(packet, resolve);
|
|
@@ -1548,7 +1547,7 @@ class Deva {
|
|
|
1548
1547
|
delete this.devas[key];
|
|
1549
1548
|
this.talk(config.events.unload, key);
|
|
1550
1549
|
});
|
|
1551
|
-
return
|
|
1550
|
+
return resolve(this._messages.states.unload);
|
|
1552
1551
|
} catch (e) {
|
|
1553
1552
|
return this.error(e, this.devas[key], reject)
|
|
1554
1553
|
}
|
|
@@ -1862,7 +1861,7 @@ class Deva {
|
|
|
1862
1861
|
if (params[1]) helpFile = `${params[0]}_${params[1]}`;
|
|
1863
1862
|
helpFile = path.join(help_dir, 'help', `${helpFile}.feecting`);
|
|
1864
1863
|
try {
|
|
1865
|
-
return
|
|
1864
|
+
return resolve(fs.readFileSync(helpFile, 'utf8'));
|
|
1866
1865
|
} catch (e) {
|
|
1867
1866
|
this.action('help');
|
|
1868
1867
|
this.zone('help');
|