-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(v2): SDK update and interface overhaul (#32)
Signed-off-by: Tomas Pilar <tomas.pilar@ibm.com>
- Loading branch information
1 parent
386ac9a
commit 83d5b48
Showing
53 changed files
with
1,273 additions
and
1,265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { loadProfileConfig } from "../../utils/config.js"; | ||
import { prettyPrint } from "../../utils/print.js"; | ||
|
||
export const showCommandDefinition = [ | ||
"show", | ||
"Show configuration", | ||
{}, | ||
(args) => { | ||
const config = loadProfileConfig(args.profile); | ||
prettyPrint(config); | ||
args.print(config); | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { clientMiddleware } from "../../middleware/client.js"; | ||
|
||
import { deleteCommandDefinition } from "./delete.js"; | ||
import { downloadCommandDefinition } from "./download.js"; | ||
import { infoCommandDefinition } from "./info.js"; | ||
import { readCommandDefinition } from "./read.js"; | ||
import { retrieveCommandDefinition } from "./retrieve.js"; | ||
import { listCommandDefinition } from "./list.js"; | ||
import { uploadCommandDefinition } from "./upload.js"; | ||
import { createCommandDefinition } from "./create.js"; | ||
|
||
export const filesCommandDefinition = [ | ||
"files", | ||
"Upload and manage files", | ||
"file", | ||
"Upload, download and manage files", | ||
(yargs) => | ||
yargs | ||
.middleware(clientMiddleware) | ||
.command(...listCommandDefinition) | ||
.command(...infoCommandDefinition) | ||
.command(...uploadCommandDefinition) | ||
.command(...downloadCommandDefinition) | ||
.command(...createCommandDefinition) | ||
.command(...retrieveCommandDefinition) | ||
.command(...readCommandDefinition) | ||
.command(...deleteCommandDefinition) | ||
.command(...listCommandDefinition) | ||
.demandCommand(1, 1, "Please choose a command"), | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const retrieveCommandDefinition = [ | ||
"retrieve <id>", | ||
"Show detailed information about a file", | ||
(yargs) => | ||
yargs.positional("id", { | ||
type: "string", | ||
description: "Identifier of the file", | ||
}), | ||
async (args) => { | ||
const output = await args.client.file.retrieve( | ||
{ | ||
id: args.id, | ||
}, | ||
{ signal: args.timeout } | ||
); | ||
args.print(output); | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.