workproof 0.1.2 → 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.
- package/README.md +363 -85
- package/README.tr.md +270 -77
- package/dist/src/analyse.d.ts +39 -2
- package/dist/src/analyse.js +98 -12
- package/dist/src/attest.d.ts +62 -0
- package/dist/src/attest.js +72 -0
- package/dist/src/badge.d.ts +13 -0
- package/dist/src/badge.js +20 -0
- package/dist/src/canonical.d.ts +9 -0
- package/dist/src/canonical.js +27 -0
- package/dist/src/cli.d.ts +6 -0
- package/dist/src/cli.js +141 -14
- package/dist/src/exclusions.d.ts +24 -0
- package/dist/src/exclusions.js +80 -0
- package/dist/src/figures/authorship.d.ts +53 -0
- package/dist/src/figures/authorship.js +190 -0
- package/dist/src/figures/footprint.d.ts +5 -1
- package/dist/src/figures/footprint.js +16 -10
- package/dist/src/figures/surviving.d.ts +38 -2
- package/dist/src/figures/surviving.js +82 -11
- package/dist/src/git.d.ts +24 -2
- package/dist/src/git.js +70 -13
- package/dist/src/index.d.ts +10 -4
- package/dist/src/index.js +7 -3
- package/dist/src/report.d.ts +5 -1
- package/dist/src/report.js +35 -13
- package/dist/src/schema.d.ts +4 -0
- package/dist/src/schema.js +66 -0
- package/dist/src/summary.d.ts +11 -0
- package/dist/src/summary.js +47 -0
- package/dist/src/verify.d.ts +29 -3
- package/dist/src/verify.js +38 -6
- package/package.json +67 -12
- package/schema/report.schema.json +74 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workproof.dev/schema/report-2.json",
|
|
4
|
+
"title": "workproof report",
|
|
5
|
+
"description": "A verifiable engineering report for one author. hash is sha256 over the RFC 8785 canonical JSON of { params, repositories }.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["tool", "schemaVersion", "version", "generatedAt", "params", "repositories", "hash"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"tool": { "const": "workproof" },
|
|
10
|
+
"schemaVersion": { "const": 2 },
|
|
11
|
+
"version": { "type": "string" },
|
|
12
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"params": { "type": "object" },
|
|
14
|
+
"hash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
15
|
+
"repositories": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["name", "head", "fingerprint", "identity", "environment", "excluded", "figures"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": { "type": "string" },
|
|
23
|
+
"head": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
24
|
+
"fingerprint": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
25
|
+
"fingerprintKeyed": { "type": "boolean" },
|
|
26
|
+
"identity": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["emails", "names", "count"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"emails": { "type": "array", "items": { "type": "string" } },
|
|
31
|
+
"names": { "type": "array", "items": { "type": "string" } },
|
|
32
|
+
"count": { "type": "integer", "minimum": 0 }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"environment": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["git", "blame"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"git": { "type": "string" },
|
|
40
|
+
"blame": { "type": "array", "items": { "type": "string" } },
|
|
41
|
+
"ignoreRevs": { "type": ["string", "null"] },
|
|
42
|
+
"seed": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"excluded": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["botCommits", "files", "linesAddedShare"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"botCommits": { "type": "integer", "minimum": 0 },
|
|
50
|
+
"files": { "type": "integer", "minimum": 0 },
|
|
51
|
+
"linesAddedShare": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
52
|
+
"enabled": { "type": "boolean" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"figures": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"minItems": 1,
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["id", "title", "value", "command", "limits"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": { "type": "string", "minLength": 1 },
|
|
63
|
+
"title": { "type": "string" },
|
|
64
|
+
"value": {},
|
|
65
|
+
"command": { "type": "string" },
|
|
66
|
+
"limits": { "type": "array", "items": { "type": "string" } }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|