Socket
Socket
Sign inDemoInstall

cli-ux

Package Overview
Dependencies
Maintainers
3
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-ux - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

lib/action/debug.d.ts

2

lib/action/base.d.ts
import { Base } from '../base';
export declare function shouldDisplaySpinner(): boolean;
export declare function getSpinner(): ActionBase;
export interface ITask {

@@ -4,0 +4,0 @@ action: string;

@@ -13,12 +13,17 @@ "use strict";

const config_1 = require("../config");
function shouldDisplaySpinner() {
return (!process.env.DEBUG &&
!config_1.Config.mock &&
!config_1.Config.debug &&
function getSpinner() {
let Action;
if (config_1.Config.debug)
Action = require('./debug').DebugAction;
else if (!config_1.Config.mock &&
!!process.stdin.isTTY &&
!!process.stderr.isTTY &&
!process.env.CI &&
process.env.TERM !== 'dumb');
process.env.TERM !== 'dumb')
Action = require('./spinner').SpinnerAction;
else
Action = require('./simple').SimpleAction;
return new Action();
}
exports.shouldDisplaySpinner = shouldDisplaySpinner;
exports.getSpinner = getSpinner;
class ActionBase extends base_1.Base {

@@ -25,0 +30,0 @@ start(action, status) {

@@ -5,4 +5,2 @@ "use strict";

const errors_1 = require("./errors");
const spinner_1 = require("./action/spinner");
const simple_1 = require("./action/simple");
const base_1 = require("./action/base");

@@ -31,5 +29,4 @@ const base_2 = require("./base");

get action() {
if (!this._action) {
this._action = base_1.shouldDisplaySpinner() ? new spinner_1.SpinnerAction() : new simple_1.SimpleAction();
}
if (!this._action)
this._action = base_1.getSpinner();
return this._action;

@@ -36,0 +33,0 @@ }

{
"name": "cli-ux",
"description": "set of CLI output utilities",
"version": "2.0.6",
"version": "2.0.7",
"author": "Jeff Dickey",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/jdxcode/cli-ux/issues",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc