@indra.ai/deva 1.3.14 → 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.
- package/index.js +38 -6
- 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
|