File tree 1 file changed +10
-0
lines changed
packages/config-yaml/src/schemas
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,20 @@ export const blockItemWrapperSchema = <T extends z.AnyZodObject>(schema: T) =>
48
48
export const blockOrSchema = < T extends z . AnyZodObject > ( schema : T ) =>
49
49
z . union ( [ schema , blockItemWrapperSchema ( schema ) ] ) ;
50
50
51
+ export const commonMetadataSchema = z . object ( {
52
+ tags : z . string ( ) . optional ( ) ,
53
+ sourceCodeUrl : z . string ( ) . optional ( ) ,
54
+ description : z . string ( ) . optional ( ) ,
55
+ author : z . string ( ) . optional ( ) ,
56
+ license : z . string ( ) . optional ( ) ,
57
+ iconUrl : z . string ( ) . optional ( ) ,
58
+ } ) ;
59
+
51
60
export const baseConfigYamlSchema = z . object ( {
52
61
name : z . string ( ) ,
53
62
version : z . string ( ) ,
54
63
schema : z . string ( ) . optional ( ) ,
64
+ metadata : z . record ( z . string ( ) ) . and ( commonMetadataSchema . partial ( ) ) . optional ( ) ,
55
65
} ) ;
56
66
57
67
export const configYamlSchema = baseConfigYamlSchema . extend ( {
You can’t perform that action at this time.
0 commit comments