{"_id":"@ordermentum/steveo","_rev":"36-a1af32a21a054d6971ae164652d4d6c7","name":"@ordermentum/steveo","dist-tags":{"latest":"5.1.0-beta"},"versions":{"5.1.0-beta":{"name":"@ordermentum/steveo","version":"5.1.0-beta","author":{"name":"engineering@ordermentum.com"},"license":"Apache-2.0","_id":"@ordermentum/steveo@5.1.0-beta","maintainers":[{"name":"mariancastro","email":"marian.castro@ordermentum.com"},{"name":"tjcoyoca","email":"tj.coyoca@ordermentum.com"},{"name":"zdcatom","email":"zahav.capper@ordermentum.com"},{"name":"kgstaana-ordermentum","email":"kenjie.staana@ordermentum.com"},{"name":"rraymundo19","email":"raye.raymundo@ordermentum.com"},{"name":"johndagostino","email":"john.dagostino@gmail.com"},{"name":"ishmeet-ordermentum","email":"ishmeet.singh@ordermentum.com"}],"homepage":"https://github.com/ordermentum/steveo#readme","bugs":{"url":"https://github.com/ordermentum/steveo/issues"},"nyc":{"all":true,"exclude":["coverage","examples","test","lib"],"extends":"@istanbuljs/nyc-config-typescript","reporter":["text","html","lcov"]},"dist":{"shasum":"50fc3c1cc70373feebb7562ebcee403980809a01","tarball":"https://registry.npmjs.org/@ordermentum/steveo/-/steveo-5.1.0-beta.tgz","fileCount":59,"integrity":"sha512-+tEn46Pe5Uvv0MpGyO6pgYAsrFNXKDGQGz1u1eV3ZePsPmvJxvPlauSxLY5CijEbwNM7JHUxK9nuNO7WyXYbBQ==","signatures":[{"sig":"MEUCIGM7vCwxPuv5pNTobA9tapez1PoLxhXtWzH8GNmvh5CAAiEAx2ed17XVoEIp34Tx8RTXU0FoTMYrhVn2W9FiFNo4pBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjz0r0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrz+Q//YF/EpHHaHzJPwR/NbZl0w2gbDbvixYIQdeLbkVbN72nlfGQb\r\n8aGiMYoJ6Br4+EmJGu4QN1BBFBdiX8nRuM2laGnUWIFs4BwWBOcx+eeXd9AO\r\nPGShl2H5Pndmfyib7UDSuIIZ7y1hnBDcS01EbQ79tzTt5BbHtixelyzbrz3o\r\nWIrwBoMKNhN/CvdvBSSA5H/8GaPe2jOiWdkZYsX3/PAeMESxVDMZ6sQkRD7c\r\nURWP7rfTXiRWkBL5nBM/FUZBNz4mrQFqlxnJTkqMAnl03FewdGfQwssDtGmz\r\nGWqqcKOvZXN9avYcMhAb+EhZLLBJOjmuleUhFolhnOZRC4gYjPwx928giP26\r\nujhLq7A9mw9Igsn8XxV2/Qwsa/hGUsh5YBM+uDQWHITnQDo+RRNLpAL/JUs8\r\nYYsTeKdnW7VEacq822Bli1PRxkQ/GO3ssthewAXuv/XYuqAXH67P64oqGLa4\r\n5Wg80y2X56g2wWsL4J++k9w68R35gxkRyRDJyNgKV4OYcmejQLjtgfUg1ZrR\r\neyi+P+1d0KdfPdnbwpLKyDtBosBIRcuDSBN3cTs5S5LzajgUdVDuiMNKpF2q\r\nTRO6dr1IYGjioCj1bjYCj3yU9XJl6hkksc6j9IIS9LIxfg7qE/tOsbHbXpTm\r\nEBaFUC3cgv3OrQr/1e9nf8txysIFSjVe5XQ=\r\n=1ALc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","gitHead":"e9fc0fdfaee18576579422d335993ba09ed3b4eb","scripts":{"lint":"yarn eslint 'src/**/*.{ts,js}'","spec":"tsc && yarn mocha --bail=false 'test/**/*_test.ts'","test":"NODE_ENV=test nyc yarn spec","build":"yarn run tsc","steveo":"node ./lib/cli-task.js","autotest":"yarn run mocha --watch","lint:test":"yarn eslint 'test/**/*.{ts,js}'","typecheck":"yarn run tsc --noEmit","prepublish":"yarn run build"},"_npmUser":{"name":"zdcatom","email":"zahav.capper@ordermentum.com"},"repository":{"url":"git+ssh://git@github.com/ordermentum/steveo.git","type":"git"},"_npmVersion":"8.11.0","description":"A Task Pub/Sub Background processing library","directories":{},"_nodeVersion":"16.15.1","dependencies":{"rsmq":"^0.12.4","uuid":"^8.0.0","moment":"2.29.4","aws-sdk":"^2.1043.0","bluebird":"^3.7.2","lazy-object":"^1.0.1","null-logger":"^2.0.0","generic-pool":"^3.8.2","lodash.merge":"4.6.2","node-rdkafka":"^2.13.0","lodash.shuffle":"^4.2.0","@types/bluebird":"^3.5.38","lodash.difference":"^4.5.0","lodash.intersection":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"15.1.0","chai":"4.3.7","mocha":"10.2.0","sinon":"15.0.1","eslint":"8.32.0","ts-node":"10.9.1","prettier":"2.8.3","cross-env":"7.0.3","typescript":"4.9.4","@types/chai":"4.3.4","@types/node":"16.18.3","@types/rsmq":"0.8.4","@types/uuid":"8.3.4","@types/mocha":"10.0.1","@types/sinon":"10.0.13","@types/newrelic":"9.4.0","source-map-support":"0.5.21","@types/generic-pool":"3.1.11","@types/lodash.merge":"4.6.7","eslint-plugin-mocha":"9.0.0","eslint-config-airbnb":"19.0.4","eslint-plugin-import":"2.27.5","eslint-plugin-unicorn":"45.0.2","@emotion/eslint-plugin":"11.10","eslint-config-prettier":"8.6.0","eslint-plugin-jsx-a11y":"6.7.1","eslint-plugin-prettier":"4.2.1","@typescript-eslint/parser":"5.48.2","eslint-config-airbnb-base":"15.0.0","@typescript-eslint/eslint-plugin":"5.48.2","@istanbuljs/nyc-config-typescript":"1.0.2","@ordermentum/eslint-config-ordermentum":"2.0.0-rc2"},"optionalDependencies":{"rsmq":"^0.12.4","aws-sdk":"^2.1043.0","node-rdkafka":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/steveo_5.1.0-beta_1674529524232_0.45252773740798347","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-01-24T03:05:24.231Z","modified":"2026-10-01T06:07:52.921Z","5.1.0-beta":"2023-01-24T03:05:24.429Z"},"bugs":{"url":"https://github.com/ordermentum/steveo/issues"},"author":{"name":"engineering@ordermentum.com"},"license":"Apache-2.0","homepage":"https://github.com/ordermentum/steveo#readme","repository":{"url":"git+ssh://git@github.com/ordermentum/steveo.git","type":"git"},"description":"A Task Pub/Sub Background processing library","maintainers":[{"email":"phil.manansala@ordermentum.com","name":"philorder"},{"email":"sugendran.ganess@ordermentum.com","name":"sugendran.ordermentum"},{"email":"brainstrust@ordermentum.com","name":"ordermentumeng"},{"email":"anne.pascual@ordermentum.com","name":"annepascual"},{"email":"syed.masood@ordermentum.com","name":"sgmasoodom"},{"email":"karlo.nicomedes@ordermentum.com","name":"karlo-ordermentum"},{"email":"alex.sykes@ordermentum.com","name":"a-sykes"},{"email":"jfabianzarsuela@gmail.com","name":"jfabian006ph"},{"email":"hooperarma@gmail.com","name":"safetymarcus"},{"email":"richard.bell@ordermentum.com","name":"richardbe11"},{"email":"me@brandonjc.com","name":"bcook98"},{"email":"ishmeet.singh@ordermentum.com","name":"ishmeet-ordermentum"},{"email":"meng.xu@ordermentum.com","name":"om-mengxu"},{"email":"naitik.hingu@ordermentum.com","name":"naitikhingu-ordermentum"},{"email":"michael.elliott@ordermentum.com","name":"michaelelliottom"},{"email":"tristan@tristandavey.com","name":"tjdavey"},{"email":"peggy.liu@ordermentum.com","name":"pegzom"},{"email":"ronak.amani@ordermentum.com","name":"ronak_amani"},{"email":"raye.raymundo@ordermentum.com","name":"rraymundo19"},{"email":"tj.coyoca@ordermentum.com","name":"tjcoyoca"},{"email":"marian.castro@ordermentum.com","name":"mariancastro"},{"email":"carl.woodward@ordermentum.com","name":"carlwoodward-ordermentum"}],"readme":"<h1 align=\"center\">Welcome to steveo 👋</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/steveo\" target=\"_blank\">\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/steveo.svg\">\n  </a>\n  <a href=\"#\" target=\"_blank\">\n    <img alt=\"License: Apache--2.0\" src=\"https://img.shields.io/badge/License-Apache--2.0-yellow.svg\" />\n  </a>\n</p>\n\n[![npm version](https://badge.fury.io/js/steveo.svg)](https://badge.fury.io/js/steveo)\n[![CI](https://github.com/ordermentum/steveo/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/ordermentum/steveo/actions/workflows/main.yml)\n[![npm](https://img.shields.io/npm/l/steveo.svg)](https://www.npmjs.com/package/steveo)\n[![npm](https://img.shields.io/npm/dt/steveo.svg)](https://www.npmjs.com/package/steveo)\n\nA Task Pub/Sub Background processing library (Task Framework for Node.js)\n\nSteveo is a task management library that supports Kafka, SQS and Redis.\n\nThink of it as [sidekiq](https://github.com/mperham/sidekiq) for node.js with support for multiple backends.\n\n## Installation\n\nThis is a Node.js module available through the npm registry.\n\nBefore installing, download and install Node.js. Node.js 12 or higher is required.\n\nIf this is a brand new project, make sure to create a package.json first with the npm init command.\n\nInstallation is done using the npm install command:\n\n```bash\n$ npm install steveo\n```\n\n## Author\n\n👤 **engineering@ordermentum.com**\n\n### Task\n\nHolds the information about the type of task. It has below methods,\n\n- publish - send a message onto a queue\n- subscribe - process a message\n\n### Registry\n\nResponsible for keeping the inventory of tasks & event manager. Whenever a new task is created, an entry will be added in the registry\n\n### Runner\n\nResponsible for consuming messages,\n\n- `process` method initialize group consumers and start to consume the messages. It will then call the subscribe callback set on the task\n\nEmitting events based on success/failures\n\n- runner_receive -> Received a message\n- runner_complete -> Completed running the associated task\n- runner_failure -> Failed running the associated task\n- runner_connection_failure -> Error while polling for message (Kafka only)\n\n- task_send\n- task_success\n- task_failure\n- task_added\n- task_removed\n\n- producer_success\n- producer_failure\n\n### Example\n\n```javascript\n(async () => {\n  const steveo = Steveo({\n    kafkaConnection: process.env.KAFKA_CONNECTION,\n    clientId: '1234-123',\n  });\n\n  const example = steveo.task('example-task', async ({ name }) => {\n    console.log(`hello ${name}`);\n  });\n\n  await example.publish({ name: 'tommo' });\n  await example.publish({ name: 'bazza' });\n\n  await steveo.runner().process();\n})();\n```\n\nPublish without registering a task\n\n```javascript\nawait steveo.publish('example-task', { name: 'Apple' });\n```\n\nFor more details, see [example](https://github.com/ordermentum/steveo/blob/master/examples/full/README.md)\n\n\n## Contributing\n\n\n### Installing dependencies\n\n```sh\nyarn install\n```\n\n## Running tests\n\n```sh\nyarn run test\n```\n\n\n## Architecture\n\nOn a highlevel, it works as below, Steveo has 3 main components\n\n```\n              +-----------+     +-----------+     +-----------+\n              |           |     |           |     |           |\nPUBLISH ----->|   TASK    |     | REGISTRY  |     |   RUNNER  |-----> RECEIVE\n              |           |     |           |     |           |\n              |           |     |           |     |           |\n              +-----------+     +-----------+     +-----------+\n```\n\n\n_Credits_\n\n- [nokafka](https://github.com/oleksiyk/kafka)\n- [rsmq](https://github.com/smrchy/rsmq)\n- [aws-sdk](https://github.com/aws/aws-sdk-js)\n","readmeFilename":"README.md"}