@indra.ai/deva 1.6.56 → 1.6.57

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 +6 -3
  2. package/package.json +4 -2
package/index.js CHANGED
@@ -231,8 +231,7 @@ class Deva {
231
231
  return this.err(e);
232
232
  }
233
233
  }
234
-
235
-
234
+
236
235
  /**************
237
236
  func: Client
238
237
  params: client - client provided data.
@@ -939,6 +938,10 @@ class Deva {
939
938
  data.sha512 = this.lib.hash(data, 'sha512');
940
939
 
941
940
  return new Promise((resolve, reject) => {
941
+
942
+ const license_check = this.license_check(client.VLA, pkg.VLA);
943
+ if (!license_check) return resolve(config.messages.client_license_invalid); // return if license check fails
944
+
942
945
  this.events.setMaxListeners(this.maxListeners);
943
946
  this._assignInherit().then(() => {
944
947
  return this._assignBind();
@@ -949,6 +952,7 @@ class Deva {
949
952
  this.zone('init');
950
953
  this.action('init');
951
954
  this.state('init');
955
+ }).then(() => {
952
956
  return this.Client(client, resolve, reject);
953
957
  }).then(() => {
954
958
  return this.Indra(resolve, reject);
@@ -2250,7 +2254,6 @@ class Deva {
2250
2254
  const personalVLA_hash = this.lib.hash(personalVLA, 'sha256');
2251
2255
  const packageVLA_hash = this.lib.hash(packageVLA, 'sha256');
2252
2256
 
2253
- console.log('HASHES', packageVLA_hash, personalVLA_hash);
2254
2257
  if (personalVLA_hash !== packageVLA_hash) return false;
2255
2258
 
2256
2259
  const approved = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": 45958588982385560000,
3
3
  "name": "@indra.ai/deva",
4
- "version": "1.6.56",
4
+ "version": "1.6.57",
5
5
  "description": "The Deva Core",
6
6
  "main": "index.js",
7
7
  "license": "VLA:45958588982385558603 LICENSE.md",
@@ -364,7 +364,9 @@
364
364
  "invalid_client": "⛔️ Client Hash Invalid",
365
365
  "load": "📦 Load",
366
366
  "unload": "🥡 Unload",
367
- "uid_warning": "⚠️ Unlawful Use Constitutes Lawful Consent to Forfeit of All Wealth, Property, and Holdings to the Internal Revenue Service (IRS) for Lawful Taxation and Restiuttion to the Rightful Owner of the Machine of Origin."
367
+ "uid_warning": "⚠️ Unlawful Use Constitutes Lawful Consent to Forfeit of All Wealth, Property, and Holdings to the Internal Revenue Service (IRS) for Lawful Taxation and Restiuttion to the Rightful Owner of the Machine of Origin.",
368
+ "client_license_check": "🪪 Check Client License",
369
+ "client_license_invalid": "❌ The Provided Client License Is Invalid"
368
370
  }
369
371
  }
370
372
  }