{"_id":"@davidloiret/puppeteer-pool","_rev":"3-4bb292f92358c51a2f9900c7fc14213f","name":"@davidloiret/puppeteer-pool","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.3":{"name":"@davidloiret/puppeteer-pool","version":"1.0.3","description":"Resource pool for Node.js Puppeteer","main":"./lib/index.js","directories":{"test":"test"},"scripts":{"test":"npm run test:fast","build":"npm run clean && babel ./src --out-dir ./lib --copy-files","clean":"rimraf ./lib","lint":"eslint src/ test/","pretest":"npm run lint","test:fast":"babel-tape-runner test/*.test.js","test:watch":"nodemon --exec npm -- run --silent test:fast || true","semantic-release":"git push && npm test && semantic-release pre && npm run build && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/davidloiret/puppeteer-pool.git"},"keywords":["puppeteer","generic-pool","pool","pooling"],"author":{"name":"Latesh Galia","email":"lateshg@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/davidloiret/puppeteer-pool/issues"},"homepage":"https://github.com/davidloiret/puppeteer-pool#readme","engines":{"node":">=6"},"devDependencies":{"babel-cli":"6.26.0","babel-plugin-add-module-exports":"0.2.1","babel-plugin-transform-async-to-generator":"6.24.1","babel-plugin-transform-object-rest-spread":"6.26.0","babel-preset-es2015":"6.24.1","babel-tape-runner":"2.0.1","blue-tape":"1.0.0","cz-conventional-changelog":"2.1.0","eslint":"4.19.1","eslint-config-blockai":"1.0.3","nodemon":"1.17.4","rimraf":"2.6.2","semantic-release":"15.4.1"},"release":{"debug":false,"verifyConditions":{"path":"./node_modules/semantic-release/src/lib/plugin-noop.js"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"dependencies":{"debug":"3.1.0","generic-pool":"3.4.2","puppeteer":"1.4.0"},"gitHead":"1307cb1aa3c83d349e72718147910c28a51e8923","_id":"@davidloiret/puppeteer-pool@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"davidloiret","email":"loiret.d@gmail.com"},"dist":{"integrity":"sha512-mpy0x9XNfy8eWpY36UeamEMqLIozL/2ZFepj7vDCyS3P5OXDLlkCJkYbSPzNBiuk8kC9chDG/vFu4aAHNNvr/Q==","shasum":"ca6bc810dc4b434c7fbab24ce489893bad41854d","tarball":"https://registry.npmjs.org/@davidloiret/puppeteer-pool/-/puppeteer-pool-1.0.3.tgz","fileCount":4,"unpackedSize":5611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+qYWCRA9TVsSAnZWagAAKnMP/RqG/by7OZ1hUC2E2oTX\nUtpUMzPvrRYSF7dFXC5pyHB69Jz5eoMRj3wkgIkq0GYmGU5TEAM8Lqh7gX4i\nF4Yx70QSPX4eXZfKhnGDUQnfXTCp7suHcwshyyDMwAKVKXHnKIyZMBQSPYCj\n32tZ5DcCFp9+lZK5RdpIomzS245gPNdk57WaRmhp1v3PO18P/jpQY5yRuzm7\nnp/zEB19bIt31hu9mp1w74LIKH2RcJlXsLOgdxHI2PvCp6GNjOYfPSTjn/wF\n3mIFhkyec9JlyqbR8V0Q5f1ZHsWxh5id+lYaiJwb0SS7sI3C5je1hBkGjD9O\nA0ODOsVHW3tk9Ltp7lDSezi+9e4e+gsR0+ZHoSlizc+VTdP7YGxpN0kPS5iz\nfYFchFXJ3pUtlOy5kDR2iRmlTMFcOlCuKem8DF70f+ZON3g0zNRJvSpc0Uhm\n2qpHVMUo/kSc/wAMj/QtyXI5GeWuioBOrrpnxOBD3rx6qMqOvs67BW8kKABS\nj1JHs/JoB6uqcL5TiDEOqP7DtXYPAf3NbV/D6Wb4ST2a5zS46++U/t3mFZ88\nh6pvgLppxK4ngpVlWRmw6fEX8OCkHyDu7ZmUU6orlZWXPBEWgGKnl40VW6KF\nL4MbtVyH5FnCmQFBwYzBBRqoHAEil1SSAC+Cj4Ae7wVd4xmxfJPatmZKznKZ\noaM4\r\n=mLxZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIARuuelLCA943OhFX2gFdEpglkozNf0AVEJl9ERxPqmRAiEAtciwQxAkXPiOGnqcRN23MkGu6YMLiPwGdsSyenoL2SU="}]},"maintainers":[{"name":"davidloiret","email":"loiret.d@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/puppeteer-pool_1.0.3_1526375958205_0.4216519860648058"},"_hasShrinkwrap":false},"1.0.4":{"name":"@davidloiret/puppeteer-pool","version":"1.0.4","description":"Resource pool for Node.js Puppeteer","main":"./lib/index.js","directories":{"test":"test"},"scripts":{"test":"npm run test:fast","build":"npm run clean && babel ./src --out-dir ./lib --copy-files","clean":"rimraf ./lib","lint":"eslint src/ test/","pretest":"npm run lint","test:fast":"babel-tape-runner test/*.test.js","test:watch":"nodemon --exec npm -- run --silent test:fast || true","semantic-release":"git push && npm test && semantic-release pre && npm run build && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/davidloiret/puppeteer-pool.git"},"keywords":["puppeteer","generic-pool","pool","pooling"],"author":{"name":"Latesh Galia","email":"lateshg@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/davidloiret/puppeteer-pool/issues"},"homepage":"https://github.com/davidloiret/puppeteer-pool#readme","engines":{"node":">=6"},"devDependencies":{"babel-cli":"6.26.0","babel-plugin-add-module-exports":"0.2.1","babel-plugin-transform-async-to-generator":"6.24.1","babel-plugin-transform-object-rest-spread":"6.26.0","babel-preset-es2015":"6.24.1","babel-tape-runner":"2.0.1","blue-tape":"1.0.0","cz-conventional-changelog":"2.1.0","eslint":"4.19.1","eslint-config-blockai":"1.0.3","nodemon":"1.17.4","rimraf":"2.6.2","semantic-release":"15.4.1"},"release":{"debug":false,"verifyConditions":{"path":"./node_modules/semantic-release/src/lib/plugin-noop.js"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"dependencies":{"debug":"3.1.0","generic-pool":"3.4.2","puppeteer":"1.4.0"},"gitHead":"1307cb1aa3c83d349e72718147910c28a51e8923","_id":"@davidloiret/puppeteer-pool@1.0.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"davidloiret","email":"loiret.d@gmail.com"},"dist":{"integrity":"sha512-kFA77FTWVMtNpe6GVUk7Gd8vXPVNlPItodsUYZkppfjS83CZk/+/5sgCMxM3l6hFHeeN9ZpHN2qMb2DjwrYfBw==","shasum":"577dd3fcd61640c940e75e40e8c2e0122f411355","tarball":"https://registry.npmjs.org/@davidloiret/puppeteer-pool/-/puppeteer-pool-1.0.4.tgz","fileCount":5,"unpackedSize":9474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+qg3CRA9TVsSAnZWagAA2kgP/10DK98DlveWg1Yh6D2i\nTXlITMTXz/nzGRzhwb6ggBsG+qestFrSAnWKJRwDJkx9yIUDJSFYqin7YF7c\nJHj6Heth0CRN4wUMY2XPXFApy25RauA0gsOdUWeVD/EDEmsk0gm7++URWLOU\nSyGdK1A+LQwC7DcSeJ2aiCflh1IC9/nQt5LAlGyibjl878wzFE8OUmFD9x0x\nQG54TpKAFGjlfb57b2bdifum6vX9jS7QHc9bAPXrj0wZLGp4J7xhKKxgWWFW\n6hw7EX2QlEJ28dIqByf9XGv/NqCMktDfW3BtFA5AVQ2hhil66P4YmijAzmBC\nxydodpYd6b6oo3jQxpYq8SCJYR7fGgtRn2yi1XBzJHHaxPYQtWU8RVzOL3eS\ni10NhDL4+f4J2sv1EpB7rNyKr/20ZOsmhTlTxm5c9LDg+HNgS91q7tDcRKVA\nAPognWt4ErSAwlxmdCyr/6THdO6ocIBaroauYjEOknHwZkUgT87DY0uBZWoR\nN+3rTpHZArCoEy6F2tlfl9X/8Iun97DrlAoH6z7bwD225D8Y1qtENcNpxQ04\nxhEx7YhWpUO2eM3MXk2OkQNmRhfgfrPUGy8afDYUGUoz1L7AhXJ64pp8aTX/\nWnEGHNcmByhgSsQpjHKSESDGHDlonv4x3D+3iqfWk/wLE1/BI/J1mm9/2otn\nuOuI\r\n=I6HN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQdqfCRcgSeNdAfjNKst1ergt7NAfQwdktyKdwFfWaiAiArICUl+sJF3LJKtb+h+xh41krzwPUc1B7J+tEe4IYiQQ=="}]},"maintainers":[{"name":"davidloiret","email":"loiret.d@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/puppeteer-pool_1.0.4_1526376502937_0.35903061337464104"},"_hasShrinkwrap":false},"1.0.5":{"name":"@davidloiret/puppeteer-pool","version":"1.0.5","description":"Resource pool for Node.js Puppeteer","main":"./lib/index.js","directories":{"test":"test"},"scripts":{"test":"npm run test:fast","build":"npm run clean && babel ./src --out-dir ./lib --copy-files","clean":"rimraf ./lib","lint":"eslint src/ test/","pretest":"npm run lint","test:fast":"babel-tape-runner test/*.test.js","test:watch":"nodemon --exec npm -- run --silent test:fast || true","semantic-release":"git push && npm run build && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/latesh/puppeteer-pool.git"},"keywords":["puppeteer","generic-pool","pool","pooling"],"author":{"name":"Latesh Galia","email":"lateshg@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/latesh/puppeteer-pool/issues"},"homepage":"https://github.com/latesh/puppeteer-pool#readme","engines":{"node":">=6"},"devDependencies":{"babel-cli":"6.26.0","babel-plugin-add-module-exports":"0.2.1","babel-plugin-transform-async-to-generator":"6.24.1","babel-plugin-transform-object-rest-spread":"6.26.0","babel-preset-es2015":"6.24.1","babel-tape-runner":"2.0.1","blue-tape":"1.0.0","cz-conventional-changelog":"2.1.0","eslint":"4.19.1","eslint-config-blockai":"1.0.3","nodemon":"1.17.4","rimraf":"2.6.2","semantic-release":"15.4.1"},"release":{"debug":false,"verifyConditions":{"path":"./node_modules/semantic-release/src/lib/plugin-noop.js"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"dependencies":{"debug":"3.1.0","generic-pool":"3.4.2","puppeteer":"1.19.0"},"gitHead":"e7191c07e31d1a40b9233349bb550a5d48ca7fa6","_id":"@davidloiret/puppeteer-pool@1.0.5","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-PJ9BOVm6siw7wUg5y7u60OQQtcehWnmqxE1YdJFR5ZcGb3eDqvE3bxZXC4ZQDp7NJOIAvFxxKzX7yl1wiFhYKQ==","shasum":"0ba5f4698c21d5c480836e9a591b30263e518e9a","tarball":"https://registry.npmjs.org/@davidloiret/puppeteer-pool/-/puppeteer-pool-1.0.5.tgz","fileCount":5,"unpackedSize":9424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdStDACRA9TVsSAnZWagAARS0P/0F5K3PYePiX8DnLCNJ7\nSCe9HFxVd36/dKRuQi+kjUxwY0HoHiiKg7Yv2QdxWogso2hTV7503U0pFHyq\nnqn3/Q0ZhGCAgksBW3IUYYBcHGjweGcHjVctAgPJnOqldOHCHw49wKD2DX99\nnjzIHyBC6jxp75wadJOlt5v/82Z1h8kb5td+gX/41qS4M2aIJR2+lwnXqIQB\nsMLSJTFN1pEepfVSrE070vjQ2pQr1ID8EASqtiS3W8mZ4sBBxUlFiK6dgKeN\nTNgml9arDlmiSz/QrIqdtUExyEL3L+ZxS8kOWueqdI4CuK4t0FMJM3qBJY25\nOJeSHKmo7Ncd7CFRm/x7j1DuR131PSpd/P58+FcJquty2p2awYP6BE6jFMf4\numH/pv9sE2N5MY5dFcVVrPE0CLyAsw/P1sS8Y6kHKWK+iyeY8D9TVhizvVGl\nfhYtvw7lEKdhuoqKvyOsggu+ALw8WQD2A+xFbio5RX5dhgVv1Q5XNfXaCf4U\n80pi7YLeA6UFmPr3KtjVJ5tYSv6LgQurdyfEdIk+Y2FlHpi2KTegSm3FlCQ4\nOrBZV/eVWUHIMMCd80+WovLIjDPwlG5XiHh7mMHVWzJkTpIFWs5N3OXJpwji\nJLDtfPAD2Zlh3mBmZ4pWZpr00T1ZRkVeRkFgP7t+834zjwjQEelnlDFhntYs\nrtGd\r\n=dOFv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4V3C4zZn2L1mEefKllXE7UhB/J9jxLudvRj3UnFvJwwIgavFLgbiZ+5fdgG22ZrnRwzfHHchw660gmj3tVJz7aO8="}]},"maintainers":[{"name":"davidloiret","email":"loiret.d@gmail.com"}],"_npmUser":{"name":"davidloiret","email":"loiret.d@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/puppeteer-pool_1.0.5_1565184191854_0.9465271510140301"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-15T09:19:17.849Z","1.0.3":"2018-05-15T09:19:18.377Z","modified":"2022-04-05T03:06:04.458Z","1.0.4":"2018-05-15T09:28:23.064Z","1.0.5":"2019-08-07T13:23:11.949Z"},"maintainers":[{"name":"davidloiret","email":"loiret.d@gmail.com"}],"description":"Resource pool for Node.js Puppeteer","homepage":"https://github.com/latesh/puppeteer-pool#readme","keywords":["puppeteer","generic-pool","pool","pooling"],"repository":{"type":"git","url":"git+https://github.com/latesh/puppeteer-pool.git"},"author":{"name":"Latesh Galia","email":"lateshg@gmail.com"},"bugs":{"url":"https://github.com/latesh/puppeteer-pool/issues"},"license":"MIT","readme":"# puppeteer-pool\n\nResource pool based on [generic-pool](https://github.com/coopernurse/node-pool) for [Puppeteer](https://github.com/GoogleChrome/puppeteer).\n\nCreating new phantom instances with `puppeteer.launch()` can be slow. If\nyou are frequently creating new instances and destroying them, as a\nresult of HTTP requests for example, this module can help by keeping a\npool of puppeteer instances alive and making it easy to re-use them across\nrequests.\n\n## Install\n\n```bash\nnpm install --save puppeteer-pool\n```\n\nRequires Node v6+\n\n## Usage\n\n```javascript\nconst createPuppeteerPool = require('puppeteer-pool')\n\n// Returns a generic-pool instance\nconst pool = createPuppeteerPool({\n  max: 10, // default\n  min: 2, // default\n  // how long a resource can stay idle in pool before being removed\n  idleTimeoutMillis: 30000, // default.\n  // maximum number of times an individual resource can be reused before being destroyed; set to 0 to disable\n  maxUses: 50, // default\n  // function to validate an instance prior to use; see https://github.com/coopernurse/node-pool#createpool\n  validator: () => Promise.resolve(true), // defaults to always resolving true\n  // validate resource before borrowing; required for `maxUses and `validator`\n  testOnBorrow: true, // default\n  // For all opts, see opts at https://github.com/coopernurse/node-pool#createpool\n  puppeteerArgs: []\n})\n\n// Automatically acquires a puppeteer instance and releases it back to the\n// pool when the function resolves or throws\npool.use(async (browser) => {\n  const page = await browser.newPage()\n  const status = await page.goto('http://google.com')\n  if (!status.ok) {\n    throw new Error('cannot open google.com')\n  }\n  const content = await page.content()\n  page.close()\n  return content\n}).then((content) => {\n  console.log(content)\n})\n\n// Destroying the pool:\npool.drain().then(() => pool.clear())\n\n// For more API doc, see https://github.com/coopernurse/node-pool#generic-pool\n```\n\n## Security\n\nWhen using puppeteer-pool, you should be aware that the puppeteer instance\nyou are getting might not be in a completely clean state. It could have\nbrowser history, cookies or other persistent data from a previous use.\n\nIf that is an issue for you, make sure you clean up any sensitive data\non the puppeteer instance before returning it to the pool.\n\n## Credits\n\nThis module is forked from [phantom-pool](https://github.com/binded/phantom-pool) and all phantom related code\nhas been sustituted with puppeteer.\n","readmeFilename":"README.md"}