Skip to content

Commit 2abd4cc

Browse files
authored
Add json-compact Flag and improve JSON Output Handling (#1283)
* 1. Add support for json-compact flag 2. Ensure no reading from stdin for api get and delete endpoints * Update json flagged output for tenant list command * Fix JSON data handling and improve output formatting * Fix integration tests * Not Display headings only if output format json-compact * Not Display headings only if output format json-compact
1 parent f859808 commit 2abd4cc

133 files changed

Lines changed: 545 additions & 174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/auth0_actions_create.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ auth0 actions create [flags]
2727
auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --secret "SECRET=value"
2828
auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --dependency "uuid=9.0.0" --secret "API_KEY=value" --secret "SECRET=value"
2929
auth0 actions create -n myaction -t post-login -c "$(cat path/to/code.js)" -r node18 -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json
30+
auth0 actions create -n myaction -t post-login -c "$(cat path/to/code.js)" -r node18 -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json-compact
3031
```
3132

3233

@@ -36,6 +37,7 @@ auth0 actions create [flags]
3637
-c, --code string Code content for the action.
3738
-d, --dependency stringToString Third party npm module, and its version, that the action depends on. (default [])
3839
--json Output in json format.
40+
--json-compact Output in compact json format.
3941
-n, --name string Name of the action.
4042
-r, --runtime string Runtime to be used in the action. Possible values are: node22(recommended), node18, node16, node12
4143
-s, --secret stringToString Secrets to be used in the action. (default [])

docs/auth0_actions_deploy.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ auth0 actions deploy [flags]
2020
auth0 actions deploy
2121
auth0 actions deploy <action-id>
2222
auth0 actions deploy <action-id> --json
23+
auth0 actions deploy <action-id> --json-compact
2324
```
2425

2526

2627
## Flags
2728

2829
```
29-
--json Output in json format.
30+
--json Output in json format.
31+
--json-compact Output in compact json format.
3032
```
3133

3234

docs/auth0_actions_list.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ auth0 actions list [flags]
1818
auth0 actions list
1919
auth0 actions ls
2020
auth0 actions ls --json
21+
auth0 actions ls --json-compact
2122
auth0 actions ls --csv
2223
```
2324

2425

2526
## Flags
2627

2728
```
28-
--csv Output in csv format.
29-
--json Output in json format.
29+
--csv Output in csv format.
30+
--json Output in json format.
31+
--json-compact Output in compact json format.
3032
```
3133

3234

docs/auth0_actions_show.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ auth0 actions show [flags]
1818
auth0 actions show
1919
auth0 actions show <action-id>
2020
auth0 actions show <action-id> --json
21+
auth0 actions show <action-id> --json-compact
2122
```
2223

2324

2425
## Flags
2526

2627
```
27-
--json Output in json format.
28+
--json Output in json format.
29+
--json-compact Output in compact json format.
2830
```
2931

3032

docs/auth0_actions_update.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ auth0 actions update [flags]
2727
auth0 actions update <action-id> --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --secret "SECRET=value"
2828
auth0 actions update <action-id> --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --dependency "uuid=9.0.0" --secret "API_KEY=value" --secret "SECRET=value"
2929
auth0 actions update <action-id> -n myaction -c "$(cat path/to/code.js)" -r node18 -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json
30+
auth0 actions update <action-id> -n myaction -c "$(cat path/to/code.js)" -r node18 -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json-compact
3031
```
3132

3233

@@ -37,6 +38,7 @@ auth0 actions update [flags]
3738
-d, --dependency stringToString Third party npm module, and its version, that the action depends on. (default [])
3839
--force Skip confirmation.
3940
--json Output in json format.
41+
--json-compact Output in compact json format.
4042
-n, --name string Name of the action.
4143
-r, --runtime string Runtime to be used in the action. Possible values are: node22(recommended), node18, node16, node12
4244
-s, --secret stringToString Secrets to be used in the action. (default [])

docs/auth0_apis_create.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ auth0 apis create [flags]
2727
auth0 apis create --name myapi --identifier http://my-api --token-lifetime 6100 --offline-access=false --scopes "letter:write,letter:read"
2828
auth0 apis create --name myapi --identifier http://my-api --token-lifetime 6100 --offline-access=false --scopes "letter:write,letter:read" --signing-alg "RS256"
2929
auth0 apis create -n myapi -i http://my-api -t 6100 -o false -s "letter:write,letter:read" --signing-alg "RS256" --json
30+
auth0 apis create -n myapi -i http://my-api -t 6100 -o false -s "letter:write,letter:read" --signing-alg "RS256" --json-compact
3031
```
3132

3233

@@ -35,6 +36,7 @@ auth0 apis create [flags]
3536
```
3637
-i, --identifier string Identifier of the API. Cannot be changed once set.
3738
--json Output in json format.
39+
--json-compact Output in compact json format.
3840
-n, --name string Name of the API.
3941
-o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false).
4042
-s, --scopes strings Comma-separated list of scopes (permissions).

docs/auth0_apis_list.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ auth0 apis list [flags]
1919
auth0 apis ls
2020
auth0 apis ls --number 100
2121
auth0 apis ls -n 100 --json
22+
auth0 apis ls -n 100 --json-compact
2223
auth0 apis ls --csv
2324
```
2425

2526

2627
## Flags
2728

2829
```
29-
--csv Output in csv format.
30-
--json Output in json format.
31-
-n, --number int Number of APIs to retrieve. Minimum 1, maximum 1000. (default 100)
30+
--csv Output in csv format.
31+
--json Output in json format.
32+
--json-compact Output in compact json format.
33+
-n, --number int Number of APIs to retrieve. Minimum 1, maximum 1000. (default 100)
3234
```
3335

3436

docs/auth0_apis_scopes_list.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ auth0 apis scopes list [flags]
1818
auth0 apis scopes list
1919
auth0 apis scopes ls <api-id|api-audience>
2020
auth0 apis scopes ls <api-id|api-audience> --json
21+
auth0 apis scopes ls <api-id|api-audience> --json-compact
2122
auth0 apis scopes ls <api-id|api-audience> --csv
2223
```
2324

2425

2526
## Flags
2627

2728
```
28-
--csv Output in csv format.
29-
--json Output in json format.
29+
--csv Output in csv format.
30+
--json Output in json format.
31+
--json-compact Output in compact json format.
3032
```
3133

3234

docs/auth0_apis_show.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ auth0 apis show [flags]
1818
auth0 apis show
1919
auth0 apis show <api-id|api-audience>
2020
auth0 apis show <api-id|api-audience> --json
21+
auth0 apis show <api-id|api-audience> --json-compact
2122
```
2223

2324

2425
## Flags
2526

2627
```
27-
--json Output in json format.
28+
--json Output in json format.
29+
--json-compact Output in compact json format.
2830
```
2931

3032

docs/auth0_apis_update.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ auth0 apis update [flags]
2626
auth0 apis update <api-id|api-audience> --name myapi --token-lifetime 6100 --offline-access=false
2727
auth0 apis update <api-id|api-audience> --name myapi --token-lifetime 6100 --offline-access=false --scopes "letter:write,letter:read" --signing-alg "RS256"
2828
auth0 apis update <api-id|api-audience> -n myapi -t 6100 -o false -s "letter:write,letter:read" --signing-alg "RS256" --json
29+
auth0 apis update <api-id|api-audience> -n myapi -t 6100 -o false -s "letter:write,letter:read" --signing-alg "RS256" --json-compact
2930
```
3031

3132

3233
## Flags
3334

3435
```
3536
--json Output in json format.
37+
--json-compact Output in compact json format.
3638
-n, --name string Name of the API.
3739
-o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false).
3840
-s, --scopes strings Comma-separated list of scopes (permissions).

0 commit comments

Comments
 (0)