@indra.ai/deva 1.64.44 → 1.64.45
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 +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -58,6 +58,7 @@ class Deva {
|
|
|
58
58
|
|
|
59
59
|
this._inherit = config.inherit; // set inherit from config data.
|
|
60
60
|
this._bind = config.bind; // set the bind from the config data.
|
|
61
|
+
this._binding = new Map(); // set the binding map
|
|
61
62
|
|
|
62
63
|
this._uid = config.uid; // set the uid options
|
|
63
64
|
|
|
@@ -146,6 +147,7 @@ class Deva {
|
|
|
146
147
|
this._bind.forEach(bind => { // loop over the bind items func, method, listener...
|
|
147
148
|
if (this[bind]) for (let x in this[bind]) { // if the root has a bind func, method, listener
|
|
148
149
|
if (typeof this[bind][x] === 'function') { // check to make sure object is a fucntion
|
|
150
|
+
if (!this._binding.has(bind)) this._binding.set(bind, {});
|
|
149
151
|
this[bind][x] = this[bind][x].bind(this); // bind the item from the bind object
|
|
150
152
|
}
|
|
151
153
|
}
|
|
@@ -1216,9 +1218,9 @@ class Deva {
|
|
|
1216
1218
|
this.state('loop', `${key}:config:ready:hash:${data.id.uid}`);
|
|
1217
1219
|
for (let item of this._config.ready_hash) {
|
|
1218
1220
|
if (this[item]) {
|
|
1219
|
-
const this_item = this[item];
|
|
1220
1221
|
this.action('hash', `${agent.key}:config:${item}:${data.id.uid}`);
|
|
1221
1222
|
// manually build hash for the config hash object for each agent key.
|
|
1223
|
+
const this_item = this._binding.get(item) || this[item];
|
|
1222
1224
|
this.config.hash[agent.key][item] = this.hash(this_item, 'sha256');
|
|
1223
1225
|
}
|
|
1224
1226
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "31711622713594414221",
|
|
3
3
|
"name": "@indra.ai/deva",
|
|
4
|
-
"version": "1.64.
|
|
4
|
+
"version": "1.64.45",
|
|
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:31711622713594414221 LICENSE.md",
|