Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*
* (c) Harminder Virk
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { Ora } from 'ora'
import cliWidth from 'cli-width'
import { yellow, dim } from 'kleur'
/**
* Getting width of the stdout to put log messages
* in one line
*/
const WIDTH = cliWidth()
/**
* Log installing dependencies message
*/
export function logInstall (list: string[], spinner: Ora, dev: boolean) {
const dependencies: string[] = []
const spaceBetweenDependencies = 2
let widthConsumed = 17 + 15
for (let dependency of list) {
if ((widthConsumed + dependency.length + spaceBetweenDependencies) > WIDTH) {
break
}
/**