Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 193x 193x 193x 193x 193x 193x 193x 193x 193x 10x 10x 10x 10x 10x | import * as git from 'isomorphic-git/http/node';
import http from 'node:http';
import https from 'node:https';
// We use our own HTTP plugin, so we can customize the agent used for requests and configure a long timeout (default is 5 seconds).
const KEEP_ALIVE_TIMEOUT = 10 * 60 * 1000;
export function request(params) {
const agent = params.url.startsWith('https:')
? new https.Agent({ keepAlive: true, timeout: KEEP_ALIVE_TIMEOUT })
: new http.Agent({ keepAlive: true, timeout: KEEP_ALIVE_TIMEOUT });
return git.request({ ...params, agent });
}
|