@indra.ai/deva 1.5.12 → 1.5.13

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 +5 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -716,7 +716,7 @@ class Deva {
716
716
  this._active = Date.now();
717
717
  const agent = this.agent();
718
718
 
719
- const _data = {
719
+ const data = {
720
720
  id: this.lib.uid(),
721
721
  key: 'init',
722
722
  value: agent.key,
@@ -725,7 +725,7 @@ class Deva {
725
725
  text: this._messages.init,
726
726
  created: Date.now(),
727
727
  }
728
- _data.hash = this.lib.hash(_data);
728
+ data.hash = this.lib.hash(data);
729
729
  return new Promise((resolve, reject) => {
730
730
  this.events.setMaxListeners(this.maxListeners);
731
731
  this._assignInherit().then(() => {
@@ -762,8 +762,10 @@ class Deva {
762
762
  return this.Done(resolve, reject);
763
763
  }).then(() => {
764
764
  const hasOnInit = this.onInit && typeof this.onInit === 'function';
765
- return hasOnInit ? this.onInit(_data, resolve) : this.start(_data, resolve);
765
+ this.state('return', `init:${data.id}`);
766
+ return hasOnInit ? this.onInit(data, resolve) : this.start(data, resolve);
766
767
  }).catch(err => {
768
+ this.state('catch', `init:${data.id}`);
767
769
  return this.error(err, client, reject);
768
770
  });
769
771
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.5.12",
3
+ "version": "1.5.13",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "copyright": "(c)2025 Quinn Michaels; All rights reserved.",