Comparing version 0.0.0 to 0.0.1
@@ -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" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
9852
13
278
5
16
3
3
+ Added@types/fs-extra@^4.0.2
+ Addedchalk@^2.1.0
+ Addedfs-extra@^4.0.1
+ Addedmoment@^2.18.1
+ Addedstrip-ansi@^4.0.0
+ Added@types/fs-extra@4.0.15(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedansi-regex@3.0.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfs-extra@4.0.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedmoment@2.30.1(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addeduniversalify@0.1.2(transitive)