@@ -21,9 +21,13 @@ export default class Launch extends BaseCommand<typeof Launch> {
2121 '<%= config.bin %> <%= command.id %> --data-dir <path/of/current/working/dir> --redeploy-last-upload' ,
2222 '<%= config.bin %> <%= command.id %> --config <path/to/launch/config/file> --type <options: GitHub|FileUpload>' ,
2323 '<%= config.bin %> <%= command.id %> --environment=<value> --redeploy-latest' ,
24+ // eslint-disable-next-line max-len
2425 '<%= config.bin %> <%= command.id %> --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value>' ,
26+ // eslint-disable-next-line max-len
2527 '<%= config.bin %> <%= command.id %> --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --server-command=<value>' ,
28+ // eslint-disable-next-line max-len
2629 '<%= config.bin %> <%= command.id %> --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --variable-type="Import variables from a stack" --alias=<value>' ,
30+ // eslint-disable-next-line max-len
2731 '<%= config.bin %> <%= command.id %> --config <path/to/launch/config/file> --type <options: GitHub|FileUpload> --name=<value> --environment=<value> --branch=<value> --build-command=<value> --framework=<option> --org=<value> --out-dir=<value> --variable-type="Manually add custom variables to the list" --env-variables="APP_ENV:prod, TEST_ENV:testVal"' ,
2832 ] ;
2933
@@ -62,6 +66,7 @@ export default class Launch extends BaseCommand<typeof Launch> {
6266 'variable-type' : Flags . string ( {
6367 options : [ ...config . variablePreparationTypeOptions ] ,
6468 description :
69+ // eslint-disable-next-line max-len
6570 '[optional] Provide a variable type. <options: Import variables from a stack|Manually add custom variables to the list|Import variables from the .env.local file|Skip adding environment variables>' ,
6671 } ) ,
6772 'show-variables' : Flags . boolean ( {
@@ -79,6 +84,7 @@ export default class Launch extends BaseCommand<typeof Launch> {
7984 } ) ,
8085 'env-variables' : Flags . string ( {
8186 description :
87+ // eslint-disable-next-line max-len
8288 '[optional] Provide the environment variables in the key:value format, separated by comma. For example: APP_ENV:prod, TEST_ENV:testVal.' ,
8389 } ) ,
8490 'redeploy-latest' : Flags . boolean ( {
@@ -103,7 +109,7 @@ export default class Launch extends BaseCommand<typeof Launch> {
103109 // NOTE pre-check: manage flow and set the provider value
104110 await this . preCheckAndInitConfig ( ) ;
105111 if ( ! this . sharedConfig . isExistingProject ) {
106- await this . selectProjectType ( ) ;
112+ await this . setProviderType ( ) ;
107113 }
108114 await this . manageFlowBasedOnProvider ( ) ;
109115 }
@@ -182,4 +188,14 @@ export default class Launch extends BaseCommand<typeof Launch> {
182188
183189 this . sharedConfig . provider = selectedProvider ;
184190 }
191+
192+ private async setProviderType ( ) : Promise < void > {
193+ const providerTypeFlag = this . flags . type ;
194+
195+ if ( providerTypeFlag ) {
196+ this . sharedConfig . provider = providerTypeFlag as Providers ;
197+ return ;
198+ }
199+ await this . selectProjectType ( ) ;
200+ }
185201}
0 commit comments