Add browser profile option and TSV output mode
- add --browser-profile for login and validate browser/profile combinations\n- validate browser options eagerly and keep default-browser behavior when omitted\n- add TSV output format (no header)\n- change header default to auto; add --header original/-H o\n- remove explicit json/j output mode usage and keep JSON as implicit default\n- add tini to Dockerfile entrypoint path to improve signal handling
This commit is contained in:
12
src/cli.js
12
src/cli.js
@@ -26,7 +26,7 @@ Commands:
|
||||
|
||||
Global options (all commands):
|
||||
-q, --query <jmespath>
|
||||
-o, --output <format> json|j|table|t|alignedtable|at|prettytable|pt
|
||||
-o, --output <format> table|t|alignedtable|at|prettytable|pt|tsv
|
||||
-h, --help
|
||||
|
||||
Use: sk-az-tools --help <command>
|
||||
@@ -43,13 +43,14 @@ Options:
|
||||
}
|
||||
|
||||
function usageLogin() {
|
||||
return `Usage: sk-az-tools login [--resources <csv>] [--use-device-code] [--no-browser] [--browser <name>] [global options]
|
||||
return `Usage: sk-az-tools login [--resources <csv>] [--use-device-code] [--no-browser] [--browser <name>] [--browser-profile <profile>] [global options]
|
||||
|
||||
Options:
|
||||
--resources <csv> Comma-separated resources: graph,devops,arm (default: all)
|
||||
--use-device-code Use device code flow instead of interactive flow
|
||||
--no-browser Do not launch browser; print interactive URL to stderr
|
||||
--browser <name> Browser keyword: default|brave|browser|browserPrivate|chrome|edge|firefox`;
|
||||
--browser <name> Browser keyword: brave|browser|browserPrivate|chrome|edge|firefox
|
||||
--browser-profile <name> Chromium profile name (e.g. Default, "Profile 1")`;
|
||||
}
|
||||
|
||||
function usageLogout() {
|
||||
@@ -86,10 +87,10 @@ Options:
|
||||
}
|
||||
|
||||
function usageTable() {
|
||||
return `Usage: sk-az-tools table [--header|-H <spec|auto|a>] [global options]
|
||||
return `Usage: sk-az-tools table [--header|-H <spec|auto|a|original|o>] [global options]
|
||||
|
||||
Options:
|
||||
-H, --header <value> Header mode/spec: auto|a OR "col1, col2" OR "key1: Label 1, key2: Label 2"`;
|
||||
-H, --header <value> Header mode/spec: auto|a (default), original|o, OR "col1, col2" OR "key1: Label 1, key2: Label 2"`;
|
||||
}
|
||||
|
||||
function usageCommand(command) {
|
||||
@@ -136,6 +137,7 @@ async function main() {
|
||||
"use-device-code": { type: "boolean" },
|
||||
"no-browser": { type: "boolean" },
|
||||
browser: { type: "string" },
|
||||
"browser-profile": { type: "string" },
|
||||
all: { type: "boolean" },
|
||||
resolve: { type: "boolean", short: "r" },
|
||||
short: { type: "boolean", short: "s" },
|
||||
|
||||
Reference in New Issue
Block a user