{"name":"@npmcli/agent","version":"3.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":"npm run eslint","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run eslint -- --fix","snap":"tap","posttest":"npm run lint","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"author":{"name":"GitHub Inc."},"license":"ISC","bugs":{"url":"https://github.com/npm/agent/issues"},"homepage":"https://github.com/npm/agent#readme","engines":{"node":"^18.17.0 || >=20.5.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.23.1","publish":"true"},"dependencies":{"agent-base":"^7.1.0","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","lru-cache":"^10.0.1","socks-proxy-agent":"^8.0.3"},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.1","minipass-fetch":"^3.0.3","nock":"^13.2.7","socksv5":"^0.0.6","tap":"^16.3.0"},"repository":{"type":"git","url":"git+https://github.com/npm/agent.git"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"_id":"@npmcli/agent@3.0.0","gitHead":"94f346d882458ac9481d015c55057d15f5899bf1","_nodeVersion":"22.7.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==","shasum":"1685b1fbd4a1b7bb4f930cbb68ce801edfe7aa44","tarball":"http://registry-npm.ywwl.com/@npmcli/agent/download/@npmcli/agent-3.0.0.tgz","fileCount":8,"unpackedSize":17748,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@npmcli%2fagent@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICpkjG67uQgAng68ISY3Qa7DY7ygKj421oof28Z4U7btAiAvLFWuWD4g+Gv0kq8lUGuiZiYDSrkpyKoUbIWWmLMfCQ=="}],"size":6044,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-3.0.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agent_3.0.0_1724711033583_0.409122926314782"},"_hasShrinkwrap":false,"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","publish_time":1724711033754,"maintainers":[{"name":"hashtagchris","email":"hashtagchris@github.com"},{"name":"reggi","email":"reggi@github.com"},{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"fritzy","email":"fritzy@github.com"},{"name":"gar","email":"gar+npm@danger.computer"}],"_cnpm_publish_time":1724711033754,"dist-tags":{"latest":"5.0.2"}}