{"_id":"@allgemein/eventbus-dev","_rev":"2-274f26570c106ce396b47209f63e0f58","name":"@allgemein/eventbus-dev","dist-tags":{"latest":"0.14.2"},"versions":{"0.14.2":{"name":"@allgemein/eventbus-dev","version":"0.14.2","description":"","main":"index.js","browser":"browser.js","scripts":{"test":"npx gulp test","posttest":"npx codecov -f coverage/**/*.json","lint":"npx ng lint","mocha":"npx mocha test/{**,**/**}/*.spec.ts"},"repository":{"type":"git","url":"git+https://github.com/allgemein-node/eventbus.git"},"author":{"name":"Robert Kania"},"bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"homepage":"https://github.com/allgemein-node/eventbus","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"devDependencies":{"@allgemein/packaging":"^1.2.13","@testdeck/mocha":"^0.1.2","@types/bson":"^4.0.5","@types/chai":"^4.2.22","@types/glob":"^7.1.4","@types/gulp":"^4.0.9","@types/heapdump":"^0.3.1","@types/lodash":"^4.14.175","@types/mocha":"^9.0.0","@types/node":"^16.10.3","@types/nsqjs":"^0.12.1","@types/redis":"^2.8.32","chai":"^4.3.4","codecov":"^3.8.3","codelyzer":"^6.0.2","del":"^6.0.0","gulp":"^4.0.2","gulp-bump":"^3.2.0","gulp-clean":"^0.4.0","gulp-replace":"^1.1.3","gulp-shell":"^0.8.0","gulp-sourcemaps":"^3.0.0","gulp-typescript":"^5.0.1","heapdump":"^0.3.15","merge-stream":"^2.0.0","mocha":"^9.1.2","mqtt":"^4.2.8","nsqjs":"^0.13.0","nyc":"^15.1.0","redis":"^3.1.2","reflect-metadata":"^0.1.13","ts-node":"^10.2.1","tslint":"^6.1.3","typescript":"4.4.3"},"dependencies":{"@allgemein/eventbus":"file:./packages/eventbus/src"},"peerDependencies":{"reflect-metadata":"^0.1.13"},"private":false,"nyc":{"extension":[".ts",".tsx"],"exclude":["**/*.d.ts","tmp/","build/"],"require":["ts-node/register"],"sourceMap":true,"instrument":true,"cache":false},"gitHead":"f6e0dbb216e65be9ef817a179a39fe567e9f6ada","_id":"@allgemein/eventbus-dev@0.14.2","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-m4JirBjfPIJn9XNIBZveCK65qMeShml1xULAJq91vluqfRKZ3Xy5lwF3yP04rW99UHSTfTmGmxo7fPBpg4JHYQ==","shasum":"57e51c4754cc396753bbef5c1a15575225b9333a","tarball":"https://registry.npmjs.org/@allgemein/eventbus-dev/-/eventbus-dev-0.14.2.tgz","fileCount":3,"unpackedSize":5848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzFACCRA9TVsSAnZWagAAuOMP/3MtMDsx346QNHmjlqJe\nfo8NaxDx+LH88UoVWveUYzty+QPQ2rX+rLuhC3F194HuHHP6cBVn6mU5hZyi\nHmrbcp5blA7JXeBmCBrtpjXwxpWkkYsTZ9mVjGPcY4PvuDSSMU1OlKzizxU1\nJZePPLkbXWP30Ly+x24ee089qv+Cut/yvTzEVx4+5QdVTgKOjI01UH0Mg6/k\nq4gaWvOsHpMgzaiSPTdAWtUhtsbJJgnhhhS3rHLHNOefRm2tqoYoBxjt+FhC\n7Lh0tNF1TlODuHrMu1feuHBSBpA+/eP2TPV4YnhHYA8qWW7LX4lCs4/V2han\nCYHLsAfTNNZ3Nvp4+75ldCzD7qkWf+soN16kd0C2r1ZdAFCeE7J76x1m0F7Y\nUsxF0FDfypUgA3KCviby6+Y4LZmbwHBol/fpnLLjx5ngQ4sgVMuFruDG4eEN\nNDes45T8M4fZ10QbCZQhxTbZDF0vtkAtKvsoXxdsI2FeBbwRY5rd2spXzdlp\n6L8Wh2qog5YiUaJUmHuiUkjOmyisX9AyXeDOAqHHZFTnd6LHY00Y86Dyj9Ve\nMWgbwP7ZIdOw9Lt1vNubqPAApYF562p3aB85cYEVpaEfvz/L3gQG3QMDBgO6\nB7FD8kitxgAdp/6UAMHMnkEUtO0xpVlt22oV5vZ8gb08E1IBi1+14LbW7Zb4\nZ85w\r\n=0x/d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEnyjqNy09hgDpi/o+dWf6Qh/dd+8HsGmQ6os4UkLQWMAiBvTcDYlv5ru3HHygXHW4Aind8thJnrL61Mha1UuGbYcA=="}]},"_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"directories":{},"maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eventbus-dev_0.14.2_1634477053288_0.3644871598141426"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-17T13:24:13.244Z","0.14.2":"2021-10-17T13:24:13.431Z","modified":"2022-04-04T13:32:50.499Z"},"maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"repository":{"type":"git","url":"git+https://github.com/allgemein-node/eventbus.git"},"author":{"name":"Robert Kania"},"bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"readme":"\n# @allgemein/eventbus\n\n\n[![Build Status](https://travis-ci.org/allgemein-node/eventbus.svg?branch=master)](https://travis-ci.org/allgemein-node/eventbus)\n[![codecov](https://codecov.io/gh/allgemein-node/eventbus/branch/master/graph/badge.svg)](https://codecov.io/gh/allgemein-node/eventbus)\n[![Dependency Status](https://david-dm.org/allgemein-node/eventbus.svg)](https://david-dm.org/allgemein-node/eventbus)\n\n\n## Usage\n\n```javascript\nimport 'reflect-metadata'\nimport {Event,EventBus,subscribe} from '@allgemein/eventbus'\n\n// Definition of the exchange object type\n@Event()\nclass MySuggestion {\n    content:string;\n    constructor(content:string){\n      this.content = content;\n    }\n}\n\n// subscribe to listening for the explicit object type\nclass WillListenOnEvent {\n\n  @subscribe(MySuggestion)\n  letstalk(data:MySuggestion){\n    console.log(data.content);\n  }\n}\n\nlet instance = new WillListenOnEvent()\nEventBus.register(instance);\n\n\nlet suggestion = new MySuggestion('blabla');\nEventBus.post(suggestion);\n\n// That's it\n\n```\n\nUse without annotations:\n\n```javascript\nimport 'reflect-metadata'\nimport {Event, subscribe, EventBus, EventBusMeta} from '@allgemein/eventbus'\n\n// Definition of the exchange object type\nclass MySuggestion {\n    content:string;\n    constructor(content:string){\n      this.content = content;\n    }\n}\n\n// subscribe to listening for the explicit object type\nclass WillListenOnEvent {\n\n  letstalk(data:MySuggestion){\n    console.log(data.content);\n  }\n}\n\nEventBusMeta.$().register({\n  type: 'subscribe',\n  target: WillListenOnEvent,\n  eventClass: MySuggestion,\n  methodName: 'letstalk',\n  configuration: 'default',\n  configurationOptions: null\n});\n\nlet instance = new WillListenOnEvent()\nEventBus.register(instance);\n\nlet suggestion = new MySuggestion('blabla');\nEventBus.post(suggestion);\n```\n\n\n## Supported adapter\n\n* default (Eventemitter)\n* nsq\n* redis\n\n## Configuration\n\nTODO\n\nExample configuration for nsq:\n\n```javascript\nimport {EventBus} from '@allgemein/eventbus'\n\nlet eventBusSettings = {\n  name: 'default_nsq',\n  adapter: 'nsq',\n  extra: {\n    reader: {\n      nsqdTCPAddresses:['localhost:4150'],\n      maxInFlight: 100,\n      messageTimeout: 30000\n    },\n    writer:{\n      host: '127.0.0.1',\n      port: 4150\n    }\n  }\n}\n\nEventBus.$().addConfiguration(eventBusSettings);\n\n```\n\nExample configuration for redis:\n\n```javascript\nimport {EventBus} from '@allgemein/eventbus'\n\nlet eventBusSettings = {\n  name: 'default_redis',\n  adapter: 'redis',\n  extra: {\n    host: '127.0.0.1',\n    port: 6379\n  }\n}\n\nEventBus.$().addConfiguration(eventBusSettings);\n\n```\n","readmeFilename":"README.md"}