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

prompts

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prompts - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

dist/elements/multiselect.js

@@ -144,3 +144,3 @@ 'use strict';

let title;
if (v.disabled) title = c === i ? color.gray.underline(v.title) : color.strikethrough.gray(v.title);else title = c === i ? color.cyan.underline(v.title) : v.title;
if (v.disabled) title = c === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = c === i ? color.cyan().underline(v.title) : v.title;
return (v.selected ? color.green(figures.tick) : ' ') + ' ' + title;

@@ -147,0 +147,0 @@ }).join('\n');

@@ -204,3 +204,3 @@ 'use strict';

let lines = this.errorMsg.split(`\n`);
error += lines.reduce((a, l, i) => a += `\n${i ? ` ` : figures.pointerSmall} ${color.red.italic(l)}`, ``);
error += lines.reduce((a, l, i) => a += `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
this.lines = lines.length;

@@ -210,3 +210,3 @@ }

let underline = !this.done || !this.done && !this.placeholder;
let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), underline ? color[this.color].underline(this.rendered) : this.rendered].join(` `);
let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), underline ? color[this.color]().underline(this.rendered) : this.rendered].join(` `);

@@ -213,0 +213,0 @@ let position = ``;

@@ -125,6 +125,6 @@ 'use strict';

if (v.disabled) {
title = this.cursor === i ? color.gray.underline(v.title) : color.strikethrough.gray(v.title);
prefix = this.cursor === i ? color.bold.gray(figures.pointer) + ' ' : ' ';
title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
prefix = this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ';
} else {
title = this.cursor === i ? color.cyan.underline(v.title) : v.title;
title = this.cursor === i ? color.cyan().underline(v.title) : v.title;
prefix = this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ';

@@ -131,0 +131,0 @@ }

@@ -188,3 +188,3 @@ 'use strict';

let lines = this.errorMsg.split(`\n`);
error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red.italic(l)}`, ``);
error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);
this.lines = lines.length;

@@ -191,0 +191,0 @@ }

@@ -111,3 +111,3 @@ 'use strict';

this.out.write(erase.lines(this.first ? 1 : this.msg.split(/\n/g).length) + cursor.to(0) + [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan.underline(this.inactive), color.gray('/'), this.value ? color.cyan.underline(this.active) : this.active].join(' '));
this.out.write(erase.lines(this.first ? 1 : this.msg.split(/\n/g).length) + cursor.to(0) + [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray('/'), this.value ? color.cyan().underline(this.active) : this.active].join(' '));
}

@@ -114,0 +114,0 @@ }

@@ -147,4 +147,4 @@ 'use strict';

let title;
if (v.disabled) title = c === i ? color.gray.underline(v.title) : color.strikethrough.gray(v.title);
else title = c === i ? color.cyan.underline(v.title) : v.title;
if (v.disabled) title = c === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
else title = c === i ? color.cyan().underline(v.title) : v.title;
return (v.selected ? color.green(figures.tick) : ' ') + ' ' + title

@@ -151,0 +151,0 @@ })

@@ -181,3 +181,3 @@ const color = require('kleur');

let lines = this.errorMsg.split(`\n`);
error += lines.reduce((a, l, i) => a += `\n${i ? ` ` : figures.pointerSmall} ${color.red.italic(l)}`, ``);
error += lines.reduce((a, l, i) => a += `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
this.lines = lines.length;

@@ -191,3 +191,3 @@ }

style.delimiter(this.done),
underline ? color[this.color].underline(this.rendered) : this.rendered
underline ? color[this.color]().underline(this.rendered) : this.rendered
].join(` `);

@@ -194,0 +194,0 @@

@@ -126,6 +126,6 @@ 'use strict';

if (v.disabled) {
title = this.cursor === i ? color.gray.underline(v.title) : color.strikethrough.gray(v.title);
prefix = this.cursor === i ? color.bold.gray(figures.pointer) + ' ' : ' ';
title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
prefix = this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ';
} else {
title = this.cursor === i ? color.cyan.underline(v.title) : v.title;
title = this.cursor === i ? color.cyan().underline(v.title) : v.title;
prefix = this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ';

@@ -132,0 +132,0 @@ }

@@ -171,3 +171,3 @@ const color = require('kleur');

let lines = this.errorMsg.split(`\n`);
error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red.italic(l)}`, ``);
error += lines.reduce((a, l, i) => a += `\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);
this.lines = lines.length;

@@ -174,0 +174,0 @@ }

@@ -106,5 +106,5 @@ const color = require('kleur');

style.delimiter(this.done),
this.value ? this.inactive : color.cyan.underline(this.inactive),
this.value ? this.inactive : color.cyan().underline(this.inactive),
color.gray('/'),
this.value ? color.cyan.underline(this.active) : this.active
this.value ? color.cyan().underline(this.active) : this.active
].join(' ')

@@ -111,0 +111,0 @@ );

{
"name": "prompts",
"version": "1.2.0",
"version": "1.2.1",
"description": "Lightweight, beautiful and user-friendly prompts",

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

"dependencies": {
"kleur": "^2.0.1",
"kleur": "^3.0.0",
"sisteransi": "^1.0.0"

@@ -42,0 +42,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