@intentset/verification 0.1.0 → 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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/report.d.ts +12 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +31 -0
- package/dist/report.js.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/report.ts +40 -0
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `reports.evidence` for the export (spec/export.md §4.1): the classification
|
|
3
|
+
* and the per-claim coverage of one evidence check, in the shape a consumer
|
|
4
|
+
* displays without reinterpreting. No totals and no percentage: a consumer
|
|
5
|
+
* shows each verification's status and each claim's, and the difference
|
|
6
|
+
* between missing, stale, failed and passed stays visible (Core §8).
|
|
7
|
+
*/
|
|
8
|
+
import type { EvidenceReportSection } from "@intentset/core";
|
|
9
|
+
import type { EvidenceCheck } from "./check.ts";
|
|
10
|
+
/** The evidence report of a check that classified `records` run records. */
|
|
11
|
+
export declare function evidenceReport(check: EvidenceCheck, records: number): EvidenceReportSection;
|
|
12
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,qBAAqB,CA4B3F"}
|
package/dist/report.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The evidence report of a check that classified `records` run records. */
|
|
2
|
+
export function evidenceReport(check, records) {
|
|
3
|
+
const { classification, coverage } = check;
|
|
4
|
+
return {
|
|
5
|
+
commit: classification.snapshot.commit,
|
|
6
|
+
graphHash: classification.snapshot.graphHash,
|
|
7
|
+
scope: classification.snapshot.scope,
|
|
8
|
+
records,
|
|
9
|
+
verifications: Object.values(classification.verifications).map((v) => ({
|
|
10
|
+
id: v.verificationId,
|
|
11
|
+
method: v.method,
|
|
12
|
+
status: v.status,
|
|
13
|
+
note: v.note ?? null,
|
|
14
|
+
latest: v.latest,
|
|
15
|
+
atSnapshot: { ...v.atSnapshot },
|
|
16
|
+
runs: v.history.length,
|
|
17
|
+
outOfScope: v.outOfScope,
|
|
18
|
+
})),
|
|
19
|
+
claims: coverage.perClaim.map((claim) => ({
|
|
20
|
+
id: claim.id,
|
|
21
|
+
type: claim.type,
|
|
22
|
+
lifecycle: claim.lifecycle,
|
|
23
|
+
required: claim.required,
|
|
24
|
+
linked: claim.linked,
|
|
25
|
+
verified: claim.verified,
|
|
26
|
+
verifications: claim.verifications.map((v) => v.id),
|
|
27
|
+
withheld: 0,
|
|
28
|
+
})),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAUA,4EAA4E;AAC5E,MAAM,UAAU,cAAc,CAAC,KAAoB,EAAE,OAAe;IAClE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO;QACL,MAAM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0.2.0",
|
|
4
4
|
"description": "Run records, evidence freshness classification, and test-reporter adapters.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@intentset/core": "^0.
|
|
31
|
+
"@intentset/core": "^0.2.0"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/index.ts
CHANGED
package/src/report.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `reports.evidence` for the export (spec/export.md §4.1): the classification
|
|
3
|
+
* and the per-claim coverage of one evidence check, in the shape a consumer
|
|
4
|
+
* displays without reinterpreting. No totals and no percentage: a consumer
|
|
5
|
+
* shows each verification's status and each claim's, and the difference
|
|
6
|
+
* between missing, stale, failed and passed stays visible (Core §8).
|
|
7
|
+
*/
|
|
8
|
+
import type { EvidenceReportSection } from "@intentset/core";
|
|
9
|
+
import type { EvidenceCheck } from "./check.ts";
|
|
10
|
+
|
|
11
|
+
/** The evidence report of a check that classified `records` run records. */
|
|
12
|
+
export function evidenceReport(check: EvidenceCheck, records: number): EvidenceReportSection {
|
|
13
|
+
const { classification, coverage } = check;
|
|
14
|
+
return {
|
|
15
|
+
commit: classification.snapshot.commit,
|
|
16
|
+
graphHash: classification.snapshot.graphHash,
|
|
17
|
+
scope: classification.snapshot.scope,
|
|
18
|
+
records,
|
|
19
|
+
verifications: Object.values(classification.verifications).map((v) => ({
|
|
20
|
+
id: v.verificationId,
|
|
21
|
+
method: v.method,
|
|
22
|
+
status: v.status,
|
|
23
|
+
note: v.note ?? null,
|
|
24
|
+
latest: v.latest,
|
|
25
|
+
atSnapshot: { ...v.atSnapshot },
|
|
26
|
+
runs: v.history.length,
|
|
27
|
+
outOfScope: v.outOfScope,
|
|
28
|
+
})),
|
|
29
|
+
claims: coverage.perClaim.map((claim) => ({
|
|
30
|
+
id: claim.id,
|
|
31
|
+
type: claim.type,
|
|
32
|
+
lifecycle: claim.lifecycle,
|
|
33
|
+
required: claim.required,
|
|
34
|
+
linked: claim.linked,
|
|
35
|
+
verified: claim.verified,
|
|
36
|
+
verifications: claim.verifications.map((v) => v.id),
|
|
37
|
+
withheld: 0,
|
|
38
|
+
})),
|
|
39
|
+
};
|
|
40
|
+
}
|