Keep token scan output focused on item rows

This commit is contained in:
mpabi
2026-04-26 19:47:53 +02:00
parent d93d28eaa7
commit 8623e5b1e9
3 changed files with 22 additions and 25 deletions
+3 -10
View File
@@ -297,20 +297,12 @@ Przelaczniki:
- `--repo PATH`
Sciezka wewnatrz docelowego repo. Domyslnie biezacy katalog.
- `--verbose`
Pokazuje dodatkowo sekcje `context` i `scan`.
Typowy wynik:
```text
context
item<TAB>value
repo_root<TAB>...
token_path<TAB>...
scan
item<TAB>value
remotes<TAB>1
urls<TAB>1
items
item<TAB>source<TAB>remote<TAB>kind<TAB>user<TAB>token<TAB>result<TAB>status<TAB>url
1<TAB>repo<TAB>r1<TAB>auth<TAB>u1<TAB>remote<TAB>existing<TAB>in_sync<TAB>http://77.90.8.171:3001
@@ -327,6 +319,7 @@ Przyklad:
```bash
./rvctl tokens scan
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
./rvctl tokens scan --verbose
```
## `tokens read`
+3 -1
View File
@@ -84,7 +84,8 @@ Dzialanie:
- skanuje remote URL-e w repo
- zapisuje znalezione tokeny do `tokens.json`
- zapisuje je per endpoint serwera
- wypisuje wynik jako waskie tabele TSV: `context`, `scan` oraz `items`
- wypisuje domyslnie tylko waska tabele TSV `items`
- z `--verbose` dopisuje diagnostyczne sekcje `context` oraz `scan`
Tabela `items` porownuje dwa zrodla dla tego samego endpointu. Ten sam `item`
moze miec dwa wiersze:
@@ -109,6 +110,7 @@ Przyklad:
```bash
./rvctl tokens scan
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
./rvctl tokens scan --verbose
```
### `tokens read`
+2
View File
@@ -830,6 +830,7 @@ def run_tokens_scan(config: WorkspaceConfig, args: argparse.Namespace) -> None:
store_servers = token_data.get("servers", {})
endpoint_names = sorted(set(repo_servers) | set(store_servers))
if args.verbose:
print_token_context(repo_root, config, repo_servers, store_servers, len(endpoint_names))
print()
print("scan")
@@ -1380,6 +1381,7 @@ def build_parser() -> argparse.ArgumentParser:
help="Scan remote URLs in a git repo and save discovered credentials into tokens.json.",
)
add_repo_option(tokens_scan_parser)
tokens_scan_parser.add_argument("--verbose", action="store_true", help="Print context and scan counters before item rows.")
tokens_read_parser = tokens_subparsers.add_parser(
"read",