File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 11import { deleteAssets } from '@junobuild/core' ;
22import { red } from 'kleur' ;
3+ import ora from 'ora' ;
34import { DAPP_COLLECTION } from '../constants/constants' ;
45import { junoConfigExist , readSatelliteConfig } from '../utils/satellite.config.utils' ;
56import { satelliteParameters } from '../utils/satellite.utils' ;
@@ -12,8 +13,14 @@ export const clear = async () => {
1213
1314 const { satelliteId} = await readSatelliteConfig ( ) ;
1415
15- await deleteAssets ( {
16- collection : DAPP_COLLECTION ,
17- satellite : satelliteParameters ( satelliteId )
18- } ) ;
16+ const spinner = ora ( 'Clearing dapp assets...' ) . start ( ) ;
17+
18+ try {
19+ await deleteAssets ( {
20+ collection : DAPP_COLLECTION ,
21+ satellite : satelliteParameters ( satelliteId )
22+ } ) ;
23+ } finally {
24+ spinner . stop ( ) ;
25+ }
1926} ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import {lstatSync, readdirSync} from 'fs';
77import { readFile } from 'fs/promises' ;
88import mime from 'mime-types' ;
99import minimatch from 'minimatch' ;
10+ import ora from 'ora' ;
1011import { basename , extname , join } from 'path' ;
1112import { DAPP_COLLECTION , SOURCE } from '../constants/constants' ;
1213import { SatelliteConfigHeaders } from '../types/satellite.config' ;
@@ -58,8 +59,14 @@ export const deploy = async () => {
5859 } ) ;
5960 } ;
6061
61- const promises = sourceFiles . map ( upload ) ;
62- await Promise . all ( promises ) ;
62+ const spinner = ora ( `Uploading...` ) . start ( ) ;
63+
64+ try {
65+ const promises = sourceFiles . map ( upload ) ;
66+ await Promise . all ( promises ) ;
67+ } finally {
68+ spinner . stop ( ) ;
69+ }
6370} ;
6471
6572const configHeaders = ( {
You can’t perform that action at this time.
0 commit comments