@dsgraph/schema 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,406 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "Changeset",
4
+ "type": "object",
5
+ "required": [
6
+ "schema",
7
+ "base",
8
+ "head",
9
+ "contexts",
10
+ "summary",
11
+ "changes",
12
+ "diagnostics"
13
+ ],
14
+ "properties": {
15
+ "schema": {
16
+ "const": "dsgraph/changeset@1",
17
+ "type": "string"
18
+ },
19
+ "base": {
20
+ "type": "object",
21
+ "required": [
22
+ "hash",
23
+ "source"
24
+ ],
25
+ "properties": {
26
+ "hash": {
27
+ "type": "string"
28
+ },
29
+ "source": {
30
+ "$id": "SourceMeta",
31
+ "additionalProperties": true,
32
+ "type": "object",
33
+ "required": [
34
+ "kind"
35
+ ],
36
+ "properties": {
37
+ "kind": {
38
+ "type": "string"
39
+ },
40
+ "package": {
41
+ "type": "string"
42
+ },
43
+ "version": {
44
+ "type": "string"
45
+ },
46
+ "repo": {
47
+ "type": "string"
48
+ },
49
+ "ref": {
50
+ "type": "string"
51
+ },
52
+ "commit": {
53
+ "type": "string"
54
+ },
55
+ "path": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "head": {
63
+ "type": "object",
64
+ "required": [
65
+ "hash",
66
+ "source"
67
+ ],
68
+ "properties": {
69
+ "hash": {
70
+ "type": "string"
71
+ },
72
+ "source": {
73
+ "$id": "SourceMeta",
74
+ "additionalProperties": true,
75
+ "type": "object",
76
+ "required": [
77
+ "kind"
78
+ ],
79
+ "properties": {
80
+ "kind": {
81
+ "type": "string"
82
+ },
83
+ "package": {
84
+ "type": "string"
85
+ },
86
+ "version": {
87
+ "type": "string"
88
+ },
89
+ "repo": {
90
+ "type": "string"
91
+ },
92
+ "ref": {
93
+ "type": "string"
94
+ },
95
+ "commit": {
96
+ "type": "string"
97
+ },
98
+ "path": {
99
+ "type": "string"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ },
105
+ "contexts": {
106
+ "type": "object",
107
+ "required": [
108
+ "compared",
109
+ "partial"
110
+ ],
111
+ "properties": {
112
+ "compared": {
113
+ "type": "array",
114
+ "items": {
115
+ "$id": "When",
116
+ "type": "object",
117
+ "patternProperties": {
118
+ "^(.*)$": {
119
+ "type": "string"
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "partial": {
125
+ "type": "boolean"
126
+ }
127
+ }
128
+ },
129
+ "summary": {
130
+ "type": "object",
131
+ "required": [
132
+ "counts",
133
+ "level",
134
+ "reasons"
135
+ ],
136
+ "properties": {
137
+ "counts": {
138
+ "type": "object",
139
+ "patternProperties": {
140
+ "^(.*)$": {
141
+ "type": "integer"
142
+ }
143
+ }
144
+ },
145
+ "level": {
146
+ "anyOf": [
147
+ {
148
+ "const": "major",
149
+ "type": "string"
150
+ },
151
+ {
152
+ "const": "minor",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "const": "patch",
157
+ "type": "string"
158
+ },
159
+ {
160
+ "const": "none",
161
+ "type": "string"
162
+ }
163
+ ]
164
+ },
165
+ "reasons": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "changes": {
174
+ "type": "array",
175
+ "items": {
176
+ "$id": "Change",
177
+ "type": "object",
178
+ "required": [
179
+ "id",
180
+ "kind",
181
+ "target",
182
+ "when",
183
+ "origin",
184
+ "cause",
185
+ "level",
186
+ "confidence"
187
+ ],
188
+ "properties": {
189
+ "id": {
190
+ "type": "string"
191
+ },
192
+ "kind": {
193
+ "anyOf": [
194
+ {
195
+ "const": "token.added",
196
+ "type": "string"
197
+ },
198
+ {
199
+ "const": "token.removed",
200
+ "type": "string"
201
+ },
202
+ {
203
+ "const": "token.renamed",
204
+ "type": "string"
205
+ },
206
+ {
207
+ "const": "token.value-changed",
208
+ "type": "string"
209
+ },
210
+ {
211
+ "const": "token.notation-changed",
212
+ "type": "string"
213
+ },
214
+ {
215
+ "const": "token.alias-retargeted",
216
+ "type": "string"
217
+ },
218
+ {
219
+ "const": "token.type-changed",
220
+ "type": "string"
221
+ },
222
+ {
223
+ "const": "token.contexts-changed",
224
+ "type": "string"
225
+ },
226
+ {
227
+ "const": "token.missing-in-context",
228
+ "type": "string"
229
+ },
230
+ {
231
+ "const": "token.deprecated",
232
+ "type": "string"
233
+ },
234
+ {
235
+ "const": "token.undeprecated",
236
+ "type": "string"
237
+ },
238
+ {
239
+ "const": "token.description-changed",
240
+ "type": "string"
241
+ },
242
+ {
243
+ "const": "token.extensions-changed",
244
+ "type": "string"
245
+ },
246
+ {
247
+ "const": "group.extends-changed",
248
+ "type": "string"
249
+ },
250
+ {
251
+ "const": "context.added",
252
+ "type": "string"
253
+ },
254
+ {
255
+ "const": "context.removed",
256
+ "type": "string"
257
+ },
258
+ {
259
+ "const": "modifier.added",
260
+ "type": "string"
261
+ },
262
+ {
263
+ "const": "modifier.removed",
264
+ "type": "string"
265
+ }
266
+ ]
267
+ },
268
+ "target": {
269
+ "type": "string"
270
+ },
271
+ "from": {
272
+ "type": "string"
273
+ },
274
+ "when": {
275
+ "anyOf": [
276
+ {
277
+ "$id": "When",
278
+ "type": "object",
279
+ "patternProperties": {
280
+ "^(.*)$": {
281
+ "type": "string"
282
+ }
283
+ }
284
+ },
285
+ {
286
+ "type": "null"
287
+ }
288
+ ]
289
+ },
290
+ "before": {},
291
+ "after": {},
292
+ "delta": {
293
+ "type": "object",
294
+ "patternProperties": {
295
+ "^(.*)$": {}
296
+ }
297
+ },
298
+ "origin": {
299
+ "anyOf": [
300
+ {
301
+ "const": "direct",
302
+ "type": "string"
303
+ },
304
+ {
305
+ "const": "propagated",
306
+ "type": "string"
307
+ }
308
+ ]
309
+ },
310
+ "cause": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "level": {
317
+ "anyOf": [
318
+ {
319
+ "const": "major",
320
+ "type": "string"
321
+ },
322
+ {
323
+ "const": "minor",
324
+ "type": "string"
325
+ },
326
+ {
327
+ "const": "patch",
328
+ "type": "string"
329
+ },
330
+ {
331
+ "const": "none",
332
+ "type": "string"
333
+ }
334
+ ]
335
+ },
336
+ "confidence": {
337
+ "type": "number"
338
+ },
339
+ "possibleRenames": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "string"
343
+ }
344
+ },
345
+ "note": {
346
+ "type": "string"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "diagnostics": {
352
+ "type": "array",
353
+ "items": {
354
+ "$id": "Diagnostic",
355
+ "type": "object",
356
+ "required": [
357
+ "code",
358
+ "severity",
359
+ "message"
360
+ ],
361
+ "properties": {
362
+ "code": {
363
+ "type": "string"
364
+ },
365
+ "severity": {
366
+ "anyOf": [
367
+ {
368
+ "const": "error",
369
+ "type": "string"
370
+ },
371
+ {
372
+ "const": "warning",
373
+ "type": "string"
374
+ },
375
+ {
376
+ "const": "info",
377
+ "type": "string"
378
+ }
379
+ ]
380
+ },
381
+ "message": {
382
+ "type": "string"
383
+ },
384
+ "loc": {
385
+ "$id": "Loc",
386
+ "type": "object",
387
+ "properties": {
388
+ "file": {
389
+ "type": "string"
390
+ },
391
+ "pointer": {
392
+ "type": "string"
393
+ },
394
+ "line": {
395
+ "type": "integer"
396
+ },
397
+ "column": {
398
+ "type": "integer"
399
+ }
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+ }
@@ -0,0 +1,252 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "Config",
4
+ "type": "object",
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string"
8
+ },
9
+ "extends": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "tokens": {
16
+ "type": "object",
17
+ "properties": {
18
+ "include": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "exclude": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "resolver": {
31
+ "type": "string"
32
+ },
33
+ "order": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "strict": {
40
+ "type": "boolean"
41
+ }
42
+ }
43
+ },
44
+ "css": {
45
+ "type": "object",
46
+ "properties": {
47
+ "include": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "exclude": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ }
58
+ },
59
+ "prefix": {
60
+ "type": "string"
61
+ },
62
+ "contexts": {
63
+ "type": "object",
64
+ "patternProperties": {
65
+ "^(.*)$": {
66
+ "type": "object",
67
+ "patternProperties": {
68
+ "^(.*)$": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "remBase": {
79
+ "type": "number"
80
+ }
81
+ }
82
+ },
83
+ "layers": {
84
+ "type": "object",
85
+ "patternProperties": {
86
+ "^(.*)$": {
87
+ "type": "object",
88
+ "required": [
89
+ "match"
90
+ ],
91
+ "properties": {
92
+ "match": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "public": {
99
+ "type": "boolean"
100
+ }
101
+ }
102
+ }
103
+ }
104
+ },
105
+ "contexts": {
106
+ "type": "object",
107
+ "properties": {
108
+ "default": {
109
+ "type": "object",
110
+ "patternProperties": {
111
+ "^(.*)$": {
112
+ "type": "string"
113
+ }
114
+ }
115
+ },
116
+ "maxPermutations": {
117
+ "type": "integer"
118
+ }
119
+ }
120
+ },
121
+ "compare": {
122
+ "type": "object",
123
+ "properties": {
124
+ "equalDeltaE": {
125
+ "type": "number"
126
+ },
127
+ "ignoreExtensions": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ "renames": {
136
+ "type": "object",
137
+ "patternProperties": {
138
+ "^(.*)$": {
139
+ "type": "string"
140
+ }
141
+ }
142
+ },
143
+ "semver": {
144
+ "type": "object",
145
+ "properties": {
146
+ "levels": {
147
+ "type": "object",
148
+ "patternProperties": {
149
+ "^(.*)$": {
150
+ "anyOf": [
151
+ {
152
+ "const": "major",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "const": "minor",
157
+ "type": "string"
158
+ },
159
+ {
160
+ "const": "patch",
161
+ "type": "string"
162
+ },
163
+ {
164
+ "const": "none",
165
+ "type": "string"
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ },
171
+ "imperceptible": {
172
+ "type": "object",
173
+ "properties": {
174
+ "deltaE": {
175
+ "type": "number"
176
+ },
177
+ "px": {
178
+ "type": "number"
179
+ }
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "rules": {
185
+ "type": "object",
186
+ "patternProperties": {
187
+ "^(.*)$": {
188
+ "anyOf": [
189
+ {
190
+ "const": "off",
191
+ "type": "string"
192
+ },
193
+ {
194
+ "anyOf": [
195
+ {
196
+ "const": "error",
197
+ "type": "string"
198
+ },
199
+ {
200
+ "const": "warning",
201
+ "type": "string"
202
+ },
203
+ {
204
+ "const": "info",
205
+ "type": "string"
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "type": "array",
211
+ "items": [
212
+ {
213
+ "anyOf": [
214
+ {
215
+ "const": "off",
216
+ "type": "string"
217
+ },
218
+ {
219
+ "anyOf": [
220
+ {
221
+ "const": "error",
222
+ "type": "string"
223
+ },
224
+ {
225
+ "const": "warning",
226
+ "type": "string"
227
+ },
228
+ {
229
+ "const": "info",
230
+ "type": "string"
231
+ }
232
+ ]
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ "type": "object",
238
+ "patternProperties": {
239
+ "^(.*)$": {}
240
+ }
241
+ }
242
+ ],
243
+ "additionalItems": false,
244
+ "minItems": 2,
245
+ "maxItems": 2
246
+ }
247
+ ]
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }