Azure / ng-deploy-azure

Deploy Angular apps to Azure using the Angular CLI
MIT License
79 stars 37 forks source link

Account name invalid error, if project name is part uppercase or longer than 18 characters #61

Closed softchris closed 4 years ago

softchris commented 4 years ago

Describe the bug if you scaffold an Angular project with uppercase characters in it it will error out. Example ExampleApp will not work. The reason is the part of the project name is used to generate an account name. You get an error looking something like this: {"error":{"code":"AccountNameInvalid","message":"ExampleAppstatic is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only."}}', headers: HttpHeaders { _headersMap: [Object] }

Fix: ensure project name is lowercased before being used as part of account name. Also ensure project name is capped if needed as it must not be longer than 24 characters (Project name + static).

Expected behavior should be able to handle upper as well as lower case project names and if the project name is longer than 18 characters we need to cap it (project name - static)