From ff1f226f8e190d55202c4e5b23703f67a4fc99aa Mon Sep 17 00:00:00 2001 From: jash Date: Wed, 19 Dec 2018 15:40:04 +0100 Subject: [PATCH] made lightning node alias and color optional. added lightning node name generator for nice default aliases --- .../generators/app/index.js | 14 +- .../generators/app/lib/name.js | 2370 +++++++++++++++++ .../generators/app/prompters/200_lightning.js | 18 +- .../templates/lightning/c-lightning/config | 4 + 4 files changed, 2398 insertions(+), 8 deletions(-) create mode 100644 install/generator-cyphernode/generators/app/lib/name.js diff --git a/install/generator-cyphernode/generators/app/index.js b/install/generator-cyphernode/generators/app/index.js index 8a7abd9..8bd80bb 100644 --- a/install/generator-cyphernode/generators/app/index.js +++ b/install/generator-cyphernode/generators/app/index.js @@ -6,6 +6,7 @@ const fs = require('fs'); const validator = require('validator'); const path = require("path"); const coinstring = require('coinstring'); +const name = require('./lib/name.js'); const Archive = require('./lib/archive.js'); const ApiKey = require('./lib/apikey.js'); const Cert = require('./lib/cert.js'); @@ -16,8 +17,7 @@ const userRegexp = /^[a-zA-Z0-9\._\-]+$/; const reset = '\u001B8\u001B[u'; const clear = '\u001Bc'; -const configFileVersion='0.0.1'; - +const configFileVersion='0.1.0'; const defaultAPIProperties = ` # Watcher can: @@ -302,7 +302,6 @@ module.exports = class extends Generator { } } - delete this.props.gatekeeper_recreatekeys; } @@ -385,7 +384,7 @@ module.exports = class extends Generator { proxy_datapath: '', lightning_implementation: 'c-lightning', lightning_datapath: '', - lightning_nodename: '', + lightning_nodename: name.generate(), lightning_nodecolor: '', otsclient_datapath: '', installer_cleanup: false @@ -442,6 +441,13 @@ module.exports = class extends Generator { return true; } + _lightningNodeNameValidator(name) { + if( !name || name.length > 32 ) { + throw new Error('Please enter anything shorter than 32 characters'); + } + return true; + } + _notEmptyValidator( path ) { if( !path ) { throw new Error('Please enter something'); diff --git a/install/generator-cyphernode/generators/app/lib/name.js b/install/generator-cyphernode/generators/app/lib/name.js new file mode 100644 index 0000000..82602e3 --- /dev/null +++ b/install/generator-cyphernode/generators/app/lib/name.js @@ -0,0 +1,2370 @@ +const MAXLENGTH = 32; + +const ADJECTIVES = [ + /*a*/ ["Abiding", + "Able", + "Able-bodied", + "Abounding", + "Aboveboard", + "Absolute", + "Absolved", + "Abundant", + "Academic", + "Acceptable", + "Accepted", + "Accepting", + "Accessible", + "Acclaimed", + "Accommodating", + "Accomplished", + "Accordant", + "Accountable", + "Accredited", + "Accurate", + "Accustomed", + "Acknowledged", + "Acquainted", + "Active", + "Actual", + "Acuminous", + "Acute", + "Adamant", + "Adaptable", + "Adept", + "Adequate", + "Adjusted", + "Admirable", + "Admired", + "Admissible", + "Adonic", + "Adorable", + "Adored", + "Adroit", + "Advanced", + "Advantaged", + "Advantageous", + "Adventuresome", + "Adventurous", + "Advisable", + "Aesthetic", + "Aesthetical", + "Affable", + "Affecting", + "Affectionate", + "Affective", + "Affiliated", + "Affined", + "Affluent", + "Affluential", + "Ageless", + "Agile", + "Agreeable", + "Aholic", + "Alacritous", + "Alert", + "Alive", + "All-important", + "Allegiant", + "Allied", + "Alluring", + "Alright", + "Alternate", + "Altruistic", + "Amative", + "Amatory", + "Amazing", + "Ambidextrous", + "Ambitious", + "Amelioratory", + "Amenable", + "Amiable", + "Amicable", + "Amusing", + "Anamnestic", + "Angelic", + "Aplenty", + "Apollonian", + "Appealing", + "Appeasing", + "Appetent", + "Appetizing", + "Apposite", + "Appreciated", + "Appreciative", + "Apprehensible", + "Approachable", + "Appropriate", + "Approving", + "Apropos", + "Apt", + "Ardent", + "Aristocratic", + "Arousing", + "Arresting", + "Articulate", + "Artistic", + "Ascendant", + "Ascending", + "Aspirant", + "Aspiring", + "Assertive", + "Assiduous", + "Assistant", + "Assisting", + "Assistive", + "Associate", + "Associated", + "Associative", + "Assured", + "Assuring", + "Astir", + "Astonishing", + "Astounding", + "Astronomical", + "Astute", + "Athletic", + "Attainable", + "Attendant", + "Attentive", + "Attractive", + "Atypical", + "Au fait", + "August", + "Auspicious", + "Authentic", + "Authoritative", + "Authorized", + "Autonomous", + "Available", + "Avant-garde", + "Avid", + "Awaited", + "Awake", + "Aware", + "Awash", + "Awesome", + "Axiological"], + /*b*/ ["Balanced", + "Baronial", + "Beaming", + "Beatific", + "Beauteous", + "Beautified", + "Beautiful", + "Becoming", + "Beefy", + "Believable", + "Beloved", + "Benedictory", + "Benefic", + "Beneficent", + "Beneficial", + "Beneficiary", + "Benevolent", + "Benign", + "Benignant", + "Bent on", + "Best", + "Better", + "Big", + "Big-hearted", + "Big-time", + "Biggest", + "Bijou", + "Blameless", + "Blazing", + "Blessed", + "Blissful", + "Blithe", + "Blooming", + "Blue-ribbon", + "Bodacious", + "Boisterous", + "Bold", + "Bona fide", + "Bonny", + "Bonzer", + "Boss", + "Bound", + "Bounteous", + "Bountiful", + "Brainy", + "Brave", + "Brawny", + "Breezy", + "Brief", + "Bright", + "Brill", + "Brilliant", + "Brimming", + "Brisk", + "Broadminded", + "Brotherly", + "Bubbly", + "Budding", + "Buff", + "Bullish", + "Buoyant", + "Businesslike", + "Bustling", + "Busy", + "Buxom"], + /*c*/ ["Calm", + "Calmative", + "Calming", + "Can-do", + "Candescent", + "Canny", + "Canty", + "Capable", + "Capital", + "Captivating", + "Cared for", + "Carefree", + "Careful", + "Caring", + "Casual", + "Causative", + "Celebrated", + "Celeritous", + "Celestial", + "Centered", + "Central", + "Cerebral", + "Certain", + "Champion", + "Changeable", + "Changeless", + "Charismatic", + "Charitable", + "Charming", + "Cheerful", + "Cherished", + "Cherry", + "Chic", + "Childlike", + "Chipper", + "Chirpy", + "Chivalrous", + "Choice", + "Chosen", + "Chummy", + "Civic", + "Civil", + "Civilized", + "Clairvoyant", + "Classic", + "Classical", + "Classy", + "Clean", + "Clear", + "Clear-cut", + "Clearheaded", + "Clement", + "Clever", + "Close", + "Clubby", + "Coadjutant", + "Coequal", + "Cogent", + "Cognizant", + "Coherent", + "Collected", + "Colossal", + "Colourful", + "Coltish", + "Come-at-able", + "Comely", + "Comfortable", + "Comforting", + "Comic", + "Comical", + "Commanding", + "Commendable", + "Commendatory", + "Commending", + "Commiserative", + "Committed", + "Commodious", + "Commonsensical", + "Communicative", + "Commutual", + "Companionable", + "Compassionate", + "Compatible", + "Compelling", + "Competent", + "Complete", + "Completed", + "Complimentary", + "Composed", + "Comprehensive", + "Concentrated", + "Concise", + "Conclusive", + "Concordant", + "Concrete", + "Condolatory", + "Confederate", + "Conferrable", + "Confident", + "Congenial", + "Congruous", + "Connected", + "Conscientious", + "Conscious", + "Consensual", + "Consentaneous", + "Consentient", + "Consequential", + "Considerable", + "Considerate", + "Consistent", + "Consonant", + "Conspicuous", + "Constant", + "Constitutional", + "Constructive", + "Contemplative", + "Contemporary", + "Content", + "Contributive", + "Convenient", + "Conversant", + "Convictive", + "Convincing", + "Convivial", + "Cool", + "Cooperative", + "Coordinated", + "Copacetic", + "Copious", + "Cordial", + "Correct", + "Coruscant", + "Cosmic", + "Cosy", + "Courageous", + "Courteous", + "Courtly", + "Cozy", + "Crackerjack", + "Creamy", + "Creative", + "Credible", + "Creditable", + "Crisp", + "Crucial", + "Crystal (Clear)", + "Cuddly", + "Cultivated", + "Cultured", + "Cunning", + "Curious", + "Current", + "Curvaceous", + "Cushy", + "Cute", + "Cutting-edge"], + /*d*/ ["Dainty", + "Dandy", + "Dapper", + "Daring", + "Darling", + "Dashing", + "Dauntless", + "Dazzling", + "Dear", + "Debonair", + "Decent", + "Deciding", + "Decisive", + "Decorous", + "Dedicated", + "Deep", + "Defiant", + "Defiantly", + "Definite", + "Deft", + "Delectable", + "Deliberate", + "Delicate", + "Delicious", + "Delighted", + "Delightful", + "Deluxe", + "Demonstrative", + "Demulcent", + "Dependable", + "Deserving", + "Designer", + "Desirable", + "Desired", + "Desirous", + "Destined", + "Determined", + "Developed", + "Developing", + "Devoted", + "Devotional", + "Devout", + "Dexterous", + "Didactic", + "Different", + "Dignified", + "Diligent", + "Dinkum", + "Diplomatic", + "Direct", + "Disarming", + "Discerning", + "Disciplined", + "Discreet", + "Discrete", + "Discriminating", + "Dispassionate", + "Distinct", + "Distinctive", + "Distinguished", + "Distinguishing", + "Diverse", + "Diverting", + "Divine", + "Doable", + "Dominant", + "Doting", + "Doubtless", + "Doughty", + "Down-to-earth", + "Dreamy", + "Driven", + "Driving", + "Durable", + "Dutiful", + "Dynamic", + "Dynamite"], + /*e*/ ["Eager", + "Early", + "Earnest", + "Earthly", + "Earthy", + "Easy", + "Easygoing", + "Ebullient", + "Eclectic", + "Economic", + "Economical", + "Ecstatic", + "Ecumenical", + "Edified", + "Educated", + "Educational", + "Effective", + "Effectual", + "Effervescent", + "Efficient", + "Effortless", + "Elaborate", + "Elated", + "Elating", + "Elder", + "Electric", + "Electrifying", + "Eleemosynary", + "Elegant", + "Elemental", + "Eligible", + "Eloquent", + "Emerging", + "Eminent", + "Empathetic", + "Employable", + "Empowered", + "Enamored", + "Enchanting", + "Encouraged", + "Encouraging", + "Endearing", + "Enduring", + "Energetic", + "Energizing", + "Engaging", + "Enhanced", + "Enjoyable", + "Enlightened", + "Enlightening", + "Enlivened", + "Enlivening", + "Enormous", + "Enough", + "Enriching", + "Enterprising", + "Entertaining", + "Enthralling", + "Enthusiastic", + "Enticing", + "Entrancing", + "Entrepreneurial", + "Epicurean", + "Epideictic", + "Equable", + "Equal", + "Equiponderant", + "Equipped", + "Equitable", + "Equivalent", + "Erotic", + "Erudite", + "Especial", + "Essential", + "Established", + "Esteemed", + "Esthetic", + "Esthetical", + "Eternal", + "Ethical", + "Euphoric", + "Even-handed", + "Eventful", + "Evident", + "Evocative", + "Exact", + "Exalted", + "Exceeding", + "Excellent", + "Exceptional", + "Executive", + "Exhilarating", + "Exotic", + "Expansive", + "Expectant", + "Expeditious", + "Expeditive", + "Expensive", + "Experienced", + "Explorative", + "Expressive", + "Exquisite", + "Extraordinary", + "Exuberant", + "Exultant", + "Eye-catching"], + /*f*/ ["Fab", + "Fabulous", + "Facile", + "Factual", + "Facultative", + "Fain", + "Fair", + "Faithful", + "Famed", + "Familial", + "Familiar", + "Family", + "Famous", + "Fancy", + "Fantastic", + "Far-reaching", + "Far-sighted", + "Fascinating", + "Fashionable", + "Fast", + "Faultless", + "Favorable", + "Favored", + "Favorite", + "Fearless", + "Feasible", + "Fecund", + "Felicitous", + "Fertile", + "Fervent", + "Festal", + "Festive", + "Fetching", + "Fiery", + "Fine", + "Finer", + "Finest", + "Firm", + "First", + "First-class", + "First-rate", + "Fit", + "Fitting", + "Flamboyant", + "Flash", + "Flashy", + "Flavorful", + "Flawless", + "Fleet", + "Flexible", + "Flourishing", + "Fluent", + "Flying", + "Focused", + "Fond", + "For real", + "Forceful", + "Foremost", + "Foresighted", + "Forgiving", + "Formidable", + "Forthcoming", + "Forthright", + "Fortified", + "Fortuitous", + "Fortunate", + "Forward", + "Foundational", + "Four-star", + "Foxy", + "Fragrant", + "Frank", + "Fraternal", + "Free", + "Freely", + "Fresh", + "Friendly", + "Frisky", + "Frolicsome", + "Front-page", + "Fruitful", + "Fulfilled", + "Fulfilling", + "Full", + "Fun", + "Funny", + "Futuristic"], + /*g*/ ["Gainful", + "Gallant", + "Galore", + "Game", + "Gamesome", + "Generous", + "Genial", + "Genteel", + "Gentle", + "Genuine", + "Germane", + "Get-at-able", + "Gettable", + "Giddy", + "Gifted", + "Giving", + "Glad", + "Glamorous", + "Gleaming", + "Gleeful", + "Glorious", + "Glowing", + "Gnarly", + "Goal-oriented", + "Godly", + "Golden", + "Good", + "Good-humored", + "Good-looking", + "Good-natured", + "Goodhearted", + "Goodly", + "Gorgeous", + "Graced", + "Graceful", + "Gracile", + "Gracious", + "Gradely", + "Graithly", + "Grand", + "Grateful", + "Gratified", + "Gratifying", + "Great", + "Greatest", + "Greathearted", + "Gregarious", + "Groovy", + "Grounded", + "Growing", + "Grown", + "Guaranteed", + "Gubernatorial", + "Guided", + "Guiding", + "Guileless", + "Guilt-free", + "Guiltless", + "Gumptious", + "Gustatory", + "Gutsy", + "Gymnastic"], + /*h*/ ["Halcyon", + "Hale", + "Hallowed", + "Handsome", + "Handy", + "Happening", + "Happy", + "Happy-go-lucky", + "Hard-working", + "Hardy", + "Harmless", + "Harmonious", + "Head", + "Healing", + "Healthful", + "Healthy", + "Heart-to-heart", + "Heartfelt", + "Hearty", + "Heavenly", + "Heedful", + "Hegemonic", + "Helpful", + "Hep", + "Heralded", + "Heroic", + "Heteroclite", + "Heuristic", + "High", + "High-class", + "High-minded", + "High-power", + "High-powered", + "High-priority", + "High-reaching", + "High-spirited", + "Highest", + "Highly regarded", + "Highly valued", + "Hilarious", + "Hip", + "Holy", + "Homely", + "Honest", + "Honeyed", + "Honorary", + "Honorable", + "Honored", + "Hopeful", + "Hortative", + "Hospitable", + "Hot", + "Hotshot", + "Huggy", + "Humane", + "Humanitarian", + "Humble", + "Humorous", + "Hunky", + "Hygienic", + "Hypersonic", + "Hypnotic"], + /*i*/ ["Ideal", + "Idealistic", + "Idiosyncratic", + "Idolized", + "Illimitable", + "Illuminated", + "Illuminating", + "Illustrious", + "Imaginative", + "Imitable", + "Immaculate", + "Immeasurable", + "Immediate", + "Immense", + "Immortal", + "Immune", + "Impartial", + "Impassioned", + "Impeccable", + "Impeccant", + "Imperturbable", + "Impish", + "Important", + "Impressive", + "Improved", + "Improving", + "Improvisational", + "In", + "Incisive", + "Included", + "Inclusive", + "Incomparable", + "Incomplex", + "Incontestable", + "Incontrovertible", + "Incorrupt", + "Incredible", + "Inculpable", + "Indefatigable", + "Independent", + "Indestructible", + "Indispensable", + "Indisputable", + "Individual", + "Individualistic", + "Indivisible", + "Indomitable", + "Indubitable", + "Industrious", + "Inerrant", + "Inexhaustible", + "Infallible", + "Infant", + "Infinite", + "Influential", + "Informative", + "Informed", + "Ingenious", + "Inimitable", + "Initiate", + "Initiative", + "Innocent", + "Innovative", + "Innoxious", + "Inquisitive", + "Insightful", + "Inspired", + "Inspiring", + "Inspiriting", + "Instantaneous", + "Instinctive", + "Instructive", + "Instrumental", + "Integral", + "Integrated", + "Intellectual", + "Intelligent", + "Intense", + "Intent", + "Interactive", + "Interconnected", + "Interested", + "Interesting", + "Internal", + "Intertwined", + "Intimate", + "Intoxicating", + "Intrepid", + "Intriguing", + "Introducer", + "Inventive", + "Invigorated", + "Invigorating", + "Invincible", + "Inviolable", + "Inviting", + "Irrefragable", + "Irrefutable", + "Irreplaceable", + "Irrepressible", + "Irreproachable", + "Irresistible"], + /*j*/ ["Jaculable", + "Jam-packed", + "Jaunty", + "Jazzed", + "Jazzy", + "Jessant", + "Jestful", + "Jesting", + "Jewelled", + "Jiggish", + "Jigjog", + "Jimp", + "Jobbing", + "Jocose", + "Jocoserious", + "Jocular", + "Joculatory", + "Jocund", + "Joint", + "Jointed", + "Jolif", + "Jolly", + "Jovial", + "Joyful", + "Joyous", + "Joysome", + "Jubilant", + "Judicious", + "Juicy", + "Jump", + "Just", + "Justified"], + /*k*/ ["Keen", + "Kempt", + "Key", + "Kind", + "Kind-hearted", + "Kindly", + "Kindred", + "Kinetic", + "King-sized", + "Kingly", + "Kissable", + "Knightly", + "Knowable", + "Knowing", + "Knowledgeable", + "Kooky"], + /*l*/ ["Ladylike", + "Laid-back", + "Large", + "Lasting", + "Latitudinarian", + "Laudable", + "Laureate", + "Lavish", + "Law-abiding", + "Lawful", + "Leading", + "Leading-edge", + "Learned", + "Legal", + "Legendary", + "Legible", + "Legit", + "Legitimate", + "Leisured", + "Leisurely", + "Lenien", + "Leonine", + "Lepid", + "Lettered", + "Level-headed", + "Liberal", + "Liberated", + "Liberating", + "Light-hearted", + "Lightly", + "Likable", + "Like", + "Like-minded", + "Liked", + "Likely", + "Limber", + "Lionhearted", + "Literary", + "Literate", + "Lithe", + "Lithesome", + "Live", + "Lively", + "Logical", + "Long-established", + "Long-standing", + "Lordly", + "Lovable", + "Loved", + "Lovely", + "Loving", + "Loyal", + "Lucent", + "Lucid", + "Lucky", + "Lucrative", + "Luminous", + "Luscious", + "Lush", + "Lustrous", + "Lusty", + "Luxuriant", + "Luxurious"], + /*m*/ ["Made", + "Magical", + "Magnanimous", + "Magnetic", + "Magnificent", + "Maiden", + "Main", + "Majestic", + "Major", + "Malleable", + "Manageable", + "Managerial", + "Manifest", + "Manly", + "Mannerly", + "Many", + "Marked", + "Marvelous", + "Masculine", + "Master", + "Masterful", + "Masterly", + "Matchless", + "Maternal", + "Matter-of-fact", + "Mature", + "Maturing", + "Maximal", + "Meaningful", + "Mediate", + "Meditative", + "Meek", + "Mellow", + "Melodious", + "Memorable", + "Merciful", + "Meritable", + "Meritorious", + "Merry", + "Mesmerizing", + "Metaphysical", + "Meteoric", + "Methodical", + "Meticulous", + "Mettlesome", + "Mighty", + "Mindful", + "Minikin", + "Ministerial", + "Mint", + "Miraculous", + "Mirthful", + "Mitigative", + "Mitigatory", + "Model", + "Modern", + "Modernistic", + "Modest", + "Momentous", + "Moneyed", + "Moral", + "More", + "Most", + "Mother", + "Motivated", + "Motivating", + "Motivational", + "Motor", + "Moving", + "Much", + "Mucho", + "Multidimensional", + "Multidisciplined", + "Multifaceted", + "Munificent", + "Muscular", + "Musical", + "Must", + "Mutual"], + /*n*/ ["National", + "Nationwide", + "Native", + "Natty", + "Natural", + "Nearby", + "Neat", + "Necessary", + "Needed", + "Neighborly", + "Neoteric", + "Nestling", + "Never-failing", + "New", + "New-fashioned", + "Newborn", + "Nice", + "Nifty", + "Nimble", + "Nimble-witted", + "Nippy", + "Noble", + "Noetic", + "Nonchalant", + "Nonpareil", + "Normal", + "Notable", + "Noted", + "Noteworthy", + "Noticeable", + "Nourished", + "Nourishing", + "Novel", + "Now", + "Nubile", + "Number one", + "Nutrimental"], + /*o*/ ["Objective", + "Obliging", + "Observant", + "Obtainable", + "Oecumenical", + "Official", + "OK", + "Okay", + "Olympian", + "On", + "Once", + "One", + "Onward", + "Open", + "Open-handed", + "Open-hearted", + "Open-minded", + "Operative", + "Opportune", + "Optimal", + "Optimistic", + "Optimum", + "Opulent", + "Orderly", + "Organic", + "Organized", + "Oriented", + "Original", + "Ornamental", + "Out-of-sight", + "Out-of-this-world", + "Outgoing", + "Outstanding", + "Overflowing", + "Overjoyed", + "Overriding", + "Overt"], + /*p*/ ["Palatable", + "Pally", + "Palpable", + "Par excellence", + "Paradisiac", + "Paradisiacal", + "Paramount", + "Parental", + "Parnassian", + "Participant", + "Participative", + "Particular", + "Partisan", + "Passionate", + "Paternal", + "Patient", + "Peaceable", + "Peaceful", + "Peachy", + "Peerless", + "Penetrating", + "Peppy", + "Perceptive", + "Perfect", + "Perky", + "Permanent", + "Permissive", + "Perseverant", + "Persevering", + "Persistent", + "Personable", + "Perspective", + "Perspicacious", + "Perspicuous", + "Persuasive", + "Pert", + "Pertinent", + "Pet", + "Petite", + "Phenomenal", + "Philanthropic", + "Philoprogenitive", + "Philosophical", + "Picked", + "Picturesque", + "Pierian", + "Pilot", + "Pioneering", + "Pious", + "Piquant", + "Pithy", + "Pivotal", + "Placid", + "Plausible", + "Playful", + "Pleasant", + "Pleased", + "Pleasing", + "Pleasurable", + "Plenary", + "Plenteous", + "Plentiful", + "Plenty", + "Pliable", + "Plucky", + "Plummy", + "Plus", + "Plush", + "Poetic", + "Poignant", + "Poised", + "Polished", + "Polite", + "Popular", + "Posh", + "Positive", + "Possible", + "Potent", + "Potential", + "Powerful", + "Practicable", + "Practical", + "Practised", + "Pragmatic", + "Praiseworthy", + "Prayerful", + "Precious", + "Precise", + "Predominant", + "Preeminent", + "Preferable", + "Preferred", + "Premier", + "Premium", + "Prepared", + "Preponderant", + "Prepotent", + "Present", + "Prestigious", + "Pretty", + "Prevailing", + "Prevalent", + "Prevenient", + "Primal", + "Primary", + "Prime", + "Prime mover", + "Primed", + "Primo", + "Princely", + "Principal", + "Principled", + "Pristine", + "Privileged", + "Prize", + "Prizewinning", + "Prized", + "Pro", + "Proactive", + "Probable", + "Probative", + "Procurable", + "Prodigious", + "Productive", + "Professional", + "Proficient", + "Profitable", + "Profound", + "Profuse", + "Progressive", + "Prolific", + "Prominent", + "Promising", + "Prompt", + "Proper", + "Propertied", + "Prophetic", + "Propitious", + "Prospective", + "Prosperous", + "Protean", + "Protective", + "Proud", + "Provocative", + "Prudent", + "Psyched up", + "Public-spirited", + "Puissant", + "Pukka", + "Pulchritudinous", + "Pumped up", + "Punchy", + "Punctilious", + "Punctual", + "Pure", + "Purposeful"], + /*q*/ ["Quaint", + "Qualified", + "Qualitative", + "Quality", + "Quantifiable", + "Queenly", + "Quemeful", + "Quick", + "Quick-witted", + "Quiet", + "Quietsome", + "Quintessential", + "Quirky", + "Quiver", + "Quixotic", + "Quotable"], + /*r*/ ["Racy", + "Rad", + "Radiant", + "Rapid", + "Rapturous", + "Rational", + "Razor-sharp", + "Reachable", + "Ready", + "Real", + "Realistic", + "Realizable", + "Reasonable", + "Reassuring", + "Receptive", + "Recherche", + "Recipient", + "Reciprocal", + "Recognizable", + "Recognized", + "Recommendable", + "Recuperative", + "Red-carpet", + "Refined", + "Reflective", + "Refreshing", + "Refulgent", + "Regal", + "Regnant", + "Regular", + "Rejuvenescent", + "Relaxed", + "Relevant", + "Reliable", + "Relieved", + "Remarkable", + "Remissive", + "Renowned", + "Reputable", + "Resilient", + "Resolute", + "Resolved", + "Resounding", + "Resourceful", + "Respectable", + "Respectful", + "Resplendent", + "Responsible", + "Responsive", + "Restful", + "Restorative", + "Retentive", + "Revealing", + "Revered", + "Reverent", + "Revitalizing", + "Revolutionary", + "Rewardable", + "Rewarding", + "Rhapsodic", + "Rich", + "Right", + "Righteous", + "Rightful", + "Risible", + "Robust", + "Rollicking", + "Romantic", + "Rooted", + "Rosy", + "Round", + "Rounded", + "Rousing", + "Rugged", + "Ruling"], + /*s*/ ["Saccharine", + "Sacred", + "Sacrosanct", + "Safe", + "Sagacious", + "Sage", + "Saintly", + "Salient", + "Salubrious", + "Salutary", + "Salutiferous", + "Sanctified", + "Sanctimonious", + "Sanctioned", + "Sanguine", + "Sapid", + "Sapient", + "Sapoforic", + "Sassy", + "Satisfactory", + "Satisfied", + "Satisfying", + "Saucy", + "Saving", + "Savory", + "Savvy", + "Scenic", + "Scholarly", + "Scientific", + "Scintillating", + "Scrumptious", + "Scrupulous", + "Seamless", + "Seasonal", + "Seasoned", + "Second-to-none", + "Secure", + "Sedulous", + "Seemly", + "Select", + "Self-assertive", + "Self-assured", + "Self-confident", + "Self-disciplined", + "Self-made", + "Self-sacrificing", + "Self-starting", + "Self-sufficient", + "Selfless", + "Sensational", + "Sensible", + "Sensitive", + "Sensual", + "Sensuous", + "Sentimental", + "Sequacious", + "Serendipitous", + "Serene", + "Service", + "Set", + "Settled", + "Sexual", + "Sexy", + "Shapely", + "Sharp", + "Shatterproof", + "Sheen", + "Shining", + "Shiny", + "Shipshape", + "Showy", + "Shrewd", + "Sightly", + "Significant", + "Silken", + "Silky", + "Silver", + "Silver-toned", + "Silvery", + "Simple", + "Sincere", + "Sinewy", + "Singular", + "Sisterly", + "Sizable", + "Sizzling", + "Skillful", + "Skilled", + "Sleek", + "Slick", + "Slinky", + "Smacking", + "Smart", + "Smashing", + "Smiley", + "Smooth", + "Snap", + "Snappy", + "Snazzy", + "Snod", + "Snug", + "Soaring", + "Sociable", + "Social", + "Societal", + "Soft", + "Soft-hearted", + "Soigne", + "Solicitous", + "Solid", + "Sonsy", + "Sooth", + "Soothing", + "Sophisticated", + "Sought-after", + "Soulful", + "Sound", + "Souped-up", + "Sovereign", + "Spacious", + "Spangly", + "Spanking", + "Sparkling", + "Sparkly", + "Special", + "Spectacular", + "Specular", + "Speedy", + "Spellbinding", + "Spicy", + "Spiffy", + "Spirited", + "Spiritual", + "Splendid", + "Splendiferous", + "Spontaneous", + "Sport", + "Sporting", + "Sportive", + "Sporty", + "Spot", + "Spotless", + "Spot on", + "Sprightly", + "Spruce", + "Spry", + "Spunky", + "Square", + "Stable", + "Stacked", + "Stainless", + "Stalwart", + "Staminal", + "Standard", + "Standing", + "Stand-up", + "Star", + "Starry", + "State", + "Stately", + "Statuesque", + "Staunch", + "Steadfast", + "Steady", + "Steamy", + "Stellar", + "Sterling", + "Sthenic", + "Stick-to-itive", + "Stimulant", + "Stimulating", + "Stimulative", + "Stipendiary", + "Stirred", + "Stirring", + "Stocky", + "Stoical", + "Storied", + "Stout", + "Stouthearted", + "Straight-out", + "Straightforward", + "Strapping", + "Strategic", + "Street-smart", + "Streetwise", + "Strenuous", + "Striking", + "Strong", + "Studious", + "Stunning", + "Stupendous", + "Sturdy", + "Stylish", + "Suasive", + "Suave", + "Sublime", + "Substantial", + "Substant", + "Substantive", + "Subtle", + "Successful", + "Succinct", + "Succulent", + "Sufficient", + "Sugary", + "Suitable", + "Sultry", + "Summary", + "Summery", + "Sumptuous", + "Sun-kissed", + "Sunny", + "Super", + "Superabundant", + "Super-duper", + "Supereminent", + "Superethical", + "Superexcellent", + "Superb", + "Supercalifragilisticexpialidocious", + "Superfluous", + "Superior", + "Superlative", + "Supernal", + "Supersonic", + "Supple", + "Supportive", + "Supreme", + "Sure", + "Sure-fire", + "Sure-footed", + "Sure-handed", + "Surpassing", + "Sustained", + "Svelte", + "Swank", + "Swashbuckling", + "Sweet", + "Swell", + "Swift", + "Swish", + "Sybaritic", + "Sylvan", + "Symmetrical", + "Sympathetic", + "Symphonious", + "Synergistic", + "Systematic"], + /*t*/ ["Tactful", + "Tailor-made", + "Take-charge", + "Talented", + "Tangible", + "Tasteful", + "Tasty", + "Teachable", + "Teeming", + "Tempean", + "Temperate", + "Tenable", + "Tenacious", + "Tender", + "Tender-hearted", + "Terrific", + "Testimonial", + "Thankful", + "Thankworthy", + "Therapeutic", + "Thorough", + "Thoughtful", + "Thrilled", + "Thrilling", + "Thriving", + "Tidy", + "Tight", + "Time-honored", + "Time-saving", + "Timeless", + "Timely", + "Tiptop", + "Tireless", + "Titanic", + "Titillating", + "Today", + "Together", + "Tolerant", + "Top", + "Top drawer", + "Top-notch", + "Tops", + "Total", + "Totally-tubular", + "Touching", + "Tough", + "Trailblazing", + "Tranquil", + "Transcendent", + "Transcendental", + "Transient", + "Transnormal", + "Transparent", + "Transpicuous", + "Traveled", + "Tremendous", + "Tretis", + "Trim", + "Triumphant", + "True", + "True-blue", + "Trustful", + "Trusting", + "Trustworthy", + "Trusty", + "Truthful", + "Tubular", + "Tuneful", + "Turgent", + "Tympanic"], + /*u*/ ["Uber", + "Ultimate", + "Ultra", + "Ultraprecise", + "Unabashed", + "Unadulterated", + "Unaffected", + "Unafraid", + "Unalloyed", + "Unambiguous", + "Unanimous", + "Unarguable", + "Unassuming", + "Unattached", + "Unbeaten", + "Unbelieavable", + "Unbiased", + "Unbigoted", + "Unblemished", + "Unbroken", + "Uncommon", + "Uncomplicated", + "Unconditional", + "Uncontestable", + "Unconventional", + "Uncorrupted", + "Uncritical", + "Undamaged", + "Undauntable", + "Undaunted", + "Undefeated", + "Undefiled", + "Undeniable", + "Under control", + "Understandable", + "Understanding", + "Understood", + "Undesigning", + "Undiminished", + "Undisputed", + "Undivided", + "Undoubted", + "Unencumbered", + "Unequalled", + "Unequivocal", + "Unerring", + "Unfailing", + "Unfaltering", + "Unfaultable", + "Unfeigned", + "Unfettered", + "Unflagging", + "Unflappable", + "Ungrudging", + "Unhampered", + "Unharmed", + "Unhesitating", + "Unhurt", + "Unified", + "Unimpaired", + "Unimpeachable", + "Unimpeded", + "Unique", + "United", + "Universal", + "Unlimited", + "Unmistakable", + "Unmitigated", + "Unobjectionable", + "Unobstructed", + "Unobtrusive", + "Unopposed", + "UnUnprejudiced", + "Unpretentious", + "Unquestionable", + "Unrefuted", + "Unreserved", + "Unrivalled", + "Unruffled", + "Unselfish", + "Unshakable", + "Unshaken", + "Unspoiled", + "Unspoilt", + "Unstoppable", + "Unsullied", + "Unsurpassed", + "Untarnished", + "Untiring", + "Untouched", + "Untroubled", + "Unusual", + "Unwavering", + "Up", + "Up-front", + "Up-to-date", + "Upbeat", + "Upcoming", + "Uplifted", + "Uplifting", + "Uppermost", + "Upright", + "Upstanding", + "Upward", + "Upwardly", + "Urbane", + "Usable", + "Useful", + "User-friendly", + "Utmost"], + /*v*/ ["Valiant", + "Valid", + "Validatory", + "Valorous", + "Valuable", + "Valued", + "Vast", + "Vaulting", + "Vehement", + "Venerable", + "Venturesome", + "Venust", + "Veracious", + "Verdurous", + "Veridical", + "Verified", + "Versatile", + "Versed", + "Very", + "Vestal", + "Veteran", + "Viable", + "Vibrant", + "Vibratile", + "Victor", + "Victorious", + "Vigilant", + "Vigorous", + "Virile", + "Virtuous", + "Visionary", + "Vital", + "Vivacious", + "Vivid", + "Vocal", + "Volant", + "Volitional", + "Voluptuous", + "Vulnerary"], + /*w*/ ["Wanted", + "Warm", + "Warm-hearted", + "Warranted", + "Wealthy", + "Weighty", + "Welcome", + "Welcomed", + "Welcoming", + "Weleful", + "Welfaring", + "Well", + "Well-behaved", + "Well-built", + "Well-disposed", + "Well-established", + "Well-founded", + "Well-grounded", + "Well-informed", + "Well-intentioned", + "Well-known", + "Well-liked", + "Well-made", + "Well-meaning", + "Well-planned", + "Well-read", + "Well-received", + "Well-spoken", + "Well-suited", + "Well-timed", + "Welsome", + "Whimsical", + "Whiz-bang", + "Whole", + "Wholehearted", + "Wholesome", + "Whopping", + "Wide-awake", + "Widely used", + "Willed", + "Willing", + "Winged", + "Winning", + "Winsome", + "Wired", + "Wise", + "With it", + "Within reach", + "Without equal", + "Witty", + "Wizard", + "Wizardly", + "Won", + "Wonderful", + "Wondrous", + "Workable", + "World-class", + "Worldly", + "Worldly-wise", + "Worshipful", + "Worth", + "Worthwhile", + "Worthy"], + /*y*/ ["Yern", + "Young", + "Young-at-Heart", + "Youthful", + "Yummy"], + /*z*/ ["Zaftig", + "Zany", + "Zappy", + "Zazzy", + "Zealed", + "Zealful", + "Zealous", + "Zestful", + "Zesty", + "Zingy", + "Zippy", + "Zootrophic", + "Zooty"], +]; + +const ANIMALS = [ + [ + "Aardvark", + "Abyssinian", + "Affenpinscher", + "Akbash", + "Akita", + "Albatross", + "Alligator", + "Alpaca", + "Angelfish", + "Ant", + "Anteater", + "Antelope", + "Ape", + "Armadillo", + "Avocet", + "Axolotl", + ], + [ + "Baboon", + "Badger", + "Balinese", + "Bandicoot", + "Barb", + "Barnacle", + "Barracuda", + "Bat", + "Beagle", + "Bear", + "Beaver", + "Bee", + "Beetle", + "Binturong", + "Bird", + "Birman", + "Bison", + "Bloodhound", + "Boar", + "Bobcat", + "Bombay", + "Bongo", + "Bonobo", + "Booby", + "Budgerigar", + "Buffalo", + "Bulldog", + "Bullfrog", + "Burmese", + "Butterfly" + ], + [ + "Caiman", + "Camel", + "Capybara", + "Caracal", + "Caribou", + "Cassowary", + "Cat", + "Caterpillar", + "Catfish", + "Cattle", + "Centipede", + "Chameleon", + "Chamois", + "Cheetah", + "Chicken", + "Chihuahua", + "Chimpanzee", + "Chinchilla", + "Chinook", + "Chipmunk", + "Chough", + "Cichlid", + "Clam", + "Coati", + "Cobra", + "Cockroach", + "Cod", + "Collie", + "Coral", + "Cormorant", + "Cougar", + "Cow", + "Coyote", + "Crab", + "Crane", + "Crocodile", + "Crow", + "Curlew", + "Cuscus", + "Cuttlefish" + ], + [ + "Dachshund", + "Dalmatian", + "Deer", + "Dhole", + "Dingo", + "Dinosaur", + "Discus", + "Dodo", + "Dog", + "Dogfish", + "Dolphin", + "Donkey", + "Dormouse", + "Dotterel", + "Dove", + "Dragonfly", + "Drever", + "Duck", + "Dugong", + "Dunker", + "Dunlin" + ], + [ + "Eagle", + "Earwig", + "Echidna", + "Eel", + "Eland", + "Elephant", + "Elephant seal", + "Elk", + "Emu" + ], + [ + "Falcon", + "Ferret", + "Finch", + "Fish", + "Flamingo", + "Flounder", + "Fly", + "Fossa", + "Fox", + "Frigatebird", + "Frog" + ], + [ + "Galago", + "Gar", + "Gaur", + "Gazelle", + "Gecko", + "Gerbil", + "Gharial", + "Giant Panda", + "Gibbon", + "Giraffe", + "Gnat", + "Gnu", + "Goat", + "Goldfinch", + "Goldfish", + "Goose", + "Gopher", + "Gorilla", + "Goshawk", + "Grasshopper", + "Greyhound", + "Grouse", + "Guanaco", + "Guinea fowl", + "Guinea pig", + "Gull", + "Guppy" + ], + [ + "Hamster", + "Hare", + "Harrier", + "Havanese", + "Hawk", + "Hedgehog", + "Heron", + "Herring", + "Himalayan", + "Hippopotamus", + "Hornet", + "Horse", + "Human", + "Hummingbird", + "Hyena" + ], + [ + "Ibis", + "Iguana", + "Impala", + "Indri", + "Insect" + ], + [ + "Jackal", + "Jaguar", + "Javanese", + "Jay", + "Jay, Blue", + "Jellyfish" + ],[ + "Kakapo", + "Kangaroo", + "Kingfisher", + "Kiwi", + "Koala", + "Komodo dragon", + "Kouprey", + "Kudu" + ], + [ + "Labradoodle", + "Ladybird", + "Lapwing", + "Lark", + "Lemming", + "Lemur", + "Leopard", + "Liger", + "Lion", + "Lionfish", + "Lizard", + "Llama", + "Lobster", + "Locust", + "Loris", + "Louse", + "Lynx", + "Lyrebird" + ], + [ + "Macaw", + "Magpie", + "Mallard", + "Maltese", + "Manatee", + "Mandrill", + "Markhor", + "Marten", + "Mastiff", + "Mayfly", + "Meerkat", + "Millipede", + "Mink", + "Mole", + "Molly", + "Mongoose", + "Mongrel", + "Monkey", + "Moorhen", + "Moose", + "Mosquito", + "Moth", + "Mouse", + "Mule" + ], + [ + "Narwhal", + "Neanderthal", + "Newfoundland", + "Newt", + "Nightingale", + "Numbat" + ], + [ + "Ocelot", + "Octopus", + "Okapi", + "Olm", + "Opossum", + "Orang-utan", + "Oryx", + "Ostrich", + "Otter", + "Owl", + "Ox", + "Oyster" + ], + [ + "Pademelon", + "Panther", + "Parrot", + "Partridge", + "Peacock", + "Peafowl", + "Pekingese", + "Pelican", + "Penguin", + "Persian", + "Pheasant", + "Pig", + "Pigeon", + "Pika", + "Pike", + "Piranha", + "Platypus", + "Pointer", + "Pony", + "Poodle", + "Porcupine", + "Porpoise", + "Possum", + "Prairie Dog", + "Prawn", + "Puffin", + "Pug", + "Puma" + ], + [ + "Quail", + "Quelea", + "Quetzal", + "Quokka", + "Quoll" + ], + [ + "Rabbit", + "Raccoon", + "Ragdoll", + "Rail", + "Ram", + "Rat", + "Rattlesnake", + "Raven", + "Red deer", + "Red panda", + "Reindeer", + "Rhinoceros", + "Robin", + "Rook", + "Rottweiler", + "Ruff" + ], + [ + "Salamander", + "Salmon", + "Sand Dollar", + "Sandpiper", + "Saola", + "Sardine", + "Scorpion", + "Sea lion", + "Sea Urchin", + "Seahorse", + "Seal", + "Serval", + "Shark", + "Sheep", + "Shrew", + "Shrimp", + "Siamese", + "Siberian", + "Skunk", + "Sloth", + "Snail", + "Snake", + "Snowshoe", + "Somali", + "Sparrow", + "Spider", + "Sponge", + "Squid", + "Squirrel", + "Starfish", + "Starling", + "Stingray", + "Stinkbug", + "Stoat", + "Stork", + "Swallow", + "Swan" + ], + [ + "Tang", + "Tapir", + "Tarsier", + "Termite", + "Tetra", + "Tiffany", + "Tiger", + "Toad", + "Tortoise", + "Toucan", + "Tropicbird", + "Trout", + "Tuatara", + "Turkey", + "Turtle" + ], + [ + "Uakari", + "Uguisu", + "Umbrellabird" + ], + [ + "Vicuña", + "Viper", + "Vulture" + ], + [ + "Wallaby", + "Walrus", + "Warthog", + "Wasp", + "Water buffalo", + "Weasel", + "Whale", + "Whippet", + "Wildebeest", + "Wolf", + "Wolverine", + "Wombat", + "Woodcock", + "Woodlouse", + "Woodpecker", + "Worm", + "Wrasse", + "Wren" + ], + [ + "Yak" + ], + [ + "Zebra", + "Zebu", + "Zonkey", + "Zorse" + ] +]; + +module.exports.generate = function() { + const index = Math.round((Math.random()*(ADJECTIVES.length-1))); + let name; + do { + name = ( + '🚀 '+ADJECTIVES[index][Math.round(Math.random()*(ADJECTIVES[index].length-1))]+ + ' '+ + ANIMALS[index][Math.round(Math.random()*(ANIMALS[index].length-1))]+' 🚀' + ).replace(/\s+/g, ' '); + } while( name.length > MAXLENGTH ); + + return name +} + diff --git a/install/generator-cyphernode/generators/app/prompters/200_lightning.js b/install/generator-cyphernode/generators/app/prompters/200_lightning.js index 5d758a4..afc0ef3 100644 --- a/install/generator-cyphernode/generators/app/prompters/200_lightning.js +++ b/install/generator-cyphernode/generators/app/prompters/200_lightning.js @@ -21,7 +21,7 @@ const templates = { }; module.exports = { - name: function() { + name: function() { return name; }, prompts: function( utils ) { @@ -42,7 +42,7 @@ module.exports = { name: 'LND', value: 'lnd' } - + ] }, */ @@ -61,7 +61,12 @@ module.exports = { name: 'lightning_nodename', default: utils._getDefault( 'lightning_nodename' ), filter: utils._trimFilter, - validate: utils._notEmptyValidator, + validate: (input)=>{ + if( !input.trim() ) { + return true; + } + return utils._lightningNodeNameValidator(input); + }, message: prefix()+'What name has your lightning node?'+utils._getHelp('lightning_nodename'), }, { @@ -70,7 +75,12 @@ module.exports = { name: 'lightning_nodecolor', default: utils._getDefault( 'lightning_nodecolor' ), filter: utils._trimFilter, - validate: utils._colorValidator, + validate: (input)=>{ + if( !input.trim() ) { + return true; + } + return utils._colorValidator(input); + }, message: prefix()+'What color has your lightning node?'+utils._getHelp('lightning_nodecolor'), }]; }, diff --git a/install/generator-cyphernode/generators/app/templates/lightning/c-lightning/config b/install/generator-cyphernode/generators/app/templates/lightning/c-lightning/config index 79aa05e..2ced26c 100644 --- a/install/generator-cyphernode/generators/app/templates/lightning/c-lightning/config +++ b/install/generator-cyphernode/generators/app/templates/lightning/c-lightning/config @@ -4,8 +4,12 @@ network=testnet <% } else if (net === 'mainnet') { %> network=bitcoin <% } %> +<% if( lightning_nodename ) { %> alias=<%= lightning_nodename %> +<% } %> +<% if( lightning_nodecolor ) { %> rgb=<%= lightning_nodecolor %> +<% } %> bitcoin-rpcconnect=<%= (bitcoin_mode === 'internal')?'bitcoin':bitcoin_node_ip %> bitcoin-rpcuser=<%= bitcoin_rpcuser %> bitcoin-rpcpassword=<%= bitcoin_rpcpassword %>