@indra.ai/deva 1.1.116 → 1.1.118
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 +7 -19
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -213,8 +213,8 @@ 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
|
|
217
|
-
if (
|
|
216
|
+
const isFunc = typeof methods[y] === 'function';
|
|
217
|
+
if (isFunc) this.methods[y] = methods[y].bind(this);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
// console.log('CLINET BEFORE COPY', client);
|
|
@@ -1769,23 +1769,11 @@ class Deva {
|
|
|
1769
1769
|
params: id
|
|
1770
1770
|
describe: return info data.
|
|
1771
1771
|
***************/
|
|
1772
|
-
info(
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
`::begin:info:${id}`,
|
|
1778
|
-
`## ${this._agent.profile.name} (#${agent.key})`,
|
|
1779
|
-
];
|
|
1780
|
-
for (let x in this._info) {
|
|
1781
|
-
_info.push(`- ${x}: ${this._info[x]}`);
|
|
1782
|
-
}
|
|
1783
|
-
_info.push(`::end:info:${this.hash(this._info)}`);
|
|
1784
|
-
return _info.join('\n');
|
|
1785
|
-
}
|
|
1786
|
-
else {
|
|
1787
|
-
return '';
|
|
1788
|
-
}
|
|
1772
|
+
info() {
|
|
1773
|
+
// check the active status
|
|
1774
|
+
if (!this._active) return Promise.resolve(this._messages.states.offline);
|
|
1775
|
+
this.action('info');
|
|
1776
|
+
return this._info;
|
|
1789
1777
|
}
|
|
1790
1778
|
|
|
1791
1779
|
/**************
|