@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.
@@ -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) => this.connectedAccount.insert({ ...x, userDid: user.did }))
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) => this.connectedAccount.upsert({ did: x.did }, { ...x, userDid: did }))
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);
@@ -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
- if (isEmpty(x.value)) {
1479
- throw new Error(`${x.key} can not be empty`);
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-c308dc3b",
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-c308dc3b",
23
- "@abtnode/auth": "1.16.14-beta-c308dc3b",
24
- "@abtnode/certificate-manager": "1.16.14-beta-c308dc3b",
25
- "@abtnode/constant": "1.16.14-beta-c308dc3b",
26
- "@abtnode/cron": "1.16.14-beta-c308dc3b",
27
- "@abtnode/logger": "1.16.14-beta-c308dc3b",
28
- "@abtnode/models": "1.16.14-beta-c308dc3b",
29
- "@abtnode/queue": "1.16.14-beta-c308dc3b",
30
- "@abtnode/rbac": "1.16.14-beta-c308dc3b",
31
- "@abtnode/router-provider": "1.16.14-beta-c308dc3b",
32
- "@abtnode/static-server": "1.16.14-beta-c308dc3b",
33
- "@abtnode/timemachine": "1.16.14-beta-c308dc3b",
34
- "@abtnode/util": "1.16.14-beta-c308dc3b",
35
- "@arcblock/did": "1.18.88",
36
- "@arcblock/did-auth": "1.18.88",
37
- "@arcblock/did-ext": "^1.18.88",
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.88",
40
- "@arcblock/event-hub": "1.18.88",
41
- "@arcblock/jwt": "^1.18.88",
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.88",
44
- "@arcblock/vc": "1.18.88",
45
- "@blocklet/constant": "1.16.14-beta-c308dc3b",
46
- "@blocklet/meta": "1.16.14-beta-c308dc3b",
47
- "@blocklet/resolver": "1.16.14-beta-c308dc3b",
48
- "@blocklet/sdk": "1.16.14-beta-c308dc3b",
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.88",
52
- "@ocap/util": "1.18.88",
53
- "@ocap/wallet": "1.18.88",
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": "c08aaac7fb25d0f1c81c8866baf5579714416485"
101
+ "gitHead": "82bae80cd584a096719d6985740e13f15b4f46bf"
102
102
  }