@indra.ai/deva 1.1.8 → 1.1.9
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/examples/hello-world.js +3 -0
- package/index.js +6 -0
- package/package.json +1 -1
package/examples/hello-world.js
CHANGED
package/index.js
CHANGED
|
@@ -17,6 +17,8 @@ class Deva {
|
|
|
17
17
|
enter: 'ENTER',
|
|
18
18
|
exit: 'EXIT',
|
|
19
19
|
done: 'DONE',
|
|
20
|
+
load: 'LOAD DEVAS',
|
|
21
|
+
unload: 'UNLOAD 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
|
});
|