@abtnode/core 1.16.11-next-8a4df821 → 1.16.11-next-ca5f18b5
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.
|
@@ -73,6 +73,7 @@ const {
|
|
|
73
73
|
BLOCKLET_CONTROLLER_STATUS,
|
|
74
74
|
SUSPENDED_REASON,
|
|
75
75
|
} = require('@blocklet/constant');
|
|
76
|
+
const isUndefined = require('lodash/isUndefined');
|
|
76
77
|
const { consumeServerlessNFT, consumeLauncherSession } = require('../../util/launcher');
|
|
77
78
|
const util = require('../../util');
|
|
78
79
|
const {
|
|
@@ -1630,14 +1631,20 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
1630
1631
|
|
|
1631
1632
|
/**
|
|
1632
1633
|
* @description
|
|
1633
|
-
* @param {import('@abtnode/client').RequestAddBlockletSpaceGatewayInput} { did,
|
|
1634
|
+
* @param {import('@abtnode/client').RequestAddBlockletSpaceGatewayInput} { did, spaceGatewayDid }
|
|
1634
1635
|
* @return {Promise<void>}
|
|
1635
1636
|
* @memberof BlockletManager
|
|
1636
1637
|
*/
|
|
1637
|
-
async deleteBlockletSpaceGateway({ did,
|
|
1638
|
+
async deleteBlockletSpaceGateway({ did, spaceGatewayDid }) {
|
|
1638
1639
|
const spaceGateways = await this.getBlockletSpaceGateways({ did });
|
|
1639
1640
|
|
|
1640
|
-
const latestSpaceGateways = spaceGateways.filter((s) =>
|
|
1641
|
+
const latestSpaceGateways = spaceGateways.filter((s) => {
|
|
1642
|
+
if (spaceGatewayDid) {
|
|
1643
|
+
return s?.did !== spaceGatewayDid;
|
|
1644
|
+
}
|
|
1645
|
+
// note: 兼容性处理,所有没有 did 的 spaceGateway 统一会被删除
|
|
1646
|
+
return !isUndefined(s?.did);
|
|
1647
|
+
});
|
|
1641
1648
|
|
|
1642
1649
|
await states.blockletExtras.setSettings(did, { spaceGateways: latestSpaceGateways });
|
|
1643
1650
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const { Joi } = require('@arcblock/validator');
|
|
2
2
|
|
|
3
3
|
const validateAddSpaceGateway = Joi.object({
|
|
4
|
+
// 表示 space did
|
|
5
|
+
did: Joi.DID(),
|
|
4
6
|
url: Joi.string()
|
|
5
7
|
.uri({ scheme: ['http', 'https'] })
|
|
6
8
|
.required(),
|
|
@@ -13,6 +15,7 @@ const validateAddSpaceGateway = Joi.object({
|
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
const validateUpdateSpaceGateway = Joi.object({
|
|
18
|
+
did: Joi.DID(),
|
|
16
19
|
url: Joi.string()
|
|
17
20
|
.uri({ scheme: ['http', 'https'] })
|
|
18
21
|
.required(),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.11-next-
|
|
6
|
+
"version": "1.16.11-next-ca5f18b5",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/auth": "1.16.11-next-
|
|
23
|
-
"@abtnode/certificate-manager": "1.16.11-next-
|
|
24
|
-
"@abtnode/constant": "1.16.11-next-
|
|
25
|
-
"@abtnode/cron": "1.16.11-next-
|
|
26
|
-
"@abtnode/logger": "1.16.11-next-
|
|
27
|
-
"@abtnode/models": "1.16.11-next-
|
|
28
|
-
"@abtnode/queue": "1.16.11-next-
|
|
29
|
-
"@abtnode/rbac": "1.16.11-next-
|
|
30
|
-
"@abtnode/router-provider": "1.16.11-next-
|
|
31
|
-
"@abtnode/static-server": "1.16.11-next-
|
|
32
|
-
"@abtnode/timemachine": "1.16.11-next-
|
|
33
|
-
"@abtnode/util": "1.16.11-next-
|
|
22
|
+
"@abtnode/auth": "1.16.11-next-ca5f18b5",
|
|
23
|
+
"@abtnode/certificate-manager": "1.16.11-next-ca5f18b5",
|
|
24
|
+
"@abtnode/constant": "1.16.11-next-ca5f18b5",
|
|
25
|
+
"@abtnode/cron": "1.16.11-next-ca5f18b5",
|
|
26
|
+
"@abtnode/logger": "1.16.11-next-ca5f18b5",
|
|
27
|
+
"@abtnode/models": "1.16.11-next-ca5f18b5",
|
|
28
|
+
"@abtnode/queue": "1.16.11-next-ca5f18b5",
|
|
29
|
+
"@abtnode/rbac": "1.16.11-next-ca5f18b5",
|
|
30
|
+
"@abtnode/router-provider": "1.16.11-next-ca5f18b5",
|
|
31
|
+
"@abtnode/static-server": "1.16.11-next-ca5f18b5",
|
|
32
|
+
"@abtnode/timemachine": "1.16.11-next-ca5f18b5",
|
|
33
|
+
"@abtnode/util": "1.16.11-next-ca5f18b5",
|
|
34
34
|
"@arcblock/did": "1.18.80",
|
|
35
35
|
"@arcblock/did-auth": "1.18.80",
|
|
36
36
|
"@arcblock/did-ext": "^1.18.80",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
42
|
"@arcblock/validator": "^1.18.80",
|
|
43
43
|
"@arcblock/vc": "1.18.80",
|
|
44
|
-
"@blocklet/constant": "1.16.11-next-
|
|
45
|
-
"@blocklet/meta": "1.16.11-next-
|
|
46
|
-
"@blocklet/sdk": "1.16.11-next-
|
|
44
|
+
"@blocklet/constant": "1.16.11-next-ca5f18b5",
|
|
45
|
+
"@blocklet/meta": "1.16.11-next-ca5f18b5",
|
|
46
|
+
"@blocklet/sdk": "1.16.11-next-ca5f18b5",
|
|
47
47
|
"@did-space/client": "^0.2.113",
|
|
48
48
|
"@fidm/x509": "^1.2.1",
|
|
49
49
|
"@ocap/mcrypto": "1.18.80",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"express": "^4.18.2",
|
|
97
97
|
"jest": "^27.5.1"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "d797d0177d585b66d17876c99c994fda4d812f37"
|
|
100
100
|
}
|