@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.
Files changed (2) hide show
  1. package/index.js +3 -2
  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
- return this.onExit && typeof this.onExit === 'function' ? this.onExit() : this.done(this.state)
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({msg,agent:this.agent})
626
+ return this.onDone && typeof this.onDone === 'function' ? this.onDone() : Promise.resolve(this._state)
626
627
  }
627
628
 
628
629
  /**************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {