@@ -32,13 +32,13 @@ const {
3232
3333class BaseCommand extends Command {
3434 // default error handler for app commands
35- async catch ( error ) {
35+ async catch ( error ) {
3636 const { flags } = await this . parse ( this . prototype )
3737 aioLogger . error ( error ) // debug log
3838 this . error ( flags . verbose && error . stack ? error . stack : error . message )
3939 }
4040
41- async init ( ) {
41+ async init ( ) {
4242 await super . init ( )
4343 // setup a prompt that outputs to stderr
4444 this . prompt = inquirer . createPromptModule ( { output : process . stderr } )
@@ -51,7 +51,7 @@ class BaseCommand extends Command {
5151 `aio-cli-plugin-app/${ vs ?. cliVersion } (${ vs ?. architecture } ; ${ vs ?. nodeVersion } ; ${ vs ?. shell } )`
5252 }
5353
54- async getLibConsoleCLI ( ) {
54+ async getLibConsoleCLI ( ) {
5555 if ( ! this . consoleCLI ) {
5656 // requires valid login
5757 const { accessToken, env } = await getAccessToken ( )
@@ -61,11 +61,11 @@ class BaseCommand extends Command {
6161 return this . consoleCLI
6262 }
6363
64- async cleanConsoleCLIOutput ( ) {
64+ async cleanConsoleCLIOutput ( ) {
6565 LibConsoleCLI . cleanStdOut ( )
6666 }
6767
68- async getAppExtConfigs ( flags , options = { } ) {
68+ async getAppExtConfigs ( flags , options = { } ) {
6969 const all = ( await this . getFullConfig ( options , flags ) ) . all
7070
7171 // default case: no flags, return all
@@ -96,7 +96,7 @@ class BaseCommand extends Command {
9696 return ret
9797 }
9898
99- async getRuntimeManifestConfigFile ( implName , flags ) {
99+ async getRuntimeManifestConfigFile ( implName , flags ) {
100100 let configKey
101101 if ( implName === APPLICATION_CONFIG_KEY ) {
102102 configKey = APPLICATION_CONFIG_KEY
@@ -112,7 +112,7 @@ class BaseCommand extends Command {
112112 return configData
113113 }
114114
115- async getEventsConfigFile ( implName , flags ) {
115+ async getEventsConfigFile ( implName , flags ) {
116116 let configKey
117117 if ( implName === APPLICATION_CONFIG_KEY ) {
118118 configKey = APPLICATION_CONFIG_KEY
@@ -128,7 +128,7 @@ class BaseCommand extends Command {
128128 return configData
129129 }
130130
131- async getConfigFileForKey ( fullKey , flags = { } ) {
131+ async getConfigFileForKey ( fullKey , flags = { } ) {
132132 // NOTE: the index returns undefined if the key is loaded from a legacy configuration file
133133 const fullConfig = await this . getFullConfig ( { } , flags )
134134 // full key like 'extensions.dx/excshell/1.runtimeManifest'
@@ -142,19 +142,18 @@ class BaseCommand extends Command {
142142 return configData || { }
143143 }
144144
145- async getFullConfig ( options = { } , flags = { } ) {
145+ async getFullConfig ( options = { } , flags = { } ) {
146146 // validate appConfig defaults to true unless flag is explicitly set to off
147147 const validateAppConfig = flags [ 'config-validation' ] !== false
148148 aioLogger . debug ( `validateAppConfig=${ validateAppConfig } ` )
149149
150150 if ( ! this . appConfig ) {
151- // this will explicitly set validateAppConfig=false if not set
152151 this . appConfig = await appConfig . load ( { ...options , validateAppConfig } )
153152 }
154153 return this . appConfig
155154 }
156155
157- getLaunchUrlPrefix ( ) {
156+ getLaunchUrlPrefix ( ) {
158157 // todo: it might make sense to have a value that defines if this is an ExC hosted app, or otherwise
159158 // so we can decide what type of url to return here.
160159 // at some point we could also just delete the .env value and return our expected url here.
@@ -173,19 +172,19 @@ class BaseCommand extends Command {
173172 return ( launchPrefix || defaultLaunchPrefix )
174173 }
175174
176- get pjson ( ) {
175+ get pjson ( ) {
177176 return this . config . pjson
178177 }
179178
180- get appName ( ) {
179+ get appName ( ) {
181180 return this . pjson . name
182181 }
183182
184- get appVersion ( ) {
183+ get appVersion ( ) {
185184 return this . pjson . version
186185 }
187186
188- preRelease ( ) {
187+ preRelease ( ) {
189188 this . log ( chalk . yellow ( 'Pre-release warning: This command is in pre-release, and not suitable for production.' ) )
190189 }
191190}
0 commit comments