Comparing version 4.1.0 to 4.2.0
{ | ||
"name": "envinfo", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tabrindle/envinfo", |
@@ -7,2 +7,3 @@ 'use strict'; | ||
const formatters = require('./formatters'); | ||
const presets = require('./presets'); | ||
const arrayIncludes = require('array-includes'); | ||
@@ -96,2 +97,8 @@ const objectEntries = require('object.entries'); | ||
}, {}); | ||
// if there is a preset, merge that with the parsed props | ||
if (options.preset) { | ||
if (!presets[options.preset]) console.error(`\nNo "${options.preset}" preset found.`); | ||
return main(Object.assign({}, presets[options.preset], props), options); | ||
} | ||
// call the main function with the filtered props, and cli options | ||
@@ -102,3 +109,3 @@ return main(props, options); | ||
// require('envinfo); | ||
// envinfo.run({ system: [os, cpu], fullTree: true }) | ||
// envinfo.run({ system: [os, cpu]}, {fullTree: true }) | ||
function run(args, options) { | ||
@@ -105,0 +112,0 @@ return main(args, options); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
413767
20
971