{"_id":"@cababunga/beanstalkd","_rev":"8-96dd8f3fa70d4a7bd672e710e6e99d14","name":"@cababunga/beanstalkd","dist-tags":{"latest":"0.6.1"},"versions":{"0.5.1":{"name":"@cababunga/beanstalkd","version":"0.5.1","license":"ISC","_id":"@cababunga/beanstalkd@0.5.1","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"39559f5e021e26b8a4972c6df7228756f1fd3199","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.5.1.tgz","fileCount":5,"integrity":"sha512-x7v6HOkfbvubNHUSJoXf2wt3yfoaPTO2QLy2hyyjle4zxyf3YDtFLVoRFzSl5IhQLZfdsKISiAmKz/gM5nCpmA==","signatures":[{"sig":"MEUCIQC5aU1Ho+mEw1TvPwTTfRKZP6PAkfm3DGzchHJVYcgfawIgUvyyN3VlOrDWkZXWWc+Uc94rHtRWA9TFqkI2G+TV/lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19377},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"3d07895ec6d6a814c93c476cf138fab1d5f513be","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.5.1_1709169420984_0.10639576206329626","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@cababunga/beanstalkd","version":"0.5.2","license":"ISC","_id":"@cababunga/beanstalkd@0.5.2","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"3ac8c66cd19941efded04b65611f458ae72a4829","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.5.2.tgz","fileCount":5,"integrity":"sha512-jwjeXsDXEe3BkCphReKfZ5lSsQlj/oWHFhA5UIfNr+7sBNKDiiX9wagi7CtIj8hDetQ2QVy9tlSVMe87w0fZYg==","signatures":[{"sig":"MEUCIQCjQiVrLlDZHRqu7tbgq1PBWSmAD2gtiPuipXWmYN9ZewIgNwgWalF7HZLTJiAMCkE4oCRZ4wg+PTlQjY99zjrE4KU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19440},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"68965ba5ee40f2ca972cfc915ff274db03acee67","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.5.2_1709170413020_0.004610352769001791","host":"s3://npm-registry-packages"}},"0.5.3":{"name":"@cababunga/beanstalkd","version":"0.5.3","license":"ISC","_id":"@cababunga/beanstalkd@0.5.3","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"cea9c69ca44356fb7f9dbdda5bec2eba8edb5ad3","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.5.3.tgz","fileCount":5,"integrity":"sha512-MF/BV0A4Lew3LsPe3HWPvLTCZjz/KYA63/4dcTAUmJqTaT7dB6RyMuHx0zXFYLsy3T6z2hG5p5Bjd6P82oI+ng==","signatures":[{"sig":"MEUCIA5lovWuCIZfSdgzhwuyg6CVK+ujdWmhGK50OeUDMWd6AiEAkUeKETPMaUy7Dkh2jni0BAJtvQU+mO3Tu/hvSAJZ92E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19444},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"e7bd00fc387c0d720c6dcdc42059b3c124c8b841","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.5.3_1709170717976_0.9170042645861747","host":"s3://npm-registry-packages"}},"0.5.4":{"name":"@cababunga/beanstalkd","version":"0.5.4","license":"ISC","_id":"@cababunga/beanstalkd@0.5.4","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"009e96fce018e56f7f3f21e998ea81f340401b8a","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.5.4.tgz","fileCount":5,"integrity":"sha512-NTh8j+vxojXqPTVLE7lK3tBpSuL7tyo2npHhEDOE8QZIFioAwG4I6SRW5V3p7ZENfCZYqrjIMnKo1rBajgMpyw==","signatures":[{"sig":"MEYCIQDwxU3qbpdQeaaDDhzNJkVGoE+lEZNseZP15BKNrCPi8AIhAIDcE9W6Kn7/ycwmrh/BXNUuf66uD6sJhhdyrR5Ns7hZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19480},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"5fbb68d19971beb5ba3133cf971f5fa7ac7eb1b8","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.5.4_1709590793705_0.012855545735748652","host":"s3://npm-registry-packages"}},"0.5.5":{"name":"@cababunga/beanstalkd","version":"0.5.5","license":"ISC","_id":"@cababunga/beanstalkd@0.5.5","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"3903332ed7ec9f0bcb46d84125ba793757d8fce4","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.5.5.tgz","fileCount":5,"integrity":"sha512-UB7U+/vDvMNM0+9lIAh5k1i6yD3uy7o2IobZsTyUXFuM6mhGtPjVP34YteV6n/nsMZjrCfsdUck/YR4MuiFDjw==","signatures":[{"sig":"MEUCIFiQKPj+pGYLTQ8hG9lhaiIspayNnSunRQrSnZHOVoCHAiEAyWFPlCOshfVuYZ8AVKzcb5VpxvsgEfXxKX3X9a0i/WI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19591},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"1339f508df23cc504591a24b2076c8d8114aed74","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.5.5_1709859087203_0.918152403704362","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@cababunga/beanstalkd","version":"0.6.0","license":"ISC","_id":"@cababunga/beanstalkd@0.6.0","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"homepage":"https://github.com/cababunga/beanstalkd-client#readme","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"dist":{"shasum":"fbe1aa72f35dbbfad5bd5125091e3bd88c72648a","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.6.0.tgz","fileCount":5,"integrity":"sha512-eOzDYfIontPzexScF4YbNxQQk8lkL6RoRkugop+9BxFW9gyo6JrYf6obexGCLZ434W5znLSy2NtwGKLNSIVA4Q==","signatures":[{"sig":"MEUCICDjXuPA1x/Fu4zCHu+kbyHua7Jc5xFRwrLETCKyRoYZAiEAv28cJ67RfMw2zjCoweoren/8FIpXZONcnBAWOwFGqIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20239},"main":"beanstalk.js","types":"./beanstalk.d.ts","gitHead":"b39277a6bd412ffcbae3b0a4eeb598fb67869646","scripts":{"test":"node --test"},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"repository":{"url":"git+https://github.com/cababunga/beanstalkd-client.git","type":"git"},"_npmVersion":"9.8.0","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","directories":{},"_nodeVersion":"20.5.1","_hasShrinkwrap":false,"devDependencies":{"yaml":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/beanstalkd_0.6.0_1713997558303_0.938869468424191","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"@cababunga/beanstalkd","version":"0.6.1","description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","license":"ISC","main":"beanstalk.js","repository":{"type":"git","url":"git+https://github.com/cababunga/beanstalkd-client.git"},"scripts":{"test":"node --test","bump":"npm version ${BUMP:=patch} && git push && git push --tags"},"devDependencies":{"@types/node":"^22.5.4","yaml":"^2.4.0"},"_id":"@cababunga/beanstalkd@0.6.1","gitHead":"d8e9ffc93bf133f636a22669cf24aa53858d5858","types":"./beanstalk.d.ts","bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"homepage":"https://github.com/cababunga/beanstalkd-client#readme","_nodeVersion":"22.8.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-aBEUmzAMwz4vyyLG++bMYHwFwmRXYzr0OBBv49q12FXOwNz7pj5Nx2qqtvHZH5YS0gjhclMLAkK2YJFoR5IX1A==","shasum":"32a3174700b0d6401615d003fb10eaa64d9bdf50","tarball":"https://registry.npmjs.org/@cababunga/beanstalkd/-/beanstalkd-0.6.1.tgz","fileCount":5,"unpackedSize":20287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICsKK7j3eXW3eo0KnXUhgdX3mL7LtnaDCHHM3E51ES8mAiEAg0YsBXKZfvu1+zb3NWfak3HFyxXzAAqOG+BNhRRGuKA="}]},"_npmUser":{"name":"cababunga","email":"alexmv@gmail.com"},"directories":{},"maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/beanstalkd_0.6.1_1726205510202_0.6665763203194934"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-29T01:17:00.895Z","modified":"2024-09-13T05:31:50.597Z","1.0.0":"2024-02-27T21:52:26.036Z","0.5.1":"2024-02-29T01:17:01.142Z","0.5.2":"2024-02-29T01:33:33.167Z","0.5.3":"2024-02-29T01:38:38.177Z","0.5.4":"2024-03-04T22:19:53.866Z","0.5.5":"2024-03-08T00:51:27.335Z","0.6.0":"2024-04-24T22:25:58.454Z","0.6.1":"2024-09-13T05:31:50.426Z"},"bugs":{"url":"https://github.com/cababunga/beanstalkd-client/issues"},"license":"ISC","homepage":"https://github.com/cababunga/beanstalkd-client#readme","repository":{"type":"git","url":"git+https://github.com/cababunga/beanstalkd-client.git"},"description":"Beanstalkd client with async/await API, auto-reconnect and zero dependencies","maintainers":[{"name":"cababunga","email":"alexmv@gmail.com"}],"readme":"# Beanstalkd Client\n\nNode.js beanstalkd client with async/await API, auto-reconnect and zero dependencies.\n\n## Install\n\n    npm i @cababunga/beanstalkd\n\n## Example\n\n```javascript\nconst assert = require(\"node:assert\").strict;\nconst Beanstalk = require(\"@cababunga/beanstalkd\");\n\nconst bs = await Beanstalk.connect();\nawait bs.watch(\"test\");\nawait bs.ignore(\"default\");\nawait bs.use(\"test\");\nawait bs.put(JSON.stringify({task: \"make coffee\"}), {ttr: 600});\n\nconst job = await bs.reserve();\nconst [jobId, payload] = job;\nassert.equal(JSON.parse(payload.toString()).task, \"make coffee\");\nawait bs.delete(jobId);\n```\n\n## beanstalk\n\nReturns a Beanstalk object, a handle to communicate with beanstalkd. It take one optional parameter, which is an options object. Here are the options with their default values:\n\n```javascript\n{\n    host: \"localhost\",\n    port: 11300,\n    parseYaml: null,\n    delay: 10,\n    maxDelay: 5000,\n    logger: null\n}\n```\n\n**host** and **port** are the endpoint of your beanstalkd.\n\n**parseYaml** is a function that takes YAML document and produces JavaScript object out of it.\nYou only need to provide it if you are planning to issue beanstalkd commands that return YAML\ndocuments, such as stats, stats-tube, list-tubes, etc. These commands are mostly used in the interactive sessions and rarely in scripts. If you do not provide YAML parser, YAML response will be returned unparsed as a Buffer.\n\n**delay** is an initial delay in milliseconds before new connection attempt is made after failed one. Delay will exponentially increase until it reach *maxDelay* value. A negative value provided for this option will make connection fail instead of attempting to connect again. If an attempt of initial connection failed `connect()` will throw an exception. If connection was lost after successful connect, the connection object will emit \"error\".\n\n**maxDelay** maximum delay between connection attempts.\n\n**logger** a function that can take a text message generated on successful connection, failed connection and dropped connection.\n\n\n### beanstalkd API methods\n\nFor most of the beanstalkd commands in form of\n\n    COMMAND arg1 arg2 ...\n\nthere is a method with signature\n\n    client.COMMAND(arg1, arg2, ...);\n\nPlease refer to the beanstalkd wire protocol documentation:\nhttps://github.com/beanstalkd/beanstalkd/blob/master/doc/protocol.txt\n\nExceptions are:\n\n*reserve-with-timeout* command, which it issued by *reserve* method when you pass it an optional numeric parameter, which is a timeout in seconds.\n\n*put* `client.put(payload, options)` takes payload as string or Buffer and a single options object. Here are the defaults:\n\n```javascript\n{\n    priority: 65536,\n    delay: 0,\n    ttr: 60\n}\n```\n\n*release* `client.release(id, options={}) takes job ID and options object:\n\n```javascript\n{\n    priority: 65536,\n    delay: 0\n}\n```\n\n*burry* `client.bury(id, options={}) takes job ID and options object:\n\n```javascript\n{\n    priority: 65536,\n}\n```\n\nCommands that return no data make methods that return *undefined*.\n\nCommands that return a single item, typically job ID or tube count, will return that single item as a string.\n\nCommands that return more than one item, for example *reserve* returns job ID and payload, will return an array.\n\n","readmeFilename":"README.md"}