Commit b599fa0 1 parent 9246967 commit b599fa0 Copy full SHA for b599fa0
File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 18
18
relations/rel-type-main
19
19
relations/rel-type-slide})
20
20
21
- (s/def :stencil.model/path (s/and string? not-empty #(not (.startsWith ^String % " /" ))))
21
+ (s/def :stencil.model/path (s/and string?
22
+ not-empty
23
+ #(not (.startsWith (str %) " /" ))
24
+ #(not (.endsWith (str %) " /" ))
25
+ #(not (.contains (str %) " .." ))))
22
26
23
27
; ; relationship file
24
28
(s/def ::relations (s/keys :req [:stencil.model/path ]
32
36
(s/def ::style (s/keys :req [:stencil.model/path ]
33
37
:opt-un [::result ]))
34
38
35
- (s/def :stencil.model/headers+footers (s/* (s/keys :req [:stencil.model/path ]
36
- :req-un [::source-file :stencil.model/executable :?/relations ]
37
- :opt-un [::result ])))
39
+ (s/def :stencil.model/headers+footers
40
+ (s/* (s/keys :req [:stencil.model/path ]
41
+ :req-un [::source-file :stencil.model/executable :?/relations ]
42
+ :opt-un [::result ])))
38
43
39
- (s/def ::source-folder (s/and (partial instance? java.io.File)
40
- fs/directory?
41
- fs/exists?))
44
+ (s/def ::source-folder (s/and fs/directory? fs/exists?))
42
45
43
46
(s/def ::source-file (s/and (partial instance? java.io.File)
44
47
(complement fs/directory?)
63
66
64
67
(s/def ::parsed any? )
65
68
66
- (s/def :stencil.model/numbering (s/nilable (s/keys :req [:stencil.model/path ]
67
- :req-un [::source-file ::parsed ])))
69
+ (s/def :stencil.model/numbering
70
+ (s/nilable (s/keys :req [:stencil.model/path ]
71
+ :req-un [::source-file ::parsed ])))
68
72
69
73
(s/fdef stencil.model/load-template-model
70
74
:args (s/cat :dir ::source-folder , :opts map?)
You can’t perform that action at this time.
0 commit comments