@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.
Files changed (2) hide show
  1. package/index.js +7 -19
  2. 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 isMethod = typeof methods[y] === 'function' && !this.methods[y];
217
- if (isMethod) this.methods[y] = methods[y].bind(this);
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(id=false) {
1773
- id = id || this._id;
1774
- const agent = this.agent();
1775
- if (this._info) {
1776
- const _info = [
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
  /**************
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.116",
3
+ "version": "1.1.118",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {