@nielspeter/eess-crossvalidate 0.2.0 → 0.5.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 +92 -4
- package/dist/files.d.ts +1 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +3 -27
- package/dist/files.js.map +1 -1
- package/dist/gherkin-ts.d.ts +68 -9
- package/dist/gherkin-ts.d.ts.map +1 -1
- package/dist/gherkin-ts.js +99 -40
- package/dist/gherkin-ts.js.map +1 -1
- package/dist/md-gherkin.d.ts +6 -2
- package/dist/md-gherkin.d.ts.map +1 -1
- package/dist/md-gherkin.js +0 -0
- package/dist/md-gherkin.js.map +1 -1
- package/dist/md-mermaid-er.d.ts +6 -2
- package/dist/md-mermaid-er.d.ts.map +1 -1
- package/dist/md-mermaid-er.js +14 -16
- package/dist/md-mermaid-er.js.map +1 -1
- package/dist/md-mermaid.d.ts +42 -5
- package/dist/md-mermaid.d.ts.map +1 -1
- package/dist/md-mermaid.js +148 -17
- package/dist/md-mermaid.js.map +1 -1
- package/dist/md-ts.d.ts +2 -0
- package/dist/md-ts.d.ts.map +1 -1
- package/dist/md-ts.js +2 -0
- package/dist/md-ts.js.map +1 -1
- package/dist/mermaid-ts.d.ts +2 -0
- package/dist/mermaid-ts.d.ts.map +1 -1
- package/dist/mermaid-ts.js +8 -9
- package/dist/mermaid-ts.js.map +1 -1
- package/dist/shared.d.ts +61 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +63 -0
- package/dist/shared.js.map +1 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @nielspeter/eess-crossvalidate
|
|
2
2
|
|
|
3
|
-
Cross-validation presets for the [eess](
|
|
3
|
+
Cross-validation presets for the [eess](https://github.com/nielspeter/eess/blob/main/README.md) family — bind two dialects' artifacts and fail the build when they drift.
|
|
4
4
|
|
|
5
|
-
The generic engine lives in the kernel: [`correspondence()`](
|
|
5
|
+
The generic engine lives in the kernel: [`correspondence()`](https://www.npmjs.com/package/@nielspeter/eess) binds two element `Selection`s (from any dialects) and checks completeness both ways plus relation preservation. This package ships the **dialect-coupled presets** — the pairs that must import two concrete dialects.
|
|
6
6
|
|
|
7
7
|
## Mermaid ↔ TypeScript
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ import { diagramMatchesCode } from '@nielspeter/eess-crossvalidate/mermaid-ts'
|
|
|
11
11
|
import { project } from '@nielspeter/eess-ts'
|
|
12
12
|
import { diagram } from '@nielspeter/eess-mermaid'
|
|
13
13
|
|
|
14
|
-
// every class in the diagram exists in code, and vice versa
|
|
15
|
-
diagramMatchesCode(diagram('docs/architecture.mmd'), project('tsconfig.json'))
|
|
14
|
+
// every class in the diagram exists in code, and vice versa — throws on drift
|
|
15
|
+
diagramMatchesCode(diagram('docs/architecture.mmd'), project('tsconfig.json'))
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
If the code gains a `ModuloOperation` class the diagram doesn't have (or vice
|
|
@@ -73,6 +73,94 @@ ADR-007). A scenario renamed or deleted out from under the test that cites it
|
|
|
73
73
|
fails the build. It resolves the citation; it does not claim the test exercises
|
|
74
74
|
the scenario's steps (Tier 2, still open).
|
|
75
75
|
|
|
76
|
+
```typescript
|
|
77
|
+
import { scenariosCovered } from '@nielspeter/eess-crossvalidate/gherkin-ts'
|
|
78
|
+
|
|
79
|
+
// every scenario must be cited by at least one test — the coverage
|
|
80
|
+
// (right→left) direction, the complement of scenarioTestsResolve. `include`
|
|
81
|
+
// narrows the requirement so not-yet-implemented flows don't force a red
|
|
82
|
+
// build.
|
|
83
|
+
scenariosCovered(project('tsconfig.json'), features({ roots: ['features/**/*.feature'] }), {
|
|
84
|
+
include: (s) => !s.tags.includes('wip'),
|
|
85
|
+
})
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A scenario shipped with no citing test fails the build. Pair `include` with
|
|
89
|
+
`scenarioExemptionsCurrent`'s `isExempt`, below — the two must use the same
|
|
90
|
+
tag, and neither has a default, on purpose: a `@wip` scenario excluded from
|
|
91
|
+
one but not the other would fail one gate or the other unconditionally.
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
import { scenarioExemptionsCurrent } from '@nielspeter/eess-crossvalidate/gherkin-ts'
|
|
95
|
+
|
|
96
|
+
// the reverse of scenariosCovered: an exempt scenario must NOT already have a
|
|
97
|
+
// citing test. Once a test proves it, the exemption has outlived its reason.
|
|
98
|
+
scenarioExemptionsCurrent(
|
|
99
|
+
project('tsconfig.json'),
|
|
100
|
+
features({ roots: ['features/**/*.feature'] }),
|
|
101
|
+
{
|
|
102
|
+
isExempt: (s) => s.tags.includes('wip'),
|
|
103
|
+
},
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
An exemption (`@wip` by the convention above, or any tag `isExempt` reads) that
|
|
108
|
+
is still in force when a real test starts citing the scenario is a silent hole
|
|
109
|
+
in the coverage gate it was meant to narrow — the exemption should have been
|
|
110
|
+
removed the moment the work landed. The violation names both the scenario and
|
|
111
|
+
the citing test's own `file`/`line`.
|
|
112
|
+
|
|
113
|
+
## Markdown ↔ Mermaid
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import {
|
|
117
|
+
embeddedDiagramsMatchCode,
|
|
118
|
+
embeddedDiagramStats,
|
|
119
|
+
} from '@nielspeter/eess-crossvalidate/md-mermaid'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
A ```mermaid fence embedded in a Markdown page must match the code it claims to
|
|
123
|
+
describe — a diagram that drifts from the source is a document that lies while
|
|
124
|
+
looking authoritative.
|
|
125
|
+
|
|
126
|
+
Only **class diagrams** are compared. A fence declaring another kind
|
|
127
|
+
(`sequenceDiagram`, `flowchart`, `gantt`, …) is skipped as a different artifact,
|
|
128
|
+
not treated as a broken class diagram; a fence whose kind is unrecognised is
|
|
129
|
+
still handed to the parser, so an unknown diagram costs a loud finding rather
|
|
130
|
+
than silent coverage loss. `embeddedDiagramStats` reports what was compared —
|
|
131
|
+
`documents`, `diagrams`, and the `skipped` count — so a pass is evidence rather
|
|
132
|
+
than a default:
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
const docs = corpus({ roots: ['docs/architecture.md'] })
|
|
136
|
+
embeddedDiagramsMatchCode(docs, project('tsconfig.json'), { completeness: 'both' })
|
|
137
|
+
|
|
138
|
+
const stats = embeddedDiagramStats(docs)
|
|
139
|
+
if (stats.diagrams === 0) throw new Error('selected zero class diagrams — green-but-empty')
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
`diagrams` counts fences **selected**, not classes compared — a fence that turns
|
|
143
|
+
out not to parse is selected and then reported. Pair the guard with
|
|
144
|
+
`completeness: 'both'` if you also want an emptied diagram to fail.
|
|
145
|
+
|
|
146
|
+
## Markdown ↔ Mermaid ER
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
import { tableErAgree, tableErStats } from '@nielspeter/eess-crossvalidate/md-mermaid-er'
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
An ER diagram and the table it documents must agree. `tableErStats` reports what
|
|
153
|
+
was compared, so a pass is evidence rather than a default.
|
|
154
|
+
|
|
155
|
+
## Files
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
import { files } from '@nielspeter/eess-crossvalidate/files'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
A file-set loader for binding a side of a correspondence to paths on disk rather
|
|
162
|
+
than to a parsed dialect.
|
|
163
|
+
|
|
76
164
|
## Peers
|
|
77
165
|
|
|
78
166
|
The dialects are optional peer dependencies — install the ones your presets use
|
package/dist/files.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Selection, ElementInfo } from '@nielspeter/eess';
|
|
2
|
+
export type { Selection, ElementInfo } from '@nielspeter/eess';
|
|
2
3
|
/**
|
|
3
4
|
* A file matched by [[files]]. Its content is **not** read — this is a
|
|
4
5
|
* path-selection brick. Callers that need the file's content (e.g. parse a
|
package/dist/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,6BAA6B;AAC7B,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;IACzC,mEAAmE;IACnE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW,CAAA;CACpD;
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9D,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,6BAA6B;AAC7B,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;IACzC,mEAAmE;IACnE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW,CAAA;CACpD;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,CAgB9D"}
|
package/dist/files.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join
|
|
1
|
+
import { walkFiles } from '@nielspeter/eess/internal';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
3
|
import picomatch from 'picomatch';
|
|
4
4
|
// Directories never walked — deps, build output, VCS. Mirrors the corpus walk.
|
|
5
5
|
const BUILTIN_IGNORE_DIRS = new Set([
|
|
@@ -11,30 +11,6 @@ const BUILTIN_IGNORE_DIRS = new Set([
|
|
|
11
11
|
'.nuxt',
|
|
12
12
|
'.vercel',
|
|
13
13
|
]);
|
|
14
|
-
function toPosix(p) {
|
|
15
|
-
return sep === '/' ? p : p.split(sep).join('/');
|
|
16
|
-
}
|
|
17
|
-
function walk(dir, root, acc) {
|
|
18
|
-
let entries;
|
|
19
|
-
try {
|
|
20
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
21
|
-
}
|
|
22
|
-
catch (err) {
|
|
23
|
-
void err; // unreadable dir (permissions, dangling symlink) — deliberately skipped
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
for (const e of entries) {
|
|
27
|
-
const abs = join(dir, e.name);
|
|
28
|
-
if (e.isDirectory()) {
|
|
29
|
-
if (BUILTIN_IGNORE_DIRS.has(e.name))
|
|
30
|
-
continue;
|
|
31
|
-
walk(abs, root, acc);
|
|
32
|
-
}
|
|
33
|
-
else if (e.isFile()) {
|
|
34
|
-
acc.push(toPosix(relative(root, abs)));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
14
|
/**
|
|
39
15
|
* Turn a set of files into a `Selection` — the recurring "the code side is a
|
|
40
16
|
* set of files" case (an ADR index binds to `adr/*.md`, a manifest binds to
|
|
@@ -55,7 +31,7 @@ function walk(dir, root, acc) {
|
|
|
55
31
|
export function files(opts) {
|
|
56
32
|
const root = opts.cwd ?? process.cwd();
|
|
57
33
|
const all = [];
|
|
58
|
-
|
|
34
|
+
all.push(...walkFiles(root, root, BUILTIN_IGNORE_DIRS));
|
|
59
35
|
const globs = typeof opts.glob === 'string' ? [opts.glob] : [...opts.glob];
|
|
60
36
|
const matchesGlob = picomatch(globs);
|
|
61
37
|
const matchesIgnore = opts.ignore && opts.ignore.length > 0 ? picomatch([...opts.ignore]) : () => false;
|
package/dist/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,SAAS,MAAM,WAAW,CAAA;AAgCjC,+EAA+E;AAC/E,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,cAAc;IACd,MAAM;IACN,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,SAAS;CACV,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CAAC,IAAkB;IACtC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IACtC,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAA;IAEvD,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAA;IAC1E,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;IACpC,MAAM,aAAa,GACjB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAA;IAEnF,MAAM,QAAQ,GAAgB,GAAG;SAC9B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SACxD,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;IAE1D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;AACjE,CAAC"}
|
package/dist/gherkin-ts.d.ts
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PresetReportOptions, type CollectResult } from '@nielspeter/eess';
|
|
2
2
|
import { type ArchProject } from '@nielspeter/eess-ts';
|
|
3
3
|
import type { FeatureSet, GherkinScenario } from '@nielspeter/eess-gherkin';
|
|
4
|
+
export { finishPreset, collectResult } from '@nielspeter/eess';
|
|
5
|
+
export type { CollectResult } from '@nielspeter/eess';
|
|
6
|
+
export type { ArchViolation, PresetReportOptions } from '@nielspeter/eess';
|
|
7
|
+
/**
|
|
8
|
+
* Custom citation extractor — receives one `it('…')` title and returns the
|
|
9
|
+
* scenario it cites, or `undefined` if the title is not a citation. Shared by
|
|
10
|
+
* every gherkin-ts export that reads citations (plan 0145; previously three
|
|
11
|
+
* copies of the same inline signature).
|
|
12
|
+
*/
|
|
13
|
+
export type TestCitationExtractor = (itTitle: string) => ExtractedTestCitation | undefined;
|
|
4
14
|
export interface ScenarioTestsResolveOptions extends PresetReportOptions {
|
|
5
15
|
/**
|
|
6
|
-
* Custom citation extractor for transition periods
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `` it('<path>.feature › <Scenario title>') `` (plan 0080).
|
|
16
|
+
* Custom citation extractor for transition periods. Default: the frozen
|
|
17
|
+
* convention adapted to a single string — `` it('<path>.feature › <Scenario
|
|
18
|
+
* title>') `` (plan 0080).
|
|
10
19
|
*/
|
|
11
|
-
readonly extract?:
|
|
20
|
+
readonly extract?: TestCitationExtractor;
|
|
12
21
|
}
|
|
13
22
|
export interface ScenariosCoveredOptions extends PresetReportOptions {
|
|
14
23
|
/** Custom citation extractor — same contract as {@link ScenarioTestsResolveOptions.extract}. */
|
|
15
|
-
readonly extract?:
|
|
24
|
+
readonly extract?: TestCitationExtractor;
|
|
16
25
|
/**
|
|
17
26
|
* Require coverage only for scenarios matching this predicate — the opt-in
|
|
18
27
|
* scope. Default: every scenario. Use it to exclude un-implemented flows,
|
|
@@ -26,6 +35,13 @@ export interface ExtractedTestCitation {
|
|
|
26
35
|
/** The cited scenario title. */
|
|
27
36
|
readonly title: string;
|
|
28
37
|
}
|
|
38
|
+
/** Where one `it('…')` citation lives — exported (plan 0145) so a consumer
|
|
39
|
+
* can report a citation's own location, not just that one exists. */
|
|
40
|
+
export interface TestCitationSite {
|
|
41
|
+
readonly title: string;
|
|
42
|
+
readonly file: string;
|
|
43
|
+
readonly line: number;
|
|
44
|
+
}
|
|
29
45
|
/** The default `it()`-title convention: `<path>.feature › <title>`. */
|
|
30
46
|
declare function defaultExtract(itTitle: string): ExtractedTestCitation | undefined;
|
|
31
47
|
/**
|
|
@@ -43,7 +59,17 @@ declare function defaultExtract(itTitle: string): ExtractedTestCitation | undefi
|
|
|
43
59
|
* Resolves a citation; it does NOT claim the test exercises the scenario's
|
|
44
60
|
* steps — that is Tier 2, still open (plan 0079).
|
|
45
61
|
*/
|
|
46
|
-
export declare function scenarioTestsResolve(project: ArchProject, set: FeatureSet, options?: ScenarioTestsResolveOptions):
|
|
62
|
+
export declare function scenarioTestsResolve(project: ArchProject, set: FeatureSet, options?: ScenarioTestsResolveOptions): CollectResult;
|
|
63
|
+
/**
|
|
64
|
+
* Every test citation, keyed by the scenario it cites (`relPath title`) —
|
|
65
|
+
* exported (plan 0145) so a consumer can report where a citation lives, not
|
|
66
|
+
* just that one exists. Ambiguous citations (matching more than one feature
|
|
67
|
+
* file) are excluded, same as the prior `citedScenarioKeys`'s behavior. If
|
|
68
|
+
* two tests cite the same scenario, the map keeps one of them (which one is
|
|
69
|
+
* unspecified) — enough to point an author at *a* citing test, which is all
|
|
70
|
+
* any consumer here needs.
|
|
71
|
+
*/
|
|
72
|
+
export declare function citedScenarioSites(project: ArchProject, set: FeatureSet, extract: TestCitationExtractor): Map<string, TestCitationSite>;
|
|
47
73
|
/**
|
|
48
74
|
* Cross-validate that every in-scope scenario is cited by at least one test —
|
|
49
75
|
* the coverage (right→left) direction, the complement of `scenarioTestsResolve`.
|
|
@@ -58,7 +84,40 @@ export declare function scenarioTestsResolve(project: ArchProject, set: FeatureS
|
|
|
58
84
|
* Coverage means "a test cites this scenario", not "a test exercises its steps"
|
|
59
85
|
* (Tier 2, still open — plan 0079).
|
|
60
86
|
*/
|
|
61
|
-
export declare function scenariosCovered(project: ArchProject, set: FeatureSet, options?: ScenariosCoveredOptions):
|
|
87
|
+
export declare function scenariosCovered(project: ArchProject, set: FeatureSet, options?: ScenariosCoveredOptions): CollectResult;
|
|
88
|
+
export interface ScenarioExemptionsCurrentOptions extends PresetReportOptions {
|
|
89
|
+
/**
|
|
90
|
+
* Which scenarios are currently exempt from the coverage requirement.
|
|
91
|
+
* Required — no default, unlike `scenariosCovered`'s `include`: the two
|
|
92
|
+
* options must never be able to silently disagree about the same tag.
|
|
93
|
+
* Found in proposal 005's third review round — if both defaulted to
|
|
94
|
+
* `@wip`, a `@wip` scenario would be simultaneously required to be cited
|
|
95
|
+
* (`scenariosCovered`, default `include`) and required to be uncited
|
|
96
|
+
* (this export, a hypothetical default `isExempt`), unconditionally.
|
|
97
|
+
* There is no default under which the pair is not self-contradictory, so
|
|
98
|
+
* there is no default at all — the caller states the tag explicitly,
|
|
99
|
+
* e.g. `(s) => s.tags.includes('wip')`, paired with the matching
|
|
100
|
+
* `scenariosCovered({ include: (s) => !s.tags.includes('wip') })`.
|
|
101
|
+
*/
|
|
102
|
+
readonly isExempt: (scenario: GherkinScenario) => boolean;
|
|
103
|
+
/** Custom citation extractor — same contract as the siblings' `extract`. */
|
|
104
|
+
readonly extract?: TestCitationExtractor;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Cross-validate that no scenario currently exempted (via `isExempt`) already
|
|
108
|
+
* has a real citing test — the complement of `scenariosCovered`: that gate
|
|
109
|
+
* proves a non-exempt scenario IS cited; this one proves an exempt scenario
|
|
110
|
+
* is NOT YET cited. An exemption that outlives its reason is a silent hole
|
|
111
|
+
* in the coverage gate it was meant to narrow (proposal 005).
|
|
112
|
+
*
|
|
113
|
+
* A citation from a `.skip`-modified test still counts as "cites it," same
|
|
114
|
+
* as `scenariosCovered`'s own treatment (`itTitles` binds a citation; it
|
|
115
|
+
* does not require the test to run) — consistency across the three
|
|
116
|
+
* gherkin-ts gates is worth more than a bespoke carve-out here. A caller
|
|
117
|
+
* who wants a skipped-placeholder citation to NOT trigger staleness narrows
|
|
118
|
+
* `isExempt` to exclude it (or tags it `@wip @tracked` and narrows on that).
|
|
119
|
+
*/
|
|
120
|
+
export declare function scenarioExemptionsCurrent(project: ArchProject, set: FeatureSet, options: ScenarioExemptionsCurrentOptions): CollectResult;
|
|
62
121
|
/** Count citing tests / scenarios for a caller's non-vacuity summary line. */
|
|
63
122
|
export declare function scenarioTestStats(project: ArchProject, set: FeatureSet, options?: ScenarioTestsResolveOptions): {
|
|
64
123
|
citations: number;
|
package/dist/gherkin-ts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gherkin-ts.d.ts","sourceRoot":"","sources":["../src/gherkin-ts.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gherkin-ts.d.ts","sourceRoot":"","sources":["../src/gherkin-ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAExB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAK3E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAG9D,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,qBAAqB,GAAG,SAAS,CAAA;AAE1F,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAA;CACzC;AAED,MAAM,WAAW,uBAAwB,SAAQ,m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EAAE,qBAAqB,CAAA;CACzC;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,gCAAgC,GACxC,aAAa,CA2Bf;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,UAAU,EACf,OAAO,GAAE,2BAAgC,GACxC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAM1C;AAGD,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/gherkin-ts.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { finishPreset } from '@nielspeter/eess';
|
|
1
|
+
import { finishPreset, collectResult, } from '@nielspeter/eess';
|
|
2
|
+
import { featurePaths, violationsFor } from './shared.js';
|
|
2
3
|
import { calls } from '@nielspeter/eess-ts';
|
|
4
|
+
import path from 'node:path';
|
|
3
5
|
import { itOrTestTitleOf } from './it-title.js';
|
|
6
|
+
// Kernel re-exports (plan 0089 — standalone sufficiency): see mermaid-ts.ts.
|
|
7
|
+
export { finishPreset, collectResult } from '@nielspeter/eess';
|
|
4
8
|
// The gherkin↔ts citation convention (plan 0080): a test names the scenario it
|
|
5
9
|
// proves in its `it()` title — a feature path (unique `/`-boundary suffix, like
|
|
6
10
|
// md↔gherkin) then the scenario title, separated by `›` or `·`.
|
|
@@ -45,21 +49,11 @@ function itTitles(project) {
|
|
|
45
49
|
return out;
|
|
46
50
|
}
|
|
47
51
|
/** Resolve a cited path against the set: exact relPath, or unique `/`-boundary suffix. */
|
|
48
|
-
|
|
49
|
-
const all = set.features().map((f) => f.relPath);
|
|
50
|
-
if (all.includes(path))
|
|
51
|
-
return [path];
|
|
52
|
-
return all.filter((rel) => rel.endsWith(`/${path}`));
|
|
53
|
-
}
|
|
54
|
-
const v = (site, message, because) => ({
|
|
55
|
-
rule: RULE,
|
|
56
|
-
ruleId: 'crossval/scenario-tests-resolve',
|
|
52
|
+
const v = violationsFor(RULE, 'crossval/scenario-tests-resolve', (site) => ({
|
|
57
53
|
element: `${site.file}:${site.line}`,
|
|
58
54
|
file: site.file,
|
|
59
55
|
line: site.line,
|
|
60
|
-
|
|
61
|
-
because,
|
|
62
|
-
});
|
|
56
|
+
}));
|
|
63
57
|
/**
|
|
64
58
|
* Cross-validate that every scenario citation in the *test* AST resolves against
|
|
65
59
|
* the loaded feature set — the mirror image of `scenarioCitationsResolve`, whose
|
|
@@ -79,49 +73,69 @@ export function scenarioTestsResolve(project, set, options = {}) {
|
|
|
79
73
|
const extract = options.extract ?? defaultExtract;
|
|
80
74
|
const scenarioKeys = new Set(set.scenarios().map((s) => `${s.relPath} ${s.title}`));
|
|
81
75
|
const violations = [];
|
|
76
|
+
let examined = 0;
|
|
77
|
+
const paths = featurePaths(set);
|
|
82
78
|
for (const site of itTitles(project)) {
|
|
83
79
|
const cite = extract(site.title);
|
|
84
80
|
if (cite === undefined)
|
|
85
81
|
continue; // not a scenario-citing test
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
// AFTER the `continue`, deliberately — ADR-014 §2: "a count taken before the
|
|
83
|
+
// loop's own `continue` is the same mistake one line earlier." The unit this
|
|
84
|
+
// rule examines is a CITATION it resolved, not every `it()` in the project;
|
|
85
|
+
// counting titles would report a healthy denominator for a suite that cites
|
|
86
|
+
// nothing at all, which is the exact state this rule exists to notice.
|
|
87
|
+
examined++;
|
|
88
|
+
const resolved = paths.resolve(cite.path);
|
|
89
|
+
if (resolved.kind === 'none') {
|
|
88
90
|
violations.push(v(site, `cites \`${cite.path}\` — no such feature file in the set`, 'a test citing a missing behavior spec is a dangling reference'));
|
|
89
91
|
continue;
|
|
90
92
|
}
|
|
91
|
-
if (resolved.
|
|
92
|
-
violations.push(v(site, `cites \`${cite.path}\` — ambiguous, matches ${resolved.length} feature files (${resolved.join(', ')})`, 'an ambiguous citation cannot be mechanically resolved; cite a longer suffix'));
|
|
93
|
+
if (resolved.kind === 'ambiguous') {
|
|
94
|
+
violations.push(v(site, `cites \`${cite.path}\` — ambiguous, matches ${String(resolved.files.length)} feature files (${resolved.files.join(', ')})`, 'an ambiguous citation cannot be mechanically resolved; cite a longer suffix'));
|
|
93
95
|
continue;
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
// `none` and `ambiguous` already returned above, so this is exact or unique.
|
|
98
|
+
const rel = resolved.file;
|
|
99
|
+
if (!scenarioKeys.has(`${rel} ${cite.title}`)) {
|
|
97
100
|
violations.push(v(site, `cites '${cite.title}' in \`${rel}\` — no such scenario in that feature file`, 'a renamed or deleted scenario must not silently orphan the test that proves it'));
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
return finishPreset(violations, options);
|
|
103
|
+
return finishPreset(collectResult(violations, { examined }), options);
|
|
101
104
|
}
|
|
102
105
|
const COVER_RULE = 'every scenario should be proven by a citing test';
|
|
103
|
-
const sv = (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
const sv = violationsFor(COVER_RULE, 'crossval/scenarios-covered', (s) => ({
|
|
107
|
+
element: `${s.relPath} › ${s.title}`,
|
|
108
|
+
file: s.file,
|
|
109
|
+
line: s.line,
|
|
110
|
+
}));
|
|
111
|
+
/**
|
|
112
|
+
* Every test citation, keyed by the scenario it cites (`relPath title`) —
|
|
113
|
+
* exported (plan 0145) so a consumer can report where a citation lives, not
|
|
114
|
+
* just that one exists. Ambiguous citations (matching more than one feature
|
|
115
|
+
* file) are excluded, same as the prior `citedScenarioKeys`'s behavior. If
|
|
116
|
+
* two tests cite the same scenario, the map keeps one of them (which one is
|
|
117
|
+
* unspecified) — enough to point an author at *a* citing test, which is all
|
|
118
|
+
* any consumer here needs.
|
|
119
|
+
*/
|
|
120
|
+
export function citedScenarioSites(project, set, extract) {
|
|
121
|
+
const sites = new Map();
|
|
122
|
+
const paths = featurePaths(set);
|
|
115
123
|
for (const site of itTitles(project)) {
|
|
116
124
|
const cite = extract(site.title);
|
|
117
125
|
if (cite === undefined)
|
|
118
126
|
continue;
|
|
119
|
-
const resolved =
|
|
120
|
-
|
|
127
|
+
const resolved = paths.resolve(cite.path);
|
|
128
|
+
// Unambiguous only: `exact` and `unique` both name one file; `ambiguous`
|
|
129
|
+
// and `none` name none, and this map is keyed on a real path.
|
|
130
|
+
const rel = resolved.kind === 'exact' || resolved.kind === 'unique' ? resolved.file : undefined;
|
|
121
131
|
if (rel !== undefined)
|
|
122
|
-
|
|
132
|
+
sites.set(`${rel} ${cite.title}`, site);
|
|
123
133
|
}
|
|
124
|
-
return
|
|
134
|
+
return sites;
|
|
135
|
+
}
|
|
136
|
+
/** The set of `relPath title` keys a test unambiguously cites in the project. */
|
|
137
|
+
function citedScenarioKeys(project, set, extract) {
|
|
138
|
+
return new Set(citedScenarioSites(project, set, extract).keys());
|
|
125
139
|
}
|
|
126
140
|
/**
|
|
127
141
|
* Cross-validate that every in-scope scenario is cited by at least one test —
|
|
@@ -141,12 +155,57 @@ export function scenariosCovered(project, set, options = {}) {
|
|
|
141
155
|
const extract = options.extract ?? defaultExtract;
|
|
142
156
|
const include = options.include ?? (() => true);
|
|
143
157
|
const covered = citedScenarioKeys(project, set, extract);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
// The unit is every scenario this rule CONSIDERED, not the ones that failed —
|
|
159
|
+
// counting the misses would report `examined: 0` on a perfectly healthy run.
|
|
160
|
+
const considered = set.scenarios().filter(include);
|
|
161
|
+
const examined = considered.length;
|
|
162
|
+
const violations = considered
|
|
147
163
|
.filter((s) => !covered.has(`${s.relPath} ${s.title}`))
|
|
148
164
|
.map((s) => sv(s, 'no test cites this scenario', 'an unproven use-case flow is a spec with no gate behind it'));
|
|
149
|
-
return finishPreset(violations, options);
|
|
165
|
+
return finishPreset(collectResult(violations, { examined }), options);
|
|
166
|
+
}
|
|
167
|
+
const EXEMPTION_RULE = 'an exempt scenario should have its exemption removed once a test cites it';
|
|
168
|
+
/**
|
|
169
|
+
* Cross-validate that no scenario currently exempted (via `isExempt`) already
|
|
170
|
+
* has a real citing test — the complement of `scenariosCovered`: that gate
|
|
171
|
+
* proves a non-exempt scenario IS cited; this one proves an exempt scenario
|
|
172
|
+
* is NOT YET cited. An exemption that outlives its reason is a silent hole
|
|
173
|
+
* in the coverage gate it was meant to narrow (proposal 005).
|
|
174
|
+
*
|
|
175
|
+
* A citation from a `.skip`-modified test still counts as "cites it," same
|
|
176
|
+
* as `scenariosCovered`'s own treatment (`itTitles` binds a citation; it
|
|
177
|
+
* does not require the test to run) — consistency across the three
|
|
178
|
+
* gherkin-ts gates is worth more than a bespoke carve-out here. A caller
|
|
179
|
+
* who wants a skipped-placeholder citation to NOT trigger staleness narrows
|
|
180
|
+
* `isExempt` to exclude it (or tags it `@wip @tracked` and narrows on that).
|
|
181
|
+
*/
|
|
182
|
+
export function scenarioExemptionsCurrent(project, set, options) {
|
|
183
|
+
const extract = options.extract ?? defaultExtract;
|
|
184
|
+
const sites = citedScenarioSites(project, set, extract);
|
|
185
|
+
// Every exemption this rule weighed. A run with no exemptions declared
|
|
186
|
+
// examines nothing and says so, rather than passing silently.
|
|
187
|
+
const exempt = set.scenarios().filter((s) => options.isExempt(s));
|
|
188
|
+
const examined = exempt.length;
|
|
189
|
+
const violations = exempt.flatMap((s) => {
|
|
190
|
+
const site = sites.get(`${s.relPath} ${s.title}`);
|
|
191
|
+
if (site === undefined)
|
|
192
|
+
return [];
|
|
193
|
+
const citedAt = `${path.relative(process.cwd(), site.file)}:${String(site.line)}`;
|
|
194
|
+
return [
|
|
195
|
+
{
|
|
196
|
+
rule: EXEMPTION_RULE,
|
|
197
|
+
ruleId: 'crossval/scenario-exemption-stale',
|
|
198
|
+
element: `${s.relPath} › ${s.title}`,
|
|
199
|
+
file: s.file,
|
|
200
|
+
line: s.line,
|
|
201
|
+
message: `scenario "${s.title}" is exempt but ${citedAt} already cites it`,
|
|
202
|
+
because: 'an exemption that has outlived its reason is a silent hole in the coverage gate',
|
|
203
|
+
suggestion: 'if the scenario is genuinely done, remove the exempting tag; if the exemption is ' +
|
|
204
|
+
'still intentional (flaky, partial, tracked elsewhere), narrow isExempt to exclude it',
|
|
205
|
+
},
|
|
206
|
+
];
|
|
207
|
+
});
|
|
208
|
+
return finishPreset(collectResult(violations, { examined }), options);
|
|
150
209
|
}
|
|
151
210
|
/** Count citing tests / scenarios for a caller's non-vacuity summary line. */
|
|
152
211
|
export function scenarioTestStats(project, set, options = {}) {
|
package/dist/gherkin-ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gherkin-ts.js","sourceRoot":"","sources":["../src/gherkin-ts.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gherkin-ts.js","sourceRoot":"","sources":["../src/gherkin-ts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGZ,aAAa,GAEd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,KAAK,EAAoB,MAAM,qBAAqB,CAAA;AAE7D,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,6EAA6E;AAC7E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAiD9D,+EAA+E;AAC/E,gFAAgF;AAChF,gEAAgE;AAChE,MAAM,UAAU,GAAG,8CAA8C,CAAA;AACjE,MAAM,IAAI,GAAG,wDAAwD,CAAA;AAErE,uEAAuE;AACvE,SAAS,cAAc,CAAC,OAAe;IACrC,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA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HANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { CollectResult } from '@nielspeter/eess';
|
|
2
|
+
import { type PresetReportOptions } from '@nielspeter/eess';
|
|
2
3
|
import type { Corpus } from '@nielspeter/eess-md';
|
|
3
4
|
import type { FeatureSet } from '@nielspeter/eess-gherkin';
|
|
5
|
+
export { finishPreset, collectResult } from '@nielspeter/eess';
|
|
6
|
+
export type { CollectResult } from '@nielspeter/eess';
|
|
7
|
+
export type { ArchViolation, PresetReportOptions } from '@nielspeter/eess';
|
|
4
8
|
export interface ScenarioCitationsResolveOptions extends PresetReportOptions {
|
|
5
9
|
/** Glob selecting the markdown documents to scan. Default `**` (whole corpus). */
|
|
6
10
|
readonly dir?: string;
|
|
@@ -30,7 +34,7 @@ declare function defaultExtract(line: string): ExtractedCitation[];
|
|
|
30
34
|
* files), or the cited scenario title doesn't exist in that file. Citations
|
|
31
35
|
* inside fenced code blocks never count.
|
|
32
36
|
*/
|
|
33
|
-
export declare function scenarioCitationsResolve(corpus: Corpus, set: FeatureSet, options?: ScenarioCitationsResolveOptions):
|
|
37
|
+
export declare function scenarioCitationsResolve(corpus: Corpus, set: FeatureSet, options?: ScenarioCitationsResolveOptions): CollectResult;
|
|
34
38
|
/** Count citations/scenarios for a caller's non-vacuity summary line. */
|
|
35
39
|
export declare function scenarioCitationStats(corpus: Corpus, set: FeatureSet, options?: ScenarioCitationsResolveOptions): {
|
|
36
40
|
citations: number;
|
package/dist/md-gherkin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-gherkin.d.ts","sourceRoot":"","sources":["../src/md-gherkin.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"md-gherkin.d.ts","sourceRoot":"","sources":["../src/md-gherkin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAGL,KAAK,mBAAmB,E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|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-gherkin.js","sourceRoot":"","sources":["../src/md-gherkin.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"md-gherkin.js","sourceRoot":"","sources":["../src/md-gherkin.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EACL,YAAY,EAGZ,aAAa,GACd,MAAM,kBAAkB,CAAA;AAIzB,6EAA6E;AAC7E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AA8B9D,2EAA2E;AAC3E,4EAA4E;AAC5E,MAAM,eAAe,GAAG,uBAAuB,CAAA;AAC/C,MAAM,QAAQ,GAAG,wBAAwB,CAAA;AACzC,MAAM,IAAI,GAAG,oEAAoE,CAAA;AAEjF,SAAS,cAAc,CAAC,IAAY;IAClC,MAAM,GAAG,GAAwB,EAAE,CAAA;IACnC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACjB,IAAI,IAAI,KAAK,SAAS;YAAE,SAAQ;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;QACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACtC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAA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import
|
|
1
|
+
import type { CollectResult } from '@nielspeter/eess';
|
|
2
|
+
import { type PresetReportOptions } from '@nielspeter/eess';
|
|
2
3
|
import type { Corpus, MdDocument } from '@nielspeter/eess-md';
|
|
4
|
+
export { finishPreset, collectResult } from '@nielspeter/eess';
|
|
5
|
+
export type { CollectResult } from '@nielspeter/eess';
|
|
6
|
+
export type { ArchViolation, PresetReportOptions } from '@nielspeter/eess';
|
|
3
7
|
export interface TableErAgreeOptions extends PresetReportOptions {
|
|
4
8
|
/** Glob selecting the documents to check. Default `**`. */
|
|
5
9
|
readonly docs?: string;
|
|
@@ -32,7 +36,7 @@ export interface TableErAgreeOptions extends PresetReportOptions {
|
|
|
32
36
|
* `undefined`, are skipped — gate diagram *presence* separately with
|
|
33
37
|
* `docs()` conformance if the corpus requires one.
|
|
34
38
|
*/
|
|
35
|
-
export declare function tableErAgree(corpus: Corpus, options: TableErAgreeOptions):
|
|
39
|
+
export declare function tableErAgree(corpus: Corpus, options: TableErAgreeOptions): CollectResult;
|
|
36
40
|
/** Count compared docs/entities/attributes for a caller's non-vacuity summary. */
|
|
37
41
|
export declare function tableErStats(corpus: Corpus, options: TableErAgreeOptions): {
|
|
38
42
|
docs: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-mermaid-er.d.ts","sourceRoot":"","sources":["../src/md-mermaid-er.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"md-mermaid-er.d.ts","sourceRoot":"","sources":["../src/md-mermaid-er.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAI7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAG9D,YAAY,EAAE,a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