@am_shork/attest 0.4.0 → 0.4.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/CHANGELOG.md +112 -2
- package/README.md +40 -292
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/json.d.ts.map +1 -1
- package/dist/cli/json.js +25 -1
- package/dist/cli/json.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +15 -1
- package/dist/cli/report.js.map +1 -1
- package/dist/core/apply.d.ts.map +1 -1
- package/dist/core/apply.js.map +1 -1
- package/dist/core/docs.d.ts +23 -0
- package/dist/core/docs.d.ts.map +1 -0
- package/dist/core/docs.js +91 -0
- package/dist/core/docs.js.map +1 -0
- package/dist/core/types.d.ts +22 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/version.d.ts.map +1 -0
- package/dist/{cli → core}/version.js +5 -1
- package/dist/core/version.js.map +1 -0
- package/package.json +1 -1
- package/dist/cli/version.d.ts.map +0 -1
- package/dist/cli/version.js.map +0 -1
- /package/dist/{cli → core}/version.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,115 @@ input, removes/renames a public API or `--json` field, or changes a default
|
|
|
13
13
|
runtime behavior an existing invocation relies on — diagnostic message text is
|
|
14
14
|
not API.
|
|
15
15
|
|
|
16
|
+
## [0.4.1] - 2026-07-29
|
|
17
|
+
|
|
18
|
+
Every diagnostic now links to a section that explains it, and the README is a
|
|
19
|
+
README again — the reference it had grown into has a page of its own, in both
|
|
20
|
+
languages, saying which version each part of it arrived in. No behaviour a CI
|
|
21
|
+
step branches on changed; the human report gains one line per issue.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **A troubleshooting document, with one section per issue code — and every
|
|
26
|
+
diagnostic links to its own.** A diagnostic names a rule and states a fix in
|
|
27
|
+
one line, which is the right size for a reader who already knows the rule and
|
|
28
|
+
the wrong size for the one who does not — and the second reader is the one
|
|
29
|
+
adopting Attest, who meets six codes at once on their first run. The knowledge
|
|
30
|
+
was not missing so much as filed where nobody looks during a failure: the
|
|
31
|
+
cross-platform traps (a backslash is an escape in a glob; Vitest's 5-second
|
|
32
|
+
default against a scenario that starts a subprocess) lived in `CLAUDE.md`,
|
|
33
|
+
which ships with no release, and the rationale lived in a 450-line README
|
|
34
|
+
nobody greps mid-failure. Both languages, as always
|
|
35
|
+
(`docs/{en,zh}/troubleshooting.md`).
|
|
36
|
+
|
|
37
|
+
What makes this cheap to keep true is that `code` was already the
|
|
38
|
+
machine-readable name of a rule, so the section heading is the code verbatim
|
|
39
|
+
and the link is *derived*: there is no second string to keep in step, and so
|
|
40
|
+
no way to ship a diagnostic pointing at the wrong section. The remaining
|
|
41
|
+
failure mode — a section that does not exist — is closed from the other end:
|
|
42
|
+
`Issue.code` is narrowed from `string` to the roster in `core/docs.ts`, which
|
|
43
|
+
the suite asserts against both documents. An undocumented diagnostic is now a
|
|
44
|
+
compile error. (That narrowing found two families of codes a regex over the
|
|
45
|
+
source had missed, because they are built through a helper rather than written
|
|
46
|
+
at the issue site.) The two readers that restate a *subset* of the roster —
|
|
47
|
+
`StaticReadCode`, `DeltaReadCode` — are now asserted to be subsets of it in
|
|
48
|
+
`tests/issue-code-types.spec-d.ts`. That was already caught, but downstream
|
|
49
|
+
and by accident: the failure surfaced where the code is assigned into an
|
|
50
|
+
`Issue`, several files from the two lines that disagree.
|
|
51
|
+
|
|
52
|
+
Links are pinned to `v<version>` — the tag of the build that printed the
|
|
53
|
+
diagnostic — not to `main`. The two failure modes are not the same size. An
|
|
54
|
+
unresolved tag exists only between a release commit and its push, which is a
|
|
55
|
+
version nobody has installed, so no build in anyone's `node_modules` prints
|
|
56
|
+
those links. An unpinned link is dereferenced by every installed copy forever,
|
|
57
|
+
and the first breaking change to a code turns years of shipped builds into
|
|
58
|
+
links that miss — or worse, land on a section confidently describing a rule
|
|
59
|
+
that has since been redefined. (`main` remains the fallback for the one case
|
|
60
|
+
where pinning is impossible rather than imprecise: an unreadable manifest.)
|
|
61
|
+
|
|
62
|
+
- **`docsUrl` on every issue in `--json`.** Additive, so no `schemaVersion`
|
|
63
|
+
bump. It is attached in the one envelope every report is built through —
|
|
64
|
+
including the `internal-error` crash path — rather than at the ~26 sites that
|
|
65
|
+
construct an `Issue`, for the same reason `hasError` is one function. It is
|
|
66
|
+
for the human reading a CI log; a consumer should still branch on `code`,
|
|
67
|
+
which is the more precise form of the same information.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- **Every issue in the human report gains a line: `→ <docs url>`, dim, under the
|
|
72
|
+
message.** The one behaviour change an existing invocation can notice. No exit
|
|
73
|
+
code moves, no verdict moves, no input that passed now fails, and `--json` is
|
|
74
|
+
untouched by it — but a snapshot test over `attest`'s stdout will need
|
|
75
|
+
re-recording. That report is prose for humans by the same rule that makes
|
|
76
|
+
`Issue.message` prose (see *Versioning* above); the machine surface is
|
|
77
|
+
`--json`, which is where a CI step should have been looking.
|
|
78
|
+
|
|
79
|
+
- **`Issue.code` is typed `IssueCode`, not `string`.** Breaking only for code
|
|
80
|
+
that *constructs* an `Issue` — reading one, which is what `--json` consumers
|
|
81
|
+
do, gets strictly more type information than before. Nothing in the CLI
|
|
82
|
+
surface, the report shape or the exit codes changes.
|
|
83
|
+
|
|
84
|
+
`SCHEMA_VERSION` stays at 1 for this too, not only for `docsUrl`: the emitted
|
|
85
|
+
values are the same strings they always were, so nothing on the wire changed
|
|
86
|
+
and no consumer can tell the difference. The narrowing is a compile-time
|
|
87
|
+
constraint on this repository, not a report-shape change.
|
|
88
|
+
|
|
89
|
+
- **The README is a README again; the reference moved to
|
|
90
|
+
`docs/{en,zh}/cli-reference.md`.** It had become four documents wearing one
|
|
91
|
+
hat — a pitch, a tutorial, a CLI reference and a running design argument — at
|
|
92
|
+
470 lines, which is long past the point where a newcomer reads it and well
|
|
93
|
+
past where anyone looks up a flag in it. It is now 199: the pitch, a
|
|
94
|
+
five-minute start, and a table of where everything else lives. Nothing was
|
|
95
|
+
deleted. Per-command behaviour, `--eval`, `--vitest-config`, the run scope and
|
|
96
|
+
the whole `--json` shape are in the new reference; the rationale for the
|
|
97
|
+
diagnostics that were argued through in the README (`registry-not-static`,
|
|
98
|
+
`duplicate-prefix`, `empty-spec`, `stale-spec-doc`) already had a better home
|
|
99
|
+
in the troubleshooting document, so the reference states the rule and links to
|
|
100
|
+
it rather than restating the argument a third time.
|
|
101
|
+
|
|
102
|
+
Each section of the reference that has changed since it first shipped now
|
|
103
|
+
carries a collapsed **History** table. Attest is 0.x and moves fast enough
|
|
104
|
+
that a page describes the latest build to a reader who installed an earlier
|
|
105
|
+
one, with nothing to tell them which half applies — `--vitest-config` has
|
|
106
|
+
existed since 0.1.5, the run has been scoped to attesting spec files only
|
|
107
|
+
since 0.2.0, and the registry has had to be a literal only since 0.2.0. The
|
|
108
|
+
rows were written from this file. A gate checks that every version they name
|
|
109
|
+
is a heading in it, so a row cannot cite a version that was never cut; it
|
|
110
|
+
cannot check that a row is *true*, which still needs a reader with the
|
|
111
|
+
changelog open. `Unreleased` counts as a heading while one exists — and stops
|
|
112
|
+
counting when a release removes it, which is what makes renumbering those rows
|
|
113
|
+
part of cutting the release rather than something to remember.
|
|
114
|
+
|
|
115
|
+
The two documentation gates widened with it: they scanned `README.md` alone,
|
|
116
|
+
and the JSON sample they exist to catch had just moved out from under them.
|
|
117
|
+
They now enumerate `README.md` plus every `*.md` in both language directories,
|
|
118
|
+
so a page added later is covered by default rather than by remembering.
|
|
119
|
+
|
|
120
|
+
- **`packageVersion()` moved from `src/cli/version.ts` to `src/core/version.ts`.**
|
|
121
|
+
It answers "which build is this", which `core/docs.ts` now has to ask in order
|
|
122
|
+
to pin a link — not a CLI concern. Neither path is in the `exports` map, so
|
|
123
|
+
nothing installable can have been importing either.
|
|
124
|
+
|
|
16
125
|
## [0.4.0] - 2026-07-28
|
|
17
126
|
|
|
18
127
|
Reading a registry no longer opens a port or lets the repository under test write
|
|
@@ -1330,7 +1439,7 @@ sinking one version deeper each time a release was cut above it, and a rejection
|
|
|
1330
1439
|
filed under a version reads as belonging to it.
|
|
1331
1440
|
|
|
1332
1441
|
- **A requirement's id prefix must match its registry file's name.** The other
|
|
1333
|
-
half of the rule that shipped as `duplicate-prefix` (see `[
|
|
1442
|
+
half of the rule that shipped as `duplicate-prefix` (see `[0.4.0]`), and
|
|
1334
1443
|
the half that does not pay for itself. What killed it is that the corpus
|
|
1335
1444
|
already conforms: every fixture registry matches (`auth.reqs.ts` → `AUTH-`,
|
|
1336
1445
|
`core.reqs.ts` → `CORE-`), so the rule would detect nothing anywhere it was
|
|
@@ -1553,7 +1662,8 @@ filed under a version reads as belonging to it.
|
|
|
1553
1662
|
is still the whole answer. What is rejected is grouping as a way to assist it,
|
|
1554
1663
|
and this reopens only on a contradiction that grouping would have caught.
|
|
1555
1664
|
|
|
1556
|
-
[Unreleased]: https://gitlab.com/Pseudorca/attest/-/compare/v0.4.
|
|
1665
|
+
[Unreleased]: https://gitlab.com/Pseudorca/attest/-/compare/v0.4.1...main
|
|
1666
|
+
[0.4.1]: https://gitlab.com/Pseudorca/attest/-/tags/v0.4.1
|
|
1557
1667
|
[0.4.0]: https://gitlab.com/Pseudorca/attest/-/tags/v0.4.0
|
|
1558
1668
|
[0.3.0]: https://gitlab.com/Pseudorca/attest/-/tags/v0.3.0
|
|
1559
1669
|
[0.2.2]: https://gitlab.com/Pseudorca/attest/-/tags/v0.2.2
|
package/README.md
CHANGED
|
@@ -21,8 +21,6 @@ the stronger property; noticing that it *moved* is `verify`'s job, and only when
|
|
|
21
21
|
a scenario asserts on the value it read from `params`. Read the param inside the
|
|
22
22
|
assertion, not beside it.
|
|
23
23
|
|
|
24
|
-
See the authoritative design — [English](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/attest-design.md) · [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/attest-design.md) — and the rest of the [docs](https://gitlab.com/Pseudorca/attest/-/tree/main/docs).
|
|
25
|
-
|
|
26
24
|
## Prerequisites
|
|
27
25
|
|
|
28
26
|
- Node ≥ 20.19
|
|
@@ -43,9 +41,10 @@ pnpm add -D @am_shork/attest vitest vite
|
|
|
43
41
|
```
|
|
44
42
|
|
|
45
43
|
**1. Declare a requirement** (`requirements/auth.reqs.ts`) — import the intent API
|
|
46
|
-
from the vitest-free `/define` subpath so registry loading never touches the
|
|
47
|
-
A registry is a **literal**: every value is written where you can read
|
|
48
|
-
|
|
44
|
+
from the vitest-free `/define` subpath so registry loading never touches the
|
|
45
|
+
runtime. A registry is a **literal**: every value is written where you can read
|
|
46
|
+
it, because the commands below read it without executing it
|
|
47
|
+
([why](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md#a-registry-is-a-literal)).
|
|
49
48
|
|
|
50
49
|
```ts
|
|
51
50
|
import { defineRequirements } from '@am_shork/attest/define';
|
|
@@ -78,12 +77,6 @@ requirement('AUTH-3', () => {
|
|
|
78
77
|
});
|
|
79
78
|
```
|
|
80
79
|
|
|
81
|
-
`scenario` takes an optional third argument, a timeout in milliseconds, forwarded
|
|
82
|
-
to Vitest's `it`. The run is isolated (see [What a run actually
|
|
83
|
-
runs](#what-a-run-actually-runs)), so Vitest's default applies unless a scenario
|
|
84
|
-
says otherwise — worth setting on anything that drives a subprocess, a container
|
|
85
|
-
or a build.
|
|
86
|
-
|
|
87
80
|
**3. Run the engine:**
|
|
88
81
|
|
|
89
82
|
```bash
|
|
@@ -97,31 +90,10 @@ attest archive <change> # gate a proposed change: green + covered + no drift
|
|
|
97
90
|
attest status <change> # what that gate still wants, without running anything
|
|
98
91
|
```
|
|
99
92
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
`status` is the mid-flight view `archive` cannot give you: it reports each
|
|
106
|
-
requirement the change adds as `no-scenario`, `unproven` (a scenario exists but
|
|
107
|
-
has never been seen failing) or `proven`, reading the delta, the specs and
|
|
108
|
-
`first-run.json` — no suite run, no project code. Every state is named after the
|
|
109
|
-
issue the gate will raise, and it uses the gate's own predicate, so the two
|
|
110
|
-
cannot disagree. What it deliberately cannot tell you is whether the tests pass:
|
|
111
|
-
|
|
112
|
-
```console
|
|
113
|
-
$ attest status add-2fa
|
|
114
|
-
Change: add-2fa
|
|
115
|
-
✓ AUTH-7 2 scenarios, seen red
|
|
116
|
-
● AUTH-8 1 never run
|
|
117
|
-
✗ AUTH-9 no scenario yet
|
|
118
|
-
— 3 added requirements, 1 ready to archive
|
|
119
|
-
Not a verdict: run `attest archive add-2fa` to run the suite.
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
It exits 0 there. Unmet obligations are the normal state of a change in flight,
|
|
123
|
-
so they are rows, never a failing verdict — only a delta it could not read makes
|
|
124
|
-
`status` fail. `archive` remains the one command that says "done".
|
|
93
|
+
Every command takes the project root as an optional last argument, and `--json`
|
|
94
|
+
for exactly one machine-readable document on stdout. Flags, per-command
|
|
95
|
+
behaviour and the JSON shape are in the
|
|
96
|
+
[CLI reference](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md).
|
|
125
97
|
|
|
126
98
|
### Working with an agent
|
|
127
99
|
|
|
@@ -130,274 +102,50 @@ agree on intent, write the delta, drive the scenarios red, then implement to
|
|
|
130
102
|
green — and it is written for an agent to follow:
|
|
131
103
|
|
|
132
104
|
```bash
|
|
133
|
-
attest init
|
|
134
|
-
attest init --target cursor
|
|
135
|
-
attest init --target copilot
|
|
105
|
+
attest init # .claude/skills/attest/SKILL.md
|
|
106
|
+
attest init --target cursor # .cursor/rules/attest.mdc
|
|
107
|
+
attest init --target copilot # .github/instructions/attest.instructions.md
|
|
136
108
|
```
|
|
137
109
|
|
|
138
|
-
Each target gets the same document; only the frontmatter differs, because that
|
|
139
|
-
is the part the tool parses rather than the part the agent follows.
|
|
140
|
-
|
|
141
|
-
That document carries the workflow: how to write a `changes/<name>/` delta, why
|
|
142
|
-
its scenarios have to be red before you implement, what `attest archive` blocks
|
|
143
|
-
on, and the three shortcuts that turn the gate green without changing anything.
|
|
144
110
|
"Red before you implement" is enforced rather than advised: `archive` records how
|
|
145
111
|
each of a change's scenarios ended on its first run, into
|
|
146
112
|
`changes/<name>/first-run.json`, and blocks with `never-red` on any requirement
|
|
147
113
|
the delta adds whose scenarios were never seen to fail. Commit `first-run.json`
|
|
148
114
|
with the change — it is the evidence, and CI has to reach the same verdict as
|
|
149
115
|
you do.
|
|
150
|
-
An agent loads it on its own — its description is already in the agent's
|
|
151
|
-
context, or its path matches what you have open — so nothing has to be found or
|
|
152
|
-
pasted, and nothing is resident when you are working on something else.
|
|
153
|
-
|
|
154
|
-
`--target` is repeatable, and a name that is not a known target writes nothing
|
|
155
|
-
at all — an `unknown-target` error naming the ones that would have worked. An
|
|
156
|
-
agent whose instructions live in a file your *project* owns — `AGENTS.md`,
|
|
157
|
-
`CLAUDE.md` — is deliberately not a target: Attest writes whole files at paths it
|
|
158
|
-
names and never edits a document you maintain, so what covers those is one line
|
|
159
|
-
you add there yourself, pointing at the file above. It is cheaper than a
|
|
160
|
-
generated block and it cannot go stale.
|
|
161
|
-
|
|
162
|
-
There is deliberately **no `--check`**. The file is a function of the version you
|
|
163
|
-
installed, so gating it would turn CI red on upgrades you did nothing to cause,
|
|
164
|
-
and the remedy would be a commit containing no decision. `init` is idempotent
|
|
165
|
-
instead: re-run it after upgrading, and that is the whole update mechanism.
|
|
166
|
-
|
|
167
|
-
It also writes nothing else — no registry, no `package.json` scripts, no
|
|
168
|
-
`changes/` skeleton. A generated registry is either empty (an `empty-spec` error
|
|
169
|
-
on day one) or invented, and invented requirements are worse than none.
|
|
170
|
-
|
|
171
|
-
### A registry is a literal
|
|
172
|
-
|
|
173
|
-
`check`, `cover`, `render` and `status` read your `*.reqs.ts` files from their
|
|
174
|
-
**source**, with the TypeScript compiler API. They never execute them. That is
|
|
175
|
-
what makes `attest check` safe to run where its description implies you can —
|
|
176
|
-
first in the pipeline, on an untrusted fork MR, outside whatever sandbox you give
|
|
177
|
-
the tests. (`verify` and `archive` do run your suite, so they read the registry by
|
|
178
|
-
evaluating it: there is nothing left to protect at that point.)
|
|
179
|
-
|
|
180
|
-
The cost is a contract: every value in a registry must be written in the
|
|
181
|
-
registry.
|
|
182
116
|
|
|
183
|
-
|
|
184
|
-
|
|
117
|
+
An agent loads the document on its own — its description is already in the
|
|
118
|
+
agent's context, or its path matches what you have open — so nothing has to be
|
|
119
|
+
found or pasted. See
|
|
120
|
+
[`attest init`](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md#attest-init)
|
|
121
|
+
for the targets and what `init` deliberately does not write.
|
|
185
122
|
|
|
186
|
-
|
|
187
|
-
'UP-1': {
|
|
188
|
-
statement: 'An upload SHALL be rejected above {maxMb} MB.',
|
|
189
|
-
rationale: 'Protect the storage tier from unbounded writes.',
|
|
190
|
-
params: { maxMb: MAX_MB }, // ✗ registry-not-static
|
|
191
|
-
},
|
|
192
|
-
});
|
|
193
|
-
```
|
|
123
|
+
### When something goes wrong
|
|
194
124
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
number, and importing it says the application owns it. Inline the value and read
|
|
198
|
-
it from the registry in your code — that is the fix. If you need the old
|
|
199
|
-
behaviour instead, `--eval` restores it on every one of those commands:
|
|
125
|
+
Every diagnostic carries a `code`, and every code has a section in
|
|
126
|
+
**Troubleshooting** — which the diagnostic itself links to:
|
|
200
127
|
|
|
201
|
-
```bash
|
|
202
|
-
attest check --eval # reads the registry by executing every *.reqs.ts
|
|
203
128
|
```
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`registry-invalid` ERROR under both readers rather than a crash under one of them.
|
|
208
|
-
|
|
209
|
-
**The same rule covers a change's `requirements.delta.ts`**, because `status`
|
|
210
|
-
reads that file the same way — a delta built from an imported constant is the
|
|
211
|
-
same `registry-not-static` ERROR, with the same `--eval` way out. The reason is
|
|
212
|
-
sharper there than it is for a registry: `changes/` holds a proposal nobody has
|
|
213
|
-
agreed to yet, so a command whose only job is to report on it is the last thing
|
|
214
|
-
that should execute it. `archive` evaluates the delta regardless — it is about to
|
|
215
|
-
run your suite anyway.
|
|
216
|
-
|
|
217
|
-
One more thing to know about literals: write registry prose as **one long
|
|
218
|
-
single-line string**. A template literal with no substitution reads statically and
|
|
219
|
-
is accepted — but it keeps every newline and every space of indentation inside it,
|
|
220
|
-
and `render` puts the statement into the Markdown exactly as written, so the
|
|
221
|
-
wrapping that looked tidy in the editor lands in the generated document.
|
|
222
|
-
|
|
223
|
-
### Each registry file owns its id prefix
|
|
224
|
-
|
|
225
|
-
You can split intent across as many `*.reqs.ts` as you like — every one under the
|
|
226
|
-
project root is read and merged. What you cannot do is have two of them declare
|
|
227
|
-
the same prefix:
|
|
228
|
-
|
|
229
|
-
```ts
|
|
230
|
-
// requirements/auth.reqs.ts
|
|
231
|
-
export default defineRequirements({ 'AUTH-3': { /* … */ } });
|
|
232
|
-
|
|
233
|
-
// requirements/session.reqs.ts
|
|
234
|
-
export default defineRequirements({ 'AUTH-9': { /* … */ } }); // ✗ duplicate-prefix
|
|
129
|
+
ERROR registry-not-static (requirements/upload.reqs.ts:5)
|
|
130
|
+
Value is not a literal.
|
|
131
|
+
→ https://gitlab.com/Pseudorca/attest/-/blob/v0.4.1/docs/en/troubleshooting.md#registry-not-static
|
|
235
132
|
```
|
|
236
133
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
above are distinct and every other check passes; what you find out later is that
|
|
240
|
-
`AUTH-9` was taken the day someone's counter reached it, in a file they were not
|
|
241
|
-
looking at. The ERROR names both files, and the fix is a prefix of your own —
|
|
242
|
-
`SESS-1` — not a move or a rename.
|
|
243
|
-
|
|
244
|
-
`duplicate-requirement` is the narrower one still there for the same id in two
|
|
245
|
-
files. Nothing requires the prefix to match the file's name; `attest.reqs.ts`
|
|
246
|
-
holding `ATX-*` is fine, here and in your repo.
|
|
247
|
-
|
|
248
|
-
### A readable spec for humans (`attest render`)
|
|
134
|
+
The anchor **is** the code, so the link cannot point somewhere the section
|
|
135
|
+
isn't. In `--json` the same link is on each issue as `docsUrl`.
|
|
249
136
|
|
|
250
|
-
|
|
251
|
-
anyone doing an audit cannot read it. `render` projects the registry into one
|
|
252
|
-
Markdown document — an index of every requirement, then each one with its
|
|
253
|
-
statement, rationale, params and out-of-scope notes:
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
attest render # to stdout
|
|
257
|
-
attest render --out docs/SPEC.md # to a file
|
|
258
|
-
attest render --out docs/SPEC.md --check # fail if that file is out of date
|
|
259
|
-
```
|
|
137
|
+
## Documentation
|
|
260
138
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
- **One-way.** Markdown is only ever an output. Nothing reads it back, so the
|
|
268
|
-
free-form-prose drift that a Markdown *source* invites stays out.
|
|
269
|
-
- **Intent only.** No coverage, no counts, no test locations, no pass/fail —
|
|
270
|
-
those are verdicts, and `cover` / `verify` recompute them on demand. So the
|
|
271
|
-
document is a pure function of your `*.reqs.ts` files and changes if and only
|
|
272
|
-
if intent changes: one readable hunk per registry edit, and never a rewrite
|
|
273
|
-
because a line moved in a test file.
|
|
274
|
-
- **Gated.** A generated file you commit is a new place for drift to hide, so
|
|
275
|
-
`--check` regenerates and compares, failing with `stale-spec-doc` if the
|
|
276
|
-
committed document no longer matches the registry, or `missing-spec-doc` if it
|
|
277
|
-
was never generated. It compares the document, not the bytes: line endings are
|
|
278
|
-
a property of your checkout (`core.autocrlf` is on by default on Windows), and
|
|
279
|
-
a gate that calls a fresh clone stale is worse than no gate.
|
|
280
|
-
Put it in CI next to `attest check`. (Attest does this to itself:
|
|
281
|
-
[`self/requirements/SPEC.md`](https://gitlab.com/Pseudorca/attest/-/blob/main/self/requirements/SPEC.md)
|
|
282
|
-
is generated, and the pipeline fails if it goes stale.)
|
|
283
|
-
|
|
284
|
-
The Markdown is prose for humans and its formatting is not a stable contract —
|
|
285
|
-
don't parse it. `--json` is the machine surface.
|
|
286
|
-
|
|
287
|
-
### What a run actually runs
|
|
288
|
-
|
|
289
|
-
`verify` executes **only the spec files that declare a `requirement()`**. A repo
|
|
290
|
-
that already has a test suite keeps it: those files are located, reported, and
|
|
291
|
-
left alone — Attest is not a general test runner, and running someone's suite in
|
|
292
|
-
a child process with no aliases and no DOM only ever produced a red about code it
|
|
293
|
-
was never pointed at. `archive` uses the same scope.
|
|
294
|
-
|
|
295
|
-
Every run says so, before the issues:
|
|
296
|
-
|
|
297
|
-
```
|
|
298
|
-
Running 12 spec files (30 without a requirement(), not run)
|
|
299
|
-
✓ No issues.
|
|
300
|
-
— 20 requirements / 41 scenarios, 0 error, 0 warning, 0 info
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
The gap between the two numbers is worth watching: a spec file whose
|
|
304
|
-
`requirement()` call Attest cannot see statically is skipped rather than failed,
|
|
305
|
-
and that is where it shows. The same four numbers are in `--json` under `counts`.
|
|
306
|
-
|
|
307
|
-
When three or more issues in one report share a level and a code, one line above
|
|
308
|
-
the counts says so, because a wall of identical codes is one rule and many sites:
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
Repeated: 6 × ERROR registry-not-static, 4 × WARNING rationale-placeholder
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
Every per-issue line stays exactly as it is — they are what makes a diagnostic
|
|
315
|
-
clickable — and the summary is terminal output only: it is not an issue, so it
|
|
316
|
-
appears nowhere in `--json`, changes no count, and never moves a verdict.
|
|
317
|
-
|
|
318
|
-
A run with **no requirements** under the root is an `empty-spec` ERROR, not a
|
|
319
|
-
pass. "No failing tests" is not the same claim as "the requirements hold", and
|
|
320
|
-
the case that matters is not the empty directory — it is the repo whose registry
|
|
321
|
-
quietly stopped being found, where the tests still run and still go green.
|
|
322
|
-
|
|
323
|
-
### Framework code (`.vue`, DOM, path aliases)
|
|
324
|
-
|
|
325
|
-
The child run isolates from any ambient config by default, so specs run in a bare
|
|
326
|
-
Vite/Vitest environment — no `.vue` transform, DOM, or `~/`/`@/` aliases. When
|
|
327
|
-
your specs need that environment, point `verify` (or `archive`) at a config:
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
attest verify --vitest-config vitest.config.ts
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
The config supplies the environment (plugins, `resolve.alias`, `test.environment`);
|
|
334
|
-
Attest still owns the run scope — `include`/`exclude`/`root` always win, so a
|
|
335
|
-
config cannot pull in your existing suite or un-exclude `changes/`. Without the
|
|
336
|
-
flag the run stays isolated and deterministic.
|
|
337
|
-
|
|
338
|
-
### Machine-readable output
|
|
339
|
-
|
|
340
|
-
Every command that produces a verdict takes `--json` and then writes exactly one
|
|
341
|
-
JSON document to stdout — same work, same exit code. Branch on `ok`,
|
|
342
|
-
`issues[].code` and `issues[].reqId`; never parse `message`, which is prose and
|
|
343
|
-
may be reworded. (`render` is the one exception, because its own output is a
|
|
344
|
-
document: there, `--json` needs `--out` or `--check`, so stdout still carries
|
|
345
|
-
exactly one thing.)
|
|
346
|
-
|
|
347
|
-
```bash
|
|
348
|
-
attest check --json
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
```json
|
|
352
|
-
{
|
|
353
|
-
"tool": "attest",
|
|
354
|
-
"schemaVersion": 1,
|
|
355
|
-
"version": "0.4.0",
|
|
356
|
-
"command": "check",
|
|
357
|
-
"ok": false,
|
|
358
|
-
"summary": { "error": 1, "warning": 0, "info": 0 },
|
|
359
|
-
"issues": [
|
|
360
|
-
{
|
|
361
|
-
"level": "ERROR",
|
|
362
|
-
"code": "orphan-test",
|
|
363
|
-
"reqId": "PLAN-2",
|
|
364
|
-
"file": "auth/session.spec.ts",
|
|
365
|
-
"line": 12,
|
|
366
|
-
"message": "scenario \"…\" attests unknown requirement \"PLAN-2\". …"
|
|
367
|
-
}
|
|
368
|
-
]
|
|
369
|
-
}
|
|
370
|
-
```
|
|
139
|
+
| Document | English | 中文 |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| **CLI reference** — every command, flag and JSON field | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/cli-reference.md) |
|
|
142
|
+
| **Troubleshooting** — one section per issue code | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/troubleshooting.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/troubleshooting.md) |
|
|
143
|
+
| **Design** — the authoritative design of the framework | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/attest-design.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/attest-design.md) |
|
|
144
|
+
| **Feedback template** — report how adoption actually went | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/feedback.template.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/feedback.template.md) |
|
|
371
145
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
scenarioCount }` row per requirement — plus a `requirements` roll-up;
|
|
376
|
-
`archive` adds `change`; `status` adds `change`, `progress[]` — one
|
|
377
|
-
`{ reqId, state, scenarios[] }` row per added requirement, each scenario
|
|
378
|
-
carrying its recorded `firstRun` (`"fail"`, `"pass"`, or `null` for never
|
|
379
|
-
observed) — plus an `added` roll-up; `render` and `init` add `outFile` — the
|
|
380
|
-
file the command wrote, and never its contents — and `init` adds `outFiles`,
|
|
381
|
-
every file it wrote, since it can be asked for more than one agent target at
|
|
382
|
-
once (`outFile` is still there whenever exactly one was written).
|
|
383
|
-
`schemaVersion` is bumped on any breaking change to
|
|
384
|
-
the shape. The TypeScript type is exported as `JsonReport`.
|
|
385
|
-
|
|
386
|
-
`ok` means the same thing everywhere: the report carries no `ERROR`. So an
|
|
387
|
-
uncovered requirement reaches a `cover` report twice — as a `covered: false`
|
|
388
|
-
row and as an `uncovered-requirement` issue — because the rule above is to
|
|
389
|
-
branch on `issues[].code`, and a command that answered `ok: false` with an
|
|
390
|
-
empty `issues` array would make you read `coverage[]` to find out why.
|
|
391
|
-
|
|
392
|
-
`status` is the one report whose rows are deliberately *not* issues. Its rows
|
|
393
|
-
describe a change in progress, and a change in progress has unmet obligations by
|
|
394
|
-
definition; carrying them as errors would make `status` exit 1 for the whole life
|
|
395
|
-
of every change, and put a second verdict beside `archive`'s. Its `issues` carry
|
|
396
|
-
only the reasons the report could not be produced.
|
|
397
|
-
|
|
398
|
-
Even when a command crashes, `--json` still writes one parseable envelope
|
|
399
|
-
(`ok: false` with an `internal-error` issue) rather than an empty stdout — so a
|
|
400
|
-
consumer can always parse stdout and branch on `ok`.
|
|
146
|
+
The change workflow is not here: it is what `attest init` writes into your
|
|
147
|
+
project, as a skill, a rule or an instructions file, depending on which agent
|
|
148
|
+
reads it.
|
|
401
149
|
|
|
402
150
|
## Development
|
|
403
151
|
|
|
@@ -430,12 +178,12 @@ from `pnpm test`; it runs in CI and as `prepublishOnly`.
|
|
|
430
178
|
## Feedback
|
|
431
179
|
|
|
432
180
|
Adoption reports drive the roadmap. After using Attest on a real project, fill in
|
|
433
|
-
the feedback template
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
181
|
+
the feedback template (linked above) and open it as an issue — it is also the
|
|
182
|
+
**Usage feedback** issue template. It covers greenfield and mid-project adoption
|
|
183
|
+
alike, and ends with a prompt to run inside the adopting repo that fills most of
|
|
184
|
+
the report automatically and probes for problems you haven't hit yet. The
|
|
185
|
+
highest-value part is **false negatives**: drift the engine should have caught
|
|
186
|
+
and didn't.
|
|
439
187
|
|
|
440
188
|
## Acknowledgments
|
|
441
189
|
|
package/dist/cli/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { runCheck, runVerify, runCover, runArchive, runInit, runRender, runRende
|
|
|
15
15
|
import { hasError } from '../core/types.js';
|
|
16
16
|
import { formatIssues, formatScope, summarize, formatCoverage, formatStatus, } from './report.js';
|
|
17
17
|
import { archiveReport, checkReport, coverReport, errorReport, initReport, renderJson, renderReport, statusReport, verifyReport, } from './json.js';
|
|
18
|
-
import { packageVersion } from '
|
|
18
|
+
import { packageVersion } from '../core/version.js';
|
|
19
19
|
const VERSION = packageVersion();
|
|
20
20
|
const program = new Command();
|
|
21
21
|
program
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,sCAAsC;AACtC,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,4EAA4E;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,GAGb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;AAEjC,MAAM,OAAO,GAAG,IAAI,OAAO,EAA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C;gBACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,0BAA0B,MAAM,GAAG,CAAC,CAAC,CAAC;gBAC5D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CACH,CAAC;AAEJ,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC1C,8EAA8E;IAC9E,qDAAqD;IACrD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
package/dist/cli/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,QAAQ,C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,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,KAAK,EAAE,EACf,MAAM,EAAE,OAAO,EACf,EAAE,EAAE,OAAO,EACX,MAAM,EAAE,YAAY,GACnB,UAAU,CAEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,WAAW,EAAE,EACnB,MAAM,EAAE,KAAK,EAAE,GACd,UAAU,CAWZ;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,KAAK,EAAE,EACf,OAAO,CAAC,EAAE,MAAM,GACf,UAAU,CAGZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAO3F;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,EAAE,GAChB,UAAU,CAUZ;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,UAAU,CAY9E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,OAAO,GACX,UAAU,CAIZ;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAErD"}
|
package/dist/cli/json.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// The shape is a contract: `schemaVersion` is bumped on any breaking change,
|
|
6
6
|
// and every command emits the same envelope (tool/version/command/ok/summary/
|
|
7
7
|
// issues) plus command-specific fields.
|
|
8
|
+
import { docsUrl } from '../core/docs.js';
|
|
8
9
|
import { hasError } from '../core/types.js';
|
|
9
10
|
/** Bumped whenever the emitted shape changes incompatibly. */
|
|
10
11
|
export const SCHEMA_VERSION = 1;
|
|
@@ -19,15 +20,38 @@ export function countLevels(issues) {
|
|
|
19
20
|
summary[LEVEL_KEY[i.level]]++;
|
|
20
21
|
return summary;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Attach the page that explains each code (design §5.3).
|
|
25
|
+
*
|
|
26
|
+
* Done here rather than at the ~20 sites that construct an `Issue`, for the
|
|
27
|
+
* reason `hasError` is one function: a property every report shares should have
|
|
28
|
+
* one place to be wrong. Every JSON report is built through this envelope —
|
|
29
|
+
* including the `internal-error` crash path — so there is no command that emits
|
|
30
|
+
* issues without going past this line.
|
|
31
|
+
*
|
|
32
|
+
* Non-mutating, and an issue that already carries a `docsUrl` keeps it: the
|
|
33
|
+
* argument arrays belong to the caller, and one of them is a pipeline result a
|
|
34
|
+
* human rendering may read afterwards.
|
|
35
|
+
*/
|
|
36
|
+
function withDocs(issues) {
|
|
37
|
+
return issues.map((i) => {
|
|
38
|
+
const url = i.docsUrl ?? docsUrl(i.code);
|
|
39
|
+
return url === undefined ? i : { ...i, docsUrl: url };
|
|
40
|
+
});
|
|
41
|
+
}
|
|
22
42
|
function envelope({ version, command, ok, issues = [] }) {
|
|
43
|
+
const documented = withDocs(issues);
|
|
23
44
|
return {
|
|
24
45
|
tool: 'attest',
|
|
25
46
|
schemaVersion: SCHEMA_VERSION,
|
|
26
47
|
version,
|
|
27
48
|
command,
|
|
28
49
|
ok,
|
|
50
|
+
// Counted from the input, not the decorated copy: the two have the same
|
|
51
|
+
// length by construction, and counting what was passed in keeps the summary
|
|
52
|
+
// a function of the issues rather than of the decoration.
|
|
29
53
|
summary: countLevels(issues),
|
|
30
|
-
issues,
|
|
54
|
+
issues: documented,
|
|
31
55
|
};
|
|
32
56
|
}
|
|
33
57
|
export function checkReport(version, issues) {
|
package/dist/cli/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","s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AAU,YAAY,CAAC,OAAe,EAAE,MAAoB;IAChE,OAAO;QACL,GAAG,QAAQ,CAAC;YACV,OAAO;YACP,OAAO,EAAE,QAAQ;YACjB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5B,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC;QACF,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE;KACvD,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,OAAe,EACf,OAAoB,EACpB,GAAY;IAEZ,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,KAAK,GAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IACzE,OAAO,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/cli/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAgFrD,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAcpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAkBrD;AAUD,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CASvE;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAIvD;AA4BD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAwBzD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,CAe1D"}
|
package/dist/cli/report.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Terminal rendering of graded issues (design §5.3 levels). Pure formatting —
|
|
2
2
|
// no process side effects — so it stays testable and the CLI stays thin.
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import { docsUrl } from '../core/docs.js';
|
|
4
5
|
import { byCodeUnit } from '../core/order.js';
|
|
5
6
|
const LEVEL_TAG = {
|
|
6
7
|
ERROR: (s) => chalk.red.bold(s),
|
|
@@ -59,6 +60,19 @@ function control(text) {
|
|
|
59
60
|
})
|
|
60
61
|
.join('');
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The line under a message pointing at the section that explains the code.
|
|
65
|
+
*
|
|
66
|
+
* Dim and last, so it never competes with the file:line above it — that is what
|
|
67
|
+
* a reader navigates by, and this is what they reach for once navigating did not
|
|
68
|
+
* settle it. Not sanitised through `inline`, unlike everything else on these
|
|
69
|
+
* lines: it is derived from a fixed roster, so unlike a scenario name or a path
|
|
70
|
+
* it never contains a byte the repository under test chose.
|
|
71
|
+
*/
|
|
72
|
+
function docsLine(issue) {
|
|
73
|
+
const url = issue.docsUrl ?? docsUrl(issue.code);
|
|
74
|
+
return url ? `\n${INDENT}${chalk.dim(`→ ${url}`)}` : '';
|
|
75
|
+
}
|
|
62
76
|
export function formatIssues(issues) {
|
|
63
77
|
if (issues.length === 0)
|
|
64
78
|
return chalk.green('✓ No issues.');
|
|
@@ -67,7 +81,7 @@ export function formatIssues(issues) {
|
|
|
67
81
|
for (const i of issues.filter((x) => x.level === level)) {
|
|
68
82
|
const where = i.file ? `${inline(i.file)}${i.line ? `:${i.line}` : ''}` : '';
|
|
69
83
|
const loc = where ? chalk.dim(` (${where})`) : '';
|
|
70
|
-
lines.push(`${LEVEL_TAG[level](level.padEnd(7))} ${chalk.cyan(inline(i.code))}${loc}\n${INDENT}${block(i.message)}`);
|
|
84
|
+
lines.push(`${LEVEL_TAG[level](level.padEnd(7))} ${chalk.cyan(inline(i.code))}${loc}\n${INDENT}${block(i.message)}${docsLine(i)}`);
|
|
71
85
|
}
|
|
72
86
|
}
|
|
73
87
|
const repeats = formatRepeats(issues);
|
package/dist/cli/report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,yEAAyE;AAEzE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,MAAM,SAAS,GAAyC;IACtD,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KA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C;AAC1B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAmB;IAChD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;IACnF,OAAO,IAAI;SACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO;YACtB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,aAAa,YAAY,CAAC,CAAC,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAC7E,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC7B,qEAAqE;QACrE,kEAAkE;QAClE,0EAA0E;QAC1E,mDAAmD;QACnD,OAAO,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;IAC/D,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/dist/core/apply.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/core/apply.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/core/apply.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,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AAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC;AACxE,CAAC;AAED,SAAS,YAAY,CAAC,KAAwC;IAC5D,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,eAAe,CAAC;AACrD,CAAC;AAED,8EAA8E;AAC9E,SAAS,eAAe,CAAC,CAAc,EAAE,CAAc;IACrD,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,SAAS,CAAC,GAAgB;IACjC,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;QAC5B,UAAU,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC;KAChC,CAAC,CAAC;AACL,CAAC;AAED,wEAAwE;AACxE,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,gDAAgD;AAChD,SAAS,QAAQ,CAAC,GAA4B;IAC5C,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every code the engine can put on an `Issue`, and therefore every section the
|
|
3
|
+
* troubleshooting document must have. Alphabetical, so a diff against a heading
|
|
4
|
+
* list reads as a diff.
|
|
5
|
+
*
|
|
6
|
+
* This roster is asserted against two independent things: the `code: '…'`
|
|
7
|
+
* literals in `src/`, so a new diagnostic cannot be added without landing here,
|
|
8
|
+
* and the `##` headings of both language documents, so landing here cannot
|
|
9
|
+
* produce a dead link.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ISSUE_CODES: readonly ["add-conflict", "add-invalid", "change-not-found", "declared-not-run", "duplicate-prefix", "duplicate-requirement", "empty-spec", "internal-error", "invalid-change-name", "missing-spec-doc", "modify-invalid", "modify-missing", "never-red", "orphan-test", "possible-drift", "rationale-placeholder", "registry-invalid", "registry-no-default", "registry-not-static", "rename-source-missing", "rename-target-exists", "stale-spec-doc", "tests-red", "unbound-param", "uncovered-requirement", "unknown-target"];
|
|
12
|
+
export type IssueCode = (typeof ISSUE_CODES)[number];
|
|
13
|
+
/**
|
|
14
|
+
* The page explaining `code`, or `undefined` when nothing explains it.
|
|
15
|
+
*
|
|
16
|
+
* `undefined` rather than a best-effort link: an anchor that resolves to the
|
|
17
|
+
* top of the page looks like an answer and is not one. In this repository the
|
|
18
|
+
* roster is exhaustive, so the undefined branch is unreachable from the
|
|
19
|
+
* engine's own issues — it exists because `code` is typed `string` on `Issue`,
|
|
20
|
+
* and a caller outside the engine can put anything there.
|
|
21
|
+
*/
|
|
22
|
+
export declare function docsUrl(code: string): string | undefined;
|
|
23
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/core/docs.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,mgBA2Bd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAoCrD;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExD"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// The link from a diagnostic to the page that explains it (design §5.3).
|
|
2
|
+
//
|
|
3
|
+
// `Issue.code` is the machine-readable name of a rule, and the troubleshooting
|
|
4
|
+
// document gives every rule one section whose heading *is* that code. So the
|
|
5
|
+
// anchor is not a second thing to maintain — it is the code — and a link can be
|
|
6
|
+
// derived rather than authored. Nothing here is hand-written per issue site,
|
|
7
|
+
// which is the whole point: a diagnostic added without a link is impossible,
|
|
8
|
+
// and a link pointing at a section that does not exist is caught by
|
|
9
|
+
// `tests/docs-consistency.spec.ts` rather than by a reader clicking it.
|
|
10
|
+
import { packageVersion } from './version.js';
|
|
11
|
+
/**
|
|
12
|
+
* Every code the engine can put on an `Issue`, and therefore every section the
|
|
13
|
+
* troubleshooting document must have. Alphabetical, so a diff against a heading
|
|
14
|
+
* list reads as a diff.
|
|
15
|
+
*
|
|
16
|
+
* This roster is asserted against two independent things: the `code: '…'`
|
|
17
|
+
* literals in `src/`, so a new diagnostic cannot be added without landing here,
|
|
18
|
+
* and the `##` headings of both language documents, so landing here cannot
|
|
19
|
+
* produce a dead link.
|
|
20
|
+
*/
|
|
21
|
+
export const ISSUE_CODES = [
|
|
22
|
+
'add-conflict',
|
|
23
|
+
'add-invalid',
|
|
24
|
+
'change-not-found',
|
|
25
|
+
'declared-not-run',
|
|
26
|
+
'duplicate-prefix',
|
|
27
|
+
'duplicate-requirement',
|
|
28
|
+
'empty-spec',
|
|
29
|
+
'internal-error',
|
|
30
|
+
'invalid-change-name',
|
|
31
|
+
'missing-spec-doc',
|
|
32
|
+
'modify-invalid',
|
|
33
|
+
'modify-missing',
|
|
34
|
+
'never-red',
|
|
35
|
+
'orphan-test',
|
|
36
|
+
'possible-drift',
|
|
37
|
+
'rationale-placeholder',
|
|
38
|
+
'registry-invalid',
|
|
39
|
+
'registry-no-default',
|
|
40
|
+
'registry-not-static',
|
|
41
|
+
'rename-source-missing',
|
|
42
|
+
'rename-target-exists',
|
|
43
|
+
'stale-spec-doc',
|
|
44
|
+
'tests-red',
|
|
45
|
+
'unbound-param',
|
|
46
|
+
'uncovered-requirement',
|
|
47
|
+
'unknown-target',
|
|
48
|
+
];
|
|
49
|
+
const DOCUMENTED = new Set(ISSUE_CODES);
|
|
50
|
+
const REPO = 'https://gitlab.com/Pseudorca/attest/-/blob';
|
|
51
|
+
const DOC = 'docs/en/troubleshooting.md';
|
|
52
|
+
/**
|
|
53
|
+
* The version whose documents a link points at, as a git ref.
|
|
54
|
+
*
|
|
55
|
+
* Pinned to the tag of the build that printed the diagnostic, not to `main`.
|
|
56
|
+
* The two failure modes are not symmetric:
|
|
57
|
+
*
|
|
58
|
+
* - **Pinned, between a release commit and its tag** — the ref does not resolve
|
|
59
|
+
* yet. But that window is a version nobody has installed: the manifest is
|
|
60
|
+
* bumped and the package is not published, so no build in anyone's
|
|
61
|
+
* `node_modules` prints those links. The 404 is unreachable in practice.
|
|
62
|
+
* - **Unpinned, after any breaking change to the codes** — a build from a year
|
|
63
|
+
* ago links into today's document. A renamed or removed code lands on a
|
|
64
|
+
* missing anchor, and worse, a code whose *meaning* changed lands on a
|
|
65
|
+
* section confidently describing a different rule. That one is reachable by
|
|
66
|
+
* every installed copy, forever, and it gets worse with every release.
|
|
67
|
+
*
|
|
68
|
+
* So the ref is `v<version>`, matching this repository's release tags. The
|
|
69
|
+
* fallback is `main`, for the one case where pinning is impossible rather than
|
|
70
|
+
* merely imprecise: `packageVersion()` answers `0.0.0` when it cannot read the
|
|
71
|
+
* manifest, and `v0.0.0` is a tag that has never existed.
|
|
72
|
+
*/
|
|
73
|
+
function ref() {
|
|
74
|
+
const version = packageVersion();
|
|
75
|
+
return version === '0.0.0' ? 'main' : `v${version}`;
|
|
76
|
+
}
|
|
77
|
+
/** Resolved once: the version cannot change while the process runs. */
|
|
78
|
+
const BASE = `${REPO}/${ref()}/${DOC}`;
|
|
79
|
+
/**
|
|
80
|
+
* The page explaining `code`, or `undefined` when nothing explains it.
|
|
81
|
+
*
|
|
82
|
+
* `undefined` rather than a best-effort link: an anchor that resolves to the
|
|
83
|
+
* top of the page looks like an answer and is not one. In this repository the
|
|
84
|
+
* roster is exhaustive, so the undefined branch is unreachable from the
|
|
85
|
+
* engine's own issues — it exists because `code` is typed `string` on `Issue`,
|
|
86
|
+
* and a caller outside the engine can put anything there.
|
|
87
|
+
*/
|
|
88
|
+
export function docsUrl(code) {
|
|
89
|
+
return DOCUMENTED.has(code) ? `${BASE}#${code}` : undefined;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/core/docs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,wEAAwE;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,uBAAuB;IACvB,YAAY;IACZ,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,uBAAuB;IACvB,kBAAkB;IAClB,qBAAqB;IACrB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,uBAAuB;IACvB,gBAAgB;CACR,CAAC;AAIX,MAAM,UAAU,GAAG,IAAI,GAAG,CAAS,WAAW,CAAC,CAAC;AAEhD,MAAM,IAAI,GAAG,4CAA4C,CAAC;AAC1D,MAAM,GAAG,GAAG,4BAA4B,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAS,GAAG;IACV,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,OAAO,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;AACtD,CAAC;AAED,uEAAuE;AACvE,MAAM,IAAI,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { Requirement, Registry } from './schema.js';
|
|
2
|
+
export type { IssueCode } from './docs.js';
|
|
3
|
+
import type { IssueCode } from './docs.js';
|
|
2
4
|
/** A scenario extracted statically from a spec file (design §5.2). */
|
|
3
5
|
export interface ParsedScenario {
|
|
4
6
|
reqId: string;
|
|
@@ -50,12 +52,31 @@ export type Level = 'ERROR' | 'WARNING' | 'INFO';
|
|
|
50
52
|
*/
|
|
51
53
|
export interface Issue {
|
|
52
54
|
level: Level;
|
|
53
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Narrowed to the roster in core/docs.ts rather than left as `string`: that
|
|
57
|
+
* roster is also what the troubleshooting document is asserted against, so a
|
|
58
|
+
* diagnostic that no section explains cannot be constructed in the first
|
|
59
|
+
* place. The check is the compiler's, not a regex over the source — several
|
|
60
|
+
* issue sites build the code with a ternary or hand it through a variable,
|
|
61
|
+
* and a pattern that quietly missed those would police nothing.
|
|
62
|
+
*/
|
|
63
|
+
code: IssueCode;
|
|
54
64
|
/** The requirement this issue is about, when the issue is about exactly one. */
|
|
55
65
|
reqId?: string;
|
|
56
66
|
file?: string;
|
|
57
67
|
line?: number;
|
|
58
68
|
message: string;
|
|
69
|
+
/**
|
|
70
|
+
* Where `code` is explained. Derived from `code` at the moment a report is
|
|
71
|
+
* rendered (see core/docs.ts), never written at an issue site — so it cannot
|
|
72
|
+
* be forgotten on a new diagnostic and cannot disagree with the code beside it.
|
|
73
|
+
*
|
|
74
|
+
* Additive to the JSON shape, so no SCHEMA_VERSION bump: a consumer that has
|
|
75
|
+
* never heard of it reads the same report it always did. It is there for the
|
|
76
|
+
* human reading a CI log, not for the branch — a machine already has `code`,
|
|
77
|
+
* which is the more precise form of the same information.
|
|
78
|
+
*/
|
|
79
|
+
docsUrl?: string;
|
|
59
80
|
}
|
|
60
81
|
/**
|
|
61
82
|
* Whether an issue set is failing: true iff it contains any ERROR. This is the
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,8DAA8D;AAC9D,MAAM,WAAW,SAAS;IACxB,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,kFAAkF;IAClF,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C;;;;;OAKG;IACH,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC7C;AAED,0DAA0D;AAC1D,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,KAAK,CAAC;IACb;;;;;;;OAOG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAEjD"}
|
package/dist/core/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,4EAA4E;AAC5E,gFAAgF;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,4EAA4E;AAC5E,gFAAgF;AA2FhF;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAe;IACtC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAaA,wBAAgB,cAAc,IAAI,MAAM,CAOvC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// The running attest version, read from the package manifest at runtime.
|
|
2
|
-
// Resolved relative to this module (dist/
|
|
2
|
+
// Resolved relative to this module (dist/core/ -> package root) so the built
|
|
3
3
|
// CLI reports the version it was actually installed as, not a literal that
|
|
4
4
|
// silently rots between releases.
|
|
5
|
+
//
|
|
6
|
+
// In core rather than cli because it is not a CLI concern: `core/docs.ts` pins
|
|
7
|
+
// every documentation link to the tag of the build that printed it, which is
|
|
8
|
+
// the same question — which build is this — asked by something below the shell.
|
|
5
9
|
import { createRequire } from 'node:module';
|
|
6
10
|
const require = createRequire(import.meta.url);
|
|
7
11
|
export function packageVersion() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAyB,CAAC;QACvE,OAAO,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AASA,wBAAgB,cAAc,IAAI,MAAM,CAOvC"}
|
package/dist/cli/version.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAyB,CAAC;QACvE,OAAO,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
File without changes
|