@indra.ai/deva 1.3.13 → 1.3.15

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 +56 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -18,6 +18,7 @@ class Deva {
18
18
  this._client = {}; // this will be set on init.
19
19
  this._active = false; // the active/birth date.
20
20
  this._security = false; // inherited Security features.
21
+ this._defense = false; // inherited Security features.
21
22
  this._support = false; // inherited Support features.
22
23
  this._services = false; // inherited Service features.
23
24
  this._systems = false; // inherited Systems features.
@@ -265,6 +266,17 @@ class Deva {
265
266
  return this.Feature('security', resolve, reject);
266
267
  }
267
268
 
269
+ /**************
270
+ func: Defense
271
+ params: client: false
272
+ describe:
273
+ The Defense feature sets the correct variables and necessary rules for the
274
+ client presented data.
275
+ ***************/
276
+ Defense(resolve, reject) {
277
+ return this.Feature('defense', resolve, reject);
278
+ }
279
+
268
280
  /**************
269
281
  func: Support
270
282
  params: client: false
@@ -688,6 +700,14 @@ class Deva {
688
700
  return this.Client(client, resolve, reject);
689
701
  }).then(() => {
690
702
  return this.Security(resolve, reject);
703
+ }).then(() => {
704
+ return this.Defense(resolve, reject);
705
+ }).then(() => {
706
+ return this.Legal(resolve, reject);
707
+ }).then(() => {
708
+ return this.Authority(resolve, reject);
709
+ }).then(() => {
710
+ return this.Justice(resolve, reject);
691
711
  }).then(() => {
692
712
  return this.Support(resolve, reject);
693
713
  }).then(() => {
@@ -696,12 +716,6 @@ class Deva {
696
716
  return this.Systems(resolve, reject);
697
717
  }).then(() => {
698
718
  return this.Networks(resolve, reject);
699
- }).then(() => {
700
- return this.Legal(resolve, reject);
701
- }).then(() => {
702
- return this.Justice(resolve, reject);
703
- }).then(() => {
704
- return this.Authority(resolve, reject);
705
719
  }).then(() => {
706
720
  return this.Done(resolve, reject);
707
721
  }).then(() => {
@@ -1211,6 +1225,24 @@ class Deva {
1211
1225
  }
1212
1226
  }
1213
1227
 
1228
+ /**************
1229
+ func: defense
1230
+ params: none
1231
+ describe: basic defense features available in a Deva.
1232
+ usage: this.defense()
1233
+ ***************/
1234
+ defense() {
1235
+ if (!this._active) return this._messages.offline; // check the active status
1236
+ this.zone('defense');
1237
+ this.feature('defense'); // set the defense state
1238
+ try {
1239
+ this.state('return', 'defense'); // set the defense state
1240
+ return this.lib.copy(this._defense); // return the defense feature
1241
+ } catch (e) {
1242
+ return this.error(e);
1243
+ }
1244
+ }
1245
+
1214
1246
  /**************
1215
1247
  func: support
1216
1248
  params: none
@@ -1265,6 +1297,24 @@ class Deva {
1265
1297
  }
1266
1298
  }
1267
1299
 
1300
+ /**************
1301
+ func: networks
1302
+ params: none
1303
+ describe: basic networks features available in a Deva.
1304
+ usage: this.networks()
1305
+ ***************/
1306
+ networks() {
1307
+ if (!this._active) return this._messages.offline; // check the active status
1308
+ this.zone('networks');
1309
+ this.feature('networks'); // set the support state
1310
+ try {
1311
+ this.state('return', 'networks'); // set the networks state
1312
+ return this.lib.copy(this._networks); // return the networks feature
1313
+ } catch (e) {
1314
+ return this.error(e); // return this.error when error catch
1315
+ }
1316
+ }
1317
+
1268
1318
  /**************
1269
1319
  func: legal
1270
1320
  params: none
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.3.13",
3
+ "version": "1.3.15",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "type": "module",