File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ interface RunServerOptions {
1616 verbose: boolean
1717 business: boolean
1818 manual: boolean
19- rateLimit: number
19+ rateLimit: number | undefined
2020}
2121
2222export async function runServer ( options : RunServerOptions ) : Promise < void > {
@@ -72,16 +72,20 @@ const main = defineCommand({
7272 default : false ,
7373 description : "Enable manual request approval" ,
7474 } ,
75- rateLimit : {
75+ "rate-limit" : {
7676 alias : "r" ,
7777 type : "string" ,
78- default : "5" ,
7978 description : "Rate limit in seconds between requests" ,
8079 } ,
8180 } ,
8281 run ( { args } ) {
82+ const rateLimitRaw = args [ "rate-limit" ]
83+ const rateLimit =
84+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
85+ rateLimitRaw === undefined ? undefined : Number . parseInt ( rateLimitRaw , 10 )
86+
8387 const port = Number . parseInt ( args . port , 10 )
84- const rateLimit = Number . parseInt ( args . rateLimit , 10 )
88+ // const rateLimit = Number.parseInt(args["rate-limit"] , 10)
8589
8690 return runServer ( {
8791 port,
You can’t perform that action at this time.
0 commit comments