{"_id":"@arki/event-sourcing","_rev":"8-2499c148c0b85a34f9aa90e1521a261c","name":"@arki/event-sourcing","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@arki/event-sourcing","version":"0.1.0","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.0","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"5bf5c372791f12beeb3d924eaf30f07dcad1171b","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.0.tgz","fileCount":130,"integrity":"sha512-bGqwNGBVA4Ss9v2ZTt7HaCNU/dNyKzUzRa7RI2+dNzASLQDCn9NZAA5KEFjfHzkZy0xizRmY8YO4DRoDjTGE5A==","signatures":[{"sig":"MEYCIQDPRmiRIbjDaniGuhk07cqEUkTywA2yXcaHekWvh4cffAIhAOaeGZV+mwUTz5+EhIut2iEOFgxqNcuQ1+ux3C8OOjt/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":281321},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"9de2af727a30e1081cb81864ce1b144a91d79855","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.1","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.1","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.1.0"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.0_1779377960293_0.2156835924262981","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@arki/event-sourcing","version":"0.1.1","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.1","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"91b1e6992f74f97317b2a4fa759230b3a0b08b44","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.1.tgz","fileCount":129,"integrity":"sha512-DszgqFvmU+Vjkp/AJsp0sHwOu3k10c1bCWbWJXYskYl9NU7RvAG+cjnF5Lx3CagBXdrkJQdXjaeNJ7LnJsHe/w==","signatures":[{"sig":"MEQCIDmMFlO13mg5PRNkxLVRHKwC9+MkCazi6HGQgkW0V3SMAiAQgsKBijD02pQ/5b43CBlr6hbgbNCGKgxSqFwKACxFMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":283235},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"ec6a34f9c9551065c4487586fc1fde916257bbba","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.1","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.1","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.1.1"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.1_1783065020337_0.37198014642623645","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@arki/event-sourcing","version":"0.1.2","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.2","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"2ad571f1e0a3ba807986b1fc1fbf74225728ea84","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.2.tgz","fileCount":151,"integrity":"sha512-JPuUP5hxia8pCDE3XtDMyjgrL0l6S4nfVzZrbmFgHQLNJABGQ95+X+J2AEUh0Y4i9XJA5hsUj9jAx0PKwi7icA==","signatures":[{"sig":"MEYCIQDJplHlAbAD7nLbtfC2/H0wmluODWPoTIEg+jJ3DY8VKwIhANT3tMpP9ptU2AnqBjQkmUHeF0S/3PEn+YbK8gEQys+H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":393181},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"90af27143011346380d0118c359cf82a0a6351b8","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.2","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.2","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.1.2"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.2_1783067622949_0.6184927718677036","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@arki/event-sourcing","version":"0.1.3","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.3","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"47e50410acf26dc55298fd20fe4613c502c681db","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.3.tgz","fileCount":151,"integrity":"sha512-Q/1yWfzGVV084dij2EB+9CYbLE5wO4+zxFCA9DcnZWT/2fWb31y+yib/C7CdWXYjI6MAriVAvmuOmfyoseUsyA==","signatures":[{"sig":"MEYCIQD6TVpKf2JGRxyAbWS1rdzZMKSjm5yg+/HdvhpPfvN9AQIhAJpiGE76CcZICf3QtpjCh8clx5oWfzE/nE0GxqbXuc7T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":393181},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"86a6bc36ef57bfc108f1040f0ea02a4dc87bad6e","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.2","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.2","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.1.3"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.3_1783172486920_0.06217491574968981","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@arki/event-sourcing","version":"0.1.4","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.4","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"858116724f24229ca4a8b557bbdfaec827a4839b","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.4.tgz","fileCount":151,"integrity":"sha512-UGFRCkbI3wQX4NTIli0xYrBLOWyBlniBgF456K6HjS86NSa5dBopsWW1JwZ5g7xfrvY2zVuVNc3Ves3rn1mOqg==","signatures":[{"sig":"MEUCIQD0DnFipNhLkXlTcRCr59pQeLo/Rj12LAJPcmlvGav1+gIgJYUDBIPw2ycZjTxBXsgtBWbtbO95/3CCUTR9GYRLMyU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":393181},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"a10bbc5a4bae5c1532111165056aea17fdc3730f","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.2","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.2","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.2.0"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.4_1783348393569_0.9455958090476717","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@arki/event-sourcing","version":"0.1.5","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.1.5","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"37e3c66730f9e85de5404931329d1fae1dd40203","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.1.5.tgz","fileCount":151,"integrity":"sha512-wD7nTys96M8U04u4Y7ov3K0XATnaaTqypxPVGkSDflAhfjFD2UwYkyCZEmAx5nRygaZUxzEKanBlZs9D6V2VUw==","signatures":[{"sig":"MEQCIEOHrtpWT+cWIfHQhx/PwjzRSP6W5dDR5CVc3dt3TB8eAiAPX9exGeLq+nMHDiY1XIc1RjNtl+3Hzi5YE4u8OutrDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":393181},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"31bbbd188f6a5f5e1c278c40f8dbcbefa21ac196","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.2","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.2","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.3.0"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.1.5_1783407021042_0.9654593408411911","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@arki/event-sourcing","version":"0.2.1","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"license":"MIT","_id":"@arki/event-sourcing@0.2.1","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"dist":{"shasum":"aa9ee1ef9d3d65a5fd239a1f463109a056b3264c","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.2.1.tgz","fileCount":161,"integrity":"sha512-uXMZ3Ro9+v9eNva7tGZ/JA8xICcwyVHqndUfPWvzqKOjLr+G/UswAWvvHqdNam8k+LTHAQ0m0OXkt46PoTiQ1A==","signatures":[{"sig":"MEUCIQCPM/rZ09Qj6MDPXzrY2w+o2yS/E7QPjpXTYJz/uw60WgIgazuVeo6j0Nm1IVvbyLKvolDYqv8xoQmHE6xP4+8wfa4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":460202},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./projection":{"types":"./dist/projection.d.ts","import":"./dist/projection.js","default":"./dist/projection.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./package.json":"./package.json"},"gitHead":"c2f4c2606cf870f636b60690fee772a4ff7935c9","_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"repository":{"url":"git+https://github.com/arki-labs/arki.git","type":"git"},"_npmVersion":"10.9.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","directories":{},"sideEffects":false,"_nodeVersion":"22.13.1","dependencies":{"ansis":"^3.3.2","@arki/log":"0.0.2","drizzle-orm":"1.0.0-rc.1","@arki/contracts":"0.0.3","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@arki/dot":"^0.4.0"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/event-sourcing_0.2.1_1783539609673_0.394880395721255","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@arki/event-sourcing","version":"0.2.2","description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/arki-labs/arki.git"},"homepage":"https://arki.dev","bugs":{"url":"https://github.com/arki-labs/arki/issues"},"keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"type":"module","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./builders":{"types":"./dist/builders/index.d.ts","import":"./dist/builders/index.js","default":"./dist/builders/index.js"},"./bus":{"types":"./dist/bus.d.ts","import":"./dist/bus.js","default":"./dist/bus.js"},"./command":{"types":"./dist/command.d.ts","import":"./dist/command.js","default":"./dist/command.js"},"./command-flow":{"types":"./dist/command-flow.d.ts","import":"./dist/command-flow.js","default":"./dist/command-flow.js"},"./decide":{"types":"./dist/decide.d.ts","import":"./dist/decide.js","default":"./dist/decide.js"},"./dot":{"types":"./dist/dot.d.ts","import":"./dist/dot.js","default":"./dist/dot.js"},"./projection":{"types":"./dist/projection.d.ts","import":"./dist/projection.js","default":"./dist/projection.js"},"./event":{"types":"./dist/event.d.ts","import":"./dist/event.js","default":"./dist/event.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"},"./package.json":"./package.json"},"dependencies":{"@arki/contracts":"0.0.3","@arki/log":"0.0.2","@event-driven-io/emmett":"^0.41.0","@event-driven-io/emmett-postgresql":"^0.41.0","ansis":"^3.3.2","drizzle-orm":"1.0.0-rc.1"},"peerDependencies":{"@arki/dot":"^0.4.0"},"peerDependenciesMeta":{"@arki/dot":{"optional":true}},"publishConfig":{"access":"public"},"_id":"@arki/event-sourcing@0.2.2","gitHead":"833288b81383d6375591075f481a2c7b29688261","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ygez33i3OdlitXjs/M3is+etwfghK1FQC0E6Ht7TvT2ZrmcgG4ARW2O1qnBmtW67nl2sozht5YD4vTeHXD/0Yw==","shasum":"3d851acfb779cdcc549d5db319327620c9a9335d","tarball":"https://registry.npmjs.org/@arki/event-sourcing/-/event-sourcing-0.2.2.tgz","fileCount":161,"unpackedSize":460235,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcwog3qCEeygINIe47aqCUV2erdoN+BuDyEU+Gn5QtIAIhAIPpvfggth6JfapNgk/ykLnXmrBirND2EUvtmyZqYPTs"}]},"_npmUser":{"name":"afurculita","email":"alex@furculita.net"},"directories":{},"maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/event-sourcing_0.2.2_1783598748005_0.08021635419204287"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-21T15:39:20.109Z","modified":"2026-07-09T12:05:48.250Z","0.1.0":"2026-05-21T15:39:20.486Z","0.1.1":"2026-07-03T07:50:20.482Z","0.1.2":"2026-07-03T08:33:43.086Z","0.1.3":"2026-07-04T13:41:27.117Z","0.1.4":"2026-07-06T14:33:13.745Z","0.1.5":"2026-07-07T06:50:21.180Z","0.2.1":"2026-07-08T19:40:09.833Z","0.2.2":"2026-07-09T12:05:48.139Z"},"bugs":{"url":"https://github.com/arki-labs/arki/issues"},"license":"MIT","homepage":"https://arki.dev","keywords":["arki","typescript","event-sourcing","cqrs","emmett","postgres","drizzle","process-manager","saga"],"repository":{"type":"git","url":"git+https://github.com/arki-labs/arki.git"},"description":"Event sourcing primitives — event store, message bus, projections, process managers — built on Emmett for ARKI.","maintainers":[{"name":"afurculita","email":"alex@furculita.net"}],"readme":"# @arki/event-sourcing\n\nEvent sourcing primitives for the ARKI package family — event store, message bus, command handlers, projections, and process managers, built on top of [Emmett](https://event-driven-io.github.io/emmett/) with `@event-driven-io/emmett-postgresql`.\n\n## Installation\n\n```sh\nnpm install @arki/event-sourcing\n# or\nbun add @arki/event-sourcing\n# or\npnpm add @arki/event-sourcing\n```\n\nPeer-installs:\n\n- `@event-driven-io/emmett` (re-exported core types)\n- `@event-driven-io/emmett-postgresql` (PostgreSQL event store)\n- `drizzle-orm` (for projections that write through a Drizzle handle)\n\n## What you get\n\n- **Event store** — `getEventStore(connectionString, options)` opens a PostgreSQL event store with a clean `close()` that releases the pool.\n- **Message bus** — `eventSourcingFeatures.initMessageBus(eventStore, handlers)` builds an in-memory message bus, registers command handlers, and wraps each handler with stream-name resolution + logging.\n- **DOT adapter** — `eventSourcing()` opens the store, publishes `eventStore` + `messageBus`, collects feature-local ES bundles, and registers the `event-catalog` projection.\n- **Process managers** — `createProcessManager` (per-batch), `createStatefulProcessManager` (per-batch with state), and `createSimpleProcessManager` (per-message with a pre-bound context).\n- **Builders** — `defineCommand`, `defineEvent`, `defineDecider`, `defineProjection`, `defineCommandHandler`, `defineProcessManager`, `defineStatefulProcessManager` for type-safe authoring.\n- **Drizzle projection helpers** — `drizzleProjection` / `drizzleWithRepoProjection` so projection handlers receive a typed Drizzle database (or repository registry) instead of a raw client.\n\n## Quick start\n\n### DOT app setup\n\n```ts\nimport { z } from '@arki/contracts';\nimport { defineApp, plugin, provide, token } from '@arki/dot';\nimport { eventSourcing, es, type EsBundle } from '@arki/event-sourcing/dot';\nimport { defineCommand, defineCommandHandler, defineEvent } from '@arki/event-sourcing/builders';\n\nconst placeOrder = defineCommand({\n  type: 'PlaceOrder',\n  inputSchema: z.object({ orderId: z.string(), total: z.number() }),\n});\n\nconst orderPlaced = defineEvent({\n  type: 'OrderPlaced',\n  dataSchema: z.object({ orderId: z.string(), total: z.number() }),\n});\n\nconst placeOrderHandler = defineCommandHandler({\n  initialState: () => ({ placed: false }),\n  evolve: (state, event) => (event.type === 'OrderPlaced' ? { placed: true } : state),\n  decide: (command, state) => {\n    if (state.placed) throw new Error('Order already placed');\n    return [orderPlaced({ orderId: command.data.orderId, total: command.data.total })];\n  },\n});\n\nexport const OrdersEs = token<EsBundle>()('orders.es');\n\nexport const ordersEsPlugin = plugin({\n  name: 'orders-es',\n  actions: [placeOrder, orderPlaced],\n  boot: () =>\n    provide(\n      OrdersEs,\n      es.bundle({\n        handlers: [es.handle(placeOrder, placeOrderHandler, command => `order-${command.data.orderId}`)],\n        readModels: [],\n      }),\n    ),\n});\n\nexport const app = defineApp('shop-api')\n  .use(ordersEsPlugin)\n  .use(eventSourcing({ bundles: [OrdersEs], dbUrl: process.env.DB_URL }));\n```\n\n`eventSourcing()` may be mounted with no options for append-only mode. It resolves the store URL from `EVENT_STORE_URL`, `EVENTSTORE_URL`, or `EVENT_DB_URL`; apps that use a different env name should pass `dbUrl` explicitly.\n\nCommands and events produced by `defineCommand` / `defineEvent` contribute DOT actions. `dot explain --as event-catalog` renders their JSON Schemas without booting the app. Deprecated dynamic `commandHandlers` still run, but are intentionally absent from the manifest and catalog.\n\n### Composition order\n\nFeature plugins that handle commands publish ES bundles. Feature plugins that send commands need the `messageBus` service. Mount them in this order:\n\n```text\nes-feature plugins -> eventSourcing() -> http/queue feature plugins that need messageBus -> http()/queue runtime\n```\n\nA feature that both handles `PlaceOrder` and exposes `POST /orders` should be split into two plugins: `orders-es` publishes `OrdersEs`; `orders-http` needs `messageBus` and binds the HTTP route.\n\n### HTTP and queue recipes\n\nExpose a command over HTTP explicitly:\n\n```ts\nroutes().bind(placeOrderRoute, async ({ body }, { messageBus }) => {\n  await messageBus.send(placeOrder(body));\n  return { ok: true };\n});\n```\n\nUse `@arki/queue` for durable/async command transport:\n\n```ts\njobs.worker('orders.place', async ({ payload }, { messageBus }) => {\n  await messageBus.send(placeOrder(payload));\n});\n```\n\nThe message bus published by this package is strictly in-process synchronous dispatch. It is not durable, does not distribute work across instances, and does not survive restarts or rolling deploys.\n\n### Programmatic bootstrap\n\nNon-DOT composition roots can still use the lower-level helpers:\n\n```ts\nimport { eventSourcingFeatures } from '@arki/event-sourcing';\n\nconst { eventStore, close } = eventSourcingFeatures.initEventSourcing(\n  [\n    /* read-model projections produced by defineProjection / drizzleProjection / postgreSQLProjection */\n  ],\n  process.env.EVENT_STORE_URL,\n);\n\nconst messageBus = eventSourcingFeatures.initMessageBus(eventStore, [\n  /* { commandType, handler, getStreamName } registrations */\n]);\n\nawait close();\n```\n\n### Process managers\n\nUse `createProcessManager` for batch processing, or `createSimpleProcessManager` when the handler closes over a fixed context and processes one event at a time:\n\n```ts\nimport { createSimpleProcessManager } from '@arki/event-sourcing';\n\nconst sendOrderEmails = createSimpleProcessManager(\n  { emailer, repo },\n  'order-emails',\n  ['OrderPlaced', 'OrderCancelled'],\n  async (event, ctx) => {\n    if (event.type === 'OrderPlaced') {\n      await ctx.emailer.send('order-placed', event.data);\n    } else {\n      await ctx.emailer.send('order-cancelled', event.data);\n    }\n  },\n);\n\nawait eventSourcingFeatures.setupProcessManagers(eventStore, [sendOrderEmails]);\n```\n\n`setupProcessManagers` starts each process manager as a consumer of the event store and installs a SIGTERM hook that stops and closes the consumers before exiting.\n\n## Subpath exports\n\n- `@arki/event-sourcing` — main surface (commands, events, deciders, process managers, features).\n- `@arki/event-sourcing/builders` — fluent builders only.\n- `@arki/event-sourcing/store` — `getEventStore`, `drizzleProjection`, `postgreSQLProjection`, projection context types.\n- `@arki/event-sourcing/bus` — `getInMemoryMessageBus` and message bus types re-exported from Emmett.\n- `@arki/event-sourcing/dot` — DOT plugin, ES bundle helpers, and ES plugin error codes.\n- `@arki/event-sourcing/projection` — pure `event-catalog` projection for DOT.\n\n## Documentation\n\nFor an overview of the package's design principles, see [`docs/design.md`](./docs/design.md). For command flow patterns, see [`docs/command-flows.md`](./docs/command-flows.md).\n\n## License\n\nMIT © ARKI Contributors\n","readmeFilename":"README.md"}