Refactor CLI commands: remove table command and related utilities; update dependencies and version
All checks were successful
build / build (push) Successful in 17s
All checks were successful
build / build (push) Successful in 17s
This commit is contained in:
12
src/cli.ts
12
src/cli.ts
@@ -12,19 +12,19 @@ import { usageListResourcePermissions } from "./cli/commands/list-resource-permi
|
||||
import { usageLogin } from "./cli/commands/login.ts";
|
||||
import { usageLogout } from "./cli/commands/logout.ts";
|
||||
import { usageRest } from "./cli/commands/rest.ts";
|
||||
import { usageTable } from "./cli/commands/table.ts";
|
||||
import {
|
||||
normalizeOutputFormat,
|
||||
omitPermissionGuidColumns,
|
||||
outputFiltered,
|
||||
parseHeaderSpec,
|
||||
renderOutput,
|
||||
} from "./cli/utils.ts";
|
||||
} from "@slawek/sk-tools";
|
||||
import {
|
||||
omitPermissionGuidColumns,
|
||||
} from "./cli/permission-utils.ts";
|
||||
|
||||
type CliValues = {
|
||||
help?: boolean;
|
||||
type?: string;
|
||||
from?: string;
|
||||
method?: string;
|
||||
url?: string;
|
||||
"display-name"?: string;
|
||||
@@ -56,7 +56,6 @@ Commands:
|
||||
list-app-permissions List required permissions for an app
|
||||
list-app-grants List OAuth2 grants for an app
|
||||
list-resource-permissions List available permissions for a resource app
|
||||
table Render stdin JSON as Markdown table
|
||||
|
||||
Global options (all commands):
|
||||
-q, --query <jmespath>
|
||||
@@ -85,8 +84,6 @@ function usageCommand(command: string): string {
|
||||
return usageListAppGrants();
|
||||
case "list-resource-permissions":
|
||||
return usageListResourcePermissions();
|
||||
case "table":
|
||||
return usageTable();
|
||||
default:
|
||||
return `Unknown command: ${command}\n\n${usage()}`;
|
||||
}
|
||||
@@ -110,7 +107,6 @@ async function main(): Promise<void> {
|
||||
options: {
|
||||
help: { type: "boolean", short: "h" },
|
||||
type: { type: "string", short: "t" },
|
||||
from: { type: "string", short: "F" },
|
||||
method: { type: "string" },
|
||||
url: { type: "string" },
|
||||
"display-name": { type: "string", short: "n" },
|
||||
|
||||
Reference in New Issue
Block a user