@indra.ai/deva 1.1.8 → 1.1.10

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.
@@ -39,6 +39,9 @@ const HelloWorld = new Deva({
39
39
  listeners: {
40
40
  '101:state'(st) {
41
41
  console.log(`current state: ${st}`);
42
+ },
43
+ 'log'(packet) {
44
+ console.log('logger', packet);
42
45
  }
43
46
  },
44
47
  deva: {},
package/index.js CHANGED
@@ -17,6 +17,8 @@ class Deva {
17
17
  enter: 'ENTER',
18
18
  exit: 'EXIT',
19
19
  done: 'DONE',
20
+ loading: 'LOADING DEVAS',
21
+ unloading: 'UNLOADING DEVAS',
20
22
  wait: 'WAITING',
21
23
  data: 'DATA',
22
24
  ask: 'ASK',
@@ -59,6 +61,7 @@ class Deva {
59
61
  this.bind = ["listeners", "methods", "func", "lib", "security", "agent", "client"];
60
62
  this.messages = {
61
63
  offline: 'AGENT OFFLINE',
64
+ loading: 'DEVAS LOADING',
62
65
  loaded: 'DEVAS LOADED',
63
66
  stopped: 'DEVAS STOPPED',
64
67
  notext: 'NO TEXT',
@@ -679,12 +682,15 @@ class Deva {
679
682
  Start Devas will initialize the Deva agents inside this curent Deva.
680
683
  ***************/
681
684
  startDevas() {
685
+ this.state('loading');
682
686
  return new Promise((resolve, reject) => {
687
+ this.prompt
683
688
  const devas = [];
684
689
  for (let x in this.devas) {
685
690
  devas.push(this.devas[x].init());
686
691
  }
687
692
  Promise.all(devas).then(() => {
693
+ this.state('done');
688
694
  return resolve(this.messages.loaded);
689
695
  }).catch(reject);
690
696
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {