@decantr/verifier 2.4.0 → 2.5.1
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.
- package/README.md +8 -2
- package/dist/index.d.ts +143 -1
- package/dist/index.js +939 -89
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/schema/decantr-ci-report.v1.json +46 -0
- package/schema/scan-report.v1.json +369 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/verifier",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Shared verification, critique, Project Health, and report-schema engine for Decantr",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decantr",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"./schema/project-health-report.v1.json": "./schema/project-health-report.v1.json",
|
|
38
38
|
"./schema/decantr-ci-report.v1.json": "./schema/decantr-ci-report.v1.json",
|
|
39
39
|
"./schema/evidence-bundle.v1.json": "./schema/evidence-bundle.v1.json",
|
|
40
|
+
"./schema/scan-report.v1.json": "./schema/scan-report.v1.json",
|
|
40
41
|
"./schema/workspace-health-report.v1.json": "./schema/workspace-health-report.v1.json",
|
|
41
42
|
"./schema/file-critique-report.v1.json": "./schema/file-critique-report.v1.json",
|
|
42
43
|
"./schema/showcase-shortlist-report.v1.json": "./schema/showcase-shortlist-report.v1.json"
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"localLaw": {
|
|
44
44
|
"$ref": "#/$defs/localLaw"
|
|
45
|
+
},
|
|
46
|
+
"styleBridge": {
|
|
47
|
+
"$ref": "#/$defs/styleBridge"
|
|
45
48
|
}
|
|
46
49
|
},
|
|
47
50
|
"additionalProperties": false
|
|
@@ -147,6 +150,49 @@
|
|
|
147
150
|
}
|
|
148
151
|
},
|
|
149
152
|
"additionalProperties": false
|
|
153
|
+
},
|
|
154
|
+
"styleBridge": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"required": [
|
|
157
|
+
"checked",
|
|
158
|
+
"present",
|
|
159
|
+
"status",
|
|
160
|
+
"mappingCount",
|
|
161
|
+
"stylingApproach",
|
|
162
|
+
"themeModes",
|
|
163
|
+
"warnings"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"checked": {
|
|
167
|
+
"type": "boolean"
|
|
168
|
+
},
|
|
169
|
+
"present": {
|
|
170
|
+
"type": "boolean"
|
|
171
|
+
},
|
|
172
|
+
"status": {
|
|
173
|
+
"type": ["string", "null"]
|
|
174
|
+
},
|
|
175
|
+
"mappingCount": {
|
|
176
|
+
"type": "integer",
|
|
177
|
+
"minimum": 0
|
|
178
|
+
},
|
|
179
|
+
"stylingApproach": {
|
|
180
|
+
"type": ["string", "null"]
|
|
181
|
+
},
|
|
182
|
+
"themeModes": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"warnings": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "string"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"additionalProperties": false
|
|
150
196
|
}
|
|
151
197
|
}
|
|
152
198
|
}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://decantr.ai/schemas/scan-report.v1.json",
|
|
4
|
+
"title": "Decantr Brownfield Scan Report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"$schema",
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"generatedAt",
|
|
10
|
+
"input",
|
|
11
|
+
"source",
|
|
12
|
+
"confidence",
|
|
13
|
+
"applicability",
|
|
14
|
+
"project",
|
|
15
|
+
"routes",
|
|
16
|
+
"components",
|
|
17
|
+
"styling",
|
|
18
|
+
"staticHosting",
|
|
19
|
+
"assistant",
|
|
20
|
+
"pagesProbe",
|
|
21
|
+
"findings",
|
|
22
|
+
"recommendedCommands",
|
|
23
|
+
"privacy"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"$schema": {
|
|
27
|
+
"const": "https://decantr.ai/schemas/scan-report.v1.json"
|
|
28
|
+
},
|
|
29
|
+
"schemaVersion": {
|
|
30
|
+
"const": "scan-report.v1"
|
|
31
|
+
},
|
|
32
|
+
"generatedAt": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "date-time"
|
|
35
|
+
},
|
|
36
|
+
"input": {
|
|
37
|
+
"$ref": "#/$defs/scanInput"
|
|
38
|
+
},
|
|
39
|
+
"source": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["repository", "publishedSiteUrl"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"repository": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{ "$ref": "#/$defs/repository" },
|
|
46
|
+
{ "type": "null" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"publishedSiteUrl": {
|
|
50
|
+
"type": ["string", "null"]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
},
|
|
55
|
+
"confidence": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": ["level", "score", "reasons"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"level": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"enum": ["high", "medium", "low"]
|
|
62
|
+
},
|
|
63
|
+
"score": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 100
|
|
67
|
+
},
|
|
68
|
+
"reasons": {
|
|
69
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"applicability": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": ["status", "label", "reasons"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"status": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["strong_fit", "partial_fit", "not_applicable", "unknown"]
|
|
81
|
+
},
|
|
82
|
+
"label": {
|
|
83
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
84
|
+
},
|
|
85
|
+
"reasons": {
|
|
86
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
},
|
|
91
|
+
"project": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"required": [
|
|
94
|
+
"framework",
|
|
95
|
+
"frameworkVersion",
|
|
96
|
+
"packageManager",
|
|
97
|
+
"primaryLanguage",
|
|
98
|
+
"hasTypeScript",
|
|
99
|
+
"hasTailwind",
|
|
100
|
+
"hasDecantr",
|
|
101
|
+
"packageName"
|
|
102
|
+
],
|
|
103
|
+
"properties": {
|
|
104
|
+
"framework": { "type": "string" },
|
|
105
|
+
"frameworkVersion": { "type": ["string", "null"] },
|
|
106
|
+
"packageManager": { "type": "string" },
|
|
107
|
+
"primaryLanguage": { "type": "string" },
|
|
108
|
+
"hasTypeScript": { "type": "boolean" },
|
|
109
|
+
"hasTailwind": { "type": "boolean" },
|
|
110
|
+
"hasDecantr": { "type": "boolean" },
|
|
111
|
+
"packageName": { "type": ["string", "null"] }
|
|
112
|
+
},
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"routes": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["strategy", "count", "items"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"strategy": { "type": "string" },
|
|
120
|
+
"count": {
|
|
121
|
+
"type": "integer",
|
|
122
|
+
"minimum": 0
|
|
123
|
+
},
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": {
|
|
127
|
+
"$ref": "#/$defs/route"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
},
|
|
133
|
+
"components": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": ["pageCount", "componentCount", "directories"],
|
|
136
|
+
"properties": {
|
|
137
|
+
"pageCount": {
|
|
138
|
+
"type": "integer",
|
|
139
|
+
"minimum": 0
|
|
140
|
+
},
|
|
141
|
+
"componentCount": {
|
|
142
|
+
"type": "integer",
|
|
143
|
+
"minimum": 0
|
|
144
|
+
},
|
|
145
|
+
"directories": {
|
|
146
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"additionalProperties": false
|
|
150
|
+
},
|
|
151
|
+
"styling": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"required": [
|
|
154
|
+
"approach",
|
|
155
|
+
"configFile",
|
|
156
|
+
"cssVariableCount",
|
|
157
|
+
"colorTokenCount",
|
|
158
|
+
"darkMode",
|
|
159
|
+
"themeSignals"
|
|
160
|
+
],
|
|
161
|
+
"properties": {
|
|
162
|
+
"approach": { "type": "string" },
|
|
163
|
+
"configFile": { "type": ["string", "null"] },
|
|
164
|
+
"cssVariableCount": {
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"minimum": 0
|
|
167
|
+
},
|
|
168
|
+
"colorTokenCount": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 0
|
|
171
|
+
},
|
|
172
|
+
"darkMode": { "type": "boolean" },
|
|
173
|
+
"themeSignals": {
|
|
174
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"additionalProperties": false
|
|
178
|
+
},
|
|
179
|
+
"staticHosting": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"required": ["githubPagesLikely", "evidence", "homepageUrl", "basePath", "hashRouting"],
|
|
182
|
+
"properties": {
|
|
183
|
+
"githubPagesLikely": { "type": "boolean" },
|
|
184
|
+
"evidence": {
|
|
185
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
186
|
+
},
|
|
187
|
+
"homepageUrl": { "type": ["string", "null"] },
|
|
188
|
+
"basePath": { "type": ["string", "null"] },
|
|
189
|
+
"hashRouting": { "type": "boolean" }
|
|
190
|
+
},
|
|
191
|
+
"additionalProperties": false
|
|
192
|
+
},
|
|
193
|
+
"assistant": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"required": ["ruleFiles"],
|
|
196
|
+
"properties": {
|
|
197
|
+
"ruleFiles": {
|
|
198
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"additionalProperties": false
|
|
202
|
+
},
|
|
203
|
+
"pagesProbe": {
|
|
204
|
+
"anyOf": [
|
|
205
|
+
{ "$ref": "#/$defs/publishedSiteProbe" },
|
|
206
|
+
{ "type": "null" }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"findings": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"items": {
|
|
212
|
+
"$ref": "#/$defs/finding"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"recommendedCommands": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"privacy": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": ["sourceUploaded", "persistedByDecantr", "notes"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"sourceUploaded": { "type": "boolean" },
|
|
226
|
+
"persistedByDecantr": { "type": "boolean" },
|
|
227
|
+
"notes": {
|
|
228
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"additionalProperties": false
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"additionalProperties": false,
|
|
235
|
+
"$defs": {
|
|
236
|
+
"scanInput": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"required": ["kind", "value"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"kind": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"enum": ["local", "github-repo", "github-pages"]
|
|
243
|
+
},
|
|
244
|
+
"value": {
|
|
245
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"additionalProperties": false
|
|
249
|
+
},
|
|
250
|
+
"repository": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"required": ["owner", "repo", "url"],
|
|
253
|
+
"properties": {
|
|
254
|
+
"owner": {
|
|
255
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
256
|
+
},
|
|
257
|
+
"repo": {
|
|
258
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
259
|
+
},
|
|
260
|
+
"url": {
|
|
261
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
262
|
+
},
|
|
263
|
+
"defaultBranch": {
|
|
264
|
+
"type": ["string", "null"]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"additionalProperties": false
|
|
268
|
+
},
|
|
269
|
+
"publishedSiteProbe": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"required": [
|
|
272
|
+
"url",
|
|
273
|
+
"finalUrl",
|
|
274
|
+
"checked",
|
|
275
|
+
"reachable",
|
|
276
|
+
"status",
|
|
277
|
+
"title",
|
|
278
|
+
"description",
|
|
279
|
+
"canonicalUrl",
|
|
280
|
+
"assetHints",
|
|
281
|
+
"routingHints",
|
|
282
|
+
"error"
|
|
283
|
+
],
|
|
284
|
+
"properties": {
|
|
285
|
+
"url": {
|
|
286
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
287
|
+
},
|
|
288
|
+
"finalUrl": { "type": ["string", "null"] },
|
|
289
|
+
"checked": { "type": "boolean" },
|
|
290
|
+
"reachable": { "type": "boolean" },
|
|
291
|
+
"status": {
|
|
292
|
+
"type": ["integer", "null"],
|
|
293
|
+
"minimum": 100,
|
|
294
|
+
"maximum": 599
|
|
295
|
+
},
|
|
296
|
+
"title": { "type": ["string", "null"] },
|
|
297
|
+
"description": { "type": ["string", "null"] },
|
|
298
|
+
"canonicalUrl": { "type": ["string", "null"] },
|
|
299
|
+
"assetHints": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"required": ["rootRelative", "relative", "absolute", "samples"],
|
|
302
|
+
"properties": {
|
|
303
|
+
"rootRelative": {
|
|
304
|
+
"type": "integer",
|
|
305
|
+
"minimum": 0
|
|
306
|
+
},
|
|
307
|
+
"relative": {
|
|
308
|
+
"type": "integer",
|
|
309
|
+
"minimum": 0
|
|
310
|
+
},
|
|
311
|
+
"absolute": {
|
|
312
|
+
"type": "integer",
|
|
313
|
+
"minimum": 0
|
|
314
|
+
},
|
|
315
|
+
"samples": {
|
|
316
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"additionalProperties": false
|
|
320
|
+
},
|
|
321
|
+
"routingHints": {
|
|
322
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
323
|
+
},
|
|
324
|
+
"error": { "type": ["string", "null"] }
|
|
325
|
+
},
|
|
326
|
+
"additionalProperties": false
|
|
327
|
+
},
|
|
328
|
+
"route": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"required": ["path", "file", "hasLayout"],
|
|
331
|
+
"properties": {
|
|
332
|
+
"path": {
|
|
333
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
334
|
+
},
|
|
335
|
+
"file": {
|
|
336
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
337
|
+
},
|
|
338
|
+
"hasLayout": { "type": "boolean" }
|
|
339
|
+
},
|
|
340
|
+
"additionalProperties": false
|
|
341
|
+
},
|
|
342
|
+
"finding": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"required": ["id", "severity", "title", "message", "evidence"],
|
|
345
|
+
"properties": {
|
|
346
|
+
"id": {
|
|
347
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
348
|
+
},
|
|
349
|
+
"severity": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"enum": ["success", "info", "warn", "error"]
|
|
352
|
+
},
|
|
353
|
+
"title": {
|
|
354
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
355
|
+
},
|
|
356
|
+
"message": {
|
|
357
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
358
|
+
},
|
|
359
|
+
"evidence": {
|
|
360
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
361
|
+
},
|
|
362
|
+
"recommendation": {
|
|
363
|
+
"type": "string"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"additionalProperties": false
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|