File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Ora from 'ora';
33import { setTimeout } from 'timers/promises' ;
44
55export default new Command ( )
6- . command ( 'login ' )
6+ . command ( 'auth ' )
77 . description ( 'Authenticate with Replexica Platform' )
88 . helpOption ( '-h, --help' , 'Show help' )
99 . argument ( '<email>' , 'Email address' )
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ import { Command } from 'commander';
22import Ora from 'ora' ;
33import { setTimeout } from 'timers/promises' ;
44
5- import loginCmd from './login.js' ;
5+ import authCmd from './auth.js' ;
6+ import translateCmd from './translate.js' ;
67
78export default new Command ( )
89 . name ( 'replexica' )
910 . description ( 'Replexica CLI' )
1011 . helpOption ( '-h, --help' , 'Show help' )
11- . addCommand ( loginCmd )
12+ . addCommand ( authCmd )
13+ . addCommand ( translateCmd )
1214 . action ( async ( options ) => {
1315 const spinner = Ora ( ) ;
1416 spinner . start ( 'Loading...' ) ;
Original file line number Diff line number Diff line change 1+ import { Command } from 'commander' ;
2+ import Ora from 'ora' ;
3+ import { setTimeout } from 'timers/promises' ;
4+
5+ export default new Command ( )
6+ . command ( 'translate' )
7+ . description ( 'Fetch translations from Replexica Platform' )
8+ . helpOption ( '-h, --help' , 'Show help' )
9+ . action ( async ( ) => {
10+ const spinner = Ora ( ) ;
11+ spinner . start ( 'Fetching translations...' ) ;
12+ await setTimeout ( 2000 ) ;
13+ spinner . succeed ( 'Translations fetched' ) ;
14+ } ) ;
You can’t perform that action at this time.
0 commit comments