mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 00:55:08 +01:00
added nodecolor and nodename to lightning config prompts
This commit is contained in:
@@ -104,7 +104,6 @@ module.exports = class extends Generator {
|
||||
}
|
||||
|
||||
_pathValidator( p ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -112,6 +111,20 @@ module.exports = class extends Generator {
|
||||
return true;
|
||||
}
|
||||
|
||||
_colorValidator(color) {
|
||||
if( !validator.isHexColor(color) ) {
|
||||
throw new Error('Not a hex color.');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
_notEmptyValidator( path ) {
|
||||
if( !path ) {
|
||||
throw new Error('Please enter something');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
_trimFilter( input ) {
|
||||
return (input+"").trim();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,23 @@ module.exports = {
|
||||
name: 'lightning_external_ip',
|
||||
default: utils._getDefault( 'lightning_external_ip' ),
|
||||
validate: utils._ipOrFQDNValidator,
|
||||
message: 'What external ip does your lightning node have?'+'\n',
|
||||
message: prefix()+'What external ip does your lightning node have?'+'\n',
|
||||
},
|
||||
{
|
||||
when: featureCondition,
|
||||
type: 'input',
|
||||
name: 'lightning_nodename',
|
||||
default: utils._getDefault( 'lightning_nodename' ),
|
||||
validate: utils._notEmptyValidator,
|
||||
message: prefix()+'What name has your lightning node?'+'\n',
|
||||
},
|
||||
{
|
||||
when: featureCondition,
|
||||
type: 'input',
|
||||
name: 'lightning_nodecolor',
|
||||
default: utils._getDefault( 'lightning_nodecolor' ),
|
||||
validate: utils._colorValidator,
|
||||
message: prefix()+'What color has your lightning node?'+'\n',
|
||||
}];
|
||||
},
|
||||
templates: function( props ) {
|
||||
|
||||
Reference in New Issue
Block a user