-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathstatus.ts
More file actions
27 lines (20 loc) · 867 Bytes
/
status.ts
File metadata and controls
27 lines (20 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Command } from "@oclif/core";
import { format, intro, outro } from "../../prompts/format.js";
import { StatusAction } from "../../actions/auth/status.js";
import { DirectoryPath } from "../../types/file/directoryPath.js";
import { CommandMetadata } from "../../types/common/command-metadata.js";
export default class Status extends Command {
static description = "View the currently logged in user.";
private static cmdTxt = format.cmd('apimatic', 'auth' ,'status');
static examples = [Status.cmdTxt];
async run() {
const commandMetadata: CommandMetadata = {
commandName: Status.id,
shell: this.config.shell
};
intro('Status')
const statusAction = new StatusAction(new DirectoryPath(this.config.configDir), commandMetadata);
const actionResult = await statusAction.execute(null);
outro(actionResult)
}
}