{"_id":"@crcastle/fastify-piscina","_rev":"1-0e3f0dfc5aae5f3a6cfb3961f7a510c6","name":"@crcastle/fastify-piscina","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@crcastle/fastify-piscina","version":"2.0.0","description":"A Fastify Piscina Plugin","main":"./plugin.js","exports":{"import":"./esm-wrapper.mjs","require":"./plugin.js"},"types":"./plugin.d.ts","scripts":{"build":"gen-esm-wrapper . esm-wrapper.mjs","lint":"standardx \"**/*.{mjs,js,cjs}\" | snazzy","prepack":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/piscinajs/fastify-piscina.git"},"keywords":["piscina","fastify"],"author":{"name":"James M Snell","email":"jasnell@gmail.com"},"contributors":[{"name":"Anna Henningsen","email":"anna@addaleax.net"},{"name":"Matteo Collina","email":"matteo.collina@gmail.com"}],"license":"MIT","devDependencies":{"@types/node":"^14.0.20","fastify":"^3.0.0","gen-esm-wrapper":"^1.0.0","snazzy":"^8.0.0","standardx":"^5.0.0","tap":"^14.10.7"},"dependencies":{"fastify-plugin":"^2.0.0","piscina":"^1.6.3"},"eslintConfig":{"rules":{"semi":["error","always"],"no-unused-vars":"off"},"globals":{"SharedArrayBuffer":true,"Atomics":true}},"standardx":{},"gitHead":"02fcd727a2cc561fc8c9d33f851e7d41538dac92","bugs":{"url":"https://github.com/piscinajs/fastify-piscina/issues"},"homepage":"https://github.com/piscinajs/fastify-piscina#readme","_id":"@crcastle/fastify-piscina@2.0.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-5KAKFH3vyWGu0Uzi/O5LH94tICVyPORoXeRhM5WUMXLLOOf6PwAhEIJhx2WQ+Zbj4GxfDK3nkfXknaXdnmMCPQ==","shasum":"5f4e6656ed8fdf8c64cf6783bdd74ced70de430d","tarball":"https://registry.npmjs.org/@crcastle/fastify-piscina/-/fastify-piscina-2.0.0.tgz","fileCount":10,"unpackedSize":11756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbBC8CRA9TVsSAnZWagAAPbUQAIhzRHDPKVeLgeLyto+6\n5xXMa3PauWWJyvREIDbf4E3HEoRNwvzzlPiOFf6Ghe4GJZPqlEpFbvcS56wG\n9NMOIZSqaOx8iuKwjoPdKex+cmE/h8rRkpJJ++S1R49LAz64oFHlst5jOMGO\nrC+CeMQlG1ACjGB2MfPlPpiaiFwvCBVMNqqc7K8mC+vcmKm/ouwzRvLA3q0n\nJdQwv4JSPc71X2IgTTy+gaVxHsBm35bWGaxbUxhCJqTGv83NTLvzTLXBv/S0\nFHPsHZZabftddS5GAkwXpKZnkRrNKArUpMU907+L+PfHKajesxoY9jNGUDnu\nLPhhdDUgVWuyRwAJw0eSqT5uCBeQmP8Dadlbf6bdMPd1dHXP+QfmsqG+bmgS\nI+UcPVtNQIbLKnZ4GvP25CQO9lDwjXA2bc/1valBwVOP8O3efiX9IJRSxEYr\n7jlRPZkLFrL4mdJ5v4miC8ChQBq+N8Ys0Z64DzmD/Mehc+YWEcUBxsMweNVX\nlpGU6O5wwqslLNMDB3n8zURvTAmjBjwY3LcSMbF0nYDV+uNsJY/t3ELckVB7\n+SlaN38v9Lz91CIn5amWpe1D/sZ5kpQbdLvytwveocAhOSPwGmp2UHEVIyal\nOrAWEPGDKN1hxJzdTTbYhMEWkPAguShvY8gvLkeQ+sKABn2BQ3rDTFnAtFCF\n1Ogz\r\n=M94L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDnWlSx5WE2uxwU3Yf8aFv/huNDi6kVvXYVMiQrwg+ENAiAesJaWB/5ppWXmVcw9Lm0tyXz1KVlDlMTyTTMI6Rfi2Q=="}]},"maintainers":[{"name":"crcastle","email":"castle@heroku.com"}],"_npmUser":{"name":"crcastle","email":"castle@heroku.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fastify-piscina_2.0.0_1600917691599_0.7465879379984066"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-24T03:21:31.567Z","2.0.0":"2020-09-24T03:21:31.761Z","modified":"2022-04-05T01:40:51.181Z"},"maintainers":[{"name":"crcastle","email":"castle@heroku.com"}],"description":"A Fastify Piscina Plugin","homepage":"https://github.com/piscinajs/fastify-piscina#readme","keywords":["piscina","fastify"],"repository":{"type":"git","url":"git+https://github.com/piscinajs/fastify-piscina.git"},"contributors":[{"name":"Anna Henningsen","email":"anna@addaleax.net"},{"name":"Matteo Collina","email":"matteo.collina@gmail.com"}],"author":{"name":"James M Snell","email":"jasnell@gmail.com"},"bugs":{"url":"https://github.com/piscinajs/fastify-piscina/issues"},"license":"MIT","readme":"# fastify-piscina - A Piscina plugin for Fastify\n\n## Example\n\n```js\nconst fastify = require('fastify')();\nconst { resolve} = require('path');\n\nfastify.register(require('fastify-piscina'), {\n  // Piscina Options object. See Piscina docs for details\n  filename: resolve(__dirname, 'worker.js')\n});\n\n// Declare a route\nfastify.get('/', async (request, reply) => {\n  reply.send({ hello: `world [${await fastify.runTask({ a: 1, b: 2 })}]` });\n});\n\n// Run the server!\nfastify.listen(3000, function (err, address) {\n  if (err) {\n    fastify.log.error(err);\n    process.exit(1);\n  }\n  fastify.log.info(`server listening on ${address}`);\n});\n```\n\nOnce registered, the plugin decorates the `fastify` instance\nwith two new properties:\n\n* `fastify.piscina` {`Piscina`} The Piscina instance.\n* `fastify.runTask()` {`Function`} The Piscina runTask function.\n\nSee the [Piscina docs][] for more information.\n\n## The Team\n\n* James M Snell <jasnell@gmail.com>\n* Anna Henningsen <anna@addaleax.net>\n* Matteo Collina <matteo.collina@gmail.com>\n\n## Acknowledgements\n\nPiscina development is sponsored by [NearForm Research][].\n\n[Piscina docs]: https://github.com/jasnell/piscina\n[NearForm Research]: https://www.nearform.com/research/\n","readmeFilename":"README.md"}