@@ -2,38 +2,44 @@ import { z } from "zod";
22
33export const TargetModeSchema = z . enum ( [ "symlink" , "copy" ] ) ;
44export const CacheModeSchema = z . enum ( [ "materialize" ] ) ;
5- export const IntegritySchema = z . object ( {
6- type : z . enum ( [ "commit" , "manifest" ] ) ,
7- value : z . string ( ) . nullable ( ) ,
8- } ) ;
5+ export const IntegritySchema = z
6+ . object ( {
7+ type : z . enum ( [ "commit" , "manifest" ] ) ,
8+ value : z . string ( ) . nullable ( ) ,
9+ } )
10+ . strict ( ) ;
911
10- export const DefaultsSchema = z . object ( {
11- ref : z . string ( ) . min ( 1 ) ,
12- mode : CacheModeSchema ,
13- include : z . array ( z . string ( ) . min ( 1 ) ) . min ( 1 ) ,
14- targetMode : TargetModeSchema . optional ( ) ,
15- depth : z . number ( ) . min ( 1 ) ,
16- required : z . boolean ( ) ,
17- maxBytes : z . number ( ) . min ( 1 ) ,
18- maxFiles : z . number ( ) . min ( 1 ) . optional ( ) ,
19- allowHosts : z . array ( z . string ( ) . min ( 1 ) ) . min ( 1 ) ,
20- } ) ;
12+ export const DefaultsSchema = z
13+ . object ( {
14+ ref : z . string ( ) . min ( 1 ) ,
15+ mode : CacheModeSchema ,
16+ include : z . array ( z . string ( ) . min ( 1 ) ) . min ( 1 ) ,
17+ targetMode : TargetModeSchema . optional ( ) ,
18+ depth : z . number ( ) . min ( 1 ) ,
19+ required : z . boolean ( ) ,
20+ maxBytes : z . number ( ) . min ( 1 ) ,
21+ maxFiles : z . number ( ) . min ( 1 ) . optional ( ) ,
22+ allowHosts : z . array ( z . string ( ) . min ( 1 ) ) . min ( 1 ) ,
23+ } )
24+ . strict ( ) ;
2125
22- export const SourceSchema = z . object ( {
23- id : z . string ( ) . min ( 1 ) ,
24- repo : z . string ( ) . min ( 1 ) ,
25- targetDir : z . string ( ) . min ( 1 ) . optional ( ) ,
26- targetMode : TargetModeSchema . optional ( ) ,
27- ref : z . string ( ) . min ( 1 ) . optional ( ) ,
28- mode : CacheModeSchema . optional ( ) ,
29- depth : z . number ( ) . min ( 1 ) . optional ( ) ,
30- include : z . array ( z . string ( ) . min ( 1 ) ) . optional ( ) ,
31- exclude : z . array ( z . string ( ) . min ( 1 ) ) . optional ( ) ,
32- required : z . boolean ( ) . optional ( ) ,
33- maxBytes : z . number ( ) . min ( 1 ) . optional ( ) ,
34- maxFiles : z . number ( ) . min ( 1 ) . optional ( ) ,
35- integrity : IntegritySchema . optional ( ) ,
36- } ) ;
26+ export const SourceSchema = z
27+ . object ( {
28+ id : z . string ( ) . min ( 1 ) ,
29+ repo : z . string ( ) . min ( 1 ) ,
30+ targetDir : z . string ( ) . min ( 1 ) . optional ( ) ,
31+ targetMode : TargetModeSchema . optional ( ) ,
32+ ref : z . string ( ) . min ( 1 ) . optional ( ) ,
33+ mode : CacheModeSchema . optional ( ) ,
34+ depth : z . number ( ) . min ( 1 ) . optional ( ) ,
35+ include : z . array ( z . string ( ) . min ( 1 ) ) . optional ( ) ,
36+ exclude : z . array ( z . string ( ) . min ( 1 ) ) . optional ( ) ,
37+ required : z . boolean ( ) . optional ( ) ,
38+ maxBytes : z . number ( ) . min ( 1 ) . optional ( ) ,
39+ maxFiles : z . number ( ) . min ( 1 ) . optional ( ) ,
40+ integrity : IntegritySchema . optional ( ) ,
41+ } )
42+ . strict ( ) ;
3743
3844export const ConfigSchema = z
3945 . object ( {
0 commit comments