@indra.ai/deva 1.29.8 → 1.29.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.
- package/index.js +12 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1392,7 +1392,7 @@ class Deva {
|
|
|
1392
1392
|
describe: This function is use to relay the to the ready state.
|
|
1393
1393
|
usage: this.ready(data, resolve)
|
|
1394
1394
|
***************/
|
|
1395
|
-
ready(data, resolve) {
|
|
1395
|
+
async ready(data, resolve) {
|
|
1396
1396
|
if (!this._active) return resolve(this._messages.offline);
|
|
1397
1397
|
const key = 'ready';
|
|
1398
1398
|
|
|
@@ -1413,7 +1413,7 @@ class Deva {
|
|
|
1413
1413
|
|
|
1414
1414
|
if (this.devas && Object.keys(this.devas).length) {
|
|
1415
1415
|
for (let deva in this.devas) {
|
|
1416
|
-
this.load(deva, data.client);
|
|
1416
|
+
await this.load(deva, data.client);
|
|
1417
1417
|
// after the deva loads talk the event to set asset directory.
|
|
1418
1418
|
const id = this.uid();
|
|
1419
1419
|
const {dir} = this.devas[deva].info();
|
|
@@ -1421,8 +1421,9 @@ class Deva {
|
|
|
1421
1421
|
this.talk(`deva:dir`, {id, key,dir});
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1424
|
+
return setImmediate(() => {
|
|
1425
|
+
return this._invoke({key,data,resolve});
|
|
1426
|
+
});
|
|
1426
1427
|
}
|
|
1427
1428
|
|
|
1428
1429
|
/**************
|
|
@@ -2155,7 +2156,13 @@ class Deva {
|
|
|
2155
2156
|
this.action('load', key);
|
|
2156
2157
|
this.state('load', key);
|
|
2157
2158
|
this.intent('good', `load:${key}`);
|
|
2158
|
-
return
|
|
2159
|
+
return new Promise((resolve, reject) => {
|
|
2160
|
+
this.devas[key].init(client).then(deva => {
|
|
2161
|
+
return resolve(deva)
|
|
2162
|
+
}).catch(err => {
|
|
2163
|
+
return this.err(err, client, reject);
|
|
2164
|
+
})
|
|
2165
|
+
});
|
|
2159
2166
|
}
|
|
2160
2167
|
|
|
2161
2168
|
/**************
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "38159520729793885324",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.29.
|
|
4
|
+
"version": "1.29.10",
|
|
5
5
|
"description": "Deva Core a Vedic-inspired Event Based Context Aware Feature, Zone, Action, and State Machine integrated Artificial Intelligence Framework",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "VLA:38159520729793885324 LICENSE.md",
|