{"_id":"@castore/message-bus-adapter-in-memory","_rev":"8-8266f19fa6163f6ced4823a7fc0a7497","name":"@castore/message-bus-adapter-in-memory","dist-tags":{"latest":"2.4.2"},"versions":{"2.0.0":{"name":"@castore/message-bus-adapter-in-memory","version":"2.0.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.0.0","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"332c4727da74d7a418d12a8792b9fdcdc5d88380","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.0.0.tgz","fileCount":35,"integrity":"sha512-qv9n/J3S5y3lhmaoY+4rGCFO9Nz1bTrG2TveABb5GXQMJvRMQLt6tEvaUFX/0BgC4zsLQjlGTLcd82IGcAoBng==","signatures":[{"sig":"MEYCIQCLtWV1gux0lc5E8HhrgBTrzRgRFOUo7zu82OuHik2uvwIhAK386E9C+Em1ZdC++Nj5BaDeSHTb6eHvbHk6uU1Z/RO3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169982},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"a00ddf6ae99fbe78737f648da21dc7aad4883733","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"9.8.1","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.0.0_1698427521236_0.1941157865737655","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@castore/message-bus-adapter-in-memory","version":"2.1.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.1.0","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"a153544fd3f437cc29300a6f4e8b8b2e685a4802","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.1.0.tgz","fileCount":35,"integrity":"sha512-qPgAlJ4i/9ExuxOHR0nwY4V3HhjZOh0r1NShTlTObCXbKOpocYjygNKyXCyTQ7NacB6CYfkeM12jD77qZGCnoA==","signatures":[{"sig":"MEUCIDP7L1NLlV7RlSGeNrlGL5KX0iaNs+KZnwQBmCDgSDfTAiEAoVksHCBzmbmD/SkFRq8WlPTnJsuR1II6Ml+cdstVIto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169982},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"80c3a1f242e1f30f789312fc5a421789f189beb5","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"9.8.1","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"18.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.1.0_1699022262168_0.9061486207789002","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@castore/message-bus-adapter-in-memory","version":"2.2.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.2.0","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"75d842b74fdf26cb1405a2b846d30382944d5445","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.2.0.tgz","fileCount":35,"integrity":"sha512-iHkbz5y3Qw1ZjmiWvlBGz8/6TubOdNETHi1p7oRyliOPKTbxhQMj58orqLD1TAYSA6MaI5lg/pdEvuwm87HxQg==","signatures":[{"sig":"MEUCIQC1YIvspy5pZM5IDUR7jTGyKDm+9dIOYq4dNAAI2Ec9ugIgawmH7++Q2+VsBiNPNkdKcich1HFRwkgmEvsgxd+W0Hc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169781},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"3cedccd6195f6afd90b6dcb30fd3511bacb4b5e7","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.2.3","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"18.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.2.0_1705427203922_0.8999704848331254","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@castore/message-bus-adapter-in-memory","version":"2.3.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.3.0","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"f59bc2389837d87e291409d31e6979908734e6ef","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.3.0.tgz","fileCount":35,"integrity":"sha512-M2T3EuNkavVoImqd2d9NShO0PTtnUPFNry5SHg+EnyZimAHsZweTruWF217dLUn3bbqrJiauJ9MAem6cL6yoiA==","signatures":[{"sig":"MEQCIFPZoAmgKJ8Jxxsn7TzR5CWGQLwV++WLeJ7WSDE0yDaaAiACbWKm/n1Io3R87eUQHTs0pPzjLFLaYOBMsyzWyAKcQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169805},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"aa8c8f824db8f4e38afd58f7b9f389c7211acd26","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.2.4","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"18.19.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.3.0_1710957134250_0.512118805567698","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@castore/message-bus-adapter-in-memory","version":"2.3.1","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.3.1","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"997aa37c3734096578e7e0ebc9c0fee3b951ede5","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.3.1.tgz","fileCount":35,"integrity":"sha512-dL8WkCiv91MIgGRRwdKP2CJOyiPNKTMhtunPFVBkpk6Qwh6f7q/dsAn8a1a/I/w0NMa4Vn1wpPmhh+xS+2eNyA==","signatures":[{"sig":"MEYCIQCCafsd4ix8WUmyRgCCuXaW9VKpgm5cGsXIP8vo847YwgIhAKAbNvezZG3rCBYuQka3SdfrvGbXHvISpBVhscZQZJ4/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169805},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"ec117c540dcadb351b35e349f04dc9f4d7937a38","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.5.0","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"18.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.3.1_1714035450995_0.002451880705471421","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@castore/message-bus-adapter-in-memory","version":"2.4.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.4.0","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"282ce3819e83bd755bd85a9fd5d5edd09752223c","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.4.0.tgz","fileCount":35,"integrity":"sha512-Mi5E0H8j/RAZieaFkjIal+r522w/N5glIJtcsLVKbG5Jd0gEITEuTIWKbjoDQSLnT5rvkvFiTsBKAzUp318TlA==","signatures":[{"sig":"MEUCIQDjuLgvx2hx8AENVnOcQ16lffF02ZzWGBYTQUqyIicKWgIgYMxnRH6P/QoVbfXxoxYXKzzopVsa1gh0eJHaO2iwTJk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":169805},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"313e001988903763e7eb169751114c5f71cc3efe","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.8.2","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.4.0_1739877956650_0.8931911775313917","host":"s3://npm-registry-packages-npm-production"}},"2.4.1":{"name":"@castore/message-bus-adapter-in-memory","version":"2.4.1","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-bus-adapter-in-memory@2.4.1","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"dist":{"shasum":"0d646895071e3982f6ea4275ee58aad8b0fd5293","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.4.1.tgz","fileCount":35,"integrity":"sha512-jRfLxEC03EUWGmZa3/uNdA6B1SeIU4zHWn1tH2noJb4dYzZQrCIFHGgpSqq3ZimdbcGg6y6RaC+PnxYWeOtbSA==","signatures":[{"sig":"MEUCIE2/zWg92XwfFjvys26nQFUQTW1ozKTpQaoHa2bbdcHCAiEAncJFU6iQdit80S0J42ZSHzg23kpJjVnXNygBqclIFs0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":169805},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"28c9f4e5c7c7527b6d3b5e5d9834789c2e64fd5e","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.8.2","description":"DRY Castore MessageBus definition using EventEmitter","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","dependency-cruiser":"^11.7.0","@castore/demo-blueprint":"workspace:","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-bus-adapter-in-memory_2.4.1_1740488560920_0.2527473893742458","host":"s3://npm-registry-packages-npm-production"}},"2.4.2":{"name":"@castore/message-bus-adapter-in-memory","description":"DRY Castore MessageBus definition using EventEmitter","license":"MIT","homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"repository":{"type":"git","url":"git+https://github.com/theodo/castore.git"},"keywords":["event","source","store","typescript"],"publishConfig":{"access":"public"},"sideEffects":false,"main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.ts","scripts":{"lint-fix":"yarn linter-base-config --fix","lint-fix-all":"yarn lint-fix .","linter-base-config":"eslint --ext=js,ts","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","test-circular":"yarn depcruise --validate dependency-cruiser.js .","test-linter":"yarn linter-base-config .","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@castore/core":"workspace:","@castore/demo-blueprint":"workspace:","@types/node":"^17.0.29","babel-plugin-module-resolver":"^4.1.0","concurrently":"^7.1.0","dependency-cruiser":"^11.7.0","eslint":"^8.14.0","prettier":"^2.6.2","ts-node":"^10.7.0","tsc-alias":"^1.8.7","typescript":"^4.6.3","vitest":"^0.26.2"},"maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"nx":{"targets":{"package":{"outputs":["packages/message-bus-adapter-in-memory/dist"]}}},"peerDependencies":{"@castore/core":"^2.0.0"},"version":"2.4.2","_id":"@castore/message-bus-adapter-in-memory@2.4.2","gitHead":"fd79dfcc42ef28d216b08007edacd21208ba1876","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-cPh5QSaCB+rzAiy84Tg7VyFL5DhQM5rIpeqqz1ONE6FrQxA+fXcClP0foBDWmwATaPpmDVygeCcMIAAsFpOmfw==","shasum":"58f9bf7ab203a321f8c806eb0d22692ce5c14a29","tarball":"https://registry.npmjs.org/@castore/message-bus-adapter-in-memory/-/message-bus-adapter-in-memory-2.4.2.tgz","fileCount":35,"unpackedSize":169805,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBlaJb/1vOdAZ2bj9E1tjqgtzz798EEzjQTN7obEVhVEAiAgXBKTrebZTDN5FLQcujoyeLwTFc5HDt9cTH+sXeJQlg=="}]},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/message-bus-adapter-in-memory_2.4.2_1744991125361_0.5598402239261266"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-27T17:25:21.158Z","modified":"2025-04-18T15:45:25.771Z","2.0.0":"2023-10-27T17:25:21.418Z","2.1.0":"2023-11-03T14:37:42.428Z","2.2.0":"2024-01-16T17:46:44.099Z","2.3.0":"2024-03-20T17:52:14.435Z","2.3.1":"2024-04-25T08:57:31.208Z","2.4.0":"2025-02-18T11:25:57.023Z","2.4.1":"2025-02-25T13:02:41.142Z","2.4.2":"2025-04-18T15:45:25.570Z"},"bugs":{"url":"https://github.com/theodo/castore/issues"},"license":"MIT","homepage":"https://github.com/theodo/castore#readme","keywords":["event","source","store","typescript"],"repository":{"type":"git","url":"git+https://github.com/theodo/castore.git"},"description":"DRY Castore MessageBus definition using EventEmitter","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"readme":"# In Memory Message Bus Adapter\n\nDRY Castore [`MessageBus`](https://castore-dev.github.io/castore/docs/reacting-to-events/message-buses/) definition using [Event Emitters](https://nodejs.org/api/events.html#events).\n\n## 📥 Installation\n\n```bash\n# npm\nnpm install @castore/message-bus-adapter-in-memory\n\n# yarn\nyarn add @castore/message-bus-adapter-in-memory\n```\n\nThis package has `@castore/core` as peer dependency, so you will have to install it as well:\n\n```bash\n# npm\nnpm install @castore/core\n\n# yarn\nyarn add @castore/core\n```\n\n## 👩‍💻 Usage\n\nThe simplest way to use this adapter is to use the `attachTo` static method:\n\n```ts\n// 👇 Note: EventEmitter is a native NodeJS library\n// Outside of NodeJS (like browsers) you can use the event-emitter package\nimport { EventEmitter } from 'events';\n\nimport { InMemoryMessageBusAdapter } from '@castore/message-bus-adapter-in-memory';\n\nconst eventEmitter = new EventEmitter();\n\nconst messageBusAdapter = InMemoryMessageBusAdapter.attachTo(\n  appMessageBus,\n  { eventEmitter }, // <= Constructor arguments\n);\n```\n\nThis will make your `messageBusAdapter` inherit from your `appMessageBus` types while plugging them together 🙌\n\nYou can also instanciate one on its own, but notice the code duplication:\n\n```ts\nimport type { MessageBusMessage } from '@castore/core';\nimport { InMemoryMessageBusAdapter } from '@castore/message-bus-adapter-in-memory';\n\nconst messageBusAdapter = new InMemoryMessageBusAdapter<\n  MessageBusMessage<typeof appMessageBus>\n>({ eventEmitter });\n\nappMessageBus.messageBusAdapter = messageBusAdapter;\n```\n\n## 👂 Add listeners\n\nSimilarly to event emitters, the `inMemoryMessageBusAdapter` exposes an `on` method that takes two arguments:\n\n- A filter patterns to optionally specify an `eventStoreId` and an event `type` to listen to (`NotificationEventBus` and `StateCarryingEventBus` only), and wether replayed events should be included\n- An async callback to execute if the message matches the filter pattern\n\n```ts\n// 👇 Listen to all messages\nmessageBusAdapter.on({}, async message => {\n  // 🙌 Correctly typed!\n  const { eventStoreId, event } = message;\n});\n\n// 👇 Listen only to pokemons messages\nmessageBusAdapter.on({ eventStoreId: 'POKEMONS' }, async message => {\n  // 🙌 Correctly typed!\n  const { eventStoreId, event } = message;\n});\n\n// 👇 Listen only to POKEMON_APPEARED created messages\nmessageBusAdapter.on(\n  { eventStoreId: 'POKEMONS', eventType: 'POKEMON_APPEARED' },\n  async message => {\n    // 🙌 Correctly typed!\n    const { eventStoreId, event } = message;\n  },\n);\n\n// 👇 Include replayed events\nmessageBusAdapter.on(\n  { eventStoreId: 'POKEMONS', eventType: 'POKEMON_APPEARED', onReplay: true },\n  async message => {\n    // 🙌 Correctly typed!\n    const { eventStoreId, event } = message;\n  },\n);\n```\n\nFor more control, the callback has access to more context through its second argument:\n\n```ts\nmessageBusAdapter.on(\n  ...,\n  async (message, context) => {\n    const { eventStoreId, event } = message;\n    const {\n      // 👇 See \"Retry policy\" section below\n      attempt,\n      retryAttemptsLeft,\n      // 👇 If event is replayed\n      replay,\n    } = context;\n  },\n);\n```\n\nThe same callback can be re-used with different filter patterns. If a message matches several of them, it will still be triggered once:\n\n```ts\nconst logSomething = async () => {\n  console.log('Received message!');\n};\n\nmessageBusAdapter.on({ eventStoreId: 'POKEMONS' }, logSomething);\nmessageBusAdapter.on(\n  { eventStoreId: 'POKEMONS', eventType: 'POKEMON_APPEARED' },\n  logSomething,\n);\n\nawait appMessageBus.publishMessage(pokemonAppearedEvent);\n\n// 👇 Console output (only once):\n// \"Received message!\"\n```\n\n> Listeners cannot be removed for now.\n\n## ♻️ Retry policy\n\nThis adapter will retry failed messages handling on a per listener basis. You can specify a different retry policy than the default one via its constructor arguments:\n\n- <code>retryAttempts <i>(?number = 2)</i></code>: The maximum number of retry attempts for a message in case of listener execution failure. If all the retries fail, the error is logged with `console.error`, and the message ignored.\n- <code>retryDelayInMs <i>(?number = 30000)</i></code>: The minimum delay in milliseconds between a listener execution failure and its first retry.\n- <code>retryBackoffRate <i>(?number = 2)</i></code>: A factor applied to the `retryDelayInMs` at each subsequent retry.\n\n```ts\nconst messageBusAdapter = InMemoryMessageBusAdapter.attachTo(appMessageBus, {\n  eventEmitter,\n  retryAttempts: 3,\n  retryDelayInMs: 10000,\n  retryBackoffRate: 1.5,\n});\n\n// 👇 Alternatively\nconst messageBusAdapter = new InMemoryMessageBusAdapter<\n  MessageBusMessage<typeof appMessageBus>\n>({\n  eventEmitter,\n  retryAttempts: 3,\n  retryDelayInMs: 10000,\n  retryBackoffRate: 1.5,\n});\n```\n\nFor instance, if a message is listened by two listeners A and B, with listener A continously failing, the sequence of code execution (with the default retry policy) will look like this:\n\n- Listener A execution: ❌ Failure\n- Listener B execution: ✅ Success\n- _30 seconds of delay_\n- Listener A execution: ❌ Failure\n- _60 seconds of delay (30x2)_\n- Listener A execution: ❌ Failure\n- _No more retry attempt, error is logged_\n","readmeFilename":"README.md"}