2020-06-15 11:56:33 +02:00
|
|
|
import { Input } from 'enquirer';
|
|
|
|
import { InteractiveSubSource } from './InteractiveSubSource';
|
|
|
|
|
|
|
|
export class StringSubSource extends InteractiveSubSource {
|
|
|
|
protected condition ():boolean {
|
2020-06-16 09:40:12 +02:00
|
|
|
return true;
|
2020-06-15 11:56:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected async run ():Promise<void> {
|
|
|
|
await this.val.assign_arg (
|
|
|
|
this.opt,
|
|
|
|
await new Input ({
|
|
|
|
message: this.get_message (),
|
|
|
|
default: this.opt.default
|
|
|
|
})
|
|
|
|
.run ()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|