Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
W.I.P.
Browse files Browse the repository at this point in the history
  • Loading branch information
pierce-h committed Sep 3, 2020
1 parent b46dfac commit a3d791a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
19 changes: 4 additions & 15 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import BaseCommand from "../base-command";
import { flags } from "@oclif/command";
import cliBanner from '../core/utils/cli-banner';
import Help from '@oclif/plugin-help';

export default class Index extends BaseCommand {
export default class Index extends Help {
public static description = "Connect CLI";

public static flags = {
help: flags.help({
char: "h",
description: "Show help for commands",
}),
};

// hide the command from help
public static hidden = true;

run(): Promise<void> {
// When the -h flag is present the following line haults execution
this.parse(Index);
this.log(cliBanner());
this._version();
run(): void {
this.showRootHelp()
}
}
4 changes: 2 additions & 2 deletions src/core/utils/api-key-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export enum Errors {

/**
* Retrieves a key if it exist in the file system
* @returns {Promise<strig>} A promise w/ the key value
* @returns {Promise<string>} A promise w/ the key value
*/
export async function get(): Promise<string> {
try {
Expand All @@ -35,7 +35,7 @@ export async function get(): Promise<string> {
* Sets a key in the file system
*
* @param {string} apiKey The key that should be set
* @returns {Promise<strig>} A promise with the value of the key that was set
* @returns {Promise<string>} A promise with the value of the key that was set
*/
export async function set(apiKey: string): Promise<string> {
try {
Expand Down

0 comments on commit a3d791a

Please sign in to comment.