@indra.ai/deva 1.6.48 → 1.6.50
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 +4 -2
- package/lib/index.js +5 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import lib from './lib/index.js';
|
|
|
9
9
|
import pkg from './package.json' with {type:'json'};
|
|
10
10
|
|
|
11
11
|
const {name,version,repository,author,bugs,homepage,license,config,VLA} = pkg;
|
|
12
|
-
|
|
13
12
|
class Deva {
|
|
14
13
|
constructor(opts) {
|
|
15
14
|
opts = opts || {}; // set opts to provided opts or an empty object.
|
|
@@ -43,7 +42,10 @@ class Deva {
|
|
|
43
42
|
this._systems = false; // inherited Systems features.
|
|
44
43
|
this._networks = false; // inherited Systems features.
|
|
45
44
|
this.events = opts.events || new EventEmitter({}); // Event Bus
|
|
46
|
-
|
|
45
|
+
|
|
46
|
+
const _lib = new lib({pkg, agent:opts.agent});
|
|
47
|
+
this.lib = _lib; // used for loading library functions
|
|
48
|
+
|
|
47
49
|
this.utils = opts.utils || {}; // parse function
|
|
48
50
|
this.devas = opts.devas || {}; // Devas which are loaded
|
|
49
51
|
this.vars = opts.vars || {}; // Variables object
|
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 = false;
|
|
21
|
+
this.agent = opts.agent || false;
|
|
22
22
|
this.client = false;
|
|
23
23
|
this.lang = opts.lang || 'en';
|
|
24
24
|
this.locale = opts.locale || 'US';
|
|
@@ -35,8 +35,8 @@ class LIB {
|
|
|
35
35
|
this.client = client;
|
|
36
36
|
this.agent.md5 = this.hash(this.agent, 'md5');
|
|
37
37
|
this.agent.sha256 = this.hash(this.agent, 'sha256');
|
|
38
|
-
this.agent.
|
|
39
|
-
console.log('agent hash', this.agent
|
|
38
|
+
this.agent.sha512 = this.hash(this.agent, 'sha512');
|
|
39
|
+
console.log('agent hash', this.agent);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
help(msg, help_dir) {
|
|
@@ -91,8 +91,8 @@ class LIB {
|
|
|
91
91
|
uid: false,
|
|
92
92
|
time,
|
|
93
93
|
date,
|
|
94
|
-
client: this.client
|
|
95
|
-
agent: this.agent
|
|
94
|
+
client: this.client,
|
|
95
|
+
agent: this.agent,
|
|
96
96
|
pkg: pkg_hash,
|
|
97
97
|
machine: machine_hash,
|
|
98
98
|
warning: this.pkg.config.messages.uid_warning,
|