@indra.ai/deva.security 0.0.134 → 0.0.135

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/feature/methods.js +50 -42
  2. package/package.json +2 -2
@@ -20,48 +20,56 @@ export default {
20
20
  params: packet
21
21
  describe: Return a system id to the user from the Log Buddy.
22
22
  ***************/
23
- uid(packet) {
24
- console.log('\nbelief security\n');
25
- this.belief('security', `uid:${packet.id.uid}`)
26
- this.context('uid', packet.id.uid);
27
- this.feature('security', `uid:${packet.id.uid}`);
28
- this.zone('security', `uid:${packet.id.uid}`);
29
- const agent = this.agent();
30
- const {key} = agent;
31
-
32
- const uuid = packet.q.text ? true : false
33
- const id = this.uid(uuid);
34
-
35
- const {client} = packet.q;
36
-
37
- const showJSON = packet.q.meta.params[1] || false;
38
- const text = [
39
- '→',
40
- `::begin:${key}:uid:${id.uid}`,
41
- `uid: ${id.uid}`,
42
- `time: ${id.time}`,
43
- `date: ${id.date}`,
44
- `client: ${id.client}`,
45
- `agent: ${id.agent}`,
46
- `core: ${id.core}`,
47
- `machine: ${id.machine}`,
48
- `warning: ${id.warning}`,
49
- `md5: ${id.md5}`,
50
- `sha256: ${id.sha256}`,
51
- `sha512: ${id.sha512}`,
52
- `copyright: ${id.copyright}`,
53
- `::end:${key}:uid:${id.uid}`,
54
- ];
55
- if (showJSON) {
56
- text.push('::::');
57
- text.push(JSON.stringify(id, null, 2));
58
- }
59
-
60
- this.belief('vedic', `uid:${packet.id.uid}`)
61
- return Promise.resolve({
62
- text: text.join('\n'),
63
- html: false,
64
- data: id,
23
+ async uid(packet) {
24
+ return new Promise((resolve, reject) => {
25
+ this.belief('security', `uid:${packet.id.uid}`)
26
+ this.context('uid', packet.id.uid);
27
+ this.feature('security', `uid:${packet.id.uid}`);
28
+ this.zone('security', `uid:${packet.id.uid}`);
29
+ const agent = this.agent();
30
+ const {key} = agent;
31
+
32
+ const uuid = packet.q.text ? true : false
33
+ const {id} = packet;
34
+
35
+ const {client} = packet.q;
36
+
37
+ const showJSON = packet.q.meta.params[1] || false;
38
+ const text = [
39
+ `::begin:${key}:uid:${id.uid}`,
40
+ `uid: ${id.uid}`,
41
+ `time: ${id.time}`,
42
+ `date: ${id.date}`,
43
+ `client: ${id.client}`,
44
+ `agent: ${id.agent}`,
45
+ `core: ${id.core}`,
46
+ `machine: ${id.machine}`,
47
+ `warning: ${id.warning}`,
48
+ `md5: ${id.md5}`,
49
+ `sha256: ${id.sha256}`,
50
+ `sha512: ${id.sha512}`,
51
+ `copyright: ${id.copyright}`,
52
+ `::end:${key}:uid:${id.uid}`,
53
+ ];
54
+ if (showJSON) {
55
+ text.push(`::begin:${key}:uid:json:${id.uid}`);
56
+ text.push(JSON.stringify(id, null, 2));
57
+ text.push(`::end:${key}:uid:json:${id.uid}`);
58
+ }
59
+
60
+ this.question(`${this.askChr}feecting parse ${text.join('\n')}`).then(parsed => {
61
+ this.belief('vedic', `uid:${packet.id.uid}`);
62
+ this.action('resolve', `uid:${id.uid}`);
63
+ return resolve({
64
+ text: parsed.a.text,
65
+ html: parsed.a.html,
66
+ data: parsed.a.data,
67
+ });
68
+ }).catch(err => {
69
+ return this.err(err, packet, reject);
70
+ });
71
+
72
+
65
73
  });
66
74
  },
67
75
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "45249771785697968797",
3
3
  "name": "@indra.ai/deva.security",
4
- "version": "0.0.134",
4
+ "version": "0.0.135",
5
5
  "license": "VLA:45249771785697968797 LICENSE.md",
6
6
  "VLA": {
7
7
  "uid": "45249771785697968797",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "homepage": "https://deva.space/devas/security",
62
62
  "dependencies": {
63
- "@indra.ai/deva": "^1.8.9",
63
+ "@indra.ai/deva": "^1.9.1",
64
64
  "mongodb": "^6.20.0"
65
65
  },
66
66
  "data": {