mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 17:49:08 -05:00
ce7dc2be92
Adds support for running npm package lifecycle scripts, opted into via a new `--allow-scripts` flag. With this PR, when running `deno cache` (or `DENO_FUTURE=1 deno install`) you can specify the `--allow-scripts=pkg1,pkg2` flag to run lifecycle scripts attached to the given packages. Note at the moment this only works when `nodeModulesDir` is true (using the local resolver). When a package with un-run lifecycle scripts is encountered, we emit a warning suggesting things may not work and to try running lifecycle scripts. Additionally, if a package script implicitly requires `node-gyp` and it's not found on the system, we emit a warning. Extra things in this PR: - Extracted out bits of `task.rs` into a separate module for reuse - Added a couple fields to `process.config` in order to support `node-gyp` (it relies on a few variables being there) - Drive by fix to downloading new npm packages to test registry --- TODO: - [x] validation for allow-scripts args (make sure it looks like an npm package) - [x] make allow-scripts matching smarter - [ ] figure out what issues this closes --- Review notes: - This adds a bunch of deps to our test registry due to using `node-gyp`, so it's pretty noisy
1 line
No EOL
22 KiB
JSON
1 line
No EOL
22 KiB
JSON
{"_id":"@npmcli/agent","_rev":"12-b6ed589ec0944ee726611736d5dbaf98","name":"@npmcli/agent","description":"the http/https agent used by the npm cli","dist-tags":{"latest":"2.2.2"},"versions":{"1.0.0":{"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://localhost:4260/@npmcli/agent/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"},"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"}},"1.1.0":{"name":"@npmcli/agent","version":"1.1.0","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@1.1.0","maintainers":[{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"fritzy","email":"fritzy@github.com"},{"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":"c3dd498bdbb484358869b961739bb1e8cf408208","tarball":"http://localhost:4260/@npmcli/agent/agent-1.1.0.tgz","fileCount":12,"integrity":"sha512-I9g/2XFOkflxm5IDrGSjCcR2d12Jmic0di9w/WpJBbzYuSXmfgoL+WwEV7zY/ajxzQr7o4vSkEJh6piyFLYtuQ==","signatures":[{"sig":"MEUCIFhoBNQ40kY/wgQ3UF+u5fgT7JjI7xS7ZybEgXH/kbbDAiEAonoac2scwlst/frNbxuFevRmtjQ4y/fklyYLXQ/xOTE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":22848},"main":"lib/index.js","engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"gitHead":"0f2fa6be0d7537869247e39cd78d1930c4e7db53","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"9.6.6","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.15.1","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"18.16.0","dependencies":{"socks":"^2.7.1","lru-cache":"^7.18.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","simple-socks":"^2.2.2","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.15.1","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_1.1.0_1684254355684_0.41897001204164774","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@npmcli/agent","version":"2.0.0","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.0.0","maintainers":[{"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"},{"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":"d8c4246c30c1ab55bb02970433acfeba85906ee7","tarball":"http://localhost:4260/@npmcli/agent/agent-2.0.0.tgz","fileCount":12,"integrity":"sha512-RpRbD6PnaQIUl+p8MoH7sl2CHyMofCO0abOV+0VulqKW84+0nRWnj0bYFQELTN5HpNvzWAV8pRN6Fjx9ZLOS0g==","signatures":[{"sig":"MEYCIQDaSfp2ggGEUBkgkj5D0GgtGq21lWBK8g4MnHEE+4NhLgIhAKCL/e/NmhbagORC8Gn/Yhpe7/D7tM9T7QhhT8WLxgHk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":22927},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"8089b84050960d9d148ca1b3818c5514b53e99a6","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"9.8.1","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.18.0","ciVersions":["16.14.0","16.x","18.0.0","18.x"],"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"18.17.0","dependencies":{"socks":"^2.7.1","lru-cache":"^10.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","simple-socks":"^2.2.2","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.18.0","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.0.0_1692120322334_0.308318601426778","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@npmcli/agent","version":"2.1.0","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.1.0","maintainers":[{"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"},{"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":"24b5ddb434cdbd94d553e6cac761638e0c49d36c","tarball":"http://localhost:4260/@npmcli/agent/agent-2.1.0.tgz","fileCount":9,"integrity":"sha512-/HFJP3a/DzgIg+6TWVee3bQmnBcWeKKYE9DKQqS8SWpAV8oYDTn/zkDM8iQ7bWI6kDDgNfHOlEFZZpN/UXMwig==","signatures":[{"sig":"MEUCIQDX+PYP6WDDeGMdIIjABXmm4fpuP+hYE7CbGRQh6X6f3gIgFu0R2uJBKoG/5G770UDYpTzPmzZ/DEjI1yveoDHcoE0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19357},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"4b2c4d1a4d005748cd9bf5066cee29f31c56d11e","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"9.8.1","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.18.0","ciVersions":["16.14.0","16.x","18.0.0","18.x"],"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"18.17.1","dependencies":{"lru-cache":"^10.0.1","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","socks-proxy-agent":"^8.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","simple-socks":"^2.2.2","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.18.0","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.1.0_1693415845862_0.1550005051318517","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@npmcli/agent","version":"2.1.1","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.1.1","maintainers":[{"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"},{"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":"31095663b8feef27ec3eccd5254a35b8fc70353a","tarball":"http://localhost:4260/@npmcli/agent/agent-2.1.1.tgz","fileCount":9,"integrity":"sha512-6RlbiOAi6L6uUYF4/CDEkDZQnKw0XDsFJVrEpnib8rAx2WRMOsUyAdgnvDpX/fdkDWxtqE+NHwF465llI2wR0g==","signatures":[{"sig":"MEYCIQDckhE/FgdT0XS8k4lTrBrayR6+wjStUOL4GvJU+l37yQIhALWWgcDTKrBRCeetiwNj4XQavxR7zlnqVKYmJ1yEOf60","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19108},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"c51096b1903422fe14011871add7c66f9ba27189","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"10.0.0","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"npmSpec":"next-9","publish":"true","version":"4.18.0","ciVersions":["16.14.0","16.x","18.0.0","18.x"],"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"18.17.1","dependencies":{"lru-cache":"^10.0.1","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","socks-proxy-agent":"^8.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","simple-socks":"^2.2.2","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.18.0","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.1.1_1694194054546_0.6067740346025494","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@npmcli/agent","version":"2.2.0","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.2.0","maintainers":[{"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"},{"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":"e81f00fdb2a670750ff7731bbefb47ecbf0ccf44","tarball":"http://localhost:4260/@npmcli/agent/agent-2.2.0.tgz","fileCount":8,"integrity":"sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==","signatures":[{"sig":"MEUCIBdB6k5vsTjYOPUD0LY872pDsDaPovYxLV5aHGPLFSWoAiEAl9DCZBNDFKQ16b+5aV/XV2eLZ/jlnpXMkbGJmuWsmFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17595},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"eb189444e4491894d82fb9f16d4b60f935be3508","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"10.1.0","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.19.0","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"18.18.0","dependencies":{"lru-cache":"^10.0.1","agent-base":"^7.1.0","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","socks-proxy-agent":"^8.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","semver":"^7.5.4","simple-socks":"^3.1.0","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.19.0","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.2.0_1696280995473_0.3776130992233082","host":"s3://npm-registry-packages"}},"2.2.1":{"name":"@npmcli/agent","version":"2.2.1","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.2.1","maintainers":[{"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"},{"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":"8aa677d0a4136d57524336a35d5679aedf2d56f7","tarball":"http://localhost:4260/@npmcli/agent/agent-2.2.1.tgz","fileCount":8,"integrity":"sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ==","signatures":[{"sig":"MEYCIQDf5i+i5dS2SX4rGemcTzjTeW+bDe+ObeSpko94M6kjcgIhAPe4EPZmGUCjp8PlfjyzOG5Vc39yfkugjTWi+2KwTPah","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17666},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"b95de7af38a2a79d54e16e9a0b5e1bc0b4c745b1","scripts":{"lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"10.4.0","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.21.3","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"20.11.0","dependencies":{"lru-cache":"^10.0.1","agent-base":"^7.1.0","http-proxy-agent":"^7.0.0","https-proxy-agent":"^7.0.1","socks-proxy-agent":"^8.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.3.0","nock":"^13.2.7","semver":"^7.5.4","simple-socks":"^3.1.0","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.21.3","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.2.1_1707158896995_0.5385531956807188","host":"s3://npm-registry-packages"}},"2.2.2":{"name":"@npmcli/agent","version":"2.2.2","author":{"name":"GitHub Inc."},"license":"ISC","_id":"@npmcli/agent@2.2.2","maintainers":[{"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"},{"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":"967604918e62f620a648c7975461c9c9e74fc5d5","tarball":"http://localhost:4260/@npmcli/agent/agent-2.2.2.tgz","fileCount":8,"integrity":"sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==","signatures":[{"sig":"MEYCIQD8utuvBD/N8G0uYr0HEHH22zAe3c5tqP0Gj0z80N+saQIhAJu+Qf6LE+R2RmJtdZVBAIPYico2M8zk7QAOpDwjstzf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"http://localhost:4260/attestations/@npmcli%2fagent@2.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17739},"main":"lib/index.js","engines":{"node":"^16.14.0 || >=18.0.0"},"gitHead":"47b9043b041c5ab982810fe16ea1c16e9ad9024e","scripts":{"lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","gencerts":"bash scripts/create-cert.sh","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"_npmVersion":"10.5.0","description":"the http/https agent used by the npm cli","directories":{},"templateOSS":{"publish":"true","version":"4.21.3","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"20.11.1","dependencies":{"lru-cache":"^10.0.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":"^13.2.7","semver":"^7.5.4","simple-socks":"^3.1.0","minipass-fetch":"^3.0.3","@npmcli/template-oss":"4.21.3","@npmcli/eslint-config":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent_2.2.2_1712003127461_0.5694423383211002","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-12-08T18:12:34.197Z","modified":"2024-05-30T15:08:07.832Z","1.0.0":"2022-12-08T18:12:34.451Z","1.1.0":"2023-05-16T16:25:55.861Z","2.0.0":"2023-08-15T17:25:22.586Z","2.1.0":"2023-08-30T17:17:26.021Z","2.1.1":"2023-09-08T17:27:34.724Z","2.2.0":"2023-10-02T21:09:55.748Z","2.2.1":"2024-02-05T18:48:17.158Z","2.2.2":"2024-04-01T20:25:27.623Z"},"maintainers":[{"email":"reggi@github.com","name":"reggi"},{"email":"npm-cli+bot@github.com","name":"npm-cli-ops"},{"email":"saquibkhan@github.com","name":"saquibkhan"},{"email":"fritzy@github.com","name":"fritzy"},{"email":"gar+npm@danger.computer","name":"gar"}],"author":{"name":"GitHub Inc."},"repository":{"url":"git+https://github.com/npm/agent.git","type":"git"},"license":"ISC","homepage":"https://github.com/npm/agent#readme","bugs":{"url":"https://github.com/npm/agent/issues"},"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","readmeFilename":"README.md"} |