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

listr-input

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

listr-input - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

18

index.js
'use strict';
const through = require('through');
const inquirer = require('inquirer');
const Observable = require('rxjs').Observable;
const {Observable} = require('rxjs');
const autosubmit = require('inquirer-autosubmit-prompt');

@@ -18,7 +19,9 @@ module.exports = (question, options) => {

{
type: options.secret ? 'password' : 'input',
type: 'autosubmit',
name: 'result',
message: question,
secret: options.secret,
default: options.default,
validate: options.validate
validate: options.validate,
autoSubmit: options.autoSubmit
}

@@ -31,3 +34,4 @@ ];

const outputStream = through(data => {
if (/\u001b\[.*?(D|C)$/.test(data)) {
// eslint-disable-next-line no-control-regex
if (/\u001B\[.*?(D|C)$/.test(data)) {
if (buffer.length > 0) {

@@ -37,2 +41,3 @@ observer.next(buffer);

}
return;

@@ -44,2 +49,3 @@ }

inquirer.registerPrompt('autosubmit', autosubmit);
const prompt = inquirer.createPromptModule({

@@ -59,4 +65,4 @@ output: outputStream

})
.catch(err => {
observer.error(err);
.catch(error => {
observer.error(error);
});

@@ -63,0 +69,0 @@

{
"name": "listr-input",
"version": "0.1.3",
"version": "0.2.0",
"description": "Input module for Listr",

@@ -13,3 +13,3 @@ "license": "MIT",

"engines": {
"node": ">=4"
"node": ">=6"
},

@@ -29,4 +29,5 @@ "scripts": {

"dependencies": {
"inquirer": "^3.3.0",
"rxjs": "^5.5.2",
"inquirer": "^7.0.0",
"inquirer-autosubmit-prompt": "^0.2.0",
"rxjs": "^6.5.3",
"through": "^2.3.8"

@@ -36,4 +37,4 @@ },

"ava": "^0.23.0",
"xo": "*"
"xo": "^0.24.0"
}
}

@@ -78,5 +78,12 @@ # listr-input [![Build Status](https://travis-ci.org/SamVerschueren/listr-input.svg?branch=master)](https://travis-ci.org/SamVerschueren/listr-input)

##### autoSubmit
Type: `function`
Function which accepts the provided value. If returns `true` then the value will be submitted automatically.
## License
MIT © [Sam Verschueren](https://github.com/SamVerschueren)
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