File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 6161 "test:prepare" : " cross-env VITEST=1 npm run build" ,
6262 "test:unit" : " vitest --run" ,
6363 "test:unit:coverage" : " vitest run --coverage" ,
64- "test:unit:update-snapshots" : " vitest --update" ,
6564 "test-ci" : " run-s test:*" ,
65+ "testu" : " npm run build:dist; VITEST=1 npm run build:test-dist ; npm run test:unit -- -u" ,
6666 "update" : " run-p --aggregate-output update:**" ,
6767 "update:deps" : " npx --yes npm-check-updates"
6868 },
Original file line number Diff line number Diff line change @@ -48,6 +48,20 @@ export async function listRepos({
4848 return
4949 }
5050
51+ spinner . stop ( )
52+
53+ if ( outputJson ) {
54+ const data = result . data . results . map ( o => ( {
55+ id : o . id ,
56+ name : o . name ,
57+ visibility : o . visibility ,
58+ defaultBranch : o . default_branch ,
59+ archived : o . archived
60+ } ) )
61+ console . log ( JSON . stringify ( data , null , 2 ) )
62+ return
63+ }
64+
5165 const options = {
5266 columns : [
5367 { field : 'id' , name : colors . magenta ( 'ID' ) } ,
@@ -58,5 +72,5 @@ export async function listRepos({
5872 ]
5973 }
6074
61- spinner . stop ( chalkTable ( options , result . data . results ) )
75+ console . log ( chalkTable ( options , result . data . results ) )
6276}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export function handleUnsuccessfulApiResponse<T extends SocketSdkOperations>(
2828 spinner . stop ( )
2929 throw new AuthError ( message )
3030 }
31- spinner . error (
31+ spinner . errorAndStop (
3232 `${ colors . bgRed ( colors . white ( 'API returned an error:' ) ) } ${ message } `
3333 )
3434 process . exit ( 1 )
You can’t perform that action at this time.
0 commit comments