Keep token scan output focused on item rows
This commit is contained in:
+3
-10
@@ -297,20 +297,12 @@ Przelaczniki:
|
|||||||
|
|
||||||
- `--repo PATH`
|
- `--repo PATH`
|
||||||
Sciezka wewnatrz docelowego repo. Domyslnie biezacy katalog.
|
Sciezka wewnatrz docelowego repo. Domyslnie biezacy katalog.
|
||||||
|
- `--verbose`
|
||||||
|
Pokazuje dodatkowo sekcje `context` i `scan`.
|
||||||
|
|
||||||
Typowy wynik:
|
Typowy wynik:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
context
|
|
||||||
item<TAB>value
|
|
||||||
repo_root<TAB>...
|
|
||||||
token_path<TAB>...
|
|
||||||
|
|
||||||
scan
|
|
||||||
item<TAB>value
|
|
||||||
remotes<TAB>1
|
|
||||||
urls<TAB>1
|
|
||||||
|
|
||||||
items
|
items
|
||||||
item<TAB>source<TAB>remote<TAB>kind<TAB>user<TAB>token<TAB>result<TAB>status<TAB>url
|
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
|
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
|
```bash
|
||||||
./rvctl tokens scan
|
./rvctl tokens scan
|
||||||
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
|
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
|
||||||
|
./rvctl tokens scan --verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
## `tokens read`
|
## `tokens read`
|
||||||
|
|||||||
+3
-1
@@ -84,7 +84,8 @@ Dzialanie:
|
|||||||
- skanuje remote URL-e w repo
|
- skanuje remote URL-e w repo
|
||||||
- zapisuje znalezione tokeny do `tokens.json`
|
- zapisuje znalezione tokeny do `tokens.json`
|
||||||
- zapisuje je per endpoint serwera
|
- 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`
|
Tabela `items` porownuje dwa zrodla dla tego samego endpointu. Ten sam `item`
|
||||||
moze miec dwa wiersze:
|
moze miec dwa wiersze:
|
||||||
@@ -109,6 +110,7 @@ Przyklad:
|
|||||||
```bash
|
```bash
|
||||||
./rvctl tokens scan
|
./rvctl tokens scan
|
||||||
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
|
./rvctl tokens scan --repo ~/dev/workspace/rv/series/inf/03
|
||||||
|
./rvctl tokens scan --verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
### `tokens read`
|
### `tokens read`
|
||||||
|
|||||||
@@ -830,6 +830,7 @@ def run_tokens_scan(config: WorkspaceConfig, args: argparse.Namespace) -> None:
|
|||||||
store_servers = token_data.get("servers", {})
|
store_servers = token_data.get("servers", {})
|
||||||
endpoint_names = sorted(set(repo_servers) | set(store_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_token_context(repo_root, config, repo_servers, store_servers, len(endpoint_names))
|
||||||
print()
|
print()
|
||||||
print("scan")
|
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.",
|
help="Scan remote URLs in a git repo and save discovered credentials into tokens.json.",
|
||||||
)
|
)
|
||||||
add_repo_option(tokens_scan_parser)
|
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(
|
tokens_read_parser = tokens_subparsers.add_parser(
|
||||||
"read",
|
"read",
|
||||||
|
|||||||
Reference in New Issue
Block a user