@abtnode/core 1.16.16-beta-d6c5ed65 → 1.16.16-beta-d11cb031
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/blocklet/manager/disk.js +10 -9
- package/package.json +32 -32
|
@@ -15,6 +15,7 @@ const { isNFTExpired, getNftExpirationDate } = require('@abtnode/util/lib/nft');
|
|
|
15
15
|
const { sign } = require('@arcblock/jwt');
|
|
16
16
|
const sleep = require('@abtnode/util/lib/sleep');
|
|
17
17
|
const getBlockletInfo = require('@blocklet/meta/lib/info');
|
|
18
|
+
const joinUrl = require('url-join');
|
|
18
19
|
|
|
19
20
|
const logger = require('@abtnode/logger')('@abtnode/core:blocklet:manager');
|
|
20
21
|
const {
|
|
@@ -3031,7 +3032,7 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
3031
3032
|
await states.blockletExtras.setConfigs([app.meta.did, component?.meta?.did].filter(Boolean), environments);
|
|
3032
3033
|
|
|
3033
3034
|
if (component) {
|
|
3034
|
-
const envsInApp = await states.blockletExtras.getConfigs([
|
|
3035
|
+
const envsInApp = await states.blockletExtras.getConfigs([blocklet.meta.did]);
|
|
3035
3036
|
const envsInComponent = await states.blockletExtras.getConfigs([app.meta.did, component.meta.did]);
|
|
3036
3037
|
|
|
3037
3038
|
const configs = getAppConfigsFromComponent({ environments }, envsInApp, envsInComponent);
|
|
@@ -3042,7 +3043,7 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
3042
3043
|
|
|
3043
3044
|
// chain config
|
|
3044
3045
|
await this._ensureAppChainConfig(
|
|
3045
|
-
blocklet.
|
|
3046
|
+
blocklet.meta.did,
|
|
3046
3047
|
environments.map((x) => ({ key: x.name, value: x.default })),
|
|
3047
3048
|
{ force: false }
|
|
3048
3049
|
);
|
|
@@ -3594,7 +3595,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3594
3595
|
async joinFederatedLogin({ appUrl, did }) {
|
|
3595
3596
|
const url = new URL(appUrl);
|
|
3596
3597
|
// master service api 的地址
|
|
3597
|
-
url.pathname =
|
|
3598
|
+
url.pathname = joinUrl(WELLKNOWN_SERVICE_PATH_PREFIX, '/api/federated/join');
|
|
3598
3599
|
|
|
3599
3600
|
const blocklet = await this.getBlocklet(did);
|
|
3600
3601
|
const nodeInfo = await states.node.read();
|
|
@@ -3611,7 +3612,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3611
3612
|
aliasDomain: domainAliases.map((x) => x.value),
|
|
3612
3613
|
appLogo:
|
|
3613
3614
|
blocklet.environmentObj.BLOCKLET_APP_LOGO ||
|
|
3614
|
-
normalizePathPrefix(
|
|
3615
|
+
normalizePathPrefix(joinUrl(WELLKNOWN_SERVICE_PATH_PREFIX, '/blocklet/logo')) ||
|
|
3615
3616
|
'/',
|
|
3616
3617
|
appLogoRect: blocklet.environmentObj.BLOCKLET_APP_LOGO_RECT,
|
|
3617
3618
|
did: permanentWallet.address,
|
|
@@ -3681,7 +3682,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3681
3682
|
masterAppUrl: masterSite.appUrl,
|
|
3682
3683
|
});
|
|
3683
3684
|
const url = new URL(masterSite.appUrl);
|
|
3684
|
-
url.pathname =
|
|
3685
|
+
url.pathname = joinUrl(WELLKNOWN_SERVICE_PATH_PREFIX, '/api/federated/quit');
|
|
3685
3686
|
try {
|
|
3686
3687
|
await pRetry(
|
|
3687
3688
|
() =>
|
|
@@ -3735,7 +3736,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3735
3736
|
.map((item) => {
|
|
3736
3737
|
return limitSync(async () => {
|
|
3737
3738
|
const url = new URL(item.appUrl);
|
|
3738
|
-
url.pathname =
|
|
3739
|
+
url.pathname = joinUrl(WELLKNOWN_SERVICE_PATH_PREFIX, '/api/federated/disband');
|
|
3739
3740
|
try {
|
|
3740
3741
|
await pRetry(
|
|
3741
3742
|
() =>
|
|
@@ -3863,7 +3864,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3863
3864
|
roles = await this.teamManager.getRoles(blocklet.appPid);
|
|
3864
3865
|
}
|
|
3865
3866
|
|
|
3866
|
-
const postUrl =
|
|
3867
|
+
const postUrl = joinUrl(memberSite.appUrl, WELLKNOWN_SERVICE_PATH_PREFIX, '/api/federated/audit-res');
|
|
3867
3868
|
|
|
3868
3869
|
logger.info('Audit member join federated login', {
|
|
3869
3870
|
status,
|
|
@@ -3911,7 +3912,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3911
3912
|
const { users, sites } = data;
|
|
3912
3913
|
if (users && Array.isArray(users)) {
|
|
3913
3914
|
safeData.users = users.map((item) =>
|
|
3914
|
-
pick(item, ['did', 'pk', 'fullName', 'avatar', 'email', 'connectedAccount', 'action'])
|
|
3915
|
+
pick(item, ['did', 'pk', 'fullName', 'avatar', 'email', 'connectedAccount', 'action', 'sourceAppPid'])
|
|
3915
3916
|
);
|
|
3916
3917
|
}
|
|
3917
3918
|
|
|
@@ -3946,7 +3947,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
|
|
|
3946
3947
|
.filter((item) => item.appId !== federated.config.appId)
|
|
3947
3948
|
.map((item) => {
|
|
3948
3949
|
return limitSync(async () => {
|
|
3949
|
-
const url =
|
|
3950
|
+
const url = joinUrl(item.appUrl, WELLKNOWN_SERVICE_PATH_PREFIX, '/api/federated/sync');
|
|
3950
3951
|
try {
|
|
3951
3952
|
// NOTICE: 即使通知某个站点失败了,也不影响其他站点接收同步结果
|
|
3952
3953
|
await pRetry(
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.16-beta-
|
|
6
|
+
"version": "1.16.16-beta-d11cb031",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,39 +19,39 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.16-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.16-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.16-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.16-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.16-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.16-beta-
|
|
28
|
-
"@abtnode/models": "1.16.16-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.16-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.16-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.16-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.16-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.16-beta-
|
|
34
|
-
"@abtnode/util": "1.16.16-beta-
|
|
35
|
-
"@arcblock/did": "1.18.
|
|
36
|
-
"@arcblock/did-auth": "1.18.
|
|
37
|
-
"@arcblock/did-ext": "^1.18.
|
|
22
|
+
"@abtnode/analytics": "1.16.16-beta-d11cb031",
|
|
23
|
+
"@abtnode/auth": "1.16.16-beta-d11cb031",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.16-beta-d11cb031",
|
|
25
|
+
"@abtnode/constant": "1.16.16-beta-d11cb031",
|
|
26
|
+
"@abtnode/cron": "1.16.16-beta-d11cb031",
|
|
27
|
+
"@abtnode/logger": "1.16.16-beta-d11cb031",
|
|
28
|
+
"@abtnode/models": "1.16.16-beta-d11cb031",
|
|
29
|
+
"@abtnode/queue": "1.16.16-beta-d11cb031",
|
|
30
|
+
"@abtnode/rbac": "1.16.16-beta-d11cb031",
|
|
31
|
+
"@abtnode/router-provider": "1.16.16-beta-d11cb031",
|
|
32
|
+
"@abtnode/static-server": "1.16.16-beta-d11cb031",
|
|
33
|
+
"@abtnode/timemachine": "1.16.16-beta-d11cb031",
|
|
34
|
+
"@abtnode/util": "1.16.16-beta-d11cb031",
|
|
35
|
+
"@arcblock/did": "1.18.90",
|
|
36
|
+
"@arcblock/did-auth": "1.18.90",
|
|
37
|
+
"@arcblock/did-ext": "^1.18.90",
|
|
38
38
|
"@arcblock/did-motif": "^1.1.13",
|
|
39
|
-
"@arcblock/did-util": "1.18.
|
|
40
|
-
"@arcblock/event-hub": "1.18.
|
|
41
|
-
"@arcblock/jwt": "^1.18.
|
|
39
|
+
"@arcblock/did-util": "1.18.90",
|
|
40
|
+
"@arcblock/event-hub": "1.18.90",
|
|
41
|
+
"@arcblock/jwt": "^1.18.90",
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
|
-
"@arcblock/validator": "^1.18.
|
|
44
|
-
"@arcblock/vc": "1.18.
|
|
45
|
-
"@blocklet/constant": "1.16.16-beta-
|
|
46
|
-
"@blocklet/env": "1.16.16-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.16-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.16-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.16-beta-
|
|
50
|
-
"@did-space/client": "^0.
|
|
43
|
+
"@arcblock/validator": "^1.18.90",
|
|
44
|
+
"@arcblock/vc": "1.18.90",
|
|
45
|
+
"@blocklet/constant": "1.16.16-beta-d11cb031",
|
|
46
|
+
"@blocklet/env": "1.16.16-beta-d11cb031",
|
|
47
|
+
"@blocklet/meta": "1.16.16-beta-d11cb031",
|
|
48
|
+
"@blocklet/resolver": "1.16.16-beta-d11cb031",
|
|
49
|
+
"@blocklet/sdk": "1.16.16-beta-d11cb031",
|
|
50
|
+
"@did-space/client": "^0.3.0",
|
|
51
51
|
"@fidm/x509": "^1.2.1",
|
|
52
|
-
"@ocap/mcrypto": "1.18.
|
|
53
|
-
"@ocap/util": "1.18.
|
|
54
|
-
"@ocap/wallet": "1.18.
|
|
52
|
+
"@ocap/mcrypto": "1.18.90",
|
|
53
|
+
"@ocap/util": "1.18.90",
|
|
54
|
+
"@ocap/wallet": "1.18.90",
|
|
55
55
|
"@slack/webhook": "^5.0.4",
|
|
56
56
|
"archiver": "^5.3.1",
|
|
57
57
|
"axios": "^0.27.2",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"jest": "^27.5.1",
|
|
101
101
|
"unzipper": "^0.10.11"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "0591985c51137cdebf382a515b17bb4f8bf829a6"
|
|
104
104
|
}
|