@arcblock/validator 1.17.12 → 1.17.15
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/index.js +8 -8
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -36,11 +36,11 @@ const foreignToken = exports.Joi.object({
|
|
|
36
36
|
const nftDisplay = exports.Joi.object({
|
|
37
37
|
type: exports.Joi.string().valid('svg', 'url', 'uri').required(),
|
|
38
38
|
content: exports.Joi.string()
|
|
39
|
-
.when('type', { is: 'uri', then: exports.Joi.string().dataUri().required() })
|
|
40
|
-
.when('type', { is: 'url', then: exports.Joi.string().uri({ scheme: ['http', 'https'] }).required() }), // prettier-ignore
|
|
39
|
+
.when('type', { is: 'uri', then: exports.Joi.string().max(20480).dataUri().required() }) // 20kb
|
|
40
|
+
.when('type', { is: 'url', then: exports.Joi.string().max(2048).uri({ scheme: ['http', 'https'] }).required() }), // prettier-ignore
|
|
41
41
|
});
|
|
42
42
|
const nftEndpoint = exports.Joi.object({
|
|
43
|
-
id: exports.Joi.string().uri({ scheme: ['http', 'https'] }).required(),
|
|
43
|
+
id: exports.Joi.string().max(2048).uri({ scheme: ['http', 'https'] }).required(),
|
|
44
44
|
scope: exports.Joi.string().valid('public', 'private').default('public'),
|
|
45
45
|
});
|
|
46
46
|
const assetProps = {
|
|
@@ -71,8 +71,8 @@ const factoryProps = {
|
|
|
71
71
|
assets: exports.Joi.array().items(exports.Joi.DID()).max(8).optional(),
|
|
72
72
|
variables: exports.Joi.array()
|
|
73
73
|
.items(exports.Joi.object({
|
|
74
|
-
name: exports.Joi.string().required(),
|
|
75
|
-
description: exports.Joi.string().
|
|
74
|
+
name: exports.Joi.string().min(1).max(255).required(),
|
|
75
|
+
description: exports.Joi.string().max(255).optional().allow(''),
|
|
76
76
|
required: exports.Joi.boolean().required(),
|
|
77
77
|
}))
|
|
78
78
|
.optional(),
|
|
@@ -83,8 +83,8 @@ const factoryProps = {
|
|
|
83
83
|
readonly: exports.Joi.boolean().default(false),
|
|
84
84
|
transferrable: exports.Joi.boolean().default(false),
|
|
85
85
|
ttl: exports.Joi.number().min(0).default(0),
|
|
86
|
-
parent: exports.Joi.string().required(),
|
|
87
|
-
issuer: exports.Joi.string().required(),
|
|
86
|
+
parent: exports.Joi.string().max(255).required(),
|
|
87
|
+
issuer: exports.Joi.string().max(255).required(),
|
|
88
88
|
endpoint: nftEndpoint.optional(),
|
|
89
89
|
display: nftDisplay.optional(),
|
|
90
90
|
tags: exports.Joi.array().items(exports.Joi.string().min(1).max(36)).max(4).optional(),
|
|
@@ -93,7 +93,7 @@ const factoryProps = {
|
|
|
93
93
|
.items(exports.Joi.object({
|
|
94
94
|
name: exports.Joi.string().valid('mint', 'postMint').required(),
|
|
95
95
|
type: exports.Joi.string().valid('url', 'contract').required(),
|
|
96
|
-
hook: exports.Joi.string().min(1).required(),
|
|
96
|
+
hook: exports.Joi.string().min(1).max(4096).required(),
|
|
97
97
|
compiled: exports.Joi.array().items(exports.Joi.object()).optional(),
|
|
98
98
|
}))
|
|
99
99
|
.optional(),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.
|
|
6
|
+
"version": "1.17.15",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"typings": "lib/index.d.ts",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"build": "tsc"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@arcblock/did": "1.17.
|
|
25
|
-
"@ocap/mcrypto": "1.17.
|
|
26
|
-
"@ocap/util": "1.17.
|
|
24
|
+
"@arcblock/did": "1.17.15",
|
|
25
|
+
"@ocap/mcrypto": "1.17.15",
|
|
26
|
+
"@ocap/util": "1.17.15",
|
|
27
27
|
"bn.js": "5.2.1",
|
|
28
28
|
"joi": "^17.6.0",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"keywords": [],
|
|
43
43
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
44
44
|
"license": "MIT",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "f2684cde2accb71a1c46144cd77090d099e3e551"
|
|
46
46
|
}
|