New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cli-confirm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-confirm

Tiny module to confirm execution of npm scripts

1.0.1
latest
Source
npm
Version published
Weekly downloads
4.8K
2.19%
Maintainers
1
Weekly downloads
 
Created
Source

cli-confirm

I was looking for a easy way to confirm the execution of our slightly more dangerous deployment related npm-scripts and I didn't want to wrap them in another script, so solutions like inquirer and other simplistic prompts did not work for me.

Usage

package.json of your project

[…]
  "scripts" {
    "self-destruct-servers": "cli-confirm \"Do you really want to blow up the servers?\" && npm run destroy:servers",
  }
[…]

If you run this script now, you will see something this:

$ npm run self-destruct-server
Do you really want to blow up the servers? n

$ npm run self-destruct-server
Do you really want to blow up the servers? y
servers decommissioned permanently

Keywords

npm

FAQs

Package last updated on 29 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts