@abtnode/core 1.7.22 → 1.7.23
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/lib/states/audit-log.js +1 -3
- package/package.json +14 -14
package/lib/states/audit-log.js
CHANGED
|
@@ -9,7 +9,6 @@ const logger = require('@abtnode/logger')('@abtnode/core:states:audit-log');
|
|
|
9
9
|
const BaseState = require('./base');
|
|
10
10
|
|
|
11
11
|
const { parse } = require('../util/ua');
|
|
12
|
-
const { lookup } = require('../util/ip');
|
|
13
12
|
|
|
14
13
|
const getServerInfo = (info) => `[${info.name}](${joinUrl(info.routing.adminPath, '/settings/about')})`;
|
|
15
14
|
const getBlockletInfo = (blocklet, info) => `[${getDisplayName(blocklet)} v${blocklet.meta.version}](${joinUrl(info.routing.adminPath, '/blocklets/', blocklet.meta.did, '/overview')})`; // prettier-ignore
|
|
@@ -374,7 +373,7 @@ class AuditLogState extends BaseState {
|
|
|
374
373
|
|
|
375
374
|
try {
|
|
376
375
|
const { ip, ua, user } = context;
|
|
377
|
-
const [info,
|
|
376
|
+
const [info, uaInfo] = await Promise.all([node.states.node.read(), parse(ua)]);
|
|
378
377
|
|
|
379
378
|
const data = await this.asyncDB.insert({
|
|
380
379
|
scope: getScope(args) || info.did, // server or blocklet did
|
|
@@ -384,7 +383,6 @@ class AuditLogState extends BaseState {
|
|
|
384
383
|
actor: pick(user.actual || user, ['did', 'fullName', 'role']),
|
|
385
384
|
extra: args,
|
|
386
385
|
env: pick(uaInfo, ['browser', 'os', 'device']),
|
|
387
|
-
geo: pick(geoInfo || { country: '', city: '' }, ['country', 'city']),
|
|
388
386
|
ip,
|
|
389
387
|
ua,
|
|
390
388
|
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.23",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,24 +19,24 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/certificate-manager": "1.7.
|
|
23
|
-
"@abtnode/constant": "1.7.
|
|
24
|
-
"@abtnode/cron": "1.7.
|
|
25
|
-
"@abtnode/db": "1.7.
|
|
26
|
-
"@abtnode/logger": "1.7.
|
|
27
|
-
"@abtnode/queue": "1.7.
|
|
28
|
-
"@abtnode/rbac": "1.7.
|
|
29
|
-
"@abtnode/router-provider": "1.7.
|
|
30
|
-
"@abtnode/static-server": "1.7.
|
|
31
|
-
"@abtnode/timemachine": "1.7.
|
|
32
|
-
"@abtnode/util": "1.7.
|
|
22
|
+
"@abtnode/certificate-manager": "1.7.23",
|
|
23
|
+
"@abtnode/constant": "1.7.23",
|
|
24
|
+
"@abtnode/cron": "1.7.23",
|
|
25
|
+
"@abtnode/db": "1.7.23",
|
|
26
|
+
"@abtnode/logger": "1.7.23",
|
|
27
|
+
"@abtnode/queue": "1.7.23",
|
|
28
|
+
"@abtnode/rbac": "1.7.23",
|
|
29
|
+
"@abtnode/router-provider": "1.7.23",
|
|
30
|
+
"@abtnode/static-server": "1.7.23",
|
|
31
|
+
"@abtnode/timemachine": "1.7.23",
|
|
32
|
+
"@abtnode/util": "1.7.23",
|
|
33
33
|
"@arcblock/did": "^1.16.15",
|
|
34
34
|
"@arcblock/did-motif": "^1.1.9",
|
|
35
35
|
"@arcblock/did-util": "^1.16.15",
|
|
36
36
|
"@arcblock/event-hub": "1.16.15",
|
|
37
37
|
"@arcblock/pm2-events": "^0.0.5",
|
|
38
38
|
"@arcblock/vc": "^1.16.15",
|
|
39
|
-
"@blocklet/meta": "1.7.
|
|
39
|
+
"@blocklet/meta": "1.7.23",
|
|
40
40
|
"@fidm/x509": "^1.2.1",
|
|
41
41
|
"@nedb/core": "^1.2.2",
|
|
42
42
|
"@nedb/multi": "^1.2.2",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"express": "^4.17.1",
|
|
81
81
|
"jest": "^27.4.5"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "aa13838b7597bce11851d0b902575f861aa1ab34"
|
|
84
84
|
}
|