envinfo
Advanced tools
Comparing version 4.0.0-beta.2 to 4.0.0-beta.3
{ | ||
"name": "envinfo", | ||
"version": "4.0.0-beta.2", | ||
"version": "4.0.0-beta.3", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -12,8 +12,19 @@ "repository": "https://github.com/tabrindle/envinfo", | ||
}, | ||
"engines": { "node": ">=4" }, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"lint": "eslint src", | ||
"format": "prettier --write 'src/**/*.js'" | ||
"format": "prettier --write 'src/**/*.js'", | ||
"test": "npm run lint && prettier -l 'src/**/*.js'" | ||
}, | ||
"keywords": ["development", "env", "environment", "info", "issues", "reporting", "diagnostics"], | ||
"keywords": [ | ||
"development", | ||
"env", | ||
"environment", | ||
"info", | ||
"issues", | ||
"reporting", | ||
"diagnostics" | ||
], | ||
"dependencies": { | ||
@@ -20,0 +31,0 @@ "array-includes": "^3.0.3", |
@@ -5,4 +5,5 @@ # envinfo | ||
[![npm downloads per month](https://img.shields.io/npm/dm/envinfo.svg?maxAge=86400)](https://www.npmjs.com/package/envinfo) | ||
[![Build Status](https://travis-ci.org/tabrindle/envinfo.svg?branch=master)](https://travis-ci.org/tabrindle/envinfo) [![npm version](https://badge.fury.io/js/envinfo.svg)](https://badge.fury.io/js/envinfo) [![npm downloads per month](https://img.shields.io/npm/dm/envinfo.svg?maxAge=86400)](https://www.npmjs.com/package/envinfo) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
## Installation | ||
@@ -9,0 +10,0 @@ |
@@ -10,2 +10,29 @@ #!/usr/bin/env node | ||
if (argv.help || argv._.indexOf('help') > -1) { | ||
console.log(` | ||
USAGE: | ||
\`envinfo\` || \`npx envinfo\` | ||
OPTIONS: | ||
--system Print general system info such as OS, CPU, Memory and Shell | ||
--browsers Get version numbers of installed web browsers | ||
--IDEs Get version numbers of installed IDEs | ||
--languages Get version numbers of installed languages such as Java, Python, PHP, etc | ||
--binaries Get version numbers of node, npm, watchman, etc | ||
--packages Get version numbers of locally installed npm packages | ||
--globalPackages Get version numbers of globally installed npm packages | ||
--duplicates Mark duplicate npm packages inside parentheses eg. (2.1.4) | ||
--fullTree Traverse entire node_modules dependency tree, not just top level | ||
--markdown Print output in markdown format | ||
--json Print output in JSON format | ||
--console Print to console (defaults to on for CLI usage, off for programmatic usage) | ||
--clipboard Copy output to your system clipboard | ||
`); | ||
process.exit(0); | ||
} | ||
envinfo.envinfo(argv); |
@@ -21,3 +21,3 @@ #!/usr/bin/env node | ||
const props = { | ||
System: ['OS', 'CPU', 'Free Memory', 'Total Memory'], | ||
System: ['OS', 'CPU', 'Free Memory', 'Total Memory', 'Shell'], | ||
Binaries: ['Node', 'Yarn', 'npm', 'Watchman', 'Docker', 'Homebrew'], | ||
@@ -24,0 +24,0 @@ IDEs: ['Android Studio', 'Atom', 'VSCode', 'Sublime Text', 'Xcode'], |
@@ -122,4 +122,6 @@ var childProcess = require('child_process'); | ||
var bashVersion; | ||
var bashPath; | ||
try { | ||
bashVersion = utils.run('echo $BASH_VERSION'); | ||
bashPath = which.sync('bash'); | ||
bashVersion = utils.run(`${bashPath} --version`).match(/\d+(\.\d+)+/)[0]; | ||
} catch (error) { | ||
@@ -251,2 +253,13 @@ bashVersion = 'Not Found'; | ||
function getShell() { | ||
var shell; | ||
try { | ||
if (process.env.SHELL.indexOf('bash') > 0) | ||
shell = utils.run(process.env.SHELL + ' --version').match(/\d+(\.\d+)+/)[0]; | ||
} catch (error) { | ||
shell = 'Not Found'; | ||
} | ||
return process.env.SHELL + ' - ' + shell; | ||
} | ||
function getOperatingSystemInfo() { | ||
@@ -398,2 +411,3 @@ var operatingSystemInfo; | ||
getRubyVersion: getRubyVersion, | ||
getShell: getShell, | ||
getSublimeTextVersion: getSublimeTextVersion, | ||
@@ -400,0 +414,0 @@ getTotalMemory: getTotalMemory, |
@@ -10,2 +10,3 @@ var helpers = require('./helpers'); | ||
free_memory: helpers.getFreeMemory, | ||
shell: helpers.getShell, | ||
// applications | ||
@@ -12,0 +13,0 @@ docker: helpers.getDockerVersion, |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
85023
15
841
179
6