File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,15 @@ export async function request(options: { type: string; url: string; headers: Rec
2323 headers : options . headers ,
2424 agent : new ProxyAgent ( ) ,
2525 secureContext,
26- timeout : 3000
26+ timeout : 60000 ,
2727 } ;
2828
29+ const offline_mode : boolean = ( process . env . OFFLINE_MODE ?? 'false' ) === 'true' ;
30+ if ( offline_mode ) {
31+ output . write ( 'Offline mode enabled, skipping request' , LogLevel . Warning ) ;
32+ return ;
33+ }
34+
2935 const plainHTTP = parsed . protocol === 'http:' || parsed . hostname === 'localhost' ;
3036 if ( plainHTTP ) {
3137 output . write ( 'Sending as plain HTTP request' , LogLevel . Warning ) ;
@@ -43,6 +49,7 @@ export async function request(options: { type: string; url: string; headers: Rec
4349 }
4450 } ) ;
4551 req . on ( 'timeout' , ( ) => {
52+ output . write ( 'Request timed out, aborting' , LogLevel . Warning ) ;
4653 req . destroy ( ) ;
4754 } ) ;
4855 req . on ( 'error' , reject ) ;
You can’t perform that action at this time.
0 commit comments