@indra.ai/deva 1.1.51 → 1.1.52

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.
@@ -81,6 +81,9 @@ const HelloWorld = new Deva({
81
81
  return this.func.test(packet);
82
82
  }
83
83
  },
84
+ onError(e) {
85
+ console.log(e);
86
+ }
84
87
  });
85
88
 
86
89
  HelloWorld.init(client);
package/index.js CHANGED
@@ -1130,6 +1130,7 @@ class Deva {
1130
1130
  usage: this.init(client_object)
1131
1131
  ***************/
1132
1132
  init(client) {
1133
+ console.log('INIT');
1133
1134
  const _data = {
1134
1135
  id: this.uid(true),
1135
1136
  key: 'return',
@@ -1703,7 +1704,6 @@ class Deva {
1703
1704
  is shared.
1704
1705
  ***************/
1705
1706
  uid(guid=false) {
1706
- this.action('uid');
1707
1707
  let id;
1708
1708
  if (guid) {
1709
1709
  id = randomUUID()
@@ -1726,7 +1726,7 @@ class Deva {
1726
1726
  The hash algorithm will take a string of text and produce a hash.
1727
1727
  ***************/
1728
1728
  hash(str, algo=false) {
1729
- this.action('hash');
1729
+ // this.action('hash');
1730
1730
  algo = algo || this._security.hash || 'md5';
1731
1731
  const the_hash = createHash(algo);
1732
1732
  the_hash.update(str);
@@ -1742,7 +1742,7 @@ class Deva {
1742
1742
  defined client security settings.
1743
1743
  ***************/
1744
1744
  cipher(str) {
1745
- this.action('cipher');
1745
+ // this.action('cipher');
1746
1746
  const security = this._security;
1747
1747
  const {password, algorithm} = security.cipher;
1748
1748
  const key = createHash('sha256').update(String(password)).digest('base64');
@@ -1761,7 +1761,7 @@ class Deva {
1761
1761
  }
1762
1762
  }
1763
1763
  decipher(opt) {
1764
- this.action('decipher');
1764
+ // this.action('decipher');
1765
1765
  const iv = Buffer.from(opt.iv, 'base64');
1766
1766
  const encrypted = Buffer.from(opt.encrypted, 'hex');
1767
1767
  const key_in_bytes = Buffer.from(opt.key, 'base64')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.1.51",
3
+ "version": "1.1.52",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "scripts": {