Split token scan and compare commands

This commit is contained in:
mpabi
2026-04-27 20:23:04 +02:00
parent 2ab1a428e7
commit 147468c48d
4 changed files with 135 additions and 24 deletions
+34 -4
View File
@@ -206,6 +206,7 @@ Komendy:
- `list-series`
- `list-cards [series]`
- `tokens scan`
- `tokens compare`
- `tokens read`
- `tokens stats`
- `tokens write`
@@ -292,6 +293,35 @@ Przyklady:
## `tokens scan`
Czyta remote URL-e w repo i pokazuje diagnostyczna tabele git remotes:
`auth`, `plain` i `unsupported`. Nie porownuje ich z `tokens.json`. Komenda
jest read-only.
Przelaczniki:
- `--repo PATH`
Sciezka wewnatrz docelowego repo. Domyslnie repo zawierajace `rvctl`.
- `--server ENDPOINT`
Pokazuje tylko wpisy z danego endpointu.
Typowy wynik:
```text
remotes
item remote kind server proto host org repo user token result url
---- ------ ----------- ------ ----- ------------------ --------- ----------- ---- ------------ -------------- --------------------------------------
1 r1 auth gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 e59cc...13be found http://77.90.8.171:3001/edu-tools/...
```
Przyklad:
```bash
./rvctl tokens scan
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
```
## `tokens compare`
Czyta remote URL-e w repo oraz lokalny `tokens.json`, laczy wpisy w pary po
endpoincie, nazwie remota, token id, wartosci tokena, org i repo, a potem
pokazuje jeden logiczny wiersz na token. Komenda jest read-only.
@@ -307,7 +337,7 @@ Typowy wynik:
tokens
item server proto host org repo user remote token_ref token valid scope org repo
---- ------ ----- ------------------ --------- ----------- ---- ------ --------- ------------ ------------------- aAimnopru oawrc- oawr--
1 gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 r1 * e59cc...13be forever -----w--- +++++ ++++
1 gitea http 77.90.8.171:3001 edu-tools rv-launcher u1 r1 r1 * e59cc...13be forever wwwwwwwww +++++ ++++
```
`token_ref` jest komorka stalej szerokosci: nazwa tokena jest po lewej, a marker
@@ -327,15 +357,15 @@ Maski uprawnien:
Przyklad:
```bash
./rvctl tokens scan
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
./rvctl tokens compare
./rvctl tokens compare --repo ~/dev/workspace/rv/series/inf/03
```
## `tokens list store|remote|both`
Wypisuje jedno zrodlo bez porownywania go z drugim. `list` jest read-only:
pokazuje co jest w `tokens.json`, co jest w git remote albo oba zrodla jako
osobne wiersze. `scan` sluzy do porownania zgodnosci.
osobne wiersze. `compare` sluzy do porownania zgodnosci.
Przelaczniki: