-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatchconfig-schema.json
106 lines (106 loc) · 4 KB
/
patchconfig-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Config",
"description": "Configuration for silpatcher tool",
"type": "object",
"properties": {
"num_threads": {
"description": "Number of running threads",
"type": "integer",
"minimum": 1
},
"root": {
"description": "Project root folder",
"type": "string"
},
"out_dir": {
"description": "Ouput folder of patched files",
"type": "string"
},
"global_includes": {
"description": "Glob patterns of globally included files",
"type": "array",
"items": {
"type": "string"
}
},
"global_excludes": {
"description": "Glob patterns of globally excluded files",
"type": "array",
"items": {
"type": "string"
}
},
"patches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of the patch rule (not required)",
"type": "string"
},
"description": {
"description": "Detail of the patch",
"type": "string"
},
"includes": {
"description": "Glob patterns of included files which only applied in this patch rule",
"type": "array",
"items": {
"type": "string"
}
},
"excludes": {
"description": "Glob patterns of excluded files which only applied in this patch rule",
"type": "array",
"items": {
"type": "string"
}
},
"preprocessor": {
"description": "Preprocessor plugin to use before find and replace. For now, only INNER_REMOVER(prefix, openChar, closeChar) is supported, it will remove everything between openChar and closeChar followed a prefix",
"enum": ["NONE", "INNER_REMOVER"]
},
"preprocessor_params": {
"description": "Paramters passed to predecessor",
"type": "array",
"items": {
"type": "string"
}
},
"regex": {
"description": "Whether regular expression is used",
"type": "boolean"
},
"replace_first": {
"description": "Replace only the first occurrence",
"type": "boolean"
},
"find": {
"description": "Pattern to search for",
"type": "string"
},
"replace": {
"description": "Pattern to replace with",
"type": "string"
},
"insert_top": {
"description": "Additional text to insert to the top of the file in case the patch is applied",
"type": "string"
},
"insert_bottom": {
"description": "Additional text to insert to the bottom of the file in case the patch is applied",
"type": "string"
}
},
"required": [
"find",
"replace"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
}