nos / create-nos-dapp

CLI tool to generate a new nOS dApp
53 stars 35 forks source link

dApp names with numbers in them are not allowed in prompt #49

Open hal0x2328 opened 5 years ago

hal0x2328 commented 5 years ago

Expected Behavior

I should be allowed to choose a dApp name such as my-test-dapp-1 when prompted

Current Behavior

In the prompt, choosing a dApp name with a number in it fails with Please enter a valid project name

Entering the name on the command line with -n or --name does not have the regex check on name characters so it is possible to specify a dApp name with a number in it

Possible Solution

Add 0-9 to the regex for name sanity checks. Also, add sanity checking to the command-line arg parser to make the behavior consistent in both methods.

Steps to Reproduce (for bugs)

  1. Run create-nos-dapp with no arguments
  2. When prompted for the dApp name, enter a name with a number in it

Context

Minor impact, easy workaround, just reporting this for improved consistency/user-experience

Your Environment

jeroenptrs commented 5 years ago

Thanks @hal0x2328 for reporting! I will expand the regex :)