agentkeepalive
Advanced tools
Comparing version 4.5.0 to 4.6.0
@@ -9,3 +9,3 @@ import * as http from 'http'; | ||
declare class HttpAgent extends http.Agent { | ||
declare class _HttpAgent extends http.Agent { | ||
constructor(opts?: AgentKeepAlive.HttpOptions); | ||
@@ -29,3 +29,6 @@ readonly statusChanged: boolean; | ||
declare class AgentKeepAlive extends HttpAgent {} | ||
/** | ||
* @deprecated instead use `import { HttpAgent } from 'agentkeepalive'; or `const HttpAgent = require('agentkeepalive').HttpAgent;` | ||
*/ | ||
declare class AgentKeepAlive extends _HttpAgent {} | ||
@@ -56,2 +59,3 @@ declare namespace AgentKeepAlive { | ||
export class HttpAgent extends _HttpAgent {} | ||
export class HttpsAgent extends https.Agent { | ||
@@ -58,0 +62,0 @@ constructor(opts?: HttpsOptions); |
'use strict'; | ||
module.exports = require('./lib/agent'); | ||
const HttpAgent = require('./lib/agent'); | ||
module.exports = HttpAgent; | ||
module.exports.HttpAgent = HttpAgent; | ||
module.exports.HttpsAgent = require('./lib/https_agent'); | ||
module.exports.constants = require('./lib/constants'); |
{ | ||
"name": "agentkeepalive", | ||
"version": "4.5.0", | ||
"version": "4.6.0", | ||
"description": "Missing keepalive http.Agent", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -64,5 +64,5 @@ # agentkeepalive | ||
const http = require('http'); | ||
const Agent = require('agentkeepalive'); | ||
const HttpAgent = require('agentkeepalive').HttpAgent; | ||
const keepaliveAgent = new Agent({ | ||
const keepaliveAgent = new HttpAgent({ | ||
maxSockets: 100, | ||
@@ -166,4 +166,4 @@ maxFreeSockets: 10, | ||
const http = require('http'); | ||
const Agent = require('agentkeepalive'); | ||
const agent = new Agent(); | ||
const HttpAgent = require('agentkeepalive').HttpAgent; | ||
const agent = new HttpAgent(); | ||
@@ -170,0 +170,0 @@ const req = http |
485
33916
9