@blocklet/meta 1.16.30-beta-2876881d → 1.16.30-beta-cd65989e
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/schema.d.ts +5 -1
- package/lib/schema.js +17 -1
- package/lib/types/schema.d.ts +2 -0
- package/package.json +13 -13
package/lib/schema.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ declare const Joi: Root & {
|
|
|
4
4
|
};
|
|
5
5
|
declare const titleSchema: JOI.StringSchema<string>;
|
|
6
6
|
declare const descriptionSchema: JOI.StringSchema<string>;
|
|
7
|
+
declare const installBlockletTitleSchema: JOI.StringSchema<string>;
|
|
8
|
+
declare const installBlockletDescriptionSchema: JOI.StringSchema<string>;
|
|
7
9
|
declare const logoSchema: JOI.StringSchema<string>;
|
|
8
10
|
declare const mountPointSchema: JOI.StringSchema<string>;
|
|
9
11
|
declare const updateMountPointSchema: JOI.StringSchema<string>;
|
|
@@ -34,7 +36,7 @@ declare const createBlockletSchema: (baseDir: string, { ensureFiles, ensureDist,
|
|
|
34
36
|
ensureName?: boolean;
|
|
35
37
|
skipValidateDidName?: boolean;
|
|
36
38
|
}) => JOI.ObjectSchema;
|
|
37
|
-
export { blockletMetaSchema, blockletNameSchema, componentSchema, createBlockletSchema, descriptionSchema, distSchema, endpointSchema, engineSchema, environmentSchema, environmentNameSchema, interfaceSchema, logoSchema, mountPointSchema, updateMountPointSchema, navigationItemSchema, navigationSchema, personSchema, scriptsSchema, serviceSchema, signatureSchema, themeSchema, titleSchema, statsSchema, cacheableSchema, authConfigSchema, resourceBundleSchema, Joi, };
|
|
39
|
+
export { blockletMetaSchema, blockletNameSchema, componentSchema, createBlockletSchema, descriptionSchema, distSchema, endpointSchema, engineSchema, environmentSchema, environmentNameSchema, interfaceSchema, logoSchema, mountPointSchema, updateMountPointSchema, navigationItemSchema, navigationSchema, personSchema, scriptsSchema, serviceSchema, signatureSchema, themeSchema, titleSchema, statsSchema, cacheableSchema, authConfigSchema, resourceBundleSchema, installBlockletTitleSchema, installBlockletDescriptionSchema, Joi, };
|
|
38
40
|
declare const _default: {
|
|
39
41
|
blockletNameSchema: JOI.StringSchema<string>;
|
|
40
42
|
componentSchema: JOI.ObjectSchema<any>;
|
|
@@ -62,6 +64,8 @@ declare const _default: {
|
|
|
62
64
|
updateMountPointSchema: JOI.StringSchema<string>;
|
|
63
65
|
authConfigSchema: JOI.ObjectSchema<any>;
|
|
64
66
|
resourceBundleSchema: JOI.ObjectSchema<any>;
|
|
67
|
+
installBlockletTitleSchema: JOI.StringSchema<string>;
|
|
68
|
+
installBlockletDescriptionSchema: JOI.StringSchema<string>;
|
|
65
69
|
Joi: JOI.Root & {
|
|
66
70
|
[key: string]: Function;
|
|
67
71
|
};
|
package/lib/schema.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Joi = exports.resourceBundleSchema = exports.authConfigSchema = exports.cacheableSchema = exports.statsSchema = exports.titleSchema = exports.themeSchema = exports.signatureSchema = exports.serviceSchema = exports.scriptsSchema = exports.personSchema = exports.navigationSchema = exports.navigationItemSchema = exports.updateMountPointSchema = exports.mountPointSchema = exports.logoSchema = exports.interfaceSchema = exports.environmentNameSchema = exports.environmentSchema = exports.engineSchema = exports.endpointSchema = exports.distSchema = exports.descriptionSchema = exports.createBlockletSchema = exports.componentSchema = exports.blockletNameSchema = exports.blockletMetaSchema = void 0;
|
|
29
|
+
exports.Joi = exports.installBlockletDescriptionSchema = exports.installBlockletTitleSchema = exports.resourceBundleSchema = exports.authConfigSchema = exports.cacheableSchema = exports.statsSchema = exports.titleSchema = exports.themeSchema = exports.signatureSchema = exports.serviceSchema = exports.scriptsSchema = exports.personSchema = exports.navigationSchema = exports.navigationItemSchema = exports.updateMountPointSchema = exports.mountPointSchema = exports.logoSchema = exports.interfaceSchema = exports.environmentNameSchema = exports.environmentSchema = exports.engineSchema = exports.endpointSchema = exports.distSchema = exports.descriptionSchema = exports.createBlockletSchema = exports.componentSchema = exports.blockletNameSchema = exports.blockletMetaSchema = void 0;
|
|
30
30
|
const fs_1 = __importDefault(require("fs"));
|
|
31
31
|
const joi_1 = __importDefault(require("joi"));
|
|
32
32
|
const cjk_length_1 = __importDefault(require("cjk-length"));
|
|
@@ -88,6 +88,20 @@ const titleSchema = Joi.string()
|
|
|
88
88
|
exports.titleSchema = titleSchema;
|
|
89
89
|
const descriptionSchema = Joi.string().trim().min(3).max(160).meta({ className: 'TDescription' });
|
|
90
90
|
exports.descriptionSchema = descriptionSchema;
|
|
91
|
+
const installBlockletTitleSchema = Joi.string()
|
|
92
|
+
.trim()
|
|
93
|
+
.min(3)
|
|
94
|
+
.max(20)
|
|
95
|
+
.messages({ '*': 'Title length must be between 3 and 20 characters' })
|
|
96
|
+
.meta({ className: 'TInstallBlockletTitle' });
|
|
97
|
+
exports.installBlockletTitleSchema = installBlockletTitleSchema;
|
|
98
|
+
const installBlockletDescriptionSchema = Joi.string()
|
|
99
|
+
.trim()
|
|
100
|
+
.min(3)
|
|
101
|
+
.max(80)
|
|
102
|
+
.messages({ '*': 'Description length must be between 3 and 80 characters' })
|
|
103
|
+
.meta({ className: 'TInstallBlockletDescription' });
|
|
104
|
+
exports.installBlockletDescriptionSchema = installBlockletDescriptionSchema;
|
|
91
105
|
const logoSchema = Joi.string()
|
|
92
106
|
.uri({ scheme: ['http', 'https'], allowRelative: true })
|
|
93
107
|
.allow('')
|
|
@@ -753,5 +767,7 @@ exports.default = {
|
|
|
753
767
|
updateMountPointSchema,
|
|
754
768
|
authConfigSchema,
|
|
755
769
|
resourceBundleSchema,
|
|
770
|
+
installBlockletTitleSchema,
|
|
771
|
+
installBlockletDescriptionSchema,
|
|
756
772
|
Joi,
|
|
757
773
|
};
|
package/lib/types/schema.d.ts
CHANGED
|
@@ -178,6 +178,8 @@ export interface TEnvironment {
|
|
|
178
178
|
validation?: string;
|
|
179
179
|
}
|
|
180
180
|
export type TEnvironmentName = string;
|
|
181
|
+
export type TInstallBlockletDescription = string;
|
|
182
|
+
export type TInstallBlockletTitle = string;
|
|
181
183
|
export interface TInterface {
|
|
182
184
|
cacheable?: TPathPrefix[];
|
|
183
185
|
endpoints?: TEndpoint[];
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.30-beta-
|
|
6
|
+
"version": "1.16.30-beta-cd65989e",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@abtnode/constant": "1.16.30-beta-
|
|
29
|
-
"@arcblock/did": "1.18.
|
|
30
|
-
"@arcblock/did-ext": "1.18.
|
|
31
|
-
"@arcblock/did-util": "1.18.
|
|
32
|
-
"@arcblock/jwt": "1.18.
|
|
33
|
-
"@blocklet/constant": "1.16.30-beta-
|
|
34
|
-
"@ocap/asset": "1.18.
|
|
35
|
-
"@ocap/mcrypto": "1.18.
|
|
36
|
-
"@ocap/types": "1.18.
|
|
37
|
-
"@ocap/util": "1.18.
|
|
38
|
-
"@ocap/wallet": "1.18.
|
|
28
|
+
"@abtnode/constant": "1.16.30-beta-cd65989e",
|
|
29
|
+
"@arcblock/did": "1.18.131",
|
|
30
|
+
"@arcblock/did-ext": "1.18.131",
|
|
31
|
+
"@arcblock/did-util": "1.18.131",
|
|
32
|
+
"@arcblock/jwt": "1.18.131",
|
|
33
|
+
"@blocklet/constant": "1.16.30-beta-cd65989e",
|
|
34
|
+
"@ocap/asset": "1.18.131",
|
|
35
|
+
"@ocap/mcrypto": "1.18.131",
|
|
36
|
+
"@ocap/types": "1.18.131",
|
|
37
|
+
"@ocap/util": "1.18.131",
|
|
38
|
+
"@ocap/wallet": "1.18.131",
|
|
39
39
|
"ajv": "^8.11.0",
|
|
40
40
|
"axios": "^1.7.2",
|
|
41
41
|
"cjk-length": "^1.0.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.0.4"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "8646768b8ac83cdb8c213ab17fe8030f3d5dc6fc"
|
|
83
83
|
}
|