diff --git a/CHANGELOG.md b/CHANGELOG.md index 600cbc79..74c330a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,33 +5,53 @@
Dependencies -- Bumped **[stdout-update](https://www.npmjs.com/package/stdout-update/v/2.0.1)** from `2.0.0` to `2.0.1` +- Bumped **[chalk](https://www.npmjs.com/package/chalk/v/4.1.2)** from `4.1.1` to `4.1.2` +- Bumped **[elegant-spinner](https://www.npmjs.com/package/elegant-spinner/v/3.0.0)** from `2.0.0` to `3.0.0` +- Bumped **[figures](https://www.npmjs.com/package/figures/v/4.0.0)** from `3.2.0` to `4.0.0` +- Bumped **[stdout-update](https://www.npmjs.com/package/stdout-update/v/2.0.4)** from `2.0.1` to `2.0.4`
Dev Dependencies -- Bumped **[@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env/v/7.14.1)** from `7.14.0` to `7.14.1` -- Bumped **[@tagproject/ts-package-shared-config](https://www.npmjs.com/package/@tagproject/ts-package-shared-config/v/3.0.0)** from `2.0.3` to `3.0.0` -- Bumped **[@types/node](https://www.npmjs.com/package/@types/node/v/15.0.2)** from `15.0.1` to `15.0.2` -- Bumped **[@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin/v/4.22.1)** from `4.22.0` to `4.22.1` -- Bumped **[@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser/v/4.22.1)** from `4.22.0` to `4.22.1` -- Bumped **[changelog-guru](https://www.npmjs.com/package/changelog-guru/v/3.0.1)** from `2.3.1` to `3.0.1` -- Bumped **[cspell](https://www.npmjs.com/package/cspell/v/5.4.0)** from `5.3.12` to `5.4.0` -- Bumped **[ghinfo](https://www.npmjs.com/package/ghinfo/v/2.0.3)** from `2.0.2` to `2.0.3` -- Bumped **[ts-jest](https://www.npmjs.com/package/ts-jest/v/26.5.6)** from `26.5.5` to `26.5.6` -- Bumped **[typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown/v/3.8.0)** from `3.7.2` to `3.8.0` +- Bumped **[@babel/plugin-transform-runtime](https://www.npmjs.com/package/@babel/plugin-transform-runtime/v/7.16.4)** from `7.13.15` to `7.16.4` +- Bumped **[@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env/v/7.16.4)** from `7.14.1` to `7.16.4` +- Bumped **[@tagproject/ts-package-shared-config](https://www.npmjs.com/package/@tagproject/ts-package-shared-config/v/5.0.0)** from `3.0.0` to `5.0.0` +- Bumped **[@types/jest](https://www.npmjs.com/package/@types/jest/v/27.0.3)** from `26.0.23` to `27.0.3` +- Bumped **[@types/node](https://www.npmjs.com/package/@types/node/v/16.11.10)** from `15.0.2` to `16.11.10` +- Bumped **[@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin/v/5.4.0)** from `4.22.1` to `5.4.0` +- Bumped **[@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser/v/5.4.0)** from `4.22.1` to `5.4.0` +- Bumped **[babel-jest](https://www.npmjs.com/package/babel-jest/v/27.3.1)** from `26.6.3` to `27.3.1` +- Bumped **[changelog-guru](https://www.npmjs.com/package/changelog-guru/v/3.0.2)** from `3.0.1` to `3.0.2` +- Bumped **[cspell](https://www.npmjs.com/package/cspell/v/5.13.1)** from `5.4.0` to `5.13.1` +- Bumped **[eslint](https://www.npmjs.com/package/eslint/v/8.3.0)** from `7.25.0` to `8.3.0` +- Bumped **[eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import/v/2.25.3)** from `2.22.1` to `2.25.3` +- Bumped **[eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest/v/25.3.0)** from `24.3.6` to `25.3.0` +- Bumped **[eslint-plugin-optimize-regex](https://www.npmjs.com/package/eslint-plugin-optimize-regex/v/1.2.1)** from `1.2.0` to `1.2.1` +- Bumped **[eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise/v/5.1.1)** from `5.1.0` to `5.1.1` +- Bumped **[husky](https://www.npmjs.com/package/husky/v/7.0.4)** from `6.0.0` to `7.0.4` +- Bumped **[jest](https://www.npmjs.com/package/jest/v/27.3.1)** from `26.6.3` to `27.3.1` +- Bumped **[prettier](https://www.npmjs.com/package/prettier/v/2.5.0)** from `2.2.1` to `2.5.0` +- Bumped **[strip-ansi](https://www.npmjs.com/package/strip-ansi/v/7.0.1)** from `7.0.0` to `7.0.1` +- Bumped **[ts-jest](https://www.npmjs.com/package/ts-jest/v/27.0.7)** from `26.5.6` to `27.0.7` +- Bumped **[typedoc](https://www.npmjs.com/package/typedoc/v/0.22.10)** from `0.20.36` to `0.22.10` +- Bumped **[typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown/v/3.11.7)** from `3.8.0` to `3.11.7` +- Bumped **[typescript](https://www.npmjs.com/package/typescript/v/4.5.2)** from `4.2.4` to `4.5.2`
# :bug: Bug Fixes -- Fix string escaping error [`328b80b`](https://github.com/keindev/tasktree/commit/328b80b8c178574cd3e573d21b71e9d2a4b3f237) +- Fix display of styled strings [`6339919`](https://github.com/keindev/tasktree/commit/6339919576564185515af421f9f047521875d150) + +# :memo: Internal changes + +- **[Ci]** Rename default branch to main [`3a39dec`](https://github.com/keindev/tasktree/commit/3a39dec16a020f79ee0c8c2d2faac427c0a9c91f) # :wrench: Code Refactoring -- Add Task, Theme & `ProgressBar` to index exports [`41dc87a`](https://github.com/keindev/tasktree/commit/41dc87a02c59a5447db56a2d716136ee08566611) +- Fix eslint errors [`164f375`](https://github.com/keindev/tasktree/commit/164f3757ec883819aaa4912253bd9ae9d4c0a9e0) --- diff --git a/docs/api/ProgressBar.md b/docs/api/ProgressBar.md new file mode 100644 index 00000000..a6679852 --- /dev/null +++ b/docs/api/ProgressBar.md @@ -0,0 +1,77 @@ +# ProgressBar + +To add a Progress Bar to your task, use [Task.bar](Task.md#bar) method accepting the string pattern and progress bar parameters. + +```javascript +const progress = new task.bar([template, options]); +``` + +## Constructor + +```typescript +new ProgressBar(template?: string, options?: IProgressBarOptions) +``` + +### IProgressBarOptions: + +| Name | Type | Description | +| :---------------- | :-------- | :---------------------------------------------------------- | +| `badges?` | _boolean_ | Option to add badge | +| `clear?` | _boolean_ | Option to clear the bar on completion | +| `completeChar?` | _string_ | Completion character | +| `current?` | _number_ | Current completed index | +| `gradient?` | _boolean_ | Option to add gradient to pending bar | +| `incompleteChar?` | _string_ | Incomplete character | +| `total?` | _number_ | Total number of ticks to complete | +| `width?` | _number_ | The displayed width of the progress bar defaulting to total | + +### Template (ProgressBar output template) + +| Name | Description | +| :--------- | :----------------------------------- | +| `:bar` | The progress bar itself | +| `:current` | Current tick number | +| `:total` | Total ticks | +| `:elapsed` | Time elapsed in seconds | +| `:percent` | Completion percentage | +| `:eta` | Estimated completion time in seconds | +| `:rate` | Rate of ticks per second | + +> default template: `:bar :rate/bps :percent :eta/s` + +## Methods + +### complete + +Completes progress and marks it as successful + +### fail + +Stops the progress and marks it as failed + +### render + +Render output string with [Theme](Theme.md) + +### skip + +Stops the progress and marks it as skipped + +### tick + +Increases current progress on step value + +#### Parameters + +| Name | Type | Description | +| :-------- | :-------------------------------------------------------------------- | :------------------------------------------------------------------------------ | +| `step?` | _number_ | Value by which the current progress will increase | +| `tokens?` | [_IProgressBarToken_](../interfaces/progressbar.iprogressbartoken.md) | Add custom tokens by adding a `{'name': value}` object parameter to your method | + +#### Example + +```javascript +const bar = new Progress(':bar template with custom :token'); + +bar.tick(10, { token: 100 }); +``` diff --git a/docs/api/Theme.md b/docs/api/Theme.md new file mode 100644 index 00000000..9f67fb0b --- /dev/null +++ b/docs/api/Theme.md @@ -0,0 +1,46 @@ +# Theme + +Allows you to set a custom theme options for the tree display. + +## Options + +All theme options is object with several fields: + +```typescript +{ + // status text badge to the task, will be added after the task is completed + badge?: string; + // indication color + color?: string; + // indication symbol + symbol?: string +} +``` + +### Indication types + +| Type | `badge` | `color` | `symbol` | Description | +| :------ | :------: | :---------------------------- | :---------: | :------------------------------------------- | +| default | ✖ | `[default]` - text | `-` | default color | +| active | ✖ | `#4285f4` - symbol | `frame (⠧)` | spinner, progress bar color | +| success | ✖ | `#00c851` - symbol, text, bar | ✔ | task symbol, progress bar color | +| skip | `[skip]` | `#ff8800` - symbol, text, bar | ↓ | task symbol, progress bar color | +| error | `[fail]` | `#ff4444` - symbol, text, bar | ✖ | task symbol, error title, progress bar color | +| message | ✖ | `#2e2e2e` - symbol | ─ | dim pointer to task information | +| info | ✖ | `#33b5e5` - symbol | ℹ | information message symbol | +| warning | ✖ | `#ffbb33` - symbol | ⚠ | warning message symbol | +| subtask | ✖ | `#2e2e2e` - symbol, text | › | dim pointer to subtask | +| list | ✖ | `#4285f4` - symbol | ❯ | list symbol | +| dim | ✖ | `#838584` - symbol, bar | `-` | dim color | + +```javascript +const theme = { + default: '#ffffff', + success: ['#008000', '✔'], + skip: { + symbol: '↓', + }, + error: ['#ff0000', '✖', '[error]'], + ... +}; +``` diff --git a/docs/api/classes/progressbar.progressbar-1.md b/docs/api/classes/progressbar.progressbar-1.md deleted file mode 100644 index 1f200c2b..00000000 --- a/docs/api/classes/progressbar.progressbar-1.md +++ /dev/null @@ -1,348 +0,0 @@ -# Class: ProgressBar - -[ProgressBar](../modules/progressbar.md).ProgressBar - -To add a Progress Bar to your task, use [Task.bar](task.task-1.md#bar) method accepting the string pattern and progress bar parameters. - -```javascript -const progress = new task.bar([template, options]); -``` - -## Implements - -- *Required*\> - -## Table of contents - -### Constructors - -- [constructor](progressbar.progressbar-1.md#constructor) - -### Properties - -- [badges](progressbar.progressbar-1.md#badges) -- [clear](progressbar.progressbar-1.md#clear) -- [completeChar](progressbar.progressbar-1.md#completechar) -- [gradient](progressbar.progressbar-1.md#gradient) -- [incompleteChar](progressbar.progressbar-1.md#incompletechar) -- [template](progressbar.progressbar-1.md#template) -- [total](progressbar.progressbar-1.md#total) -- [width](progressbar.progressbar-1.md#width) -- [MAX\_PERCENT](progressbar.progressbar-1.md#max_percent) -- [MAX\_POINT\_POSITION](progressbar.progressbar-1.md#max_point_position) -- [MAX\_RATIO](progressbar.progressbar-1.md#max_ratio) -- [MIN\_PERCENT](progressbar.progressbar-1.md#min_percent) -- [MIN\_POINT\_POSITION](progressbar.progressbar-1.md#min_point_position) -- [MIN\_RATIO](progressbar.progressbar-1.md#min_ratio) -- [TICK](progressbar.progressbar-1.md#tick) -- [TIME\_DIMENSION](progressbar.progressbar-1.md#time_dimension) - -### Accessors - -- [ETA](progressbar.progressbar-1.md#eta) -- [elapsed](progressbar.progressbar-1.md#elapsed) -- [end](progressbar.progressbar-1.md#end) -- [isCompleted](progressbar.progressbar-1.md#iscompleted) -- [percent](progressbar.progressbar-1.md#percent) -- [rate](progressbar.progressbar-1.md#rate) -- [ratio](progressbar.progressbar-1.md#ratio) -- [start](progressbar.progressbar-1.md#start) - -### Methods - -- [complete](progressbar.progressbar-1.md#complete) -- [fail](progressbar.progressbar-1.md#fail) -- [render](progressbar.progressbar-1.md#render) -- [skip](progressbar.progressbar-1.md#skip) -- [tick](progressbar.progressbar-1.md#tick) - -## Constructors - -### constructor - -\+ **new ProgressBar**(`template?`: *string*, `options?`: [*IProgressBarOptions*](../interfaces/progressbar.iprogressbaroptions.md)): [*ProgressBar*](progressbar.progressbar-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `template?` | *string* | -| `options?` | [*IProgressBarOptions*](../interfaces/progressbar.iprogressbaroptions.md) | - -**Returns:** [*ProgressBar*](progressbar.progressbar-1.md) - -## Properties - -### badges - -• `Readonly` **badges**: *boolean*= true - -Option to add badge - -Implementation of: Required.badges - -___ - -### clear - -• `Readonly` **clear**: *boolean*= false - -Option to clear the bar on completion - -Implementation of: Required.clear - -___ - -### completeChar - -• `Readonly` **completeChar**: *string* - -Completion character - -Implementation of: Required.completeChar - -___ - -### gradient - -• `Readonly` **gradient**: *boolean*= true - -Option to add gradient to pending bar - -Implementation of: Required.gradient - -___ - -### incompleteChar - -• `Readonly` **incompleteChar**: *string* - -Incomplete character - -Implementation of: Required.incompleteChar - -___ - -### template - -• `Readonly` **template**: *string* - -Output template - -**`default`** `:bar :rate/bps :percent :eta/s` - -___ - -### total - -• `Readonly` **total**: [*End*](../enums/progressbar.progress.md#end) - -Total number of ticks to complete - -Implementation of: Required.total - -___ - -### width - -• `Readonly` **width**: *number*= 20 - -The displayed width of the progress bar defaulting to total - -Implementation of: Required.width - -___ - -### MAX\_PERCENT - -▪ `Static` `Readonly` **MAX\_PERCENT**: ``100``= 100 - -___ - -### MAX\_POINT\_POSITION - -▪ `Static` `Readonly` **MAX\_POINT\_POSITION**: ``1``= 1 - -___ - -### MAX\_RATIO - -▪ `Static` `Readonly` **MAX\_RATIO**: ``1``= 1 - -___ - -### MIN\_PERCENT - -▪ `Static` `Readonly` **MIN\_PERCENT**: ``0``= 0 - -___ - -### MIN\_POINT\_POSITION - -▪ `Static` `Readonly` **MIN\_POINT\_POSITION**: ``0``= 0 - -___ - -### MIN\_RATIO - -▪ `Static` `Readonly` **MIN\_RATIO**: ``0``= 0 - -___ - -### TICK - -▪ `Static` `Readonly` **TICK**: ``1``= 1 - -___ - -### TIME\_DIMENSION - -▪ `Static` `Readonly` **TIME\_DIMENSION**: ``1000``= 1000 - -## Accessors - -### ETA - -• get **ETA**(): *number* - -Progress ETA (estimated time of arrival) - -**Returns:** *number* - -___ - -### elapsed - -• get **elapsed**(): *number* - -Elapsed time from the beginning of progress, in milliseconds - -**Returns:** *number* - -___ - -### end - -• get **end**(): *undefined* \| *number* - -End `Date` in milliseconds if progress is an ended - -**Returns:** *undefined* \| *number* - -___ - -### isCompleted - -• get **isCompleted**(): *boolean* - -`true` if progress is complete - -**Returns:** *boolean* - -___ - -### percent - -• get **percent**(): *number* - -Current percent of completion - -**Returns:** *number* - -___ - -### rate - -• get **rate**(): *number* - -Rate of progress - -**Returns:** *number* - -___ - -### ratio - -• get **ratio**(): *number* - -Ratio between `current` value and `total` value - -**Returns:** *number* - -___ - -### start - -• get **start**(): *number* - -Start `Date` in milliseconds - -**Returns:** *number* - -## Methods - -### complete - -▸ **complete**(): *void* - -Completes progress and marks it as successful - -**Returns:** *void* - -___ - -### fail - -▸ **fail**(): *void* - -Stops the progress and marks it as failed - -**Returns:** *void* - -___ - -### render - -▸ **render**(`theme`: *Theme*): *string* - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `theme` | *Theme* | - -**Returns:** *string* - -___ - -### skip - -▸ **skip**(): *void* - -Stops the progress and marks it as skipped - -**Returns:** *void* - -___ - -### tick - -▸ **tick**(`step?`: *number*, `tokens?`: [*IProgressBarToken*](../interfaces/progressbar.iprogressbartoken.md)): [*ProgressBar*](progressbar.progressbar-1.md) - -Increases current progress on step value - -**`example`** -```javascript -const bar = new Progress(':bar template with custom :token'); - -bat.tick(10, { token: 100 }); -``` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `step?` | *number* | Value by which the current progress will increase | -| `tokens?` | [*IProgressBarToken*](../interfaces/progressbar.iprogressbartoken.md) | Add custom tokens by adding a `{'name': value}` object parameter to your method | - -**Returns:** [*ProgressBar*](progressbar.progressbar-1.md) diff --git a/docs/api/classes/task.task-1.md b/docs/api/classes/task.task-1.md deleted file mode 100644 index 70cde44c..00000000 --- a/docs/api/classes/task.task-1.md +++ /dev/null @@ -1,291 +0,0 @@ -# Class: Task - -[Task](../modules/task.md).Task - -Entity for managing a task - includes all child objects (informational messages, errors, progress bars, and tasks) - -## Table of contents - -### Constructors - -- [constructor](task.task-1.md#constructor) - -### Accessors - -- [activeSubtask](task.task-1.md#activesubtask) -- [haveErrors](task.task-1.md#haveerrors) -- [havePendingSubtasks](task.task-1.md#havependingsubtasks) -- [haveSubtasks](task.task-1.md#havesubtasks) -- [haveWarnings](task.task-1.md#havewarnings) -- [id](task.task-1.md#id) -- [isPending](task.task-1.md#ispending) -- [status](task.task-1.md#status) -- [text](task.task-1.md#text) - -### Methods - -- [add](task.task-1.md#add) -- [bar](task.task-1.md#bar) -- [clear](task.task-1.md#clear) -- [complete](task.task-1.md#complete) -- [error](task.task-1.md#error) -- [fail](task.task-1.md#fail) -- [log](task.task-1.md#log) -- [render](task.task-1.md#render) -- [skip](task.task-1.md#skip) -- [update](task.task-1.md#update) -- [warn](task.task-1.md#warn) - -## Constructors - -### constructor - -\+ **new Task**(`text`: *string*, `__namedParameters?`: [*ITaskOptions*](../interfaces/task.itaskoptions.md)): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `text` | *string* | - | -| `__namedParameters` | [*ITaskOptions*](../interfaces/task.itaskoptions.md) | {} | - -**Returns:** [*Task*](task.task-1.md) - -## Accessors - -### activeSubtask - -• get **activeSubtask**(): [*Task*](task.task-1.md) - -First leaf subtask of the task tree, if it exists, otherwise, the object itself - -**Returns:** [*Task*](task.task-1.md) - -___ - -### haveErrors - -• get **haveErrors**(): *boolean* - -**Returns:** *boolean* - -___ - -### havePendingSubtasks - -• get **havePendingSubtasks**(): *boolean* - -**Returns:** *boolean* - -___ - -### haveSubtasks - -• get **haveSubtasks**(): *boolean* - -**Returns:** *boolean* - -___ - -### haveWarnings - -• get **haveWarnings**(): *boolean* - -**Returns:** *boolean* - -___ - -### id - -• get **id**(): *number* - -**Returns:** *number* - -___ - -### isPending - -• get **isPending**(): *boolean* - -**Returns:** *boolean* - -___ - -### status - -• get **status**(): [*TaskStatus*](../enums/task.taskstatus.md) - -Current task status - -**Returns:** [*TaskStatus*](../enums/task.taskstatus.md) - -___ - -### text - -• get **text**(): *string* - -Text to display - -**Returns:** *string* - -## Methods - -### add - -▸ **add**(`text`: *string*, `__namedParameters?`: [*ITaskOptions*](../interfaces/task.itaskoptions.md)): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `text` | *string* | - | -| `__namedParameters` | [*ITaskOptions*](../interfaces/task.itaskoptions.md) | {} | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### bar - -▸ **bar**(`template?`: *string*, `options?`: [*IProgressBarOptions*](../interfaces/progressbar.iprogressbaroptions.md)): [*ProgressBar*](progressbar.progressbar-1.md) - -Adds a new progress bar. Returns a progress bar object - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `template?` | *string* | -| `options?` | [*IProgressBarOptions*](../interfaces/progressbar.iprogressbaroptions.md) | - -**Returns:** [*ProgressBar*](progressbar.progressbar-1.md) - -___ - -### clear - -▸ **clear**(): *void* - -Removes all subtasks and progress bars - -**Returns:** *void* - -___ - -### complete - -▸ **complete**(`text?`: *string*, `clear?`: *boolean*): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text?` | *string* | -| `clear` | *boolean* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### error - -▸ **error**(`error?`: *string* \| Error, `fail?`: *boolean*): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `error?` | *string* \| Error | -| `fail?` | *boolean* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### fail - -▸ **fail**(`error?`: *string* \| Error, `clear?`: *boolean*): *never* - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `error?` | *string* \| Error | -| `clear` | *boolean* | - -**Returns:** *never* - -___ - -### log - -▸ **log**(`text`: *string*): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text` | *string* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### render - -▸ **render**(`theme`: *Theme*, `level?`: *number*): *string*[] - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `theme` | *Theme* | - | -| `level` | *number* | 0 | - -**Returns:** *string*[] - -___ - -### skip - -▸ **skip**(`text?`: *string*, `clear?`: *boolean*): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text?` | *string* | -| `clear` | *boolean* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### update - -▸ **update**(`text`: *string*): [*Task*](task.task-1.md) - -Update task text - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text` | *string* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### warn - -▸ **warn**(`text`: *string*): [*Task*](task.task-1.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text` | *string* | - -**Returns:** [*Task*](task.task-1.md) diff --git a/docs/api/classes/tasktree.tasktree-1.md b/docs/api/classes/tasktree.tasktree-1.md deleted file mode 100644 index de2edc7c..00000000 --- a/docs/api/classes/tasktree.tasktree-1.md +++ /dev/null @@ -1,194 +0,0 @@ -# Class: TaskTree - -[TaskTree](../modules/tasktree.md).TaskTree - -Singleton to manage the task tree - -## Table of contents - -### Properties - -- [TIMEOUT](tasktree.tasktree-1.md#timeout) - -### Methods - -- [add](tasktree.tasktree-1.md#add) -- [exit](tasktree.tasktree-1.md#exit) -- [fail](tasktree.tasktree-1.md#fail) -- [render](tasktree.tasktree-1.md#render) -- [start](tasktree.tasktree-1.md#start) -- [stop](tasktree.tasktree-1.md#stop) -- [add](tasktree.tasktree-1.md#add) -- [fail](tasktree.tasktree-1.md#fail) -- [tree](tasktree.tasktree-1.md#tree) - -## Properties - -### TIMEOUT - -▪ `Static` `Readonly` **TIMEOUT**: ``100``= 100 - -## Methods - -### add - -▸ **add**(`text`: *string*): [*Task*](task.task-1.md) - -Adds a new task to the task tree. If there are active tasks, add a new one as a subtask - to the last subtask of the first active task - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `text` | *string* | Text for display | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### exit - -▸ **exit**(`code?`: [*ExitCode*](../enums/tasktree.exitcode.md), `error?`: *string* \| Error): *void* - -Force the process to exit (see process.exit). Do nothing in "silent mode" - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `code` | [*ExitCode*](../enums/tasktree.exitcode.md) | -| `error?` | *string* \| Error | - -**Returns:** *void* - -___ - -### fail - -▸ **fail**(`error`: *string* \| Error, `active?`: *boolean*): *never* - -Fail active task or adds a new subtask and call fail on it - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `error` | *string* \| Error | - | Text or Error object for display | -| `active` | *boolean* | true | If `true` - call failed for active task, else create new task and call fail on it | - -**Returns:** *never* - -___ - -### render - -▸ **render**(): *string*[] - -Render a task tree into a `string[]`. Returns strings with tasks hierarchy - -**Returns:** *string*[] - -___ - -### start - -▸ **start**(`__namedParameters?`: [*ITaskTreeOptions*](../interfaces/tasktree.itasktreeoptions.md)): [*TaskTree*](tasktree.tasktree-1.md) - -Starts output a task tree in a terminal at a defined interval. In “silent mode” - the task tree only collects tasks and is not output it in a terminal - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `__namedParameters` | [*ITaskTreeOptions*](../interfaces/tasktree.itasktreeoptions.md) | {} | - -**Returns:** [*TaskTree*](tasktree.tasktree-1.md) - -___ - -### stop - -▸ **stop**(): [*TaskTree*](tasktree.tasktree-1.md) - -Stop output a task tree in a terminal - -**Returns:** [*TaskTree*](tasktree.tasktree-1.md) - -___ - -### add - -▸ `Static` **add**(`text`: *string*): [*Task*](task.task-1.md) - -Adds a new task to the task tree. If there are active tasks, add a new one as a subtask - to the last subtask of the first active task - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `text` | *string* | - -**Returns:** [*Task*](task.task-1.md) - -___ - -### fail - -▸ `Static` **fail**(`error`: *string* \| Error, `active?`: *boolean*): *never* - -Fail active task or adds a new subtask and call fail on it - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `error` | *string* \| Error | - | -| `active` | *boolean* | true | - -**Returns:** *never* - -___ - -### tree - -▸ `Static` **tree**(`theme?`: ThemeOptions): [*TaskTree*](tasktree.tasktree-1.md) - -Method to get the object to control the tree - -**`example`** -```javascript -const theme = { - default: '#ffffff', - success: ['#008000', '✔'], - skip: { - symbol: '↓', - }, - error: ['#ff0000', '✖', '[error]'], - ... -}; -``` - -**`description`** -| option | color | symbol | badge | description | -| ----------- | ----------------- | ------ | ----- | -------------------------------------------- | -| **default** | text | ✖ | ✖ | default color | -| **active** | symbol | ✔ | ✖ | spinner, progress bar color | -| **success** | symbol, text, bar | ✔ | ✖ | task symbol, progress bar color | -| **skip** | symbol, text, bar | ✔ | ✔ | task symbol, progress bar color | -| **error** | symbol, text, bar | ✔ | ✔ | task symbol, error title, progress bar color | -| **message** | symbol | ✔ | ✖ | dim pointer to task information | -| **info** | symbol | ✔ | ✖ | information message symbol | -| **warning** | symbol | ✔ | ✖ | warning message symbol | -| **subtask** | symbol, text | ✔ | ✖ | dim pointer to subtask | -| **list** | symbol | ✔ | ✖ | list symbol | -| **dim** | symbol, bar | ✖ | ✖ | dim color | - -> If you use a gradient fill for the progress bar - the color will change from `active` to `success` - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `theme?` | ThemeOptions | Theme properties. The field name is a modifier the value is options | - -**Returns:** [*TaskTree*](tasktree.tasktree-1.md) diff --git a/docs/api/enums/progressbar.progress.md b/docs/api/enums/progressbar.progress.md deleted file mode 100644 index eb92a672..00000000 --- a/docs/api/enums/progressbar.progress.md +++ /dev/null @@ -1,31 +0,0 @@ -# Enumeration: Progress - -[ProgressBar](../modules/progressbar.md).Progress - -Progress in percent by default - -## Table of contents - -### Enumeration members - -- [Default](progressbar.progress.md#default) -- [End](progressbar.progress.md#end) -- [Start](progressbar.progress.md#start) - -## Enumeration members - -### Default - -• **Default**: = -1 - -___ - -### End - -• **End**: = 100 - -___ - -### Start - -• **Start**: = 0 diff --git a/docs/api/enums/progressbar.templatetoken.md b/docs/api/enums/progressbar.templatetoken.md deleted file mode 100644 index 168888b2..00000000 --- a/docs/api/enums/progressbar.templatetoken.md +++ /dev/null @@ -1,71 +0,0 @@ -# Enumeration: TemplateToken - -[ProgressBar](../modules/progressbar.md).TemplateToken - -ProgressBar output template - -## Table of contents - -### Enumeration members - -- [Bar](progressbar.templatetoken.md#bar) -- [Current](progressbar.templatetoken.md#current) -- [ETA](progressbar.templatetoken.md#eta) -- [Elapsed](progressbar.templatetoken.md#elapsed) -- [Percent](progressbar.templatetoken.md#percent) -- [Rate](progressbar.templatetoken.md#rate) -- [Total](progressbar.templatetoken.md#total) - -## Enumeration members - -### Bar - -• **Bar**: = ":bar" - -The progress bar itself - -___ - -### Current - -• **Current**: = ":current" - -Current tick number - -___ - -### ETA - -• **ETA**: = ":eta" - -Estimated completion time in seconds - -___ - -### Elapsed - -• **Elapsed**: = ":elapsed" - -___ - -### Percent - -• **Percent**: = ":percent" - -Completion percentage - -___ - -### Rate - -• **Rate**: = ":rate" - -Rate of ticks per second - -___ - -### Total - -• **Total**: = ":total" - -Total ticks diff --git a/docs/api/enums/task.taskstatus.md b/docs/api/enums/task.taskstatus.md deleted file mode 100644 index 17eacf6e..00000000 --- a/docs/api/enums/task.taskstatus.md +++ /dev/null @@ -1,36 +0,0 @@ -# Enumeration: TaskStatus - -[Task](../modules/task.md).TaskStatus - -## Table of contents - -### Enumeration members - -- [Completed](task.taskstatus.md#completed) -- [Failed](task.taskstatus.md#failed) -- [Pending](task.taskstatus.md#pending) -- [Skipped](task.taskstatus.md#skipped) - -## Enumeration members - -### Completed - -• **Completed**: = 1 - -___ - -### Failed - -• **Failed**: = 2 - -___ - -### Pending - -• **Pending**: = 0 - -___ - -### Skipped - -• **Skipped**: = 3 diff --git a/docs/api/enums/tasktree.exitcode.md b/docs/api/enums/tasktree.exitcode.md deleted file mode 100644 index 414bf914..00000000 --- a/docs/api/enums/tasktree.exitcode.md +++ /dev/null @@ -1,22 +0,0 @@ -# Enumeration: ExitCode - -[TaskTree](../modules/tasktree.md).ExitCode - -## Table of contents - -### Enumeration members - -- [Error](tasktree.exitcode.md#error) -- [Success](tasktree.exitcode.md#success) - -## Enumeration members - -### Error - -• **Error**: = 1 - -___ - -### Success - -• **Success**: = 0 diff --git a/docs/api/index.md b/docs/api/index.md index 5d6faf22..591a50e9 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,9 +1,7 @@ # tasktree-cli -## Table of contents +## Modules -### Modules - -- [ProgressBar](modules/progressbar.md) -- [Task](modules/task.md) -- [TaskTree](modules/tasktree.md) +- [ProgressBar](ProgressBar.md) +- [Task](modules/Task.md) +- [TaskTree](modules/TaskTree.md) diff --git a/docs/api/interfaces/progressbar.iprogressbaroptions.md b/docs/api/interfaces/progressbar.iprogressbaroptions.md deleted file mode 100644 index 760a31ad..00000000 --- a/docs/api/interfaces/progressbar.iprogressbaroptions.md +++ /dev/null @@ -1,82 +0,0 @@ -# Interface: IProgressBarOptions - -[ProgressBar](../modules/progressbar.md).IProgressBarOptions - -ProgressBar display options - -## Table of contents - -### Properties - -- [badges](progressbar.iprogressbaroptions.md#badges) -- [clear](progressbar.iprogressbaroptions.md#clear) -- [completeChar](progressbar.iprogressbaroptions.md#completechar) -- [current](progressbar.iprogressbaroptions.md#current) -- [gradient](progressbar.iprogressbaroptions.md#gradient) -- [incompleteChar](progressbar.iprogressbaroptions.md#incompletechar) -- [total](progressbar.iprogressbaroptions.md#total) -- [width](progressbar.iprogressbaroptions.md#width) - -## Properties - -### badges - -• `Optional` **badges**: *boolean* - -Option to add badge - -___ - -### clear - -• `Optional` **clear**: *boolean* - -Option to clear the bar on completion - -___ - -### completeChar - -• `Optional` **completeChar**: *string* - -Completion character - -___ - -### current - -• `Optional` **current**: *number* - -Current completed index - -___ - -### gradient - -• `Optional` **gradient**: *boolean* - -Option to add gradient to pending bar - -___ - -### incompleteChar - -• `Optional` **incompleteChar**: *string* - -Incomplete character - -___ - -### total - -• `Optional` **total**: *number* - -Total number of ticks to complete - -___ - -### width - -• `Optional` **width**: *number* - -The displayed width of the progress bar defaulting to total diff --git a/docs/api/interfaces/progressbar.iprogressbartoken.md b/docs/api/interfaces/progressbar.iprogressbartoken.md deleted file mode 100644 index 470d3850..00000000 --- a/docs/api/interfaces/progressbar.iprogressbartoken.md +++ /dev/null @@ -1,11 +0,0 @@ -# Interface: IProgressBarToken - -[ProgressBar](../modules/progressbar.md).IProgressBarToken - -User template tokens values - -## Indexable - -▪ [key: *string*]: *string* - -User template tokens values diff --git a/docs/api/interfaces/task.itaskoptions.md b/docs/api/interfaces/task.itaskoptions.md deleted file mode 100644 index 61a1950d..00000000 --- a/docs/api/interfaces/task.itaskoptions.md +++ /dev/null @@ -1,28 +0,0 @@ -# Interface: ITaskOptions - -[Task](../modules/task.md).ITaskOptions - -New subtask options - -## Table of contents - -### Properties - -- [autoClear](task.itaskoptions.md#autoclear) -- [status](task.itaskoptions.md#status) - -## Properties - -### autoClear - -• `Optional` **autoClear**: *boolean* - -Removes all subtasks and progress bars after complete - -___ - -### status - -• `Optional` **status**: [*TaskStatus*](../enums/task.taskstatus.md) - -New subtask status diff --git a/docs/api/interfaces/tasktree.itasktreeoptions.md b/docs/api/interfaces/tasktree.itasktreeoptions.md deleted file mode 100644 index 84c5536e..00000000 --- a/docs/api/interfaces/tasktree.itasktreeoptions.md +++ /dev/null @@ -1,26 +0,0 @@ -# Interface: ITaskTreeOptions - -[TaskTree](../modules/tasktree.md).ITaskTreeOptions - -## Table of contents - -### Properties - -- [autoClear](tasktree.itasktreeoptions.md#autoclear) -- [silent](tasktree.itasktreeoptions.md#silent) - -## Properties - -### autoClear - -• `Optional` **autoClear**: *boolean* - -Removes all subtasks and bars from the main task - -___ - -### silent - -• `Optional` **silent**: *boolean* - -Disable task tree rendering diff --git a/docs/api/modules/progressbar.md b/docs/api/modules/progressbar.md deleted file mode 100644 index 6f303ad0..00000000 --- a/docs/api/modules/progressbar.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module: ProgressBar - -## Table of contents - -### Enumerations - -- [Progress](../enums/progressbar.progress.md) -- [TemplateToken](../enums/progressbar.templatetoken.md) - -### Classes - -- [ProgressBar](../classes/progressbar.progressbar-1.md) - -### Interfaces - -- [IProgressBarOptions](../interfaces/progressbar.iprogressbaroptions.md) -- [IProgressBarToken](../interfaces/progressbar.iprogressbartoken.md) diff --git a/docs/api/modules/task.md b/docs/api/modules/task.md deleted file mode 100644 index 11e66a19..00000000 --- a/docs/api/modules/task.md +++ /dev/null @@ -1,15 +0,0 @@ -# Module: Task - -## Table of contents - -### Enumerations - -- [TaskStatus](../enums/task.taskstatus.md) - -### Classes - -- [Task](../classes/task.task-1.md) - -### Interfaces - -- [ITaskOptions](../interfaces/task.itaskoptions.md) diff --git a/docs/api/modules/tasktree.md b/docs/api/modules/tasktree.md deleted file mode 100644 index 8c763b64..00000000 --- a/docs/api/modules/tasktree.md +++ /dev/null @@ -1,25 +0,0 @@ -# Module: TaskTree - -## Table of contents - -### References - -- [default](tasktree.md#default) - -### Enumerations - -- [ExitCode](../enums/tasktree.exitcode.md) - -### Classes - -- [TaskTree](../classes/tasktree.tasktree-1.md) - -### Interfaces - -- [ITaskTreeOptions](../interfaces/tasktree.itasktreeoptions.md) - -## References - -### default - -Renames and exports: [TaskTree](../classes/tasktree.tasktree-1.md) diff --git a/package-lock.json b/package-lock.json index 2b5e8f99..50f7c639 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tasktree-cli", - "version": "5.0.1", + "version": "5.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tasktree-cli", - "version": "5.0.1", + "version": "5.0.2", "license": "MIT", "dependencies": { "chalk": "^4.1.2", @@ -40,8 +40,6 @@ "rimraf": "^3.0.2", "strip-ansi": "^7.0.1", "ts-jest": "^27.0.7", - "typedoc": "^0.22.10", - "typedoc-plugin-markdown": "^3.11.7", "typescript": "^4.5.2" }, "engines": { @@ -5559,36 +5557,6 @@ "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -7094,12 +7062,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -7234,21 +7196,6 @@ "integrity": "sha1-dNFAtcqBRubGQ8NyT1FSU42awfA=", "dev": true }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -7279,18 +7226,6 @@ "tmpl": "1.0.5" } }, - "node_modules/marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", - "dev": true, - "bin": { - "marked": "bin/marked" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -7388,12 +7323,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -7709,15 +7638,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "dev": true, - "dependencies": { - "lru-cache": "^5.1.1" - } - }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -8429,17 +8349,6 @@ "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "dev": true }, - "node_modules/shiki": { - "version": "0.9.12", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz", - "integrity": "sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.0.0", - "onigasm": "^2.2.5", - "vscode-textmate": "5.2.0" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -9231,40 +9140,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/typedoc": { - "version": "0.22.10", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz", - "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==", - "dev": true, - "dependencies": { - "glob": "^7.2.0", - "lunr": "^2.3.9", - "marked": "^3.0.8", - "minimatch": "^3.0.4", - "shiki": "^0.9.12" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 12.10.0" - }, - "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" - } - }, - "node_modules/typedoc-plugin-markdown": { - "version": "3.11.7", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.11.7.tgz", - "integrity": "sha512-Wm3HP5gcBOGOOTeDA8GLgw+BY+GAI31RP9Lyog21BvTaSeWUcdXls5TG1MK+XDatS2/0dup9gFO+emoyoQJm9Q==", - "dev": true, - "dependencies": { - "handlebars": "^4.7.7" - }, - "peerDependencies": { - "typedoc": ">=0.22.0" - } - }, "node_modules/typescript": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", @@ -9278,19 +9153,6 @@ "node": ">=4.2.0" } }, - "node_modules/uglify-js": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", - "integrity": "sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -9421,12 +9283,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", - "dev": true - }, "node_modules/vscode-uri": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.2.tgz", @@ -9541,12 +9397,6 @@ "node": ">=0.10.0" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -9756,12 +9606,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -13980,27 +13824,6 @@ "tslib": "^2.1.0" } }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -15130,12 +14953,6 @@ "minimist": "^1.2.5" } }, - "jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -15249,21 +15066,6 @@ "integrity": "sha1-dNFAtcqBRubGQ8NyT1FSU42awfA=", "dev": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -15288,12 +15090,6 @@ "tmpl": "1.0.5" } }, - "marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", - "dev": true - }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -15370,12 +15166,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -15618,15 +15408,6 @@ "mimic-fn": "^2.1.0" } }, - "onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "dev": true, - "requires": { - "lru-cache": "^5.1.1" - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -16134,17 +15915,6 @@ "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "dev": true }, - "shiki": { - "version": "0.9.12", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz", - "integrity": "sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==", - "dev": true, - "requires": { - "jsonc-parser": "^3.0.0", - "onigasm": "^2.2.5", - "vscode-textmate": "5.2.0" - } - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -16729,41 +16499,12 @@ "is-typedarray": "^1.0.0" } }, - "typedoc": { - "version": "0.22.10", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz", - "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==", - "dev": true, - "requires": { - "glob": "^7.2.0", - "lunr": "^2.3.9", - "marked": "^3.0.8", - "minimatch": "^3.0.4", - "shiki": "^0.9.12" - } - }, - "typedoc-plugin-markdown": { - "version": "3.11.7", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.11.7.tgz", - "integrity": "sha512-Wm3HP5gcBOGOOTeDA8GLgw+BY+GAI31RP9Lyog21BvTaSeWUcdXls5TG1MK+XDatS2/0dup9gFO+emoyoQJm9Q==", - "dev": true, - "requires": { - "handlebars": "^4.7.7" - } - }, "typescript": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", "dev": true }, - "uglify-js": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", - "integrity": "sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==", - "dev": true, - "optional": true - }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -16869,12 +16610,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", - "dev": true - }, "vscode-uri": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.2.tgz", @@ -16968,12 +16703,6 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -17136,12 +16865,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", diff --git a/package.json b/package.json index 000be966..038db878 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tasktree-cli", - "version": "5.0.1", + "version": "5.0.2", "description": "Simple terminal task tree - helps you keep track of your tasks in a tree structure.", "homepage": "https://github.com/keindev/tasktree#readme", "license": "MIT", @@ -35,7 +35,6 @@ "build:ts": "rimraf lib && tsc --extendedDiagnostics", "generate": "npm-run-all generate:*", "generate:changelog": "node --experimental-specifier-resolution=node node_modules/.bin/changelog generate --bump", - "generate:docs": "rimraf docs/api && typedoc", "generate:ghinfo": "node --experimental-specifier-resolution=node node_modules/.bin/ghinfo generate -d media -t utils", "lint": "npm-run-all lint:*", "lint:eslint": "rimraf coverage && eslint \"src/**\" --ext .ts", @@ -82,8 +81,6 @@ "rimraf": "^3.0.2", "strip-ansi": "^7.0.1", "ts-jest": "^27.0.7", - "typedoc": "^0.22.10", - "typedoc-plugin-markdown": "^3.11.7", "typescript": "^4.5.2" } } diff --git a/src/ProgressBar.ts b/src/ProgressBar.ts index 15d08bdf..04589776 100644 --- a/src/ProgressBar.ts +++ b/src/ProgressBar.ts @@ -178,6 +178,7 @@ export class ProgressBar implements Required