@@ -18,7 +18,6 @@ import { ApolloClient } from '@apollo/client/core';
1818import { writeFileSync , existsSync , readFileSync } from 'fs' ;
1919import { cliux as ux , ContentstackClient } from '@contentstack/cli-utilities' ;
2020
21- import config from '../config' ;
2221import { print , GraphqlApiClient , LogPolling , getOrganizations } from '../util' ;
2322import {
2423 branchesQuery ,
@@ -31,7 +30,6 @@ import {
3130import {
3231 LogFn ,
3332 ExitFn ,
34- Providers ,
3533 ConfigType ,
3634 AdapterConstructorInputs ,
3735 EmitMessage ,
@@ -148,31 +146,6 @@ export default class BaseClass {
148146 await this . initApolloClient ( ) ;
149147 }
150148
151- /**
152- * @method selectProjectType - select project type/provider/adapter
153- *
154- * @return {* } {Promise<void>}
155- * @memberof BaseClass
156- */
157- async selectProjectType ( ) : Promise < void > {
158- const choices = [
159- ...map ( config . supportedAdapters , ( provider ) => ( {
160- value : provider ,
161- name : `Continue with ${ provider } ` ,
162- } ) ) ,
163- { value : 'FileUpload' , name : 'Continue with FileUpload' } ,
164- ] ;
165-
166- const selectedProvider : Providers = await ux . inquire ( {
167- choices : choices ,
168- type : 'search-list' ,
169- name : 'projectType' ,
170- message : 'Choose a project type to proceed' ,
171- } ) ;
172-
173- this . config . provider = selectedProvider ;
174- }
175-
176149 /**
177150 * @method detectFramework - detect the project framework
178151 *
@@ -427,7 +400,6 @@ export default class BaseClass {
427400 * @memberof BaseClass
428401 */
429402 async connectToAdapterOnUi ( emit = true ) : Promise < void > {
430- await this . selectProjectType ( ) ;
431403
432404 if ( includes ( this . config . supportedAdapters , this . config . provider ) ) {
433405 const baseUrl = this . config . host . startsWith ( 'http' ) ? this . config . host : `https://${ this . config . host } ` ;
@@ -862,4 +834,4 @@ export default class BaseClass {
862834 } ) ;
863835 }
864836 }
865- }
837+ }
0 commit comments