mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-23 18:34:45 +01:00
18 lines
432 B
JavaScript
18 lines
432 B
JavaScript
'use strict';
|
|
|
|
const StringPrompt = require('../types/string');
|
|
|
|
class PasswordPrompt extends StringPrompt {
|
|
constructor(options) {
|
|
super(options);
|
|
this.cursorShow();
|
|
}
|
|
|
|
format(input = this.input) {
|
|
if (!this.keypressed) return '';
|
|
let color = this.state.submitted ? this.styles.primary : this.styles.muted;
|
|
return color(this.symbols.asterisk.repeat(input.length));
|
|
}
|
|
}
|
|
|
|
module.exports = PasswordPrompt;
|