@indra.ai/deva 1.1.0 → 1.1.1
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 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -605,7 +605,8 @@ class Deva {
|
|
|
605
605
|
exit() {
|
|
606
606
|
if (!this.active) return Promise.resolve(this.messages.offline);
|
|
607
607
|
this.state('exit');
|
|
608
|
-
|
|
608
|
+
this.active = false;
|
|
609
|
+
return this.onExit && typeof this.onExit === 'function' ? this.onExit() : Promise.resolve(this._state)
|
|
609
610
|
}
|
|
610
611
|
|
|
611
612
|
/**************
|
|
@@ -622,7 +623,7 @@ class Deva {
|
|
|
622
623
|
if (!this.active) return Promise.resolve(this.messages.offline);
|
|
623
624
|
this.state('done');
|
|
624
625
|
msg = msg ? msg : this._state;
|
|
625
|
-
return this.onDone && typeof this.onDone === 'function' ? this.onDone() : Promise.resolve(
|
|
626
|
+
return this.onDone && typeof this.onDone === 'function' ? this.onDone() : Promise.resolve(this._state)
|
|
626
627
|
}
|
|
627
628
|
|
|
628
629
|
/**************
|