@did-space/core 0.1.76 → 0.1.77
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.
|
@@ -18,7 +18,7 @@ exports.SpaceConfigSchema = validator_1.Joi.object({
|
|
|
18
18
|
name: validator_1.Joi.string().required(),
|
|
19
19
|
// @see: https://github.com/sideway/joi/blob/master/API.md#string
|
|
20
20
|
description: validator_1.Joi.string().required().allow('').default(''),
|
|
21
|
-
// 字节数,默认给个1GB
|
|
21
|
+
// 字节数,默认给个1GB, size 为 0 表示空间无限制
|
|
22
22
|
size: validator_1.Joi.number().required().default(xbytes_1.default.parseSize('1GB')),
|
|
23
23
|
assetDid: validator_1.Joi.DID(),
|
|
24
24
|
createAt: validator_1.Joi.string().required(),
|
package/dist/space/index.js
CHANGED
|
@@ -116,6 +116,15 @@ class Space {
|
|
|
116
116
|
.split(',')
|
|
117
117
|
.map((s) => s.trim())
|
|
118
118
|
.filter(Boolean);
|
|
119
|
+
// @see: https://github.com/ArcBlock/did-spaces/issues/269#issuecomment-1430852234
|
|
120
|
+
// 存储空间无限制
|
|
121
|
+
if (totalCapacity === 0) {
|
|
122
|
+
return {
|
|
123
|
+
isFull: false,
|
|
124
|
+
totalCapacity,
|
|
125
|
+
usedCapacity,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
119
128
|
// 跳过白名单
|
|
120
129
|
if (whiteList.length && whiteList.includes(did)) {
|
|
121
130
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-space/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.77",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@arcblock/did": "^1.18.
|
|
36
|
-
"@arcblock/jwt": "^1.18.
|
|
37
|
-
"@arcblock/validator": "^1.18.
|
|
35
|
+
"@arcblock/did": "^1.18.52",
|
|
36
|
+
"@arcblock/jwt": "^1.18.52",
|
|
37
|
+
"@arcblock/validator": "^1.18.52",
|
|
38
38
|
"@aws-sdk/client-s3": "^3.45.0",
|
|
39
39
|
"@aws-sdk/signature-v4-crt": "^3.45.0",
|
|
40
40
|
"@blocklet/meta": "^1.8.65",
|
|
41
|
-
"@ocap/mcrypto": "^1.18.
|
|
42
|
-
"@ocap/wallet": "^1.18.
|
|
41
|
+
"@ocap/mcrypto": "^1.18.52",
|
|
42
|
+
"@ocap/wallet": "^1.18.52",
|
|
43
43
|
"fs-extra": "^10.0.0",
|
|
44
44
|
"joi": "^17.5.0",
|
|
45
45
|
"js-yaml": "^4.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"ts-jest": "^28.0.6",
|
|
62
62
|
"typescript": "^4.9.5"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "5861be6b4892bc12b215ba3930a490b37f6abcd4"
|
|
65
65
|
}
|