{"name":"@npmcli/agent","version":"4.0.2","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@4.0.2","maintainers":[{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"reggi","email":"reggi@github.com"},{"name":"owlstronaut","email":"owlstronaut@github.com"}],"homepage":"https://github.com/npm/agent#readme","bugs":{"url":"https://github.com/npm/agent/issues"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"dist":{"shasum":"9e659c2474294cb88bd382fef5d3857dc14fcbf6","tarball":"http://registry-npm.ywwl.com/@npmcli/agent/download/@npmcli/agent-4.0.2.tgz","fileCount":8,"integrity":"sha512-EUEuWAxnL07Sp5/iC/1X6Xj+XThUvnbei9zfRWZdEXa7lss9RTHMhAHBeg+MZ5To9s/gGaSI+UwZTPdYMvKSeg==","signatures":[{"sig":"MEUCIQC2bCatqICz5Kgn286gEZbFEZWkatZc39yAH1v7aiqbeQIgLdpS3IGviy/5VIPCl7OtQIkj9O9UB8kE79DNQyAiOd8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@npmcli%2fagent@4.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19797,"size":6730,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-4.0.2.tgz"},"main":"lib/index.js","engines":{"node":"^20.17.0 || >=22.9.0"},"gitHead":"db7852869c74ceb8985d7c36b291a2e7a866741c","scripts":{"lint":"npm run eslint","snap":"tap","test":"tap","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","lintfix":"npm run eslint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:42a6187b-0179-4865-a03c-61231aa4b54a"}},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"11.12.1","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.30.0","updateNpm":false,"latestCiVersion":24,"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"24.15.0","dependencies":{"lru-cache":"^11.2.1","agent-base":"^7.1.0","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","socks-proxy-agent":"^8.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^14.0.3","ip-address":"^10.1.0","minipass-fetch":"^5.0.0","@npmcli/template-oss":"4.30.0","@npmcli/eslint-config":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_4.0.2_1779907592467_0.056438608056361916","host":"s3://npm-registry-packages-npm-production"},"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":1779907592621,"_cnpm_publish_time":1779907592621,"dist-tags":{"latest":"5.0.2"}}