-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
elm.schema.json
256 lines (256 loc) · 6.69 KB
/
elm.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON schema for elm.json configuration files",
"definitions": {
"exactDependency": {
"description": "Dependencies are specified by [author name]/[package name]: [exact version].",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"rangeDependency": {
"description": "Dependencies are specified by [author name]/[package name]: [exact version or range]. Range versions look like: [1.0.0 <= v < 2.0.0].",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"packageSpecificProperties": {
"type": "object",
"properties": {
"name": {
"description": "The name of your package.",
"type": "string",
"minLength": 1
},
"license": {
"description": "An OSI approved license for your package.",
"type": "string",
"enum": [
"AFL-1.1",
"AFL-1.2",
"AFL-2.0",
"AFL-2.1",
"AFL-3.0",
"APL-1.0",
"Apache-1.1",
"Apache-2.0",
"APSL-1.0",
"APSL-1.1",
"APSL-1.2",
"APSL-2.0",
"Artistic-1.0",
"Artistic-1.0-Perl",
"Artistic-1.0-cl8",
"Artistic-2.0",
"AAL",
"BSL-1.0",
"BSD-2-Clause",
"BSD-3-Clause",
"0BSD",
"CECILL-2.1",
"CNRI-Python",
"CDDL-1.0",
"CPAL-1.0",
"CPL-1.0",
"CATOSL-1.1",
"CUA-OPL-1.0",
"EPL-1.0",
"ECL-1.0",
"ECL-2.0",
"EFL-1.0",
"EFL-2.0",
"Entessa",
"EUDatagrid",
"EUPL-1.1",
"Fair",
"Frameworx-1.0",
"AGPL-3.0",
"GPL-2.0",
"GPL-3.0",
"LGPL-2.1",
"LGPL-3.0",
"LGPL-2.0",
"HPND",
"IPL-1.0",
"Intel",
"IPA",
"ISC",
"LPPL-1.3c",
"LiLiQ-P-1.1",
"LiLiQ-Rplus-1.1",
"LiLiQ-R-1.1",
"LPL-1.02",
"LPL-1.0",
"MS-PL",
"MS-RL",
"MirOS",
"MIT",
"Motosoto",
"MPL-1.0",
"MPL-1.1",
"MPL-2.0",
"MPL-2.0-no-copyleft-exception",
"Multics",
"NASA-1.3",
"Naumen",
"NGPL",
"Nokia",
"NPOSL-3.0",
"NTP",
"OCLC-2.0",
"OGTSL",
"OSL-1.0",
"OSL-2.0",
"OSL-2.1",
"OSL-3.0",
"OSET-PL-2.1",
"PHP-3.0",
"PostgreSQL",
"Python-2.0",
"QPL-1.0",
"RPSL-1.0",
"RPL-1.1",
"RPL-1.5",
"RSCPL",
"OFL-1.1",
"SimPL-2.0",
"Sleepycat",
"SISSL",
"SPL-1.0",
"Watcom-1.0",
"UPL-1.0",
"NCSA",
"VSL-1.0",
"W3C",
"Xnet",
"Zlib",
"ZPL-2.0"
]
},
"summary": {
"description": "A helpful summary of your package, less than 80 characters",
"type": "string",
"minLength": 1,
"maxLength": 79
},
"version": {
"description": "Your package's version in semantic versioning format.",
"type": "string",
"pattern": "\\d+\\.\\d+\\.\\d+"
},
"elm-version": {
"description": "The version of elm your package is targeting",
"type": "string"
},
"exposed-modules": {
"description": "All modules that your project will make available to end users.",
"type": "object",
"items": {
"type": "string"
}
},
"dependencies": {
"description": "A list of elm dependencies that your package needs for in production.",
"$ref": "#/definitions/rangeDependency"
},
"test-dependencies": {
"description": "A list of elm dependencies that your package uses only for testing.",
"$ref": "#/definitions/rangeDependency"
}
},
"required": [
"name",
"license",
"summary",
"version",
"elm-version",
"exposed-modules",
"dependencies",
"test-dependencies"
]
},
"applicationSpecificProperties": {
"type": "object",
"properties": {
"source-directories": {
"description": "A list of directories that will be used to build your project.",
"type": "array",
"items": {
"type": "string"
}
},
"elm-version": {
"description": "The version of elm your project is targeting",
"type": "string",
"pattern": "\\d+\\.\\d+\\.\\d+",
"enum": ["0.19.0"]
},
"dependencies": {
"description": "A list of elm dependencies that your project needs for in production.",
"type": "object",
"properties": {
"direct": {
"$ref": "#/definitions/exactDependency"
},
"indirect": {
"$ref": "#/definitions/exactDependency"
}
},
"required": ["direct", "indirect"]
},
"test-dependencies": {
"description": "A list of elm dependencies that your project uses only for testing.",
"type": "object",
"properties": {
"direct": {
"$ref": "#/definitions/exactDependency"
},
"indirect": {
"$ref": "#/definitions/exactDependency"
}
},
"required": ["direct", "indirect"]
}
},
"required": [
"source-directories",
"elm-version",
"dependencies",
"test-dependencies"
]
}
},
"properties": {
"type": {
"description": "Specifies if your project will be a package or an application",
"type": "string",
"enum": ["application", "package"]
}
},
"if": {
"properties": {
"type": {
"enum": ["package"]
}
}
},
"then": {
"$ref": "#/definitions/packageSpecificProperties"
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["application"]
}
}
},
"then": {
"$ref": "#/definitions/applicationSpecificProperties"
},
"else": {}
},
"required": ["type"]
}