Timo Hocker
d9de76b188
All checks were successful
continuous-integration/drone/push Build is passing
27 lines
669 B
TypeScript
27 lines
669 B
TypeScript
/*
|
|
* Copyright (C) Sapphirecode - All Rights Reserved
|
|
* This file is part of console-app which is released under MIT.
|
|
* See file 'LICENSE' for full license details.
|
|
* Created by Timo Hocker <timo@scode.ovh>, October 2020
|
|
*/
|
|
|
|
import { Input } from 'enquirer';
|
|
import { InteractiveSubSource } from './InteractiveSubSource';
|
|
|
|
export class StringSubSource extends InteractiveSubSource {
|
|
protected condition ():boolean {
|
|
return true;
|
|
}
|
|
|
|
protected async run ():Promise<void> {
|
|
await this.val.assign_arg (
|
|
this.opt,
|
|
await new Input ({
|
|
message: this.get_message (),
|
|
default: this.opt.default
|
|
})
|
|
.run ()
|
|
);
|
|
}
|
|
}
|