{"name":"@npmcli/agent","version":"1.0.0","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@1.0.0","maintainers":[{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"fritzy","email":"fritzy@github.com"},{"name":"darcyclarke","email":"darcy@darcyclarke.me"},{"name":"nlf","email":"quitlahok@gmail.com"},{"name":"gar","email":"gar+npm@danger.computer"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"homepage":"https://github.com/npm/agent#readme","bugs":{"url":"https://github.com/npm/agent/issues"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"dist":{"shasum":"ad445c94a9c742643d2b71e8b45beb256284fd08","tarball":"http://registry-npm.ywwl.com/@npmcli/agent/download/@npmcli/agent-1.0.0.tgz","fileCount":2,"integrity":"sha512-ixBdzDFa1g7G8IqTEtXt/WacWelelyDvlIpjiZY97iIZux1MwlJEtVkPCvR3W6Z/ptRSV8CfUnT4DrwL2+BRsw==","signatures":[{"sig":"MEUCIQChwB8hhjin6AV8toFU342bWpTInKojmLREIbiY8u1g8gIgDDKyMXxz8EsOCaOAkSm6Hyw9dDG/xd1ApW/3H5sU+LE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkikSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJew//UBGWR12OIxHNxOh5YA9sDpqUqxHicYHPQ71N8qa+TufVqxvl\r\nI0GomfBxPUxLrGIe6cgHnLwH6t/LjG3CfoTOrHu+3yu3ql2bptVPX5PGdcCl\r\ntcBAuom1c4EYj9Buo63TEVsxXXWMMncMlaryf25vH/EdbWzbg6kBj48t+E4y\r\nPaZsgnaT0VIn98QlR1EZpum3OrDubgtvUZHaJZ4wx4eQYDq21R5gw732bCQf\r\nwn7Clj8kKRHTNSaxCcIhzuHvZBD7F2+ZFJvHUJSBCa1+s3oOItDvp7BGfG1x\r\nP60mh3P8Gqrt86BZrzEYiKlriUeMzY8aV6Jx2TppPFVnRwQrrPVRTOl00Hjh\r\nB3/FQA3tZqVOXf/ZOyBoVVBagnVSD2BG9z50HHcUPEK8bHdb5pC4UnQ8oXHl\r\nBDWDkn7vWbI89Fagds6CPycicW84waLzwq7w1YoyOTPvfXkRWbGZg+2R++fT\r\nRSvf62YvDOOiZYcqnBJ8yBRpOJEBk7CsIuvrT/TD0raSV7ZEJle7IS9/2PuS\r\nMEbaEjsDic+/t9goEaBGwj9Qp3lSry/tCJYxSUO539erEaFO/sy1yFtku10Z\r\nXhNwiYkEjraYqCU9TYfozZW2nRSsj2JuzTa4isOgEfAbqQjpdGyZWdksUemb\r\nV+oaEcAz1VkvqahYaJ0nMk2AM81oAzhf/Ac=\r\n=y9ye\r\n-----END PGP SIGNATURE-----\r\n","size":1713,"noattachment":false,"key":"/@npmcli/agent/-/@npmcli/agent-1.0.0.tgz"},"main":"lib/index.js","engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"gitHead":"41bb73449da453e7c2b3c2bd1f4e90fbb2f77eb5","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"nlf","email":"quitlahok@gmail.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"9.1.3","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"version":"4.11.0","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"16.16.0","_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","@npmcli/template-oss":"4.11.0","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_1.0.0_1670523154294_0.7138238512211916","host":"s3://npm-registry-packages"},"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":1670523154451,"_cnpm_publish_time":1670523154451,"dist-tags":{"latest":"5.0.2"}}