pruneguard 0.1.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,697 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "AnalysisReport",
4
+ "description": "Full analysis report from a scan.",
5
+ "type": "object",
6
+ "required": [
7
+ "cwd",
8
+ "entrypoints",
9
+ "findings",
10
+ "inventories",
11
+ "profile",
12
+ "stats",
13
+ "summary",
14
+ "toolVersion",
15
+ "version"
16
+ ],
17
+ "properties": {
18
+ "cwd": {
19
+ "description": "Working directory the analysis was run from.",
20
+ "type": "string"
21
+ },
22
+ "entrypoints": {
23
+ "description": "All detected entrypoints.",
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "#/definitions/EntrypointInfo"
27
+ }
28
+ },
29
+ "findings": {
30
+ "description": "Detected findings (violations, unused items, etc.).",
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "#/definitions/Finding"
34
+ }
35
+ },
36
+ "inventories": {
37
+ "description": "Inventories of discovered entities.",
38
+ "allOf": [
39
+ {
40
+ "$ref": "#/definitions/Inventories"
41
+ }
42
+ ]
43
+ },
44
+ "profile": {
45
+ "description": "The profile used for this analysis.",
46
+ "type": "string"
47
+ },
48
+ "stats": {
49
+ "description": "Performance statistics.",
50
+ "allOf": [
51
+ {
52
+ "$ref": "#/definitions/Stats"
53
+ }
54
+ ]
55
+ },
56
+ "summary": {
57
+ "description": "Summary counts.",
58
+ "allOf": [
59
+ {
60
+ "$ref": "#/definitions/Summary"
61
+ }
62
+ ]
63
+ },
64
+ "toolVersion": {
65
+ "description": "Version of the pruneguard tool that produced this report.",
66
+ "type": "string"
67
+ },
68
+ "version": {
69
+ "description": "Schema version for the report format.",
70
+ "type": "integer",
71
+ "format": "uint32",
72
+ "minimum": 0.0
73
+ }
74
+ },
75
+ "definitions": {
76
+ "ConfidenceCounts": {
77
+ "type": "object",
78
+ "required": [
79
+ "high",
80
+ "low",
81
+ "medium"
82
+ ],
83
+ "properties": {
84
+ "high": {
85
+ "type": "integer",
86
+ "format": "uint",
87
+ "minimum": 0.0
88
+ },
89
+ "low": {
90
+ "type": "integer",
91
+ "format": "uint",
92
+ "minimum": 0.0
93
+ },
94
+ "medium": {
95
+ "type": "integer",
96
+ "format": "uint",
97
+ "minimum": 0.0
98
+ }
99
+ }
100
+ },
101
+ "EntrypointInfo": {
102
+ "description": "Info about an entrypoint.",
103
+ "type": "object",
104
+ "required": [
105
+ "kind",
106
+ "path",
107
+ "profile",
108
+ "source"
109
+ ],
110
+ "properties": {
111
+ "kind": {
112
+ "type": "string"
113
+ },
114
+ "path": {
115
+ "type": "string"
116
+ },
117
+ "profile": {
118
+ "type": "string"
119
+ },
120
+ "source": {
121
+ "type": "string"
122
+ },
123
+ "workspace": {
124
+ "type": [
125
+ "string",
126
+ "null"
127
+ ]
128
+ }
129
+ }
130
+ },
131
+ "Evidence": {
132
+ "description": "Evidence supporting a finding.",
133
+ "type": "object",
134
+ "required": [
135
+ "description",
136
+ "kind"
137
+ ],
138
+ "properties": {
139
+ "description": {
140
+ "description": "Description of this evidence.",
141
+ "type": "string"
142
+ },
143
+ "file": {
144
+ "description": "File path involved.",
145
+ "type": [
146
+ "string",
147
+ "null"
148
+ ]
149
+ },
150
+ "kind": {
151
+ "description": "Type of evidence.",
152
+ "type": "string"
153
+ },
154
+ "line": {
155
+ "description": "Line number, if applicable.",
156
+ "type": [
157
+ "integer",
158
+ "null"
159
+ ],
160
+ "format": "uint",
161
+ "minimum": 0.0
162
+ }
163
+ }
164
+ },
165
+ "FileInfo": {
166
+ "description": "Info about a discovered file.",
167
+ "type": "object",
168
+ "required": [
169
+ "kind",
170
+ "path"
171
+ ],
172
+ "properties": {
173
+ "kind": {
174
+ "$ref": "#/definitions/FileKind"
175
+ },
176
+ "path": {
177
+ "type": "string"
178
+ },
179
+ "role": {
180
+ "anyOf": [
181
+ {
182
+ "$ref": "#/definitions/FileRole"
183
+ },
184
+ {
185
+ "type": "null"
186
+ }
187
+ ]
188
+ },
189
+ "workspace": {
190
+ "type": [
191
+ "string",
192
+ "null"
193
+ ]
194
+ }
195
+ }
196
+ },
197
+ "FileKind": {
198
+ "type": "string",
199
+ "enum": [
200
+ "source",
201
+ "test",
202
+ "story",
203
+ "config",
204
+ "generated",
205
+ "buildoutput"
206
+ ]
207
+ },
208
+ "FileRole": {
209
+ "type": "string",
210
+ "enum": [
211
+ "source",
212
+ "test",
213
+ "story",
214
+ "fixture",
215
+ "example",
216
+ "template",
217
+ "benchmark",
218
+ "config",
219
+ "generated",
220
+ "buildOutput"
221
+ ]
222
+ },
223
+ "Finding": {
224
+ "description": "A single finding from analysis.",
225
+ "type": "object",
226
+ "required": [
227
+ "category",
228
+ "code",
229
+ "confidence",
230
+ "id",
231
+ "message",
232
+ "severity",
233
+ "subject"
234
+ ],
235
+ "properties": {
236
+ "category": {
237
+ "description": "Category of the finding.",
238
+ "allOf": [
239
+ {
240
+ "$ref": "#/definitions/FindingCategory"
241
+ }
242
+ ]
243
+ },
244
+ "code": {
245
+ "description": "Machine-readable code (e.g. `unused-export`, `cycle`, `boundary-violation`).",
246
+ "type": "string"
247
+ },
248
+ "confidence": {
249
+ "description": "Confidence level for this finding.",
250
+ "allOf": [
251
+ {
252
+ "$ref": "#/definitions/FindingConfidence"
253
+ }
254
+ ]
255
+ },
256
+ "evidence": {
257
+ "description": "Evidence supporting the finding.",
258
+ "type": "array",
259
+ "items": {
260
+ "$ref": "#/definitions/Evidence"
261
+ }
262
+ },
263
+ "id": {
264
+ "description": "Stable deterministic ID for this finding.",
265
+ "type": "string"
266
+ },
267
+ "message": {
268
+ "description": "Human-readable message.",
269
+ "type": "string"
270
+ },
271
+ "package": {
272
+ "description": "Package this finding belongs to, if applicable.",
273
+ "type": [
274
+ "string",
275
+ "null"
276
+ ]
277
+ },
278
+ "ruleName": {
279
+ "description": "Name of the rule that produced this finding, if any.",
280
+ "type": [
281
+ "string",
282
+ "null"
283
+ ]
284
+ },
285
+ "severity": {
286
+ "description": "Severity level.",
287
+ "allOf": [
288
+ {
289
+ "$ref": "#/definitions/FindingSeverity"
290
+ }
291
+ ]
292
+ },
293
+ "subject": {
294
+ "description": "The subject of the finding (file path, export name, etc.).",
295
+ "type": "string"
296
+ },
297
+ "suggestion": {
298
+ "description": "Suggested fix.",
299
+ "type": [
300
+ "string",
301
+ "null"
302
+ ]
303
+ },
304
+ "workspace": {
305
+ "description": "Workspace this finding belongs to, if applicable.",
306
+ "type": [
307
+ "string",
308
+ "null"
309
+ ]
310
+ }
311
+ }
312
+ },
313
+ "FindingCategory": {
314
+ "type": "string",
315
+ "enum": [
316
+ "unused-export",
317
+ "unused-file",
318
+ "unused-package",
319
+ "unused-dependency",
320
+ "cycle",
321
+ "boundary-violation",
322
+ "ownership-violation",
323
+ "impact"
324
+ ]
325
+ },
326
+ "FindingConfidence": {
327
+ "type": "string",
328
+ "enum": [
329
+ "high",
330
+ "medium",
331
+ "low"
332
+ ]
333
+ },
334
+ "FindingSeverity": {
335
+ "type": "string",
336
+ "enum": [
337
+ "error",
338
+ "warn",
339
+ "info"
340
+ ]
341
+ },
342
+ "Inventories": {
343
+ "description": "Inventories of discovered entities.",
344
+ "type": "object",
345
+ "required": [
346
+ "files",
347
+ "packages",
348
+ "workspaces"
349
+ ],
350
+ "properties": {
351
+ "files": {
352
+ "type": "array",
353
+ "items": {
354
+ "$ref": "#/definitions/FileInfo"
355
+ }
356
+ },
357
+ "packages": {
358
+ "type": "array",
359
+ "items": {
360
+ "$ref": "#/definitions/PackageInfo"
361
+ }
362
+ },
363
+ "workspaces": {
364
+ "type": "array",
365
+ "items": {
366
+ "$ref": "#/definitions/WorkspaceInfo"
367
+ }
368
+ }
369
+ }
370
+ },
371
+ "PackageInfo": {
372
+ "description": "Info about a discovered package.",
373
+ "type": "object",
374
+ "required": [
375
+ "name",
376
+ "path",
377
+ "workspace"
378
+ ],
379
+ "properties": {
380
+ "name": {
381
+ "type": "string"
382
+ },
383
+ "path": {
384
+ "type": "string"
385
+ },
386
+ "version": {
387
+ "type": [
388
+ "string",
389
+ "null"
390
+ ]
391
+ },
392
+ "workspace": {
393
+ "type": "string"
394
+ }
395
+ }
396
+ },
397
+ "Stats": {
398
+ "description": "Performance statistics.",
399
+ "type": "object",
400
+ "required": [
401
+ "affectedEntrypoints",
402
+ "affectedFiles",
403
+ "affectedPackages",
404
+ "affectedScopeIncomplete",
405
+ "baselineApplied",
406
+ "baselineProfileMismatch",
407
+ "cacheEntriesRead",
408
+ "cacheEntriesWritten",
409
+ "cacheHits",
410
+ "cacheMisses",
411
+ "changedFiles",
412
+ "confidenceCounts",
413
+ "durationMs",
414
+ "entrypointsDetected",
415
+ "filesCached",
416
+ "filesDiscovered",
417
+ "filesParsed",
418
+ "filesResolved",
419
+ "focusApplied",
420
+ "focusedFiles",
421
+ "focusedFindings",
422
+ "fullScopeRequired",
423
+ "graphEdges",
424
+ "graphNodes",
425
+ "newFindings",
426
+ "partialScope",
427
+ "resolvedViaExports",
428
+ "suppressedFindings",
429
+ "unresolvedByReason",
430
+ "unresolvedSpecifiers"
431
+ ],
432
+ "properties": {
433
+ "affectedEntrypoints": {
434
+ "type": "integer",
435
+ "format": "uint",
436
+ "minimum": 0.0
437
+ },
438
+ "affectedFiles": {
439
+ "type": "integer",
440
+ "format": "uint",
441
+ "minimum": 0.0
442
+ },
443
+ "affectedPackages": {
444
+ "type": "integer",
445
+ "format": "uint",
446
+ "minimum": 0.0
447
+ },
448
+ "affectedScopeIncomplete": {
449
+ "type": "boolean"
450
+ },
451
+ "baselineApplied": {
452
+ "type": "boolean"
453
+ },
454
+ "baselineProfileMismatch": {
455
+ "type": "boolean"
456
+ },
457
+ "cacheEntriesRead": {
458
+ "type": "integer",
459
+ "format": "uint",
460
+ "minimum": 0.0
461
+ },
462
+ "cacheEntriesWritten": {
463
+ "type": "integer",
464
+ "format": "uint",
465
+ "minimum": 0.0
466
+ },
467
+ "cacheHits": {
468
+ "type": "integer",
469
+ "format": "uint",
470
+ "minimum": 0.0
471
+ },
472
+ "cacheMisses": {
473
+ "type": "integer",
474
+ "format": "uint",
475
+ "minimum": 0.0
476
+ },
477
+ "changedFiles": {
478
+ "type": "integer",
479
+ "format": "uint",
480
+ "minimum": 0.0
481
+ },
482
+ "confidenceCounts": {
483
+ "$ref": "#/definitions/ConfidenceCounts"
484
+ },
485
+ "durationMs": {
486
+ "type": "integer",
487
+ "format": "uint64",
488
+ "minimum": 0.0
489
+ },
490
+ "entrypointsDetected": {
491
+ "type": "integer",
492
+ "format": "uint",
493
+ "minimum": 0.0
494
+ },
495
+ "filesCached": {
496
+ "type": "integer",
497
+ "format": "uint",
498
+ "minimum": 0.0
499
+ },
500
+ "filesDiscovered": {
501
+ "type": "integer",
502
+ "format": "uint",
503
+ "minimum": 0.0
504
+ },
505
+ "filesParsed": {
506
+ "type": "integer",
507
+ "format": "uint",
508
+ "minimum": 0.0
509
+ },
510
+ "filesResolved": {
511
+ "type": "integer",
512
+ "format": "uint",
513
+ "minimum": 0.0
514
+ },
515
+ "focusApplied": {
516
+ "type": "boolean"
517
+ },
518
+ "focusedFiles": {
519
+ "type": "integer",
520
+ "format": "uint",
521
+ "minimum": 0.0
522
+ },
523
+ "focusedFindings": {
524
+ "type": "integer",
525
+ "format": "uint",
526
+ "minimum": 0.0
527
+ },
528
+ "fullScopeRequired": {
529
+ "type": "boolean"
530
+ },
531
+ "graphEdges": {
532
+ "type": "integer",
533
+ "format": "uint",
534
+ "minimum": 0.0
535
+ },
536
+ "graphNodes": {
537
+ "type": "integer",
538
+ "format": "uint",
539
+ "minimum": 0.0
540
+ },
541
+ "newFindings": {
542
+ "type": "integer",
543
+ "format": "uint",
544
+ "minimum": 0.0
545
+ },
546
+ "parityWarnings": {
547
+ "type": "array",
548
+ "items": {
549
+ "type": "string"
550
+ }
551
+ },
552
+ "partialScope": {
553
+ "type": "boolean"
554
+ },
555
+ "partialScopeReason": {
556
+ "type": [
557
+ "string",
558
+ "null"
559
+ ]
560
+ },
561
+ "resolvedViaExports": {
562
+ "type": "integer",
563
+ "format": "uint",
564
+ "minimum": 0.0
565
+ },
566
+ "suppressedFindings": {
567
+ "type": "integer",
568
+ "format": "uint",
569
+ "minimum": 0.0
570
+ },
571
+ "unresolvedByReason": {
572
+ "$ref": "#/definitions/UnresolvedByReasonStats"
573
+ },
574
+ "unresolvedSpecifiers": {
575
+ "type": "integer",
576
+ "format": "uint",
577
+ "minimum": 0.0
578
+ }
579
+ }
580
+ },
581
+ "Summary": {
582
+ "description": "Summary counts for a report.",
583
+ "type": "object",
584
+ "required": [
585
+ "errors",
586
+ "infos",
587
+ "totalExports",
588
+ "totalFiles",
589
+ "totalFindings",
590
+ "totalPackages",
591
+ "totalWorkspaces",
592
+ "warnings"
593
+ ],
594
+ "properties": {
595
+ "errors": {
596
+ "type": "integer",
597
+ "format": "uint",
598
+ "minimum": 0.0
599
+ },
600
+ "infos": {
601
+ "type": "integer",
602
+ "format": "uint",
603
+ "minimum": 0.0
604
+ },
605
+ "totalExports": {
606
+ "type": "integer",
607
+ "format": "uint",
608
+ "minimum": 0.0
609
+ },
610
+ "totalFiles": {
611
+ "type": "integer",
612
+ "format": "uint",
613
+ "minimum": 0.0
614
+ },
615
+ "totalFindings": {
616
+ "type": "integer",
617
+ "format": "uint",
618
+ "minimum": 0.0
619
+ },
620
+ "totalPackages": {
621
+ "type": "integer",
622
+ "format": "uint",
623
+ "minimum": 0.0
624
+ },
625
+ "totalWorkspaces": {
626
+ "type": "integer",
627
+ "format": "uint",
628
+ "minimum": 0.0
629
+ },
630
+ "warnings": {
631
+ "type": "integer",
632
+ "format": "uint",
633
+ "minimum": 0.0
634
+ }
635
+ }
636
+ },
637
+ "UnresolvedByReasonStats": {
638
+ "type": "object",
639
+ "required": [
640
+ "exportsConditionMiss",
641
+ "externalized",
642
+ "missingFile",
643
+ "tsconfigPathMiss",
644
+ "unsupportedSpecifier"
645
+ ],
646
+ "properties": {
647
+ "exportsConditionMiss": {
648
+ "type": "integer",
649
+ "format": "uint",
650
+ "minimum": 0.0
651
+ },
652
+ "externalized": {
653
+ "type": "integer",
654
+ "format": "uint",
655
+ "minimum": 0.0
656
+ },
657
+ "missingFile": {
658
+ "type": "integer",
659
+ "format": "uint",
660
+ "minimum": 0.0
661
+ },
662
+ "tsconfigPathMiss": {
663
+ "type": "integer",
664
+ "format": "uint",
665
+ "minimum": 0.0
666
+ },
667
+ "unsupportedSpecifier": {
668
+ "type": "integer",
669
+ "format": "uint",
670
+ "minimum": 0.0
671
+ }
672
+ }
673
+ },
674
+ "WorkspaceInfo": {
675
+ "description": "Info about a discovered workspace.",
676
+ "type": "object",
677
+ "required": [
678
+ "name",
679
+ "packageCount",
680
+ "path"
681
+ ],
682
+ "properties": {
683
+ "name": {
684
+ "type": "string"
685
+ },
686
+ "packageCount": {
687
+ "type": "integer",
688
+ "format": "uint",
689
+ "minimum": 0.0
690
+ },
691
+ "path": {
692
+ "type": "string"
693
+ }
694
+ }
695
+ }
696
+ }
697
+ }