Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

package-menu-cli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-menu-cli - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

27

cli.js
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const packageMenu = require('./src/packageMenu.js');
const meow = require('meow');
const execa = require('execa');
const updateNotifier = require('update-notifier');
const pkg = require('./package.json');
const packageMenu = require('./src/packageMenu.js');
updateNotifier({pkg}).notify();
const cli = meow(`

@@ -12,5 +17,5 @@ Usage

Options
--help, -h Shows Help (this screen)
--sort, -s Sort Scripts (default: false)
--version, -V Show Package Menu Version
--help, -h Shows Help (this screen)
--sort, -s Sort Scripts (default: false)
--version, -V, -v Show Package Menu Version

@@ -23,6 +28,14 @@ Examples

h: 'help',
V: 'version'
V: 'version',
v: 'version'
}
});
const menu = packageMenu.print('', cli.flags)
if (cli.flags.update) {
execa('npm i -g package-menu-cli@latest', []).then(result => {
console.log(result.stdout);
});
}
else {
packageMenu.print('', cli.flags)
}
{
"name": "package-menu-cli",
"version": "1.1.2",
"version": "1.2.0",
"description": "Displays menu of scripts from directory containing `package.json`",

@@ -27,3 +27,5 @@ "main": "cli.js",

"cli-table2": "^0.2.0",
"meow": "^3.7.0"
"execa": "^0.5.0",
"meow": "^3.7.0",
"update-notifier": "^1.0.3"
},

@@ -30,0 +32,0 @@ "devDependencies": {

@@ -66,3 +66,5 @@ const chalk = require('chalk');

print: (filename = '', options = {}) => {
console.log(printMenu(filename, options));
const menu = printMenu(filename, options)
console.log(menu);
return menu;
}

@@ -69,0 +71,0 @@

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