# Module: system

Contains all of the system level commands.

Author:
  - Seth Hollingsead
Copyright:
  - Copyright © 2022-… by Seth Hollingsead. All rights reserved
Source:
  - commandsBlob/commands/system.js, line 1

### Requires

- module:commandBroker
- module:ruleBroker
- module:workflowBroker
- module:configurator
- module:loggers
- module:data
- module:stack
- @haystacks/constants
- figlet
- path

### Methods

#### (inner) about(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Displays the message about the current application.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | Not used for this command. inputData[0] === 'about' inputData[1] === 'application|framework' (optional)
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 132

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) clearAllCommandsLog(inputData, inputMetaData) → {array.<boolean, boolean>}

Wipes out the all commands log, destroying all evidence of whatever commands were executed by the system.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this command.
`inputMetaData` | string | Not used for this command.

Source:
  - commandsBlob/commands/system.js, line 730

##### Returns:

An aray ith a boolean True or False value to indicate if the application should exit or not exit, followed by another boolean value to indicate if the operation was successful or not.

Type
  array.<boolean, boolean>

#### (inner) clearScreen(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Clears all data from the console cache by printing a bunch of blank lines to the screen.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this command.
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 227

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) clearUserCommandsLog(inputData, inputMetaData) → {array.<boolean, boolean>}

Wipes out the user command log, destroying all evidence of whatever commands the user has entered.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this command.
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 696

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by another boolean value to indicate if the operation was successful or not.

Type
  array.<boolean, boolean>

#### (inner) echoCommand(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Returns the input as the output without any changes.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | String that should be echoed. inputData[0] === 'echoCommand'
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 38

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) exit(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Returns false so the entire application can exit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | Not used for this command. inputData[0] === 'exit'
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 71

##### Returns:

An array with a boolean False value to indicate if the application exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) help(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Displays all the information about all of the commands in the system, including both system defined commands and client defined commands.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | An array that could possibly include the name of this command, and a list of top-level command data structure data types to print help for. That way we can parameterize and optimize the help to print commands specific to the Haystacks platform, the host application, loaded plugins, or various combinations of these. inputData[0] = 'help' inputData[1] = Could be a coma-separated string list of command catagories to get help for. inputData[n] = Could be additional list of command catagories to get help for if the user entered a space-separated list. Options are: Framework,Platform,Application,App,Plugins,Plugin
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 254

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) name(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Displays the name of the current application in standard font format, nothing special. Optional argument to output in figlet font.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | An array that could really contain anything depending on what the user entered, but the function converts and filters out for a boolean True or False value internally to the function. inputData[0] === 'name' inputData[1] === 'application|framework' (optional) inputData[2] === 'true|false' (optional)
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 171

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) printAllCommandsLog(inputData, inputMetaData) → {array.<boolean, array.<string>>}

Prints out a log of all the commands executed by the system since the start of the application for this instance it was running.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this command.
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 658

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by an array of strings that is the user entered commands.

Type
  array.<boolean, array.<string>>

#### (inner) printUserCommandsLog(inputData, inputMetaData) → {array.<boolean, array.<string>>}

Prints out the command log of all the commands the user has entered since the start of the application for this instance it was running.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this command.
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 620

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by an array of strings that is the user entered commands.

Type
  array.<boolean, array.<string>>

#### (inner) version(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Displays the current version number for the current application.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | Not used for this command. inputData[0] = 'version' inputData[1] === 'application|framework' (optional)
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 93

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>

#### (inner) workflowHelp(inputData, inputMetaData) → {array.<boolean, (string|integer|boolean|object|array)>}

Displays all the information about all the workflows in the system, including both system defined workflows & client defined workflows.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<(boolean|string|integer)> | An array that could possibly include the name of this command, and a list of top-level workflow catagories data structures to be printed. That way we can parameterize and optimize the workflow help to print workflows specific to the Haystacks platform, the host application, loaded plugins, or various combinations of these. inputData[0] = 'workflowHelp' inputData[1] = Could be a coma-separated string list of command catagories to get workflow help for. inputData[n] = Could be additional list of command catagories to get help for if the user entered a space-separated list. Options are: Framework,Platform,Application,App,Plugins,Plugin
`inputMetaData` | string | Not used for this command.

Author:
  - Seth Hollingsead
Source:
  - commandsBlob/commands/system.js, line 435

##### Returns:

An array with a boolean True or False value to indicate if the application should exit or not exit, followed by the command output.

Type
  array.<boolean, (string|integer|boolean|object|array)>