@djvlc/contracts-schemas 1.5.4 → 1.6.0
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/dist/index.d.mts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.js +20 -9
- package/dist/index.mjs +20 -9
- package/dist/schemas/component-register.json +3 -3
- package/dist/schemas/manifest.json +15 -4
- package/dist/schemas/page-schema.json +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -588,7 +588,7 @@ declare const pageSchema: {
|
|
|
588
588
|
};
|
|
589
589
|
componentType: {
|
|
590
590
|
type: string;
|
|
591
|
-
|
|
591
|
+
pattern: string;
|
|
592
592
|
description: string;
|
|
593
593
|
};
|
|
594
594
|
componentVersion: {
|
|
@@ -3247,6 +3247,11 @@ declare const manifestSchema: {
|
|
|
3247
3247
|
pattern: string;
|
|
3248
3248
|
description: string;
|
|
3249
3249
|
};
|
|
3250
|
+
source: {
|
|
3251
|
+
type: string;
|
|
3252
|
+
enum: string[];
|
|
3253
|
+
description: string;
|
|
3254
|
+
};
|
|
3250
3255
|
entry: {
|
|
3251
3256
|
type: string;
|
|
3252
3257
|
format: string;
|
|
@@ -3291,6 +3296,16 @@ declare const manifestSchema: {
|
|
|
3291
3296
|
description: string;
|
|
3292
3297
|
};
|
|
3293
3298
|
};
|
|
3299
|
+
if: {
|
|
3300
|
+
properties: {
|
|
3301
|
+
source: {
|
|
3302
|
+
const: string;
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
};
|
|
3306
|
+
then: {
|
|
3307
|
+
required: string[];
|
|
3308
|
+
};
|
|
3294
3309
|
};
|
|
3295
3310
|
RuntimeVersionRequirement: {
|
|
3296
3311
|
type: string;
|
|
@@ -4970,7 +4985,7 @@ declare const schemas: {
|
|
|
4970
4985
|
};
|
|
4971
4986
|
componentType: {
|
|
4972
4987
|
type: string;
|
|
4973
|
-
|
|
4988
|
+
pattern: string;
|
|
4974
4989
|
description: string;
|
|
4975
4990
|
};
|
|
4976
4991
|
componentVersion: {
|
|
@@ -7620,6 +7635,11 @@ declare const schemas: {
|
|
|
7620
7635
|
pattern: string;
|
|
7621
7636
|
description: string;
|
|
7622
7637
|
};
|
|
7638
|
+
source: {
|
|
7639
|
+
type: string;
|
|
7640
|
+
enum: string[];
|
|
7641
|
+
description: string;
|
|
7642
|
+
};
|
|
7623
7643
|
entry: {
|
|
7624
7644
|
type: string;
|
|
7625
7645
|
format: string;
|
|
@@ -7664,6 +7684,16 @@ declare const schemas: {
|
|
|
7664
7684
|
description: string;
|
|
7665
7685
|
};
|
|
7666
7686
|
};
|
|
7687
|
+
if: {
|
|
7688
|
+
properties: {
|
|
7689
|
+
source: {
|
|
7690
|
+
const: string;
|
|
7691
|
+
};
|
|
7692
|
+
};
|
|
7693
|
+
};
|
|
7694
|
+
then: {
|
|
7695
|
+
required: string[];
|
|
7696
|
+
};
|
|
7667
7697
|
};
|
|
7668
7698
|
RuntimeVersionRequirement: {
|
|
7669
7699
|
type: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -588,7 +588,7 @@ declare const pageSchema: {
|
|
|
588
588
|
};
|
|
589
589
|
componentType: {
|
|
590
590
|
type: string;
|
|
591
|
-
|
|
591
|
+
pattern: string;
|
|
592
592
|
description: string;
|
|
593
593
|
};
|
|
594
594
|
componentVersion: {
|
|
@@ -3247,6 +3247,11 @@ declare const manifestSchema: {
|
|
|
3247
3247
|
pattern: string;
|
|
3248
3248
|
description: string;
|
|
3249
3249
|
};
|
|
3250
|
+
source: {
|
|
3251
|
+
type: string;
|
|
3252
|
+
enum: string[];
|
|
3253
|
+
description: string;
|
|
3254
|
+
};
|
|
3250
3255
|
entry: {
|
|
3251
3256
|
type: string;
|
|
3252
3257
|
format: string;
|
|
@@ -3291,6 +3296,16 @@ declare const manifestSchema: {
|
|
|
3291
3296
|
description: string;
|
|
3292
3297
|
};
|
|
3293
3298
|
};
|
|
3299
|
+
if: {
|
|
3300
|
+
properties: {
|
|
3301
|
+
source: {
|
|
3302
|
+
const: string;
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
};
|
|
3306
|
+
then: {
|
|
3307
|
+
required: string[];
|
|
3308
|
+
};
|
|
3294
3309
|
};
|
|
3295
3310
|
RuntimeVersionRequirement: {
|
|
3296
3311
|
type: string;
|
|
@@ -4970,7 +4985,7 @@ declare const schemas: {
|
|
|
4970
4985
|
};
|
|
4971
4986
|
componentType: {
|
|
4972
4987
|
type: string;
|
|
4973
|
-
|
|
4988
|
+
pattern: string;
|
|
4974
4989
|
description: string;
|
|
4975
4990
|
};
|
|
4976
4991
|
componentVersion: {
|
|
@@ -7620,6 +7635,11 @@ declare const schemas: {
|
|
|
7620
7635
|
pattern: string;
|
|
7621
7636
|
description: string;
|
|
7622
7637
|
};
|
|
7638
|
+
source: {
|
|
7639
|
+
type: string;
|
|
7640
|
+
enum: string[];
|
|
7641
|
+
description: string;
|
|
7642
|
+
};
|
|
7623
7643
|
entry: {
|
|
7624
7644
|
type: string;
|
|
7625
7645
|
format: string;
|
|
@@ -7664,6 +7684,16 @@ declare const schemas: {
|
|
|
7664
7684
|
description: string;
|
|
7665
7685
|
};
|
|
7666
7686
|
};
|
|
7687
|
+
if: {
|
|
7688
|
+
properties: {
|
|
7689
|
+
source: {
|
|
7690
|
+
const: string;
|
|
7691
|
+
};
|
|
7692
|
+
};
|
|
7693
|
+
};
|
|
7694
|
+
then: {
|
|
7695
|
+
required: string[];
|
|
7696
|
+
};
|
|
7667
7697
|
};
|
|
7668
7698
|
RuntimeVersionRequirement: {
|
|
7669
7699
|
type: string;
|
package/dist/index.js
CHANGED
|
@@ -527,8 +527,8 @@ var page_schema_default = {
|
|
|
527
527
|
},
|
|
528
528
|
componentType: {
|
|
529
529
|
type: "string",
|
|
530
|
-
|
|
531
|
-
description: "\u7EC4\u4EF6\
|
|
530
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
531
|
+
description: "\u7EC4\u4EF6\u6807\u7B7E\u540D\uFF08Custom Element \u683C\u5F0F\uFF0C\u5982 djvlc-button\uFF09"
|
|
532
532
|
},
|
|
533
533
|
componentVersion: {
|
|
534
534
|
type: "string",
|
|
@@ -2884,9 +2884,9 @@ var component_register_default = {
|
|
|
2884
2884
|
properties: {
|
|
2885
2885
|
name: {
|
|
2886
2886
|
type: "string",
|
|
2887
|
-
pattern: "
|
|
2888
|
-
description: "\u7EC4\u4EF6\u540D\u79F0\
|
|
2889
|
-
examples: ["
|
|
2887
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
2888
|
+
description: "\u7EC4\u4EF6\u540D\u79F0\uFF08Custom Element \u6807\u7B7E\u540D\u683C\u5F0F\uFF0C\u5168\u94FE\u8DEF\u7EDF\u4E00\u6807\u8BC6\uFF09",
|
|
2889
|
+
examples: ["djvlc-button", "djvlc-card"]
|
|
2890
2890
|
},
|
|
2891
2891
|
version: {
|
|
2892
2892
|
type: "string",
|
|
@@ -3102,7 +3102,7 @@ var manifest_default = {
|
|
|
3102
3102
|
ManifestItem: {
|
|
3103
3103
|
type: "object",
|
|
3104
3104
|
additionalProperties: false,
|
|
3105
|
-
required: ["componentId", "name", "version", "
|
|
3105
|
+
required: ["componentId", "name", "version", "source", "integrity"],
|
|
3106
3106
|
properties: {
|
|
3107
3107
|
componentId: {
|
|
3108
3108
|
type: "string",
|
|
@@ -3110,18 +3110,23 @@ var manifest_default = {
|
|
|
3110
3110
|
},
|
|
3111
3111
|
name: {
|
|
3112
3112
|
type: "string",
|
|
3113
|
-
pattern: "
|
|
3114
|
-
description: "\u7EC4\u4EF6\u540D\
|
|
3113
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
3114
|
+
description: "\u7EC4\u4EF6\u6807\u7B7E\u540D\uFF08Custom Element \u683C\u5F0F\uFF0C\u5982 djvlc-button\uFF09"
|
|
3115
3115
|
},
|
|
3116
3116
|
version: {
|
|
3117
3117
|
type: "string",
|
|
3118
3118
|
pattern: "^\\d+\\.\\d+\\.\\d+$",
|
|
3119
3119
|
description: "\u7248\u672C\u53F7\uFF08SemVer\uFF09"
|
|
3120
3120
|
},
|
|
3121
|
+
source: {
|
|
3122
|
+
type: "string",
|
|
3123
|
+
enum: ["bundled", "remote"],
|
|
3124
|
+
description: "\u7EC4\u4EF6\u6765\u6E90\uFF1Abundled = \u5185\u7F6E\u7EC4\u4EF6\uFF08\u968F Runtime \u6253\u5305\uFF09\uFF0Cremote = \u8FDC\u7A0B\u7EC4\u4EF6\uFF08\u4ECE CDN \u52A0\u8F7D\uFF09"
|
|
3125
|
+
},
|
|
3121
3126
|
entry: {
|
|
3122
3127
|
type: "string",
|
|
3123
3128
|
format: "uri-reference",
|
|
3124
|
-
description: "\u5165\u53E3\u6587\u4EF6 URL"
|
|
3129
|
+
description: "\u5165\u53E3\u6587\u4EF6 URL\uFF08source \u4E3A remote \u65F6\u5FC5\u586B\uFF0Cbundled \u65F6\u53EF\u7701\u7565\uFF09"
|
|
3125
3130
|
},
|
|
3126
3131
|
styleEntry: {
|
|
3127
3132
|
type: "string",
|
|
@@ -3159,6 +3164,12 @@ var manifest_default = {
|
|
|
3159
3164
|
pattern: "^\\d+\\.\\d+\\.\\d+$",
|
|
3160
3165
|
description: "\u517C\u5BB9\u7684\u6700\u4F4E Runtime \u7248\u672C"
|
|
3161
3166
|
}
|
|
3167
|
+
},
|
|
3168
|
+
if: {
|
|
3169
|
+
properties: { source: { const: "remote" } }
|
|
3170
|
+
},
|
|
3171
|
+
then: {
|
|
3172
|
+
required: ["entry"]
|
|
3162
3173
|
}
|
|
3163
3174
|
},
|
|
3164
3175
|
RuntimeVersionRequirement: {
|
package/dist/index.mjs
CHANGED
|
@@ -525,8 +525,8 @@ var page_schema_default = {
|
|
|
525
525
|
},
|
|
526
526
|
componentType: {
|
|
527
527
|
type: "string",
|
|
528
|
-
|
|
529
|
-
description: "\u7EC4\u4EF6\
|
|
528
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
529
|
+
description: "\u7EC4\u4EF6\u6807\u7B7E\u540D\uFF08Custom Element \u683C\u5F0F\uFF0C\u5982 djvlc-button\uFF09"
|
|
530
530
|
},
|
|
531
531
|
componentVersion: {
|
|
532
532
|
type: "string",
|
|
@@ -2882,9 +2882,9 @@ var component_register_default = {
|
|
|
2882
2882
|
properties: {
|
|
2883
2883
|
name: {
|
|
2884
2884
|
type: "string",
|
|
2885
|
-
pattern: "
|
|
2886
|
-
description: "\u7EC4\u4EF6\u540D\u79F0\
|
|
2887
|
-
examples: ["
|
|
2885
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
2886
|
+
description: "\u7EC4\u4EF6\u540D\u79F0\uFF08Custom Element \u6807\u7B7E\u540D\u683C\u5F0F\uFF0C\u5168\u94FE\u8DEF\u7EDF\u4E00\u6807\u8BC6\uFF09",
|
|
2887
|
+
examples: ["djvlc-button", "djvlc-card"]
|
|
2888
2888
|
},
|
|
2889
2889
|
version: {
|
|
2890
2890
|
type: "string",
|
|
@@ -3100,7 +3100,7 @@ var manifest_default = {
|
|
|
3100
3100
|
ManifestItem: {
|
|
3101
3101
|
type: "object",
|
|
3102
3102
|
additionalProperties: false,
|
|
3103
|
-
required: ["componentId", "name", "version", "
|
|
3103
|
+
required: ["componentId", "name", "version", "source", "integrity"],
|
|
3104
3104
|
properties: {
|
|
3105
3105
|
componentId: {
|
|
3106
3106
|
type: "string",
|
|
@@ -3108,18 +3108,23 @@ var manifest_default = {
|
|
|
3108
3108
|
},
|
|
3109
3109
|
name: {
|
|
3110
3110
|
type: "string",
|
|
3111
|
-
pattern: "
|
|
3112
|
-
description: "\u7EC4\u4EF6\u540D\
|
|
3111
|
+
pattern: "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
3112
|
+
description: "\u7EC4\u4EF6\u6807\u7B7E\u540D\uFF08Custom Element \u683C\u5F0F\uFF0C\u5982 djvlc-button\uFF09"
|
|
3113
3113
|
},
|
|
3114
3114
|
version: {
|
|
3115
3115
|
type: "string",
|
|
3116
3116
|
pattern: "^\\d+\\.\\d+\\.\\d+$",
|
|
3117
3117
|
description: "\u7248\u672C\u53F7\uFF08SemVer\uFF09"
|
|
3118
3118
|
},
|
|
3119
|
+
source: {
|
|
3120
|
+
type: "string",
|
|
3121
|
+
enum: ["bundled", "remote"],
|
|
3122
|
+
description: "\u7EC4\u4EF6\u6765\u6E90\uFF1Abundled = \u5185\u7F6E\u7EC4\u4EF6\uFF08\u968F Runtime \u6253\u5305\uFF09\uFF0Cremote = \u8FDC\u7A0B\u7EC4\u4EF6\uFF08\u4ECE CDN \u52A0\u8F7D\uFF09"
|
|
3123
|
+
},
|
|
3119
3124
|
entry: {
|
|
3120
3125
|
type: "string",
|
|
3121
3126
|
format: "uri-reference",
|
|
3122
|
-
description: "\u5165\u53E3\u6587\u4EF6 URL"
|
|
3127
|
+
description: "\u5165\u53E3\u6587\u4EF6 URL\uFF08source \u4E3A remote \u65F6\u5FC5\u586B\uFF0Cbundled \u65F6\u53EF\u7701\u7565\uFF09"
|
|
3123
3128
|
},
|
|
3124
3129
|
styleEntry: {
|
|
3125
3130
|
type: "string",
|
|
@@ -3157,6 +3162,12 @@ var manifest_default = {
|
|
|
3157
3162
|
pattern: "^\\d+\\.\\d+\\.\\d+$",
|
|
3158
3163
|
description: "\u517C\u5BB9\u7684\u6700\u4F4E Runtime \u7248\u672C"
|
|
3159
3164
|
}
|
|
3165
|
+
},
|
|
3166
|
+
if: {
|
|
3167
|
+
properties: { source: { const: "remote" } }
|
|
3168
|
+
},
|
|
3169
|
+
then: {
|
|
3170
|
+
required: ["entry"]
|
|
3160
3171
|
}
|
|
3161
3172
|
},
|
|
3162
3173
|
RuntimeVersionRequirement: {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"properties": {
|
|
10
10
|
"name": {
|
|
11
11
|
"type": "string",
|
|
12
|
-
"pattern": "
|
|
13
|
-
"description": "组件名称(
|
|
14
|
-
"examples": ["
|
|
12
|
+
"pattern": "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
13
|
+
"description": "组件名称(Custom Element 标签名格式,全链路统一标识)",
|
|
14
|
+
"examples": ["djvlc-button", "djvlc-card"]
|
|
15
15
|
},
|
|
16
16
|
"version": {
|
|
17
17
|
"type": "string",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"ManifestItem": {
|
|
75
75
|
"type": "object",
|
|
76
76
|
"additionalProperties": false,
|
|
77
|
-
"required": ["componentId", "name", "version", "
|
|
77
|
+
"required": ["componentId", "name", "version", "source", "integrity"],
|
|
78
78
|
"properties": {
|
|
79
79
|
"componentId": {
|
|
80
80
|
"type": "string",
|
|
@@ -82,18 +82,23 @@
|
|
|
82
82
|
},
|
|
83
83
|
"name": {
|
|
84
84
|
"type": "string",
|
|
85
|
-
"pattern": "
|
|
86
|
-
"description": "
|
|
85
|
+
"pattern": "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
86
|
+
"description": "组件标签名(Custom Element 格式,如 djvlc-button)"
|
|
87
87
|
},
|
|
88
88
|
"version": {
|
|
89
89
|
"type": "string",
|
|
90
90
|
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
91
91
|
"description": "版本号(SemVer)"
|
|
92
92
|
},
|
|
93
|
+
"source": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": ["bundled", "remote"],
|
|
96
|
+
"description": "组件来源:bundled = 内置组件(随 Runtime 打包),remote = 远程组件(从 CDN 加载)"
|
|
97
|
+
},
|
|
93
98
|
"entry": {
|
|
94
99
|
"type": "string",
|
|
95
100
|
"format": "uri-reference",
|
|
96
|
-
"description": "入口文件 URL"
|
|
101
|
+
"description": "入口文件 URL(source 为 remote 时必填,bundled 时可省略)"
|
|
97
102
|
},
|
|
98
103
|
"styleEntry": {
|
|
99
104
|
"type": "string",
|
|
@@ -131,6 +136,12 @@
|
|
|
131
136
|
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
132
137
|
"description": "兼容的最低 Runtime 版本"
|
|
133
138
|
}
|
|
139
|
+
},
|
|
140
|
+
"if": {
|
|
141
|
+
"properties": { "source": { "const": "remote" } }
|
|
142
|
+
},
|
|
143
|
+
"then": {
|
|
144
|
+
"required": ["entry"]
|
|
134
145
|
}
|
|
135
146
|
},
|
|
136
147
|
"RuntimeVersionRequirement": {
|
|
@@ -545,8 +545,8 @@
|
|
|
545
545
|
},
|
|
546
546
|
"componentType": {
|
|
547
547
|
"type": "string",
|
|
548
|
-
"
|
|
549
|
-
"description": "
|
|
548
|
+
"pattern": "^[a-z][a-z0-9]*-[a-z0-9-]+$",
|
|
549
|
+
"description": "组件标签名(Custom Element 格式,如 djvlc-button)"
|
|
550
550
|
},
|
|
551
551
|
"componentVersion": {
|
|
552
552
|
"type": "string",
|