{"_id":"@npmcli/agent","_rev":"286809","name":"@npmcli/agent","description":"the http/https agent used by the npm cli","dist-tags":{"latest":"2.1.1"},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"time":{"modified":"2023-09-20T22:00:37.000Z","created":"2022-12-08T18:12:34.451Z","2.1.1":"2023-09-08T17:27:34.724Z","2.1.0":"2023-08-30T17:17:26.021Z","2.0.0":"2023-08-15T17:25:22.586Z","1.1.0":"2023-05-16T16:25:55.861Z","1.0.0":"2022-12-08T18:12:34.451Z"},"users":{},"author":{"name":"GitHub Inc."},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"versions":{"2.1.1":{"name":"@npmcli/agent","version":"2.1.1","description":"the http/https agent used by the npm cli","main":"lib/index.js","scripts":{"gencerts":"bash scripts/create-cert.sh","test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^16.14.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.18.0","publish":"true","ciVersions":["16.14.0","16.x","18.0.0","18.x"],"npmSpec":"next-9"},"dependencies":{"http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","lru-cache":"^10.0.1","socks-proxy-agent":"^8.0.1"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.18.0","minipass-fetch":"^3.0.3","nock":"^13.2.7","simple-socks":"^2.2.2","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"_id":"@npmcli/agent@2.1.1","gitHead":"c51096b1903422fe14011871add7c66f9ba27189","_nodeVersion":"18.17.1","_npmVersion":"10.0.0","dist":{"shasum":"31095663b8feef27ec3eccd5254a35b8fc70353a","size":6380,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-2.1.1.tgz","tarball":"http://name.csiicloud.com:7001/@npmcli/agent/download/@npmcli/agent-2.1.1.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_2.1.1_1694194054546_0.6067740346025494"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-08T17:27:34.724Z","publish_time":1694194054724,"_source_registry_name":"default","_cnpm_publish_time":1694194054724},"2.1.0":{"name":"@npmcli/agent","version":"2.1.0","description":"the http/https agent used by the npm cli","main":"lib/index.js","scripts":{"gencerts":"bash scripts/create-cert.sh","test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^16.14.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.18.0","publish":"true","ciVersions":["16.14.0","16.x","18.0.0","18.x"]},"dependencies":{"http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","lru-cache":"^10.0.1","socks-proxy-agent":"^8.0.1"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.18.0","minipass-fetch":"^3.0.3","nock":"^13.2.7","simple-socks":"^2.2.2","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"_id":"@npmcli/agent@2.1.0","gitHead":"4b2c4d1a4d005748cd9bf5066cee29f31c56d11e","_nodeVersion":"18.17.1","_npmVersion":"9.8.1","dist":{"shasum":"24b5ddb434cdbd94d553e6cac761638e0c49d36c","size":6406,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/@npmcli/agent/download/@npmcli/agent-2.1.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_2.1.0_1693415845862_0.1550005051318517"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-30T17:17:26.021Z","publish_time":1693415846021,"_source_registry_name":"default","_cnpm_publish_time":1693415846021},"2.0.0":{"name":"@npmcli/agent","version":"2.0.0","description":"the http/https agent used by the npm cli","main":"lib/index.js","scripts":{"gencerts":"bash scripts/create-cert.sh","test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^16.14.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.18.0","publish":"true","ciVersions":["16.14.0","16.x","18.0.0","18.x"]},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.18.0","minipass-fetch":"^3.0.3","nock":"^13.2.7","simple-socks":"^2.2.2","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"dependencies":{"lru-cache":"^10.0.1","socks":"^2.7.1"},"_id":"@npmcli/agent@2.0.0","gitHead":"8089b84050960d9d148ca1b3818c5514b53e99a6","_nodeVersion":"18.17.0","_npmVersion":"9.8.1","dist":{"shasum":"d8c4246c30c1ab55bb02970433acfeba85906ee7","size":5863,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@npmcli/agent/download/@npmcli/agent-2.0.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_2.0.0_1692120322334_0.308318601426778"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-15T17:25:22.586Z","publish_time":1692120322586,"_source_registry_name":"default","_cnpm_publish_time":1692120322586},"1.1.0":{"name":"@npmcli/agent","version":"1.1.0","description":"the http/https agent used by the npm cli","main":"lib/index.js","scripts":{"gencerts":"bash scripts/create-cert.sh","test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.15.1","publish":"true"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.15.1","minipass-fetch":"^3.0.3","nock":"^13.2.7","simple-socks":"^2.2.2","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"dependencies":{"lru-cache":"^7.18.3","socks":"^2.7.1"},"gitHead":"0f2fa6be0d7537869247e39cd78d1930c4e7db53","_id":"@npmcli/agent@1.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.6.6","dist":{"shasum":"c3dd498bdbb484358869b961739bb1e8cf408208","size":5854,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/@npmcli/agent/download/@npmcli/agent-1.1.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_1.1.0_1684254355684_0.41897001204164774"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-16T16:25:55.861Z","publish_time":1684254355861,"_source_registry_name":"default","_cnpm_publish_time":1684254355861},"1.0.0":{"name":"@npmcli/agent","version":"1.0.0","description":"the http/https agent used by the npm cli","main":"lib/index.js","scripts":{"test":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","snap":"tap","posttest":"npm run lint"},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.11.0"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.11.0","nock":"^13.2.7","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"gitHead":"41bb73449da453e7c2b3c2bd1f4e90fbb2f77eb5","_id":"@npmcli/agent@1.0.0","_nodeVersion":"16.16.0","_npmVersion":"9.1.3","dist":{"shasum":"ad445c94a9c742643d2b71e8b45beb256284fd08","size":1713,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@npmcli/agent/download/@npmcli/agent-1.0.0.tgz"},"_npmUser":{"name":"nlf","email":"quitlahok@gmail.com"},"directories":{},"maintainers":[{"name":"fritzy","email":""},{"name":"gar","email":""},{"name":"lukekarrys","email":""},{"name":"npm-cli-ops","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_1.0.0_1670523154294_0.7138238512211916"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-08T18:23:46.260Z","publish_time":1670523154451,"_cnpm_publish_time":1670523154451}},"readme":"## @npmcli/agent\n\nA pair of Agent implementations for nodejs that provide consistent keep-alives, granular timeouts, dns caching, and proxy support.\n\n### Usage\n\n```js\nconst { getAgent, HttpAgent } = require('@npmcli/agent')\nconst fetch = require('minipass-fetch')\n\nconst main = async () => {\n    // if you know what agent you need, you can create one directly\n    const agent = new HttpAgent(agentOptions)\n    // or you can use the getAgent helper, it will determine and create an Agent\n    // instance for you as well as reuse that agent for new requests as appropriate\n    const agent = getAgent('https://registry.npmjs.org/npm', agentOptions)\n    // minipass-fetch is just an example, this will work for any http client that\n    // supports node's Agents\n    const res = await fetch('https://registry.npmjs.org/npm', { agent })\n}\n\nmain()\n```\n\n### Options\n\nAll options supported by the node Agent implementations are supported here, see [the docs](https://nodejs.org/api/http.html#new-agentoptions) for those.\n\nOptions that have been added by this module include:\n\n- `family`: what tcp family to use, can be `4` for IPv4, `6` for IPv6 or `0` for both.\n- `proxy`: a URL to a supported proxy, currently supports `HTTP CONNECT` based http/https proxies as well as socks4 and 5.\n- `dns`: configuration for the built-in dns cache\n    - `ttl`: how long (in milliseconds) to keep cached dns entries, defaults to `5 * 60 * 100 (5 minutes)`\n    - `lookup`: optional function to override how dns lookups are performed, defaults to `require('dns').lookup`\n- `timeouts`: a set of granular timeouts, all default to `0`\n    - `connection`: time between initiating connection and actually connecting\n    - `idle`: time between data packets (if a top level `timeout` is provided, it will be copied here)\n    - `response`: time between sending a request and receiving a response\n    - `transfer`: time between starting to receive a request and consuming the response fully\n","_attachments":{},"homepage":"https://github.com/npm/agent#readme","bugs":{"url":"https://github.com/npm/agent/issues"},"license":"ISC"}