@@ -16,7 +16,6 @@ import {
1616 createWriteStream ,
1717} from "fs" ;
1818import {
19- ux ,
2019 cliux ,
2120 flags ,
2221 HttpClient ,
@@ -145,9 +144,9 @@ export default class Create extends BaseCommand<typeof Create> {
145144 await this . registerTheAppOnDeveloperHub ( ) ;
146145
147146 // NOTE Step 3: Install dependencies
148- ux . action . start ( this . messages . INSTALL_DEPENDENCIES ) ;
147+ cliux . loader ( this . messages . INSTALL_DEPENDENCIES ) ;
149148 await this . installDependencies ( ) ;
150- ux . action . stop ( ) ;
149+ cliux . loader ( "done" ) ;
151150 this . log (
152151 this . $t ( this . messages . START_APP_COMMAND , {
153152 command : `cd "${ this . sharedConfig . folderPath } " && npm run start` ,
@@ -205,7 +204,7 @@ export default class Create extends BaseCommand<typeof Create> {
205204 * @memberof Create
206205 */
207206 async cloneBoilerplate ( ) : Promise < string > {
208- ux . action . start ( this . messages . CLONE_BOILERPLATE ) ;
207+ cliux . loader ( this . messages . CLONE_BOILERPLATE ) ;
209208 const tmpObj = tmp . fileSync ( ) ;
210209 const filePath = tmpObj . name ;
211210
@@ -220,7 +219,7 @@ export default class Create extends BaseCommand<typeof Create> {
220219 writer
221220 . on ( "finish" , function ( ) {
222221 resolve ( filePath ) ;
223- ux . action . stop ( ) ;
222+ cliux . loader ( "done" ) ;
224223 } )
225224 . on ( "error" , ( ) => {
226225 reject ( this . messages . FILE_GENERATION_FAILURE ) ;
@@ -259,9 +258,9 @@ export default class Create extends BaseCommand<typeof Create> {
259258 this . sharedConfig . folderPath = targetPath ;
260259
261260 await new Promise < void > ( ( resolve , reject ) => {
262- ux . action . start ( this . messages . UNZIP ) ;
261+ cliux . loader ( this . messages . UNZIP ) ;
263262 zip . extractAllToAsync ( dataDir , true , false , ( error ) => {
264- ux . action . stop ( ) ;
263+ cliux . loader ( "done" ) ;
265264
266265 if ( ! error ) {
267266 renameSync ( sourcePath , targetPath ) ;
@@ -306,7 +305,7 @@ export default class Create extends BaseCommand<typeof Create> {
306305 * @memberof Create
307306 */
308307 async registerTheAppOnDeveloperHub ( saveManifest : boolean = true , retry = 0 ) {
309- ux . action . start (
308+ cliux . loader (
310309 this . $t ( this . messages . REGISTER_THE_APP_ON_DEVELOPER_HUB , {
311310 appName : this . sharedConfig . appName ,
312311 } )
@@ -316,7 +315,7 @@ export default class Create extends BaseCommand<typeof Create> {
316315 . app ( )
317316 . create ( this . appData as AppData )
318317 . then ( ( response ) => {
319- ux . action . stop ( ) ;
318+ cliux . loader ( "done" ) ;
320319
321320 if ( this . sharedConfig . nameChanged ) {
322321 renameSync (
@@ -356,7 +355,7 @@ export default class Create extends BaseCommand<typeof Create> {
356355 this . log ( this . messages . APP_CREATION_SUCCESS , "info" ) ;
357356 } )
358357 . catch ( async ( error ) => {
359- ux . action . stop ( "Failed" ) ;
358+ cliux . loader ( "Failed" ) ;
360359 switch ( error . status ) {
361360 case 400 :
362361 this . log ( this . messages . APP_CREATION_CONSTRAINT_FAILURE , "error" ) ;
@@ -399,13 +398,13 @@ export default class Create extends BaseCommand<typeof Create> {
399398 */
400399 rollbackBoilerplate ( ) {
401400 if ( existsSync ( this . sharedConfig . folderPath ) ) {
402- ux . action . start ( this . messages . ROLLBACK_BOILERPLATE ) ;
401+ cliux . loader ( this . messages . ROLLBACK_BOILERPLATE ) ;
403402 rmSync ( this . sharedConfig . folderPath , {
404403 force : true ,
405404 recursive : true ,
406405 maxRetries : 3 ,
407406 } ) ;
408- ux . action . stop ( ) ;
407+ cliux . loader ( "done" ) ;
409408 }
410409 }
411410
0 commit comments