@coldtea/pr-lens-cli 0.1.0 → 0.1.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/README.md +9 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npx @coldtea/pr-lens-cli analyze --base origin/main
|
|
|
10
10
|
|
|
11
11
|
## Bring your own key
|
|
12
12
|
|
|
13
|
-
The key is read from the environment, never from a flag: a flag lands in shell history and in the log of whatever CI runs it. The diff goes to the provider you name and nowhere else
|
|
13
|
+
The key is read from the environment, never from a flag: a flag lands in shell history and in the log of whatever CI runs it. The diff goes to the provider you name and nowhere else: there is no PR Lens service in this path.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
export GEMINI_API_KEY=…
|
|
@@ -49,7 +49,7 @@ The base is the merge base of the two refs, not the tip of the base branch: a di
|
|
|
49
49
|
|
|
50
50
|
The commit shas, the repository, the pull request number and the line counts are filled in from the repository itself, and anything the model writes there is discarded. A fact the model is free to restate is a fact that eventually disagrees with itself.
|
|
51
51
|
|
|
52
|
-
The answer is parsed against the contract. If it fails, the validation errors
|
|
52
|
+
The answer is parsed against the contract. If it fails, the validation errors, paths and all, go back to the model once, and only once: a model that cannot fix a named path in one round does not fix it in three. `--dry-run` reports what would be sent and sends nothing.
|
|
53
53
|
|
|
54
54
|
### `render`
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ The answer is parsed against the contract. If it fails, the validation errors
|
|
|
57
57
|
pr-lens render pr-lens/graph.json -o pr-lens/
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Draws the document as self-contained light and dark SVGs
|
|
60
|
+
Draws the document as self-contained light and dark SVGs (one pair per drill-down section per lens, or one pair per lens when the document has no sections), and writes two files beside them: `manifest.json`, which says what was drawn and under which file name, and `drawn.graph.json`, the document those pictures actually show.
|
|
61
61
|
|
|
62
62
|
Both matter to what comes next. The manifest is where `comment` gets its file names, so neither command re-derives the other's. And `drawn.graph.json` exists because this is where corrections are applied: excluding a node can empty out a whole drill-down section, and the renderer then draws no picture for it. A comment composed from the document that went *in* would announce a section that came out of nothing.
|
|
63
63
|
|
|
@@ -70,7 +70,7 @@ pr-lens comment --graph pr-lens/drawn.graph.json --manifest pr-lens/manifest.jso
|
|
|
70
70
|
--asset-base-url https://raw.githubusercontent.com/owner/repo/pr-lens/42
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
Composes the markdown
|
|
73
|
+
Composes the markdown (the `<picture>` pairs that read in both GitHub themes, the headline chips, the nested `<details>` tree) and prints it. Each diagram links to itself: a comment column is about 830 pixels wide and a system with several lanes is several times that, so it arrives scaled to fit and one click gives a reader the size the labels were drawn at. The two files have to belong to each other: the manifest records the hash of the document it came from, and a mismatched pair is refused rather than composed into a comment describing diagrams nobody drew. It posts nothing; posting is the caller's business, and `--print-marker` gives that caller the hidden marker that identifies an existing comment to update.
|
|
74
74
|
|
|
75
75
|
### `validate`
|
|
76
76
|
|
|
@@ -86,13 +86,13 @@ Parses graph documents, patch documents, render manifests and configs, JSON or Y
|
|
|
86
86
|
pr-lens export pr-lens/graph.json -o .github/pr-lens.map.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Turns a pull-request document into the map of the system once that pull request has merged: elements the change deletes are dropped
|
|
89
|
+
Turns a pull-request document into the map of the system once that pull request has merged: elements the change deletes are dropped, along with the edges and flow steps that hung from them; the rest stops being annotated, and the result is stamped with the single commit it reflects.
|
|
90
90
|
|
|
91
91
|
The map is a snapshot, not a source of truth. Nothing reads it back into the pipeline: a committed map that overrode inference would be hand-maintained rot with merge conflicts attached. Commit it so a repository has something to read, to diff, and to hand an agent.
|
|
92
92
|
|
|
93
93
|
## Corrections
|
|
94
94
|
|
|
95
|
-
A repository's `.github/pr-lens.yml` is picked up automatically by `render` and applied at draw time
|
|
95
|
+
A repository's `.github/pr-lens.yml` is picked up automatically by `render` and applied at draw time: renames, exclusions, lane pins, groupings. It is an overlay: inference never writes back into it, so a correction keeps holding as the code moves and the model renames things between runs, and the document on disk stays the record of what was inferred.
|
|
96
96
|
|
|
97
97
|
```yaml
|
|
98
98
|
schemaVersion: 0.1.0
|
|
@@ -104,9 +104,9 @@ map:
|
|
|
104
104
|
- "**/*.test.ts"
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
A lane pin may name a lane the document never declared; the band is created and takes the id for its label. And `render` reports any correction that changed nothing about what it drew
|
|
107
|
+
A lane pin may name a lane the document never declared; the band is created and takes the id for its label. And `render` reports any correction that changed nothing about what it drew. A config that has drifted, usually because the file a selector named has moved, otherwise fails silently and forever.
|
|
108
108
|
|
|
109
|
-
`--config` points elsewhere and `--no-config` ignores it, on both `render` and `analyze
|
|
109
|
+
`--config` points elsewhere and `--no-config` ignores it, on both `render` and `analyze`. `analyze` reads only `lenses` from it, since which lenses to fill is a question for extraction and the rest is a question for drawing.
|
|
110
110
|
|
|
111
111
|
## Failures
|
|
112
112
|
|
|
@@ -114,4 +114,4 @@ Every failure carries a code, so a script can branch on it: `USAGE`, `UNREADABLE
|
|
|
114
114
|
|
|
115
115
|
---
|
|
116
116
|
|
|
117
|
-
Part of [PR Lens](https://prlens.dev)
|
|
117
|
+
Part of [PR Lens](https://prlens.dev). Review what actually matters.
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldtea/pr-lens-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "The PR Lens command line: turn a pull request diff into a schema-valid graph with your own model key, render it, and compose the comment.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ohans Emmanuel",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"yaml": "^2.8.1",
|
|
42
42
|
"zod": "^4.4.3",
|
|
43
|
-
"@coldtea/pr-lens-
|
|
44
|
-
"@coldtea/pr-lens-
|
|
43
|
+
"@coldtea/pr-lens-schema": "^0.1.1",
|
|
44
|
+
"@coldtea/pr-lens-renderer": "^0.1.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^20.19.0",
|
package/src/version.ts
CHANGED