@indra.ai/deva 1.1.113 → 1.1.115

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.
Files changed (2) hide show
  1. package/index.js +2 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -213,7 +213,7 @@ class Deva {
213
213
  for (const x in client.features) {
214
214
  const methods = client.features[x].methods || false;
215
215
  if (methods) for (const y in methods) {
216
- const isMethod = typeof methods[x] === 'function' && !this.methods[y];
216
+ const isMethod = typeof methods[y] === 'function' && !this.methods[y];
217
217
  if (isMethod) this.methods[y] = methods[y].bind(this);
218
218
  }
219
219
  }
@@ -302,7 +302,6 @@ class Deva {
302
302
  this.action('Services')
303
303
  const {id, features, profile} = _cl; // set the local consts from client copy
304
304
  const {services} = features; // set services from features const
305
- console.log('SETTING UP GLOBA SERVICE FUNCTIONS', services);
306
305
  this._services = { // set this_services with data
307
306
  id: this.uid(true), // uuid of the services feature
308
307
  client_id: id, // client id for reference
@@ -311,13 +310,6 @@ class Deva {
311
310
  global: services.global, // the global policies for client
312
311
  personal: services.devas[this._agent.key], // Client personal features and rules.
313
312
  };
314
-
315
- // setup any global methods from the services feature
316
- for (const x in this._services.global) {
317
- const isFunc = typeof this._services.global[x] === 'function' ? true :false;
318
- if (isFunc) this.methods[x] = this._services.global[x].bind(this);
319
- }
320
-
321
313
  delete this._client.features.services // delete the services key for isolation
322
314
  return this.Systems() // go to Systems when done
323
315
  }
@@ -891,6 +883,7 @@ class Deva {
891
883
  init(client) {
892
884
  // set client
893
885
  this._active = Date.now();
886
+ this._agent.dir = __dirname;
894
887
  const agent = this.agent();
895
888
  const _data = {
896
889
  id: this.uid(true),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.113",
3
+ "version": "1.1.115",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {