@invariant.guru/cli 0.6.5 → 0.6.8
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 +47 -2
- package/dist/main.js +644 -631
- package/dist/ui/assets/{Editor-BHNXHvXa.js → Editor-Oj_mP0XH.js} +1 -1
- package/dist/ui/assets/{MarkdownBody-AZO5_5u7.js → MarkdownBody-Ch4frhbh.js} +1 -1
- package/dist/ui/assets/{Preview-BA0QqnWr.js → Preview-B8RXIj_m.js} +1 -1
- package/dist/ui/assets/index-B2dWndB2.css +1 -0
- package/dist/ui/assets/index-DaG3wchO.js +247 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/index-D-QfDUGL.js +0 -246
- package/dist/ui/assets/index-S_wSNShB.css +0 -1
package/README.md
CHANGED
|
@@ -196,10 +196,23 @@ writes the comments you accepted into that same session's `## Plan` and moves it
|
|
|
196
196
|
to `planned`. Executing it implements them. Nothing is ever committed or pushed —
|
|
197
197
|
you stage and commit when you are happy.
|
|
198
198
|
|
|
199
|
+
Or send them to the people who will read the merge request instead:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
invariant review publish <branch> --dry-run # what would go where
|
|
203
|
+
invariant review publish <branch>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Each accepted comment becomes a **draft (pending)** comment on the branch's
|
|
207
|
+
GitLab merge request, anchored on its file and line. Nothing is submitted for
|
|
208
|
+
you and nobody is notified — you read the drafts in GitLab and press *Submit
|
|
209
|
+
review*. The token is per project: see [docs/spec-review.md](docs/spec-review.md) §9.
|
|
210
|
+
|
|
199
211
|
### 7. `invariant ui` — see and manage your sessions
|
|
200
212
|
|
|
201
|
-
Opens a local dashboard for this project
|
|
202
|
-
rendered markdown, a rich editor, review triage, and a
|
|
213
|
+
Opens a local dashboard for this project: a session board grouped by status,
|
|
214
|
+
rendered markdown, a rich editor, review triage, package management, and a
|
|
215
|
+
command palette.
|
|
203
216
|
|
|
204
217
|
```bash
|
|
205
218
|
invariant ui # start on 4200 (or the next free port) and open a browser
|
|
@@ -404,6 +417,8 @@ invariant inspect nest-clean-architecture
|
|
|
404
417
|
|--------|-------------|
|
|
405
418
|
| `-d, --details` | Show all items including inactive ones |
|
|
406
419
|
|
|
420
|
+
The **Packages** page in `invariant ui` is this same tree, with checkboxes.
|
|
421
|
+
|
|
407
422
|
### `invariant list`
|
|
408
423
|
|
|
409
424
|
List installed or available packages.
|
|
@@ -464,6 +479,8 @@ invariant review --session <id> --base origin/develop # diff against another r
|
|
|
464
479
|
invariant review list # every review document
|
|
465
480
|
invariant review show <branch> --open # what still needs a decision
|
|
466
481
|
invariant review plan-changes <branch> # accepted comments → the session's Plan
|
|
482
|
+
invariant review publish <branch> --dry-run # what would go where on the merge request
|
|
483
|
+
invariant review publish <branch> # accepted comments → draft MR comments
|
|
467
484
|
```
|
|
468
485
|
|
|
469
486
|
| Subcommand | Description |
|
|
@@ -472,6 +489,7 @@ invariant review plan-changes <branch> # accepted comments → the sessi
|
|
|
472
489
|
| `list` | Every review document in the project (`--json`) |
|
|
473
490
|
| `show <review>` | Print a review's comments (`--staged`, `--open`, `--json`) |
|
|
474
491
|
| `plan-changes <review>` | Write the accepted comments into the session's `## Plan` |
|
|
492
|
+
| `publish <review>` | Create draft GitLab merge-request comments (`--dry-run`, `--mr <iid>`) |
|
|
475
493
|
|
|
476
494
|
| Option | Description |
|
|
477
495
|
|--------|-------------|
|
|
@@ -485,6 +503,11 @@ partial triage silently drops the comments nobody looked at, so it is not
|
|
|
485
503
|
allowed. Nothing here touches the index or a remote: the git commands this tool
|
|
486
504
|
may run are allowlisted to read-only ones.
|
|
487
505
|
|
|
506
|
+
`publish` has the same gate, and one of its own: it writes **draft notes and
|
|
507
|
+
nothing else**. There is no call in this tool that submits a review, so the
|
|
508
|
+
comments stay pending until a human presses *Submit review* in GitLab. Only
|
|
509
|
+
staged comments are sent; a discarded one never leaves your machine.
|
|
510
|
+
|
|
488
511
|
Configure it under `review` in `invariant.json`:
|
|
489
512
|
|
|
490
513
|
```jsonc
|
|
@@ -528,6 +551,28 @@ In the UI: `⌘K` opens the command palette, `⇧⌘V` toggles rendered preview
|
|
|
528
551
|
editing, `N` starts a session, `?` lists every shortcut. On a review session,
|
|
529
552
|
`j`/`k` move between comments and `s` / `d` / `e` stage, discard, or edit one.
|
|
530
553
|
|
|
554
|
+
#### The Packages page
|
|
555
|
+
|
|
556
|
+
The **Packages** section of the UI is a view over the package commands — it runs
|
|
557
|
+
the same `invariant install`, `add`, `remove`, `uninstall` and `sync` you would
|
|
558
|
+
type, in the directory the UI was started in, and shows you the command before it
|
|
559
|
+
runs. It never writes `invariant.json` itself.
|
|
560
|
+
|
|
561
|
+
- **The tree is `invariant inspect`.** Selecting a package lists everything it
|
|
562
|
+
ships, grouped by type, with the active items ticked.
|
|
563
|
+
- **Toggling stages, it does not fire.** Tick and untick as many items as you
|
|
564
|
+
like; the bar at the bottom shows what will run, and **Apply** issues one
|
|
565
|
+
`remove` and one `add` for the whole batch. Optionally a `sync` after.
|
|
566
|
+
- **Install** takes a GitHub repository (the default — `owner/repo`, or a pasted
|
|
567
|
+
URL, plus an optional ref) or a registry name, and previews the exact
|
|
568
|
+
`invariant install …` line including `--no-add` and `--sync`.
|
|
569
|
+
- **Sync** runs from the top bar, with a **Check only** dry run that reports
|
|
570
|
+
drift the way CI does.
|
|
571
|
+
- **A package the config declares but this checkout never installed** shows as
|
|
572
|
+
*not installed*, with a button that fetches it from its recorded source.
|
|
573
|
+
|
|
574
|
+
A change made in a terminal shows up in an open page within a couple of seconds.
|
|
575
|
+
|
|
531
576
|
To work on the UI itself: start a daemon (`invariant ui --no-open`), then run
|
|
532
577
|
`yarn dev:ui` for Vite with hot reload against it — `INVARIANT_UI_PORT=<port>`
|
|
533
578
|
when the daemon landed on something other than 4200.
|