@poppinss/cliui
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -88,3 +88,3 @@ "use strict"; | ||
wrapInVerticalLines(content, leftWhitespace, rightWhitespace) { | ||
return `${this.dim(BOX.vertical)}${leftWhitespace}${content}${rightWhitespace}${this.dim(BOX.vertical)}`; | ||
return `${this.dim(BOX.left)}${leftWhitespace}${content}${rightWhitespace}${this.dim(BOX.right)}`; | ||
} | ||
@@ -96,3 +96,3 @@ /** | ||
const horizontalLength = this.widestLineLength + this.leftPadding + this.rightPadding; | ||
const horizontalLine = this.repeat(this.dim(BOX.horizontal), horizontalLength); | ||
const horizontalLine = this.repeat(this.dim(BOX.top), horizontalLength); | ||
return `${this.dim(BOX.topLeft)}${horizontalLine}${this.dim(BOX.topRight)}`; | ||
@@ -105,3 +105,3 @@ } | ||
const horizontalLength = this.widestLineLength + this.leftPadding + this.rightPadding; | ||
const horizontalLine = this.repeat(this.dim(BOX.horizontal), horizontalLength); | ||
const horizontalLine = this.repeat(this.dim(BOX.bottom), horizontalLength); | ||
return `${this.dim(BOX.bottomLeft)}${horizontalLine}${this.dim(BOX.bottomRight)}`; | ||
@@ -135,3 +135,3 @@ } | ||
const horizontalLength = this.widestLineLength + this.leftPadding + this.rightPadding; | ||
const borderLine = this.repeat(this.dim(cli_boxes_1.default.single.horizontal), horizontalLength); | ||
const borderLine = this.repeat(this.dim(cli_boxes_1.default.single.top), horizontalLength); | ||
const border = this.wrapInVerticalLines(borderLine, '', ''); | ||
@@ -138,0 +138,0 @@ return `${headingContent}\n${border}`; |
@@ -43,6 +43,5 @@ "use strict"; | ||
start() { | ||
var _a; | ||
this.state = 'running'; | ||
this.startTime = process.hrtime(); | ||
(_a = this.onUpdateListener) === null || _a === void 0 ? void 0 : _a.call(this, this); | ||
this.onUpdateListener?.(this); | ||
return this; | ||
@@ -54,7 +53,6 @@ } | ||
complete(message) { | ||
var _a; | ||
this.state = 'succeeded'; | ||
this.duration = pretty_hrtime_1.default(process.hrtime(this.startTime)); | ||
this.completionMessage = message; | ||
(_a = this.onUpdateListener) === null || _a === void 0 ? void 0 : _a.call(this, this); | ||
this.onUpdateListener?.(this); | ||
return this; | ||
@@ -66,7 +64,6 @@ } | ||
fail(error) { | ||
var _a; | ||
this.state = 'failed'; | ||
this.duration = pretty_hrtime_1.default(process.hrtime(this.startTime)); | ||
this.completionMessage = error; | ||
(_a = this.onUpdateListener) === null || _a === void 0 ? void 0 : _a.call(this, this); | ||
this.onUpdateListener?.(this); | ||
return this; | ||
@@ -73,0 +70,0 @@ } |
{ | ||
"name": "@poppinss/cliui", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Highly opinionated command line UI KIT", | ||
@@ -36,21 +36,20 @@ "main": "build/index.js", | ||
"devDependencies": { | ||
"@adonisjs/mrm-preset": "^2.4.0", | ||
"@adonisjs/require-ts": "^1.0.3", | ||
"@types/node": "^14.11.2", | ||
"commitizen": "^4.2.1", | ||
"@adonisjs/mrm-preset": "^3.0.0", | ||
"@adonisjs/require-ts": "^2.0.0", | ||
"@types/node": "^14.14.25", | ||
"commitizen": "^4.2.3", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"del-cli": "^3.0.1", | ||
"doctoc": "^1.4.0", | ||
"eslint": "^7.10.0", | ||
"eslint-config-prettier": "^6.12.0", | ||
"eslint-plugin-adonis": "^1.0.15", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"doctoc": "^2.0.0", | ||
"eslint": "^7.19.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-adonis": "^1.2.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"github-label-sync": "^2.0.0", | ||
"husky": "^4.3.0", | ||
"husky": "^4.3.8", | ||
"japa": "^3.1.1", | ||
"mrm": "^2.5.1", | ||
"np": "^6.5.0", | ||
"npm-audit-html": "^1.4.3", | ||
"prettier": "^2.1.2", | ||
"typescript": "^4.0.3" | ||
"mrm": "^2.5.15", | ||
"np": "^7.3.0", | ||
"prettier": "^2.2.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
@@ -67,3 +66,3 @@ "nyc": { | ||
"hooks": { | ||
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md && npm audit --production --json | ./node_modules/.bin/npm-audit-html && git add npm-audit.html", | ||
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md", | ||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" | ||
@@ -82,4 +81,4 @@ } | ||
"dependencies": { | ||
"@poppinss/colors": "^2.0.3", | ||
"cli-boxes": "^2.2.1", | ||
"@poppinss/colors": "^2.1.0", | ||
"cli-boxes": "^3.0.0", | ||
"cli-table3": "^0.6.0", | ||
@@ -86,0 +85,0 @@ "color-support": "^1.1.3", |
@@ -11,3 +11,3 @@ ![](./assets/logger.png) | ||
[![circleci-image]][circleci-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![audit-report-image]][audit-report-url] | ||
[![circleci-image]][circleci-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![synk-image]][synk-url] | ||
@@ -358,3 +358,3 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
[license-url]: LICENSE.md 'license' | ||
[audit-report-image]: https://img.shields.io/badge/-Audit%20Report-blueviolet?style=for-the-badge | ||
[audit-report-url]: https://htmlpreview.github.io/?https://github.com/poppinss/cliui/blob/develop/npm-audit.html 'audit-report' | ||
[synk-image]: https://img.shields.io/snyk/vulnerabilities/github/poppinss/cliui?label=Synk%20Vulnerabilities&style=for-the-badge | ||
[synk-url]: https://snyk.io/test/github/poppinss/cliui?targetFile=package.json 'synk' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18
79044
2327
+ Addedcli-boxes@3.0.0(transitive)
- Removedcli-boxes@2.2.1(transitive)
Updated@poppinss/colors@^2.1.0
Updatedcli-boxes@^3.0.0