Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-ux

Package Overview
Dependencies
Maintainers
1
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 0.0.0 to 0.0.1

lib/base.d.ts

41

lib/index.js

@@ -1,1 +0,40 @@

exports.action = require('./action')
"use strict";
// @flow
Object.defineProperty(exports, "__esModule", { value: true });
const errors_1 = require("./errors");
const stream_1 = require("./stream");
class CLI {
constructor(options = {}) {
this.options = options;
this.stdoutStream = new stream_1.StreamOutput(this.options.mock ? undefined : process.stdout);
this.stderrStream = new stream_1.StreamOutput(this.options.mock ? undefined : process.stderr);
const depOpts = {
debug: !!options.debug,
stderr: this.stderrStream,
stdout: this.stdoutStream,
};
this.errors = new errors_1.Errors(depOpts);
}
get stderr() {
const output = this.stderrStream.output;
if (!output) {
throw new Error('not mocking stderr');
}
return output;
}
get stdout() {
const output = this.stdoutStream.output;
if (!output) {
throw new Error('not mocking stdout');
}
return output;
}
// public warn(err: Error | string, options: { prefix?: string } = {}) {
// return this.errors.warn(err, options)
// }
get warn() {
return this.errors.warn.bind(this.errors);
}
}
exports.CLI = CLI;
exports.cli = new CLI();
{
"name": "cli-ux",
"description": "set of CLI output utilities",
"version": "0.0.0",
"version": "0.0.1",
"author": "Jeff Dickey",
"bugs": "https://github.com/jdxcode/cli-ux/issues",
"dependencies": {
"@types/fs-extra": "^4.0.2",
"chalk": "^2.1.0",
"fs-extra": "^4.0.1",
"moment": "^2.18.1",
"strip-ansi": "^4.0.0"
},
"devDependencies": {
"@heroku/linewrap": "^1.0.0",
"@types/chalk": "^0.4.31",
"@types/jest": "^20.0.8",
"@types/node": "^8.0.27",
"@types/strip-ansi": "^3.0.0",
"husky": "^0.14.3",
"jest": "^21.0.2",
"lint-staged": "^4.1.0",
"prettier": "^1.6.1",
"rimraf": "^2.6.1",
"std-mocks": "^1.0.1",
"ts-jest": "^21.0.0",
"ts-node": "^3.3.0",
"tslint": "^5.7.0",
"tslint-config-prettier": "^1.5.0",
"typescript": "^2.5.2"
},
"files": [
"lib"
],
"homepage": "https://github.com/jdxcode/cli-ux",
"jest": {
"coverageReporters": [
"json"
],
"transform": {
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "\\.test\\.ts$",
"moduleFileExtensions": [
"js",
"ts"
]
},
"keywords": [

@@ -12,4 +53,20 @@ "cli"

"license": "ISC",
"main": "lib/index.js",
"repository": "jdxcode/cli-ux"
"lint-staged": {
"**/*.ts": [
"prettier --write",
"tslint --fix",
"git add",
"jest --bail --findRelatedTests"
]
},
"main": "./lib/index.js",
"repository": "jdxcode/cli-ux",
"scripts": {
"posttest": "tslint --project .",
"precommit": "lint-staged",
"prepare": "rimraf lib && tsc",
"pretest": "tsc --sourcemap",
"test": "jest"
},
"types": "./lib/index.d.ts"
}
lib/action.js
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