Socket
Socket
Sign inDemoInstall

cli-engine-config

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-engine-config - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

8

lib/config.d.ts

@@ -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": {

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