@indra.ai/deva 1.6.43 → 1.6.44

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 CHANGED
@@ -1126,8 +1126,8 @@ class Deva {
1126
1126
  data.sha256 = this.lib.hash(data, 'sha256');
1127
1127
  data.sha512 = this.lib.hash(data, 'sha512');
1128
1128
 
1129
- const client = this.client();
1130
- this.lib.setClient(client.sha256);
1129
+ this.lib.setClient(this.client());
1130
+ this.lib.setAgent(this.agent());
1131
1131
 
1132
1132
  this.state('ready', data.id.uid);
1133
1133
  this.talk(config.events.ready, data);
package/lib/index.js CHANGED
@@ -18,7 +18,7 @@ class Node {
18
18
  class LIB {
19
19
  constructor(opts) {
20
20
  this.pkg = opts.pkg || {};
21
- this.agent = opts.agent || false;
21
+ this.agent = false;
22
22
  this.client = false;
23
23
  this.lang = opts.lang || 'en';
24
24
  this.locale = opts.locale || 'US';
@@ -33,15 +33,11 @@ class LIB {
33
33
  setClient(client) {
34
34
  if (this.client) return;
35
35
  this.client = client;
36
- this.hashAgent();
37
36
  }
38
37
 
39
- hashAgent(client) {
40
- const {md5} = this.agent;
41
- if (md5) return;
42
- this.agent.md5 = this.hash(this.agent, 'md5');
43
- this.agent.sha256 = this.hash(this.agent, 'sha256');
44
- this.agent.sha512 = this.hash(this.agent, 'sha512');
38
+ setAgent(agent) {
39
+ if (this.agent) return;
40
+ this.agent = agent;
45
41
  }
46
42
 
47
43
  help(msg, help_dir) {
@@ -92,12 +88,13 @@ class LIB {
92
88
  const machine_hash = this.hash(machine, 'sha256');
93
89
  const pkg_hash = this.hash(this.pkg, 'sha256');
94
90
 
91
+ console.log('uid client', this.client);
95
92
 
96
93
  const data = {
97
94
  uid: false,
98
95
  time,
99
96
  date,
100
- client: this.client,
97
+ client: this.client.sha256,
101
98
  agent: this.agent.sha256,
102
99
  pkg: pkg_hash,
103
100
  machine: machine_hash,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 45958588982385560000,
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.6.43",
4
+ "version": "1.6.44",
5
5
  "description": "The Deva Core",
6
6
  "main": "index.js",
7
7
  "license": "VLA:45958588982385558603 LICENSE.md",