{"_id":"@codeforbreakfast/eventsourcing-transport","_rev":"7-ac1941b51ee188b8dafed235bc50c97a","name":"@codeforbreakfast/eventsourcing-transport","dist-tags":{"latest":"0.3.8"},"versions":{"0.3.0":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.0","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.0","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"2afbb1cfa47081bdf1c88a3fa1371eb18fd2f5a7","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.0.tgz","fileCount":15,"integrity":"sha512-SPwIDQ9c5BDOyTTbkxskrZ3Kw2Boeo5IYfeMy1PB5mzr1dKK2LKxOTXh6pZ692X7Ogzx1aDVCHU0dBQyu7yA2w==","signatures":[{"sig":"MEUCIFkCXKbHCNNYrEHV/JhJxfs2Z6WowcBjQePxWGJjlRxSAiEAmf6GOZY62FCic6BssMrQbpWz4/tsMndCMEZwfbXhaDY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35144},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"18e324d0d06e1524923d166cf7f6d84958155b5a","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target bun --format esm --external effect --external @effect/* && bun x tsc --build","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","publish:package":"npm publish --access public"},"_npmUser":{"name":"graemef","email":"graemef@gmail.com"},"repository":{"url":"git+https://github.com/codeforbreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"10.8.2","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.17.14","eslint":"9.36.0","typescript":"5.9.2","@types/node":"24.5.2"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.0_1759054232872_0.5145653773210057","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.3","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.3","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"e90af0dac20b9f242463777a040185f162539cef","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.3.tgz","fileCount":15,"integrity":"sha512-FfuhvBktHrwZfoauoY24LIw7VDTfb16ON6gmnVPCNM7yr7+dqJDrUfvcWHswwhYvF3EB4tVG2iRgDipu759m2w==","signatures":[{"sig":"MEUCIQDo9wZS39NJ9Cj2MiZHHdORu1F4LnQeuRT501N0+ChUXAIgPL6nf+Ykgc0IDUXZXL7XdInudG7h0DVX+3IFO4G93BY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35306},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"b51721207db43b5ba8b9228b79cfa36219146005","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target bun --format esm --external effect --external @effect/* && bun x tsc --build","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","validate:pack":"bun pm pack --dry-run","publish:package":"npm publish --access public","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"repository":{"url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"11.6.1","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.17.14","eslint":"9.36.0","typescript":"5.9.2","@types/node":"24.5.2"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.3_1759068014007_0.6570466783251245","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.4","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.4","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"51277b8474a50a24a095905957f99aa3b67e62ac","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.4.tgz","fileCount":15,"integrity":"sha512-NgScerHxQnpGjJqEIrD31CQx7sv5eMsa+x23tvZYRjxTf9Gb5jdHFBGkQPTP3FjApICGefsLxcPlgFWPR9bong==","signatures":[{"sig":"MEYCIQDjpHTqBcUnFHMsEGBZm+zZ2VK5zS18YNaqJQKp0+8hTwIhAJC1B6mqtQLPS02ULTdvylQqkRdvSCj8hMK1UpaaibJc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35820},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"35106a1245f942e488807eea940f69a8a8af3b13","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target bun --format esm --external effect --external @effect/* && bun x tsc --build","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","validate:pack":"bun pm pack --dry-run","publish:package":"npm publish --access public","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"repository":{"url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"11.6.1","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"type-fest":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.17.14","eslint":"9.36.0","typescript":"5.9.2","@types/node":"24.5.2"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.4_1759154765744_0.8871354516530938","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.5","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.5","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"921b7c318e464117d08644a27745c27d043d698c","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.5.tgz","fileCount":15,"integrity":"sha512-xuUInP0MiOTQAQJdOKVaKBMfT1w2hRJo9hGQXwliKdO6c49M02N9MRyPZ5liNTsxJggK6gNB4QZRJd3KylMZwg==","signatures":[{"sig":"MEUCIQDAa7q1crkls0WhiVOfxFp7oCUMyUZraJbPjbEGLQDb1gIgfl+iYA/G2hqKBH1hpSu78dQjALkDn5n9TKr54dlkk9o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35027},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"25c05b1804fe30d707ce5508addc73813ed6ebfc","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target bun --format esm --external effect --external @effect/* && bun x tsc --build","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","validate:docs":"bun ../../scripts/validate-markdown-examples.ts","validate:pack":"bun pm pack --dry-run","publish:package":"npm publish --access public","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"repository":{"url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"11.6.1","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"type-fest":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.18.1","eslint":"9.36.0","typescript":"5.9.3","@types/node":"24.6.2"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.5_1759677753865_0.3951763639783126","host":"s3://npm-registry-packages-npm-production"}},"0.3.6":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.6","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.6","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"e81089bda3f13d6f8322249789e4065e6c8e89b9","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.6.tgz","fileCount":15,"integrity":"sha512-FU5uu2gjfm3vlWYOWwEXS+t1LL+I1dvkb7zlfiFm5KGl5CR1g6hO0qnJ5WaBkSkd8/eczDZCxC/SOKge/YUAfw==","signatures":[{"sig":"MEUCIEtIXWpUoSumT42qK5APb/MMgLl5g/hHvOScv561bIJPAiEAm3ouCL/EofRfJtFQ3EOWN/jbdhUEwgg/B5nzYxQYWvQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34689},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"209ef435978ce052d57ea888fdc847b07011a674","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target node --format esm --external effect --external @effect/* && bun x tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","validate:docs":"bun ../../scripts/validate-markdown-examples.ts","validate:pack":"bun pm pack --dry-run","publish:package":"npm publish --access public","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"repository":{"url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"11.6.2","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"type-fest":"5.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.18.4","eslint":"9.37.0","typescript":"5.9.3","@types/node":"24.7.1"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.6_1760430184432_0.22555059592136373","host":"s3://npm-registry-packages-npm-production"}},"0.3.7":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.7","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","_id":"@codeforbreakfast/eventsourcing-transport@0.3.7","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"dist":{"shasum":"3da14205d872483963274b26587a99fcff42dc49","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.7.tgz","fileCount":15,"integrity":"sha512-6rsCHFz1E6P+04TKYadGaYQZg3C7rgM05fuvje6t8Edc6nVf0QgFfj/3Lo9Ks1ML+eKjSLEUrDNgmEg/8qhdag==","signatures":[{"sig":"MEYCIQD4ZDqd3uGzHvl1zTkLxBIL4wXOOI7oeXfLpgcCnHvJKgIhAOivZA/DuEaAmGY7AOhk2bqOPUCr/32n+1e+3zGbkrx+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34689},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"b86d91ea14ffcb2c9209ebfcbf6c48b4a9ff5876","scripts":{"lint":"eslint . --ext .ts,.tsx","test":"echo 'Contracts-only package - tests in implementations'","build":"bun build ./src/index.ts --outdir ./dist --target node --format esm --external effect --external @effect/* && bun x tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"bun test --watch","validate:docs":"bun ../../scripts/validate-markdown-examples.ts","validate:pack":"bun pm pack --dry-run","publish:package":"npm publish --access public","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"repository":{"url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","type":"git","directory":"packages/eventsourcing-transport"},"_npmVersion":"11.6.2","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"type-fest":"5.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"3.18.4","eslint":"9.37.0","typescript":"5.9.3","@types/node":"24.7.2"},"peerDependencies":{"effect":"^3.17.0"},"_npmOperationalInternal":{"tmp":"tmp/eventsourcing-transport_0.3.7_1760796634297_0.9141345371965768","host":"s3://npm-registry-packages-npm-production"}},"0.3.8":{"name":"@codeforbreakfast/eventsourcing-transport","version":"0.3.8","description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"build":"bun build ./src/index.ts --outdir ./dist --target node --format esm --external effect --external @effect/* && bun x tsc","test":"echo 'Contracts-only package - tests in implementations'","test:watch":"bun test --watch","lint":"eslint . --ext .ts,.tsx","typecheck":"tsc --noEmit","clean":"rm -rf dist","publish:package":"npm publish --access public","validate:pack":"bun pm pack --dry-run","check:publishable":"npm view $npm_package_name@$npm_package_version version >/dev/null 2>&1 && exit 1 || exit 0","validate:docs":"bun ../../scripts/validate-markdown-examples.ts"},"keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"author":{"name":"Code for Breakfast"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","directory":"packages/eventsourcing-transport"},"bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","peerDependencies":{"effect":"^3.17.0"},"devDependencies":{"@types/node":"24.10.0","effect":"3.19.9","typescript":"5.9.3","eslint":"9.39.1"},"publishConfig":{"access":"public"},"sideEffects":false,"engines":{"node":">=18.0.0"},"dependencies":{"type-fest":"5.2.0"},"gitHead":"dc9291553d278cb59572e9fb1569fe0c01194eea","_id":"@codeforbreakfast/eventsourcing-transport@0.3.8","_nodeVersion":"20.19.6","_npmVersion":"11.6.2","dist":{"integrity":"sha512-GJTn7s/b0/7mYnpHeKYCiWjTlD5iNBjGBHRR+gwgjVSgItlaoFQ/9UyZUieWZ8QqyyNH4ZXmoELmQSRZvOSO5g==","shasum":"41ac3fc085d78e0d6c5ebe4031224183bb7b88d3","tarball":"https://registry.npmjs.org/@codeforbreakfast/eventsourcing-transport/-/eventsourcing-transport-0.3.8.tgz","fileCount":15,"unpackedSize":34690,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codeforbreakfast%2feventsourcing-transport@0.3.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6Q2YCoiUw1QTDpLSwvEBEUPfkiDwpEdKkQlSdrrr5nwIgUMYAVsTFJNsxXwIgCrj0IkY2lHBv8DH4tM2ZPhpvWH8="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ee4396f-02d8-4ecd-ae3a-3f76ef7282cc"}},"directories":{},"maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eventsourcing-transport_0.3.8_1765443331401_0.6097894569421605"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-28T10:10:32.791Z","modified":"2025-12-11T08:55:31.897Z","0.3.0":"2025-09-28T10:10:33.107Z","0.3.3":"2025-09-28T14:00:14.222Z","0.3.4":"2025-09-29T14:06:05.917Z","0.3.5":"2025-10-05T15:22:34.065Z","0.3.6":"2025-10-14T08:23:04.625Z","0.3.7":"2025-10-18T14:10:34.496Z","0.3.8":"2025-12-11T08:55:31.563Z"},"bugs":{"url":"https://github.com/codeforbreakfast/eventsourcing/issues"},"author":{"name":"Code for Breakfast"},"license":"MIT","homepage":"https://github.com/codeforbreakfast/eventsourcing#readme","keywords":["transport","abstractions","contracts","interface","websocket","http","sse","message-transport","connection","streaming","effect","effect-ts","functional-programming","fp","typescript","type-safe"],"repository":{"type":"git","url":"git+https://github.com/CodeForBreakfast/eventsourcing.git","directory":"packages/eventsourcing-transport"},"description":"Pure transport layer abstractions and contracts for event sourcing - Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement","maintainers":[{"name":"graemef","email":"graemef@gmail.com"}],"readme":"# @codeforbreakfast/eventsourcing-transport\n\nPure transport layer abstractions and contracts for event sourcing. Define transport interfaces that any implementation (WebSocket, HTTP, SSE) can implement.\n\n## Overview\n\nThis package provides the core abstractions for building transport layers in event sourcing systems. It contains **only contracts and testing utilities** - no implementations. This ensures clean separation between transport protocols and the business logic that uses them.\n\n## Key Features\n\n- **Protocol Agnostic**: Abstractions work with any transport (WebSocket, HTTP, SSE, etc.)\n- **Type Safe**: Full TypeScript support with generic message types\n- **Effect-Native**: Built on Effect for functional programming patterns\n- **Contract Testing**: Complete test suite to verify transport implementations\n- **Connection Management**: Standardized connection lifecycle management\n- **Stream Support**: First-class support for message streaming\n- **Error Handling**: Comprehensive error types for transport failures\n\n## Core Interfaces\n\n### `Client.Transport`\n\nThe main interface representing a fully connected transport that can send and receive messages:\n\n```typescript\nimport { Effect, Stream, Scope } from 'effect';\nimport type {\n  TransportMessage,\n  ConnectionState,\n  TransportError,\n} from '@codeforbreakfast/eventsourcing-transport';\n\ninterface Transport {\n  readonly connectionState: Stream.Stream<ConnectionState, never, never>;\n  readonly publish: (message: TransportMessage) => Effect.Effect<void, TransportError, never>;\n  readonly subscribe: (\n    filter?: (message: TransportMessage) => boolean\n  ) => Effect.Effect<Stream.Stream<TransportMessage, never, never>, TransportError, never>;\n}\n```\n\n### `Client.Connector`\n\nThe service tag for creating connected transports. This design prevents calling transport methods before establishing a connection:\n\n```typescript\nimport { Context, Effect, Scope } from 'effect';\nimport type { Client, ConnectionError } from '@codeforbreakfast/eventsourcing-transport';\n\nclass Connector extends Context.Tag('@transport/Client.Connector')<\n  Connector,\n  {\n    readonly connect: (\n      url: string\n    ) => Effect.Effect<Client.Transport, ConnectionError, Scope.Scope>;\n  }\n>() {}\n```\n\n### `TransportMessage`\n\nThe base message type that all transport implementations must handle:\n\n```typescript\nimport { Brand } from 'effect';\nimport type { TransportMessage } from '@codeforbreakfast/eventsourcing-transport';\n\n// TransportMessage has this structure:\ntype MessageStructure = {\n  readonly id: string & Brand.Brand<'MessageId'>;\n  readonly type: string;\n  readonly payload: string; // Always a JSON string - transport doesn't parse it\n  readonly metadata: Record<string, unknown>;\n};\n```\n\nThe transport layer only validates the envelope structure. The payload is always a serialized JSON string - the transport doesn't care what's inside.\n\n## Error Types\n\nThe package provides standardized error types:\n\n- `TransportError` - General transport operation failures\n- `ConnectionError` - Connection establishment/management failures\n- `MessageParseError` - Message serialization/deserialization failures\n\n## Contract Testing\n\nThe `@codeforbreakfast/eventsourcing-testing-contracts` package provides comprehensive contract tests to verify your transport implementation meets all requirements.\n\nSee the [testing contracts package](../eventsourcing-testing-contracts) for documentation on how to use `runClientTransportContractTests` to validate your implementation.\n\n## Usage Example\n\n```typescript\nimport { Effect, Stream, pipe } from 'effect';\nimport { Client, makeMessageId } from '@codeforbreakfast/eventsourcing-transport';\nimport type { TransportMessage } from '@codeforbreakfast/eventsourcing-transport';\n\nconst useTransport = pipe(\n  Client.Connector,\n  Effect.andThen((connector) =>\n    pipe(\n      connector.connect('ws://localhost:8080'),\n      Effect.andThen((transport: Client.Transport) =>\n        pipe(\n          // Subscribe to messages\n          transport.subscribe((msg: TransportMessage) => msg.type === 'chat'),\n          Effect.andThen((messageStream: Stream.Stream<TransportMessage, never, never>) =>\n            pipe(\n              // Send a message\n              transport.publish({\n                id: makeMessageId(crypto.randomUUID()),\n                type: 'chat',\n                payload: JSON.stringify({ text: 'Hello, world!' }),\n                metadata: {},\n              }),\n              Effect.andThen(() =>\n                // Process incoming messages\n                Stream.runForEach(messageStream, (message: TransportMessage) =>\n                  Effect.logInfo(`Received: ${message.payload}`)\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n);\n```\n\n## Design Principles\n\n### 1. Protocol Independence\n\nThe abstractions work with any underlying protocol. Whether you're using WebSockets, Server-Sent Events, HTTP long polling, or custom TCP protocols, the same interfaces apply.\n\n### 2. Connection Safety\n\nThe `TransportConnector` pattern ensures you cannot call transport methods before establishing a connection. This prevents a whole class of runtime errors.\n\n### 3. Type Safety\n\nGeneric message types ensure compile-time safety for your specific message formats while allowing the transport layer to remain generic.\n\n### 4. Effect Integration\n\nBuilt on Effect for composable, type-safe error handling and resource management. Connections are automatically cleaned up when scopes exit.\n\n### 5. Testing First\n\nThe contract test suite ensures any implementation correctly handles edge cases like reconnection, message ordering, and error conditions.\n\n## Related Packages\n\n- `@codeforbreakfast/eventsourcing-websocket-transport` - WebSocket implementation\n- `@codeforbreakfast/eventsourcing-store` - Event store abstractions\n- `@codeforbreakfast/eventsourcing-aggregates` - Aggregate root patterns\n\n## License\n\nMIT\n","readmeFilename":"README.md"}