@indra.ai/deva 1.6.39 → 1.6.41
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 +1 -4
- package/lib/index.js +3 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -43,7 +43,7 @@ class Deva {
|
|
|
43
43
|
this._systems = false; // inherited Systems features.
|
|
44
44
|
this._networks = false; // inherited Systems features.
|
|
45
45
|
this.events = opts.events || new EventEmitter({}); // Event Bus
|
|
46
|
-
this.lib = new lib({pkg
|
|
46
|
+
this.lib = new lib({pkg}); // used for loading library functions
|
|
47
47
|
this.utils = opts.utils || {}; // parse function
|
|
48
48
|
this.devas = opts.devas || {}; // Devas which are loaded
|
|
49
49
|
this.vars = opts.vars || {}; // Variables object
|
|
@@ -1129,9 +1129,6 @@ class Deva {
|
|
|
1129
1129
|
const client = this.client();
|
|
1130
1130
|
this.lib.setClient(client.sha256);
|
|
1131
1131
|
|
|
1132
|
-
const agent = this.agent();
|
|
1133
|
-
this.lib.setAgent(agent.sha256);
|
|
1134
|
-
|
|
1135
1132
|
this.state('ready', data.id.uid);
|
|
1136
1133
|
this.talk(config.events.ready, data);
|
|
1137
1134
|
return hasOnReady ? this.onReady(data, resolve) : resolve(data);
|
package/lib/index.js
CHANGED
|
@@ -18,10 +18,10 @@ 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
|
-
this.locale = opts.locale || '
|
|
24
|
+
this.locale = opts.locale || 'US';
|
|
25
25
|
this.currency = opts.currency || 'USD';
|
|
26
26
|
this.os = os;
|
|
27
27
|
this.fs = fs;
|
|
@@ -33,9 +33,6 @@ class LIB {
|
|
|
33
33
|
setClient(client) {
|
|
34
34
|
if (!this.client) this.client = client;
|
|
35
35
|
}
|
|
36
|
-
setAgent(agent) {
|
|
37
|
-
if (!this.agent) this.agent = agent;
|
|
38
|
-
}
|
|
39
36
|
|
|
40
37
|
help(msg, help_dir) {
|
|
41
38
|
return new Promise((resolve, reject) => {
|
|
@@ -89,8 +86,8 @@ class LIB {
|
|
|
89
86
|
uid: false,
|
|
90
87
|
time,
|
|
91
88
|
date,
|
|
92
|
-
agent: this.agent,
|
|
93
89
|
client: this.client,
|
|
90
|
+
agent: this.agent,
|
|
94
91
|
pkg: pkg_hash,
|
|
95
92
|
machine: machine_hash,
|
|
96
93
|
warning: this.pkg.config.messages.uid_warning,
|