@abtnode/core 1.16.14-beta-c308dc3b → 1.16.14-beta-963cb583
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/user.js +16 -2
- package/lib/util/blocklet.js +2 -5
- package/package.json +30 -30
package/lib/states/user.js
CHANGED
|
@@ -78,7 +78,14 @@ class User extends ExtendBase {
|
|
|
78
78
|
// create passports and connectedAccounts
|
|
79
79
|
await Promise.all((get(user, 'passports') || []).map((x) => this.passport.insert({ ...x, userDid: user.did })));
|
|
80
80
|
await Promise.all(
|
|
81
|
-
(get(user, 'connectedAccounts') || []).map((x) =>
|
|
81
|
+
(get(user, 'connectedAccounts') || []).map((x) => {
|
|
82
|
+
// FIXME: @zhanghan 这里在修复完 https://github.com/blocklet/tweet-token/issues/131 之后需要去除特殊处理的逻辑
|
|
83
|
+
const mergeData = { ...x, userDid: user.did };
|
|
84
|
+
if (mergeData.id === null && mergeData.provider === LOGIN_PROVIDER.AUTH0) {
|
|
85
|
+
mergeData.provider = LOGIN_PROVIDER.WALLET;
|
|
86
|
+
}
|
|
87
|
+
return this.connectedAccount.insert(mergeData);
|
|
88
|
+
})
|
|
82
89
|
);
|
|
83
90
|
|
|
84
91
|
return this.getUser(user.did);
|
|
@@ -100,7 +107,14 @@ class User extends ExtendBase {
|
|
|
100
107
|
await Promise.all(
|
|
101
108
|
(get(updates, 'connectedAccounts') || [])
|
|
102
109
|
.filter((x) => x.did)
|
|
103
|
-
.map((x) =>
|
|
110
|
+
.map((x) => {
|
|
111
|
+
// FIXME: @zhanghan 这里在修复完 https://github.com/blocklet/tweet-token/issues/131 之后需要去除特殊处理的逻辑
|
|
112
|
+
const mergeData = { ...x, userDid: did };
|
|
113
|
+
if (mergeData.id === null && mergeData.provider === LOGIN_PROVIDER.AUTH0) {
|
|
114
|
+
mergeData.provider = LOGIN_PROVIDER.WALLET;
|
|
115
|
+
}
|
|
116
|
+
return this.connectedAccount.upsert({ did: x.did }, mergeData);
|
|
117
|
+
})
|
|
104
118
|
);
|
|
105
119
|
|
|
106
120
|
return this.getUser(did);
|
package/lib/util/blocklet.js
CHANGED
|
@@ -1475,11 +1475,8 @@ const validateAppConfig = async (config, states) => {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
1477
|
if (x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT) {
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
if (!isUrl(x.value)) {
|
|
1478
|
+
// @note: value 置空以表删除
|
|
1479
|
+
if (x.value && !isUrl(x.value)) {
|
|
1483
1480
|
throw new Error(`${x.key}(${x.value}) is not a valid http address`);
|
|
1484
1481
|
}
|
|
1485
1482
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.14-beta-
|
|
6
|
+
"version": "1.16.14-beta-963cb583",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,38 +19,38 @@
|
|
|
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.14-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.14-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.14-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.14-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.14-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.14-beta-
|
|
28
|
-
"@abtnode/models": "1.16.14-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.14-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.14-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.14-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.14-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.14-beta-
|
|
34
|
-
"@abtnode/util": "1.16.14-beta-
|
|
35
|
-
"@arcblock/did": "1.18.
|
|
36
|
-
"@arcblock/did-auth": "1.18.
|
|
37
|
-
"@arcblock/did-ext": "^1.18.
|
|
22
|
+
"@abtnode/analytics": "1.16.14-beta-963cb583",
|
|
23
|
+
"@abtnode/auth": "1.16.14-beta-963cb583",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.14-beta-963cb583",
|
|
25
|
+
"@abtnode/constant": "1.16.14-beta-963cb583",
|
|
26
|
+
"@abtnode/cron": "1.16.14-beta-963cb583",
|
|
27
|
+
"@abtnode/logger": "1.16.14-beta-963cb583",
|
|
28
|
+
"@abtnode/models": "1.16.14-beta-963cb583",
|
|
29
|
+
"@abtnode/queue": "1.16.14-beta-963cb583",
|
|
30
|
+
"@abtnode/rbac": "1.16.14-beta-963cb583",
|
|
31
|
+
"@abtnode/router-provider": "1.16.14-beta-963cb583",
|
|
32
|
+
"@abtnode/static-server": "1.16.14-beta-963cb583",
|
|
33
|
+
"@abtnode/timemachine": "1.16.14-beta-963cb583",
|
|
34
|
+
"@abtnode/util": "1.16.14-beta-963cb583",
|
|
35
|
+
"@arcblock/did": "1.18.89",
|
|
36
|
+
"@arcblock/did-auth": "1.18.89",
|
|
37
|
+
"@arcblock/did-ext": "^1.18.89",
|
|
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.89",
|
|
40
|
+
"@arcblock/event-hub": "1.18.89",
|
|
41
|
+
"@arcblock/jwt": "^1.18.89",
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
|
-
"@arcblock/validator": "^1.18.
|
|
44
|
-
"@arcblock/vc": "1.18.
|
|
45
|
-
"@blocklet/constant": "1.16.14-beta-
|
|
46
|
-
"@blocklet/meta": "1.16.14-beta-
|
|
47
|
-
"@blocklet/resolver": "1.16.14-beta-
|
|
48
|
-
"@blocklet/sdk": "1.16.14-beta-
|
|
43
|
+
"@arcblock/validator": "^1.18.89",
|
|
44
|
+
"@arcblock/vc": "1.18.89",
|
|
45
|
+
"@blocklet/constant": "1.16.14-beta-963cb583",
|
|
46
|
+
"@blocklet/meta": "1.16.14-beta-963cb583",
|
|
47
|
+
"@blocklet/resolver": "1.16.14-beta-963cb583",
|
|
48
|
+
"@blocklet/sdk": "1.16.14-beta-963cb583",
|
|
49
49
|
"@did-space/client": "^0.2.141",
|
|
50
50
|
"@fidm/x509": "^1.2.1",
|
|
51
|
-
"@ocap/mcrypto": "1.18.
|
|
52
|
-
"@ocap/util": "1.18.
|
|
53
|
-
"@ocap/wallet": "1.18.
|
|
51
|
+
"@ocap/mcrypto": "1.18.89",
|
|
52
|
+
"@ocap/util": "1.18.89",
|
|
53
|
+
"@ocap/wallet": "1.18.89",
|
|
54
54
|
"@slack/webhook": "^5.0.4",
|
|
55
55
|
"archiver": "^5.3.1",
|
|
56
56
|
"axios": "^0.27.2",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"jest": "^27.5.1",
|
|
99
99
|
"unzipper": "^0.10.11"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "82bae80cd584a096719d6985740e13f15b4f46bf"
|
|
102
102
|
}
|