{"_id":"@allgemein/eventbus","_rev":"8-2c4250035946b0394a54bcda697e79bd","name":"@allgemein/eventbus","dist-tags":{"latest":"0.17.1"},"versions":{"0.13.0":{"name":"@allgemein/eventbus","version":"0.13.0","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.13.0","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"nyc":{"cache":false,"exclude":["**/*.d.ts","tmp/","build/"],"require":["ts-node/register"],"extension":[".ts",".tsx"],"sourceMap":true,"instrument":true},"dist":{"shasum":"0061425e00f7d03fe9e974fcf7ddb74595185533","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.13.0.tgz","fileCount":176,"integrity":"sha512-mRewcMML+PirmC6wnXhADO7477GLz/Zh6Fx904MsDPWy200cZ3/EYGGa7fuYukogStb75u5WhjaJfKSUKOgsEA==","signatures":[{"sig":"MEYCIQDobqES1qkX/XXPX7HzBYdToT0dUguavLGZa1yHKBYnjwIhAOWq660A5CTcDZP7Ne3ow9U+TMQ/yB4eIuSRabaleVCl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240027},"main":"index.js","types":"./index.d.ts","browser":"browser.js","gitHead":"9a83bace57f37a8b6c2fc6001a10805ac2eb5737","scripts":{"test":"nyc mocha test/functional/*.spec.ts","posttest":"nyc report --reporter=json && codecov -f coverage/*.json"},"_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"7.24.0","description":"","directories":{},"_nodeVersion":"16.10.0","dependencies":{"bson":"^4.5.3","@allgemein/base":"^1.6.2"},"_hasShrinkwrap":false,"peerDependencies":{"reflect-metadata":"^0.1.13"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.13.0_1634336241846_0.7682779234408073","host":"s3://npm-registry-packages"}},"0.14.1":{"name":"@allgemein/eventbus","version":"0.14.1","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.14.1","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"dist":{"shasum":"2d4110d09425e4b36ef31af1ac121e4c8a8c6104","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.14.1.tgz","fileCount":176,"integrity":"sha512-qZH4XFGvLaAcNgQe8EmPtwDNUSg5z57ppO9CADg9zRgRf0OjL+tN8oSwL8RJRsf3QZEcDGde/qHVx8b2N3A4OA==","signatures":[{"sig":"MEQCIC8A5A6e+8nhfNMfPTQmEZpCwe2dfWWJZt9ksPYvA/ArAiAc57CnvAjQRVtJzto2Gqe1Cj5zzARamznxzSUBF6uD9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239814},"main":"index.js","types":"./index.d.ts","typexs":{"name":"eventbus"},"browser":"browser.js","gitHead":"5dac16a81fb8daf8c5dfc3c0786c4d8c4ded56b3","scripts":{"test":"nyc mocha test/functional/*.spec.ts","posttest":"nyc report --reporter=json && codecov -f coverage/*.json"},"_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"7.24.0","description":"","directories":{},"_nodeVersion":"16.10.0","dependencies":{"bson":"^4.5.3","@allgemein/base":"^1.6.2"},"_hasShrinkwrap":false,"peerDependencies":{"reflect-metadata":"^0.1.13"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.14.1_1634338390966_0.04298988847189911","host":"s3://npm-registry-packages"}},"0.14.2":{"name":"@allgemein/eventbus","version":"0.14.2","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.14.2","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"dist":{"shasum":"b6114f35c567f9a2b1eb402ef1599592ea8b3310","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.14.2.tgz","fileCount":176,"integrity":"sha512-RQAI/sOqkhYz3J8c1+uZva0GpxN8uV27Q/QWErxg0A5Qm/sY8sDd/Unq0GjCDWTJKDGheRYNzyjLTzHc4p9ghg==","signatures":[{"sig":"MEQCICPRYSclB4BZD9jnoNrG3qHO1Y3n8CCIlF9vQbNefMmMAiABDSuJtZXO9g8TNbx7jAJVk18hHhcLZQ/nmNV1Kq457A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh11bPCRA9TVsSAnZWagAAfx0P/1rWsqRzE9L3cAooHg3P\nv3N/ZBzWZLr4/SWPpw7lNejb2TFfoiyRJEOsGkMYqzy8teKipAIaFeS2Bwsz\nPWHcHUxyYC/lYHvHEj0xuUhC+zQb1MGxV3wynVGlxWuChug7yx+mP8/uabt8\ne8k1epZNKh93YLhcQNPs3fEmgMHkCUIz6RRZpBX45HAlliler9ML+gi7fNnR\n9Z+p2lFhDWZZbfp/rWTpgF8aVMTk1KzUcggUb63pPle6DrD2zTP+SntK3ngf\n5viNNofFbuiwCC0cSOapB2J2j0dW/gxECpIvGb66SN0Ak2XdNHH3G22yb5Uh\nVi8cWqqz72Mc1x+e3XyAYwxosyRDH3PK/dk9vDTvRrQG4KP1y+dLKX3RwkkL\nbnVrPdA3/KKXdJQOc3It+jxpQOauMxctGpET9HK5dssjPCoU6KeBBJJaaGxp\nUB5FHlWEJb0HiaoVc3zEe4Dxv4Uvv35YN3iF/La6J9DPoi9NAT8h7BgGomtM\neqkD2l4I7/o0fP/x5jZSpZRFlIz4g5s15EhkwllWf2UVuCHgr3FY+TkAwLIF\ndu2dHSIk1pHifT19zAJ8w/5WsaYrEycfLXXAkemTMmhr0Io6KbCgFMzmPq2N\n5cETuSfYYauUvwvloDAGuEpciNT9abIkfriddEWbRBWb/KS08iH7+7y2xWgS\ntEav\r\n=SM6A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"./index.d.ts","typexs":{"name":"eventbus"},"browser":"browser.js","gitHead":"f6e0dbb216e65be9ef817a179a39fe567e9f6ada","scripts":{"test":"nyc mocha test/functional/*.spec.ts","posttest":"nyc report --reporter=json && codecov -f coverage/*.json"},"_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"7.24.0","description":"","directories":{},"_nodeVersion":"16.10.0","dependencies":{"bson":"^4.5.3","@allgemein/base":"^1.6.2"},"_hasShrinkwrap":false,"peerDependencies":{"reflect-metadata":"^0.1.13"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.14.2_1634477295827_0.07348522094945631","host":"s3://npm-registry-packages"}},"0.15.0":{"name":"@allgemein/eventbus","version":"0.15.0","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.15.0","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"dist":{"shasum":"d2d7c152ef4ff8272574327a2d1cfc6c556569d2","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.15.0.tgz","fileCount":177,"integrity":"sha512-DOASP9JGXXVTMs6/eSLAlBVFkFDEqoSPEXNecjUDMmSyEGLUvDZGz8Kn7dxJ4DKFm9OvAlcxdHrspDRherPa5A==","signatures":[{"sig":"MEYCIQC2JVDiD3xQ+g3YCPnf24QyEr8wPKg4vZ94AyTWR31xeAIhAPjmr0RLThdLLIFRGluiv8STbMvc8bIniQHqGbavRdbg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":182333},"main":"index.js","typexs":{"name":"eventbus"},"browser":"browser.js","_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"lerna/8.1.9/node@v23.3.0+x64 (linux)","description":"","directories":{},"_nodeVersion":"23.3.0","dependencies":{"bson":"^6.10.1","@allgemein/base":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bson":"^4.2.4","reflect-metadata":"^0.2.2"},"peerDependencies":{"reflect-metadata":"*"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.15.0_1733524806591_0.2070066364291887","host":"s3://npm-registry-packages"}},"0.16.0":{"name":"@allgemein/eventbus","version":"0.16.0","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.16.0","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"dist":{"shasum":"67c1d3ea4b3635a4022a794db6d2e64a3cd871b5","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.16.0.tgz","fileCount":177,"integrity":"sha512-TjP3+NzyhdgicoCssu3GkAjWnv3st3NerRED+uvHJ2Wt8WCaHsejr8iZm2bUdCWrzpU3NxvwSpEJa2m2nWN9RA==","signatures":[{"sig":"MEQCIEtsy5X6y+juPwgz9V2dekZHtT+RE3Q2qCFUGj3Ef8b2AiBThYxmhtMXfBT7Mth+m58otsj+tZIJDjzA2zfLxM59OA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":182624},"main":"index.js","typexs":{"name":"eventbus"},"browser":"browser.js","_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"lerna/8.1.9/node@v23.3.0+x64 (linux)","description":"","directories":{},"_nodeVersion":"23.3.0","dependencies":{"bson":"^6.10.1"},"_hasShrinkwrap":false,"devDependencies":{"mqtt":"^5.10.3","nsqjs":"^0.13.0","redis":"^4.7.0","@types/nsqjs":"^0.12.4","@allgemein/base":"^1.8.0"},"peerDependencies":{"@allgemein/base":"*","reflect-metadata":"*"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.16.0_1733677256038_0.01594225179524078","host":"s3://npm-registry-packages"}},"0.16.1":{"name":"@allgemein/eventbus","version":"0.16.1","keywords":["nsq","nsqd","mqtt","eventbus","redis","pubsub","publish","subscribe","queue","commons","allgemein"],"author":{"name":"Robert Kania"},"_id":"@allgemein/eventbus@0.16.1","maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"homepage":"https://github.com/allgemein-node/eventbus","bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"dist":{"shasum":"1cc0412b546ad1db0ff7fa178458ab42dde9ebd1","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.16.1.tgz","fileCount":177,"integrity":"sha512-wQCYXsgC7ohG9B91y5Yp6HOEqALkwsszNLFNxE+QN98cxjQKleUlU+ZaWidfyCEaGFnl1c0d3j8cANcdnBsghA==","signatures":[{"sig":"MEYCIQCPP7qLWzCfhDZrt04VPMgJGJ4E12ocBdO8+M/eEl4IMAIhAMaUDA1U79zAva3CRDvmVOPORUdyuK+4GZFuj1A4RVaQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":182624},"main":"index.js","typexs":{"name":"eventbus"},"browser":"browser.js","_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"repository":{"url":"git+https://github.com/allgemein-node/eventbus.git","type":"git"},"_npmVersion":"lerna/8.1.9/node@v23.3.0+x64 (linux)","description":"","directories":{},"_nodeVersion":"23.3.0","dependencies":{"bson":"^6.10.1"},"_hasShrinkwrap":false,"devDependencies":{"mqtt":"^5.10.3","nsqjs":"^0.13.0","redis":"^4.7.0","@types/nsqjs":"^0.12.4","@allgemein/base":"^1.8.1"},"peerDependencies":{"@allgemein/base":"*","reflect-metadata":"*"},"_npmOperationalInternal":{"tmp":"tmp/eventbus_0.16.1_1733745529567_0.9325435778811411","host":"s3://npm-registry-packages-npm-production"}},"0.17.1":{"name":"@allgemein/eventbus","version":"0.17.1","description":"","main":"index.js","browser":"browser.js","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"],"dependencies":{"bson":"^6.10.1"},"devDependencies":{"@allgemein/logging":"*","@types/nsqjs":"^0.12.4","mqtt":"^5.10.3","nsqjs":"^0.13.0","redis":"^4.7.0"},"peerDependencies":{"@allgemein/logging":"*","reflect-metadata":"*"},"typexs":{"name":"eventbus"},"_id":"@allgemein/eventbus@0.17.1","gitHead":"e489822d6539c5e2dc9fe006fc162658dabb2dce","types":"./index.d.ts","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Tj28eksNLyViQj5PnwsNDKgBVm8MvZeiAqgmmh0LWknJhyizj0KIEipLhhnAk8a3tLrTul/S0K2yZ9VvQ88fIg==","shasum":"5bcefdf3537eddc9a093c1e11c54d93f7d21577d","tarball":"https://registry.npmjs.org/@allgemein/eventbus/-/eventbus-0.17.1.tgz","fileCount":179,"unpackedSize":185324,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEauEdYca7WO0A3yZDQcO0/TJ1eAIiG4H39IyH8Cgn0rAiEAg7TkeHDFzCi5sxWQs2X0nxPeD/cLcfq4sGa9W4XgG/c="}]},"_npmUser":{"name":"cezaryrk","email":"cezaryrk@yahoo.de"},"directories":{},"maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eventbus_0.17.1_1734433465129_0.8399503642559942"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-15T22:17:21.781Z","modified":"2024-12-17T11:04:25.514Z","0.13.0":"2021-10-15T22:17:22.087Z","0.14.1":"2021-10-15T22:53:11.161Z","0.14.2":"2021-10-17T13:28:16.000Z","0.15.0":"2024-12-06T22:40:06.856Z","0.16.0":"2024-12-08T17:00:56.240Z","0.16.1":"2024-12-09T11:58:49.730Z","0.17.1":"2024-12-17T11:04:25.343Z"},"bugs":{"url":"git+https://github.com/allgemein-node/eventbus.git"},"author":{"name":"Robert Kania"},"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"},"maintainers":[{"name":"cezaryrk","email":"cezaryrk@yahoo.de"}],"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```typescript\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```typescript\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```typescript\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```typescript\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"}