@indra.ai/deva.security 0.37.3 → 0.37.4
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/feature/methods.js +1 -11
- package/index.js +11 -5
- package/package.json +6 -6
package/feature/methods.js
CHANGED
|
@@ -7,16 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
|
|
10
|
-
/**************
|
|
11
|
-
method: security
|
|
12
|
-
params: packet
|
|
13
|
-
describe: The global security feature that installs with every agent
|
|
14
|
-
***************/
|
|
15
|
-
async security(packet) {
|
|
16
|
-
const security = await this.methods.sign('security', 'default', packet);
|
|
17
|
-
return security;
|
|
18
|
-
},
|
|
19
|
-
|
|
20
10
|
/**************
|
|
21
11
|
method: uid
|
|
22
12
|
params: packet
|
|
@@ -367,7 +357,7 @@ export default {
|
|
|
367
357
|
data,
|
|
368
358
|
});
|
|
369
359
|
}).catch(err => {
|
|
370
|
-
return
|
|
360
|
+
return this.err(err, data, reject);
|
|
371
361
|
})
|
|
372
362
|
|
|
373
363
|
});
|
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ const SecurityDeva = new Deva({
|
|
|
37
37
|
vars,
|
|
38
38
|
utils: {
|
|
39
39
|
translate(input) {return input.trim();},
|
|
40
|
-
parse(input) {return
|
|
40
|
+
parse(input) {return input.trim();},
|
|
41
41
|
process(input) {return input.trim();}
|
|
42
42
|
},
|
|
43
43
|
listeners: {
|
|
@@ -63,10 +63,16 @@ const SecurityDeva = new Deva({
|
|
|
63
63
|
***************/
|
|
64
64
|
async write_log(type, packet) {
|
|
65
65
|
let result = false;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
if (!this.modules.client) return;
|
|
67
|
+
try {
|
|
68
|
+
const database = this.modules.client.db(this.vars.log);
|
|
69
|
+
const collection = database.collection(type);
|
|
70
|
+
result = await collection.insertOne(packet);
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
return this.err(err, packet);
|
|
75
|
+
}
|
|
70
76
|
},
|
|
71
77
|
|
|
72
78
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "15266350905933520771",
|
|
3
3
|
"name": "@indra.ai/deva.security",
|
|
4
|
-
"version": "0.37.
|
|
4
|
+
"version": "0.37.4",
|
|
5
5
|
"license": "VLA:15266350905933520771 LICENSE.md",
|
|
6
6
|
"VLA": {
|
|
7
7
|
"uid": "15266350905933520771",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
"copyright": "Copyright ©2000-2026 Quinn Michaels; All rights reserved.",
|
|
47
|
-
"description": "The Security Deva the Security for
|
|
47
|
+
"description": "The Security Deva the Security for Indra.ai and Deva.world.",
|
|
48
48
|
"main": "index.js",
|
|
49
49
|
"type": "module",
|
|
50
50
|
"scripts": {
|
|
@@ -112,10 +112,10 @@
|
|
|
112
112
|
"layout": "default",
|
|
113
113
|
"color": "rgb(251,177,78)",
|
|
114
114
|
"bgcolor": "rgb(0,0,0)",
|
|
115
|
-
"emoji": "/
|
|
116
|
-
"avatar": "/
|
|
117
|
-
"image": "/
|
|
118
|
-
"background": "/
|
|
115
|
+
"emoji": "/assets/emoji.png",
|
|
116
|
+
"avatar": "/assets/avatar.png",
|
|
117
|
+
"image": "/assets/image.png",
|
|
118
|
+
"background": "/assets/background.png",
|
|
119
119
|
"owner": "Quinn Michaels",
|
|
120
120
|
"creator": "Quinn Michaels",
|
|
121
121
|
"company": "Inside The Net, Inc.",
|