cli-engine-config
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -1,2 +0,2 @@ | ||
import { IFlag, IArg } from 'cli-flags'; | ||
import { flags, args } from 'cli-flags'; | ||
export declare type UserConfig = { | ||
@@ -124,6 +124,4 @@ skipAnalytics?: boolean | undefined | null; | ||
buildHelpLine: (config: Config) => [string, string | undefined]; | ||
args?: IArg[]; | ||
flags?: { | ||
[name: string]: IFlag<any>; | ||
}; | ||
args?: args.IArg[]; | ||
flags?: flags.Input; | ||
run: (options: Config) => Promise<any>; | ||
@@ -130,0 +128,0 @@ plugin?: Plugin; |
@@ -5,3 +5,8 @@ "use strict"; | ||
const os = require("os"); | ||
const fs = require("fs-extra"); | ||
let _fs; | ||
function fs() { | ||
if (!_fs) | ||
_fs = require('fs-extra'); | ||
return _fs; | ||
} | ||
function dir(config, category, d) { | ||
@@ -17,3 +22,3 @@ let cacheKey = `dir:${category}`; | ||
d = path.join(d, config.dirname); | ||
fs.mkdirpSync(d); | ||
fs().mkdirpSync(d); | ||
config.__cache[cacheKey] = d; | ||
@@ -43,3 +48,3 @@ return d; | ||
try { | ||
userConfig = fs.readJSONSync(configPath); | ||
userConfig = fs().readJSONSync(configPath); | ||
} | ||
@@ -64,3 +69,3 @@ catch (e) { | ||
try { | ||
fs.outputJSONSync(configPath, userConfig, { spaces: 2 }); | ||
fs().outputJSONSync(configPath, userConfig, { spaces: 2 }); | ||
} | ||
@@ -168,5 +173,5 @@ catch (e) { | ||
let pjsonPath = path.join(existing.root, 'package.json'); | ||
if (fs.existsSync(pjsonPath)) { | ||
if (fs().existsSync(pjsonPath)) { | ||
// parse the package.json at the root | ||
let pjson = fs.readJSONSync(path.join(existing.root, 'package.json')); | ||
let pjson = fs().readJSONSync(path.join(existing.root, 'package.json')); | ||
existing.pjson = { | ||
@@ -173,0 +178,0 @@ ...exports.defaultConfig.pjson, |
{ | ||
"name": "cli-engine-config", | ||
"description": "base cli-engine config objects and interfaces", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"author": "Jeff Dickey @jdxcode", | ||
"bugs": "https://github.com/heroku/cli-engine-config/issues", | ||
"dependencies": { | ||
"cli-flags": "1.0.19", | ||
"debug": "^3.1.0", | ||
@@ -17,2 +16,3 @@ "fs-extra": "^5.0.0", | ||
"@types/node": "8.5.1", | ||
"cli-flags": "2.0.0", | ||
"del-cli": "1.1.0", | ||
@@ -42,2 +42,5 @@ "husky": "^0.14.3", | ||
"main": "lib/config.js", | ||
"peerDependencies": { | ||
"cli-flags": "^2.0.0" | ||
}, | ||
"repository": "heroku/cli-engine-config", | ||
@@ -44,0 +47,0 @@ "scripts": { |
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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
13978
423
14
+ Addedcli-flags@2.0.7(transitive)
- Removedcli-flags@1.0.19
- Removed@heroku-cli/color@1.1.16(transitive)
- Removedansi-escapes@3.2.04.3.2(transitive)
- Removedansi-regex@3.0.14.1.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedansicolors@0.2.1(transitive)
- Removedcardinal@1.0.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcli-flags@1.0.19(transitive)
- Removedcli-ux@2.1.1(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcross-spawn@7.0.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@3.0.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedmoment@2.30.1(transitive)
- Removedpassword-prompt@1.1.3(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedredeyed@1.0.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedstrip-ansi@4.0.05.2.0(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtslib@1.14.1(transitive)
- Removedtype-fest@0.21.3(transitive)
- Removedwhich@2.0.2(transitive)