Skip to content

Commit

Permalink
Add docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
rinatkhaziev committed Dec 11, 2023
1 parent 7912645 commit 004c4ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/lib/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export abstract class BaseVIPCommand {
return true;
}

/**
* Authentication routine.
* This will prompt the user to authenticate with their VIP account.
*
* @protected
* @returns {Promise< void >}
* @memberof BaseVIPCommand
*/
protected async authenticate(): Promise< void > {
/**
* @param {any[]} argv
Expand Down Expand Up @@ -203,6 +211,14 @@ export abstract class BaseVIPCommand {

// args length can vary based the number of arguments and options the command defines, the command itsrlf is always the last argument
// Can some of this logic be moved out to a hook?

/**
* This is a wrapper method that performs common routines before and after executing the command
*
* @param {...unknown[]} args
* @returns {Promise< void >}
* @memberof BaseVIPCommand
*/
public async run( ...args: unknown[] ): Promise< void > {
if ( this.needsAuth ) {
try {
Expand Down

0 comments on commit 004c4ad

Please sign in to comment.