@abtnode/core 1.16.6-beta-56be9f01 → 1.16.6-beta-e2082fec
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/router/helper.js +2 -2
- package/lib/states/audit-log.js +5 -2
- package/lib/util/blocklet.js +1 -1
- package/lib/util/index.js +7 -3
- package/package.json +28 -29
package/lib/router/helper.js
CHANGED
|
@@ -252,8 +252,8 @@ const ensureWellknownRule = async (sites = []) => {
|
|
|
252
252
|
const wellknownPort = await getWellknownSitePort();
|
|
253
253
|
|
|
254
254
|
for (const site of sites) {
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
// 不向 default site & ip site & wellknown site 添加 wellknown rule
|
|
256
|
+
if (![DOMAIN_FOR_INTERNAL_SITE, DOMAIN_FOR_IP_SITE, DOMAIN_FOR_DEFAULT_SITE].includes(site.domain)) {
|
|
257
257
|
const isExists = site.rules.find((x) => x.from.pathPrefix === WELLKNOWN_PATH_PREFIX);
|
|
258
258
|
if (!isExists) {
|
|
259
259
|
site.rules.push({
|
package/lib/states/audit-log.js
CHANGED
|
@@ -156,12 +156,14 @@ const getLogContent = async (action, args, context, result, info, node) => {
|
|
|
156
156
|
return `joined team ${team} by ${args.reason}`;
|
|
157
157
|
case 'updateUser':
|
|
158
158
|
return `${args.reason} and received **${args.passport.name}** passport from ${team}`;
|
|
159
|
+
case 'connectAccount':
|
|
160
|
+
return `user ${user} connect with account ${args.connectedAccount.provider}: ${args.connectedAccount.did}`;
|
|
159
161
|
case 'switchProfile':
|
|
160
162
|
return `switched profile to ${args.profile.fullName} for ${team}`;
|
|
161
163
|
case 'switchPassport':
|
|
162
|
-
return
|
|
164
|
+
return `${args.provider} user ${user} switched passport to ${args.passport.name} for ${team}`;
|
|
163
165
|
case 'login':
|
|
164
|
-
return `${user} logged in to ${team} with passport ${args.passport.name}`;
|
|
166
|
+
return `${args.provider} user ${user} logged in to ${team} with passport ${args.passport.name}`;
|
|
165
167
|
case 'updateWhoCanAccess':
|
|
166
168
|
return `updated access control policy to **${args.whoCanAccess}**`;
|
|
167
169
|
case 'configPassportIssuance':
|
|
@@ -321,6 +323,7 @@ const getLogCategory = (action) => {
|
|
|
321
323
|
case 'configTrustedFactories':
|
|
322
324
|
case 'delegateTransferNFT':
|
|
323
325
|
case 'createTransferInvitation':
|
|
326
|
+
case 'connectAccount':
|
|
324
327
|
return 'team';
|
|
325
328
|
|
|
326
329
|
// accessKeys
|
package/lib/util/blocklet.js
CHANGED
|
@@ -339,7 +339,7 @@ const getAppOverwrittenEnvironments = (blocklet, nodeInfo) => {
|
|
|
339
339
|
result[x] = blocklet.configObj[x];
|
|
340
340
|
});
|
|
341
341
|
|
|
342
|
-
const keys = ['BLOCKLET_APP_SK', 'BLOCKLET_APP_CHAIN_TYPE'];
|
|
342
|
+
const keys = ['BLOCKLET_APP_SK', 'BLOCKLET_APP_CHAIN_TYPE', 'BLOCKLET_WALLET_TYPE'];
|
|
343
343
|
const isAppDidRewritten = keys.some((key) => blocklet.configObj[key]);
|
|
344
344
|
if (!isAppDidRewritten) {
|
|
345
345
|
return result;
|
package/lib/util/index.js
CHANGED
|
@@ -2,7 +2,6 @@ const fs = require('fs');
|
|
|
2
2
|
const os = require('os');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const dns = require('dns');
|
|
5
|
-
const unzipper = require('unzipper');
|
|
6
5
|
const crypto = require('crypto');
|
|
7
6
|
const shell = require('shelljs');
|
|
8
7
|
const get = require('lodash/get');
|
|
@@ -12,6 +11,7 @@ const joinUrl = require('url-join');
|
|
|
12
11
|
const { Certificate } = require('@fidm/x509');
|
|
13
12
|
const getPortLib = require('get-port');
|
|
14
13
|
const v8 = require('v8');
|
|
14
|
+
const StreamZip = require('node-stream-zip');
|
|
15
15
|
const normalizePathPrefix = require('@abtnode/util/lib/normalize-path-prefix');
|
|
16
16
|
const axios = require('@abtnode/util/lib/axios');
|
|
17
17
|
const { encode: encodeBase32 } = require('@abtnode/util/lib/base32');
|
|
@@ -251,8 +251,12 @@ const getBaseUrls = async (node, ips) => {
|
|
|
251
251
|
}));
|
|
252
252
|
};
|
|
253
253
|
|
|
254
|
-
const expandBundle = (bundlePath, destDir) =>
|
|
255
|
-
|
|
254
|
+
const expandBundle = async (bundlePath, destDir) => {
|
|
255
|
+
// eslint-disable-next-line new-cap
|
|
256
|
+
const zip = new StreamZip.async({ file: bundlePath });
|
|
257
|
+
await zip.extract(null, destDir);
|
|
258
|
+
await zip.close();
|
|
259
|
+
};
|
|
256
260
|
|
|
257
261
|
// eslint-disable-next-line no-shadow
|
|
258
262
|
const findInterfaceByName = (blocklet, name) => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.6-beta-
|
|
6
|
+
"version": "1.16.6-beta-e2082fec",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,35 +19,35 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/auth": "1.16.6-beta-
|
|
23
|
-
"@abtnode/certificate-manager": "1.16.6-beta-
|
|
24
|
-
"@abtnode/constant": "1.16.6-beta-
|
|
25
|
-
"@abtnode/cron": "1.16.6-beta-
|
|
26
|
-
"@abtnode/db": "1.16.6-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.6-beta-
|
|
28
|
-
"@abtnode/queue": "1.16.6-beta-
|
|
29
|
-
"@abtnode/rbac": "1.16.6-beta-
|
|
30
|
-
"@abtnode/router-provider": "1.16.6-beta-
|
|
31
|
-
"@abtnode/static-server": "1.16.6-beta-
|
|
32
|
-
"@abtnode/timemachine": "1.16.6-beta-
|
|
33
|
-
"@abtnode/util": "1.16.6-beta-
|
|
34
|
-
"@arcblock/did": "1.18.
|
|
35
|
-
"@arcblock/did-auth": "1.18.
|
|
36
|
-
"@arcblock/did-ext": "^1.18.
|
|
22
|
+
"@abtnode/auth": "1.16.6-beta-e2082fec",
|
|
23
|
+
"@abtnode/certificate-manager": "1.16.6-beta-e2082fec",
|
|
24
|
+
"@abtnode/constant": "1.16.6-beta-e2082fec",
|
|
25
|
+
"@abtnode/cron": "1.16.6-beta-e2082fec",
|
|
26
|
+
"@abtnode/db": "1.16.6-beta-e2082fec",
|
|
27
|
+
"@abtnode/logger": "1.16.6-beta-e2082fec",
|
|
28
|
+
"@abtnode/queue": "1.16.6-beta-e2082fec",
|
|
29
|
+
"@abtnode/rbac": "1.16.6-beta-e2082fec",
|
|
30
|
+
"@abtnode/router-provider": "1.16.6-beta-e2082fec",
|
|
31
|
+
"@abtnode/static-server": "1.16.6-beta-e2082fec",
|
|
32
|
+
"@abtnode/timemachine": "1.16.6-beta-e2082fec",
|
|
33
|
+
"@abtnode/util": "1.16.6-beta-e2082fec",
|
|
34
|
+
"@arcblock/did": "1.18.77",
|
|
35
|
+
"@arcblock/did-auth": "1.18.77",
|
|
36
|
+
"@arcblock/did-ext": "^1.18.77",
|
|
37
37
|
"@arcblock/did-motif": "^1.1.10",
|
|
38
|
-
"@arcblock/did-util": "1.18.
|
|
39
|
-
"@arcblock/event-hub": "1.18.
|
|
40
|
-
"@arcblock/jwt": "^1.18.
|
|
38
|
+
"@arcblock/did-util": "1.18.77",
|
|
39
|
+
"@arcblock/event-hub": "1.18.77",
|
|
40
|
+
"@arcblock/jwt": "^1.18.77",
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
|
-
"@arcblock/vc": "1.18.
|
|
43
|
-
"@blocklet/constant": "1.16.6-beta-
|
|
44
|
-
"@blocklet/meta": "1.16.6-beta-
|
|
45
|
-
"@blocklet/sdk": "1.16.6-beta-
|
|
46
|
-
"@did-space/client": "^0.2.
|
|
42
|
+
"@arcblock/vc": "1.18.77",
|
|
43
|
+
"@blocklet/constant": "1.16.6-beta-e2082fec",
|
|
44
|
+
"@blocklet/meta": "1.16.6-beta-e2082fec",
|
|
45
|
+
"@blocklet/sdk": "1.16.6-beta-e2082fec",
|
|
46
|
+
"@did-space/client": "^0.2.88",
|
|
47
47
|
"@fidm/x509": "^1.2.1",
|
|
48
|
-
"@ocap/mcrypto": "1.18.
|
|
49
|
-
"@ocap/util": "1.18.
|
|
50
|
-
"@ocap/wallet": "1.18.
|
|
48
|
+
"@ocap/mcrypto": "1.18.77",
|
|
49
|
+
"@ocap/util": "1.18.77",
|
|
50
|
+
"@ocap/wallet": "1.18.77",
|
|
51
51
|
"@slack/webhook": "^5.0.4",
|
|
52
52
|
"archiver": "^5.3.1",
|
|
53
53
|
"axios": "^0.27.2",
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
"tar": "^6.1.11",
|
|
84
84
|
"transliteration": "^2.3.5",
|
|
85
85
|
"ua-parser-js": "^1.0.2",
|
|
86
|
-
"unzipper": "^0.10.11",
|
|
87
86
|
"url-join": "^4.0.1",
|
|
88
87
|
"uuid": "7.0.3",
|
|
89
88
|
"valid-url": "^1.0.9"
|
|
@@ -94,5 +93,5 @@
|
|
|
94
93
|
"express": "^4.18.2",
|
|
95
94
|
"jest": "^27.5.1"
|
|
96
95
|
},
|
|
97
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "851e0ab17f1c6e160aedc47fcdbf7dd54dfa7237"
|
|
98
97
|
}
|