@indra.ai/deva 1.1.32 → 1.1.34
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 +10 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -125,7 +125,6 @@ class Deva {
|
|
|
125
125
|
const ap = this._agent.profile;
|
|
126
126
|
const akey = this._agent.key;
|
|
127
127
|
|
|
128
|
-
console.log('AP NAME', ap);
|
|
129
128
|
const _states = {
|
|
130
129
|
uid: `${security.label}:UID ${cp.name} made a #uid with ${ap.name}`,
|
|
131
130
|
hash: `${security.label}:HASH ${cp.name} made a #hash with ${ap.name}`,
|
|
@@ -1429,6 +1428,10 @@ class Deva {
|
|
|
1429
1428
|
this.state('deva_load');
|
|
1430
1429
|
this.devas[key].init(client).then(loaded => {
|
|
1431
1430
|
this.state('deva_loaded');
|
|
1431
|
+
this.talk(`deva:load`, {
|
|
1432
|
+
key,
|
|
1433
|
+
created: Date.now(),
|
|
1434
|
+
});
|
|
1432
1435
|
return resolve();
|
|
1433
1436
|
}).catch(err => {
|
|
1434
1437
|
return this.error(err, deva, reject);
|
|
@@ -1443,10 +1446,14 @@ class Deva {
|
|
|
1443
1446
|
- deva: The deva key to unload
|
|
1444
1447
|
describe: Unload a currently loaded Deva.
|
|
1445
1448
|
***************/
|
|
1446
|
-
unload(
|
|
1449
|
+
unload(key) {
|
|
1447
1450
|
this.state('deva_unload');
|
|
1448
|
-
delete this.devas[
|
|
1451
|
+
delete this.devas[key];
|
|
1449
1452
|
this.state('deva_unloaded');
|
|
1453
|
+
this.talk(`deva:unload`, {
|
|
1454
|
+
key,
|
|
1455
|
+
created: Date.now(),
|
|
1456
|
+
});
|
|
1450
1457
|
return Promise.resolve(`unload:${deva} `);
|
|
1451
1458
|
}
|
|
1452
1459
|
|