@@ -88,13 +88,14 @@ function setupCommand(
8888 const cli = meow (
8989 `
9090 Usage
91- $ ${ name } <org slug>
91+ $ ${ name }
9292
9393 Options
9494 ${ printFlagList ( flags , 6 ) }
9595
9696 Examples
97- $ ${ name } FakeOrg
97+ $ ${ name }
98+ $ ${ name } --perPage=5 --page=2 --direction=asc --filter=joke
9899 ` ,
99100 {
100101 argv,
@@ -135,7 +136,7 @@ type ThreatResult = {
135136}
136137
137138async function fetchThreatFeed (
138- { per_page, page, direction, filter } : CommandContext ,
139+ { per_page, page, direction, filter, outputJson } : CommandContext ,
139140 spinner : Ora ,
140141 apiKey : string
141142) : Promise < void > {
@@ -146,6 +147,10 @@ async function fetchThreatFeed(
146147
147148 spinner . stop ( )
148149
150+ if ( outputJson ) {
151+ return console . log ( data )
152+ }
153+
149154 const screen = blessed . screen ( )
150155
151156 var table = contrib . table (
@@ -159,7 +164,7 @@ async function fetchThreatFeed(
159164 , height : '100%'
160165 , border : { type : "line" , fg : "cyan" }
161166 , columnSpacing : 5 //in chars
162- , columnWidth : [ 10 , 25 , 10 , 20 , 20 ] /*in chars*/ } )
167+ , columnWidth : [ 10 , 30 , 10 , 20 , 20 ] /*in chars*/ } )
163168
164169 // allow control the table with the keyboard
165170 table . focus ( )
0 commit comments