{"_id":"trpc-bun-adapter","_rev":"11-f4b393d2c7c9fe704f5b9d1e7233e846","name":"trpc-bun-adapter","dist-tags":{"latest":"1.3.2"},"versions":{"1.0.0-rc.0":{"name":"trpc-bun-adapter","version":"1.0.0-rc.0","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.0.0-rc.0","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"8e1e35d0931e17be5d465f64e91388134e685f58","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.0.0-rc.0.tgz","fileCount":15,"integrity":"sha512-aMerLDXY2jDBqFiePcb3AWVxRcSDcK1BSpR8sIwxXdKGwN+aOns7qf7pavaDZX96mYRuWrOF1laiIvtsOXobzQ==","signatures":[{"sig":"MEQCICstOHa7J+dNjIr5/Q3ZMpTjFfLnixgIfmgPXYTVcqs8AiBonzeNQf9WSzJZ97eXbQ5g5r18wvrvLlaoymfNaMjo9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73886},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","scripts":{"fmt":"bunx @biomejs/biome format --write ./src","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git","type":"git"},"_npmVersion":"10.1.0","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.8.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.0.20","typescript":"^5.3.3","@trpc/server":"10.43.0"},"peerDependencies":{"@trpc/server":"^10.43.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.0.0-rc.0_1703938683840_0.17753795323501875","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"trpc-bun-adapter","version":"1.0.0","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.0.0","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"c37cd07b672ef4971b00ecd9aba44be9df2aa594","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.0.0.tgz","fileCount":15,"integrity":"sha512-bHejrbSWQr7nKZV911o1wQnZVTZ8W5TO0Q0UOh9QgssW8m3RgM+XhwQnczvINajU/kW3awNnPtVm/R7t1yT6oA==","signatures":[{"sig":"MEQCIEeyk9CVbymzcXkdHYYzEfzYokHEeSc4O7nhW+YBFQ7WAiBFUcOcJ/l5+Ktc2KBPZzy7B0ZkpMvCxt/1BxZ4b28ptg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70042},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"50c79341172d5d125808d790fb68daf05e6d6ce0","scripts":{"fmt":"bunx @biomejs/biome format --write .","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.1.0","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.8.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.0.20","typescript":"^5.3.3","@trpc/server":"10.43.0"},"peerDependencies":{"@trpc/server":"^10.43.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.0.0_1703942164589_0.14543710820975386","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"trpc-bun-adapter","version":"1.1.0","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.1.0","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"d0dbfbe41eb868fbd6149ba5ec092d67f4b13710","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.1.0.tgz","fileCount":17,"integrity":"sha512-ECcRxgCGnyCdxjW3MTvQEjAOgrL7XFrJfOzvIf5WZlKOgsrFNW3ZZhMBeXGrirwr+gGjOyw92peRC4e4wpU/HA==","signatures":[{"sig":"MEUCIQCwyfJMF37F/3g2VUlI9m7Pe7QRM/KH/+Fzyi4QFjjPoQIgI891jbH3LyC8ING+EnEZegOr5G7I6ndKd4oBIeQjPQo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":85926},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"455963d9ff2fd8a06da1ebf803bd68bd43981a2a","scripts":{"fmt":"bunx @biomejs/biome format --write .","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.1.0","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.0.20","typescript":"^5.3.3","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-next-beta.228"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.1.0_1706118472484_0.03908809424593329","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"trpc-bun-adapter","version":"1.1.1","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.1.1","homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"fae8f79c5637c9b58ab2ff843a5d85fa77960993","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.1.1.tgz","fileCount":17,"integrity":"sha512-oD1Y0uT2QjSsB7YfTWTwAVh0q5lna/edNryRdTCxVuNUirVtRVAAsnnfkYy8HpVNF8TY/GAJNpIIdUA3mYamBw==","signatures":[{"sig":"MEUCIQCZxVaFIcFxqj+Mj1YijTzFHmdFotbKu5SvsMHgndZnigIgBCebgf1Ozn0zK92fc5PFa6Gvn0/wd9v56uJ6Ej4Wims=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91308},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"613a70b4594ad6e2804f8b6024fc9c07dd8c6a0b","scripts":{"fmt":"bunx @biomejs/biome format --write .","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.1.0","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.8.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.2","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-next-beta.228"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.1.1_1719837628478_0.12736254478203946","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"trpc-bun-adapter","version":"1.1.2","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.1.2","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"e732841cb15b4e23545086389803cfc77b6d2f59","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.1.2.tgz","fileCount":15,"integrity":"sha512-Tu2YU1bTxrO1E8jkX5tJw2CyL5HqBd/7GtOyXAxjartfaMPuiXOTqdtL2zf/NNgI4AyaWauvuxxXYQa0LMcP0Q==","signatures":[{"sig":"MEYCIQCIINieZHeGMDWJ4mHzMu5BsdxkCJU8k9Aw6nQJ57iPNgIhAM/ErdJCT+n1WqMOXmVHe4Aw5LdFk7j2tO3N98hZNIqs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89630},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"5452216a89b7ea527433069941ce2c747a6c5f04","scripts":{"fmt":"bunx @biomejs/biome format --write .","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.8.1","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-rc.477"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.1.2_1723017792148_0.10866817907241466","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"trpc-bun-adapter","version":"1.2.0","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.2.0","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"e5e3864ec7436f69984c10458c3aae18877abb33","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.2.0.tgz","fileCount":15,"integrity":"sha512-3ufDWpMU68ab0UffBr4hm3sczDzIOQr7+byCsXhiT2CT39t+3Gi2iBAfYlc/0twGiSCkH23HKzj2misgRgJ3aA==","signatures":[{"sig":"MEUCIDNjDDX8IZ6omG/858xcYN6fp0KKKo5Q2GO6Dyxpxkf2AiEA1qTOJ8/vePE0iC2rGkqtaQeDRn/ZrEksGmeFLWokXRM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103227},"main":"dist/index.js","_from":"file:trpc-bun-adapter-1.2.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","scripts":{"lint":"bunx @biomejs/biome check","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap","lint:fix":"bunx @biomejs/biome check --write ."},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"_resolved":"/private/var/folders/vz/1lx2n6592wvbs10qdsxv8yw40000gn/T/84f90cf02f1b5f74ab72c8e5b68c4ce9/trpc-bun-adapter-1.2.0.tgz","_integrity":"sha512-3ufDWpMU68ab0UffBr4hm3sczDzIOQr7+byCsXhiT2CT39t+3Gi2iBAfYlc/0twGiSCkH23HKzj2misgRgJ3aA==","repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.7.0","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-rc.566"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.2.0_1728805591447_0.5705099624030208","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"trpc-bun-adapter","version":"1.2.1","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.2.1","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"08dd7e82355cfc718d129dcc8f60f7d200fc1b8c","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.2.1.tgz","fileCount":15,"integrity":"sha512-7FQoNFumeJSkXxLOXyAsHh8ifdxkbSRNziTw+jzRVpZFjGNXJPmVsX7S9CsmC42Fg3Ci420hLUk2WRJ4ZTgoGQ==","signatures":[{"sig":"MEUCIQCkS5wRAeQnOUzUMf9q6ZXQ0IwFBBsG+6ipfapx893tNwIgaznYHyLGECbOhX+S+F/JQ5Rsk4MB0kENtygnxkFw2a0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103312},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"eef269382bafae662b8186a8489b258fb6ec189c","scripts":{"lint":"bunx @biomejs/biome check","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap","lint:fix":"bunx @biomejs/biome check --write ."},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.8.3","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"22.9.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-rc.566"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.2.1_1732608612480_0.6908841786120463","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"trpc-bun-adapter","version":"1.2.2","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.2.2","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"5a03675fb0e22fa9597a161f44880f3b7136bb48","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.2.2.tgz","fileCount":15,"integrity":"sha512-TVhZEDXZvhIM2lfNTVCx9u5fu7/86b7RuhQSM0CUs4vlIan64Sfko5m0stbjqSHNgvLBsvXKtUD8FeQOQGLfpg==","signatures":[{"sig":"MEQCIHhGq275o8kdsVCS3y+0KcmjbPUwBnaIVRNYp2ZUH6s0AiBKFaqPhnf1XODE+cMhuGgJ/ppTEz19NencYh6zPvmgRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106180},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"e70c4f0a0fce28b3094e3b09ef3a6baea4cb805e","scripts":{"lint":"bunx @biomejs/biome check","test":"bun test","build":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap","lint:fix":"bunx @biomejs/biome check --write ."},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.8.3","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"22.9.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"next"},"peerDependencies":{"@trpc/server":"^11.0.0-rc.566"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.2.2_1732609133307_0.47545362964865445","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"trpc-bun-adapter","version":"1.3.0","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.3.0","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"88bbace93c38f799afefb9a78c39885b879e4df8","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.3.0.tgz","fileCount":15,"integrity":"sha512-fZnfrDUbtzkDifdCZmdK9IANQezbyc8HdNhMa6mTbuOpIRyH20C1eYTs2Nu3Yu2RfxEmw5OIv4bU0icyavw4aw==","signatures":[{"sig":"MEUCIBPhK/TYobJj+LSu9QT5DF9vkzusg91q7eD75MWeALvYAiEAwG0AyemgoB26aEcvEFFw5xHBlF1dVnbeD/noXzko6b8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116705},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"91f1173b2b745874131b7d9edacc7235f403da7f","scripts":{"lint":"biome check","test":"bun test","bundle":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap","lint:fix":"biome check --write ."},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.8.2","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"11.0.0","@biomejs/biome":"^1.9.4"},"peerDependencies":{"@trpc/server":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.3.0_1743243211109_0.2981921927637199","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"trpc-bun-adapter","version":"1.3.1","keywords":["bun","trpc","adapter","websocket"],"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","_id":"trpc-bun-adapter@1.3.1","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"dist":{"shasum":"6d394e35d772f211b9bdb90366e49ce6aedd5e71","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.3.1.tgz","fileCount":18,"integrity":"sha512-+uLeSRqdVD6dEdOQ0QxF6jNrW3a1sVeIDdSJEp8iAun6/hsbuEAMkMd4vdCJpNeo5xhwzSnL8bNgCW0trC7bpw==","signatures":[{"sig":"MEQCIBI8jWwmZaYbdv4qh0eMg0p5P2Qhci/5utpR9D344Oq2AiAk03fFRtaCRZhyLe1+DdwziLJzPZzyvjcr4zc/Hr4oEA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116343},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"6b56cb52ac0b3354f2b478d109f25dcee9880018","scripts":{"lint":"biome check","test":"bun test","bundle":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap","lint:fix":"biome check --write ."},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"_npmVersion":"10.9.4","description":"TRPC adapter for bun js runtime","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","bun-types":"^1.1.17","typescript":"^5.5.4","@trpc/server":"11.0.0","@biomejs/biome":"^1.9.4"},"peerDependencies":{"@trpc/server":"^11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/trpc-bun-adapter_1.3.1_1781508853736_0.04552442697589587","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"trpc-bun-adapter","version":"1.3.2","description":"TRPC adapter for bun js runtime","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"test":"bun test","lint":"biome check","lint:fix":"biome check --write .","bundle":"npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"},"keywords":["bun","trpc","adapter","websocket"],"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","devDependencies":{"@trpc/server":"11.0.0","bun-types":"^1.1.17","tsup":"^8.0.1","typescript":"^5.5.4","@biomejs/biome":"^1.9.4"},"peerDependencies":{"@trpc/server":"^11.0.0"},"_id":"trpc-bun-adapter@1.3.2","gitHead":"1fbd8dab6ff865aaff7c25cf32632c695f97ca97","homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-giHE2WwUwGhoUJLIooPibNYM5pY12f74Bobj2KhpnFvWYSvFTNkOM8V9cBsnm6DRX6mAMuJklOjcoKMI7teWRA==","shasum":"57ece12b717e46186bfe761b435c3e1742c97d2a","tarball":"https://registry.npmjs.org/trpc-bun-adapter/-/trpc-bun-adapter-1.3.2.tgz","fileCount":15,"unpackedSize":115970,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFi9lBZoULOD/VDwKmtqqwcZ8kGXE4cV+FQ70AZltCjnAiEAvVT6mkZqzTgST7heOQ8G7/246X5pI0h7jqG70UHuR+c="}]},"_npmUser":{"name":"cah4a","email":"cah4o3@gmail.com"},"directories":{},"maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trpc-bun-adapter_1.3.2_1781509265498_0.9512033192587848"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-30T12:18:03.839Z","modified":"2026-06-15T07:41:05.735Z","1.0.0-rc.0":"2023-12-30T12:18:04.092Z","1.0.0":"2023-12-30T13:16:04.784Z","1.1.0":"2024-01-24T17:47:52.806Z","1.1.1":"2024-07-01T12:40:28.599Z","1.1.2":"2024-08-07T08:03:12.329Z","1.2.0":"2024-10-13T07:46:31.634Z","1.2.1":"2024-11-26T08:10:12.706Z","1.2.2":"2024-11-26T08:18:53.540Z","1.3.0":"2025-03-29T10:13:31.324Z","1.3.1":"2026-06-15T07:34:13.875Z","1.3.2":"2026-06-15T07:41:05.630Z"},"bugs":{"url":"https://github.com/cah4a/trpc-bun-adapter/issues"},"author":{"name":"Sancha","email":"cah4o3@gmail.com"},"license":"MIT","homepage":"https://github.com/cah4a/trpc-bun-adapter#readme","keywords":["bun","trpc","adapter","websocket"],"repository":{"url":"git+https://github.com/cah4a/trpc-bun-adapter.git"},"description":"TRPC adapter for bun js runtime","maintainers":[{"name":"cah4a","email":"cah4o3@gmail.com"}],"readme":"# tRPC Bun Adapter\n\n[![npm version](https://badge.fury.io/js/trpc-bun-adapter.svg)](https://badge.fury.io/js/trpc-bun-adapter)\n[![License](https://img.shields.io/github/license/cah4a/trpc-bun-adapter)](https://opensource.org/licenses/MIT)\n\n## Description\n\n\n`trpc-bun-adapter` is a [tRPC](https://trpc.io/) adapter for [Bun](https://github.com/OptimalBits/bun).\n\nStart both HTTP and WebSockets transports with ease.\n\n## Quick Start\n\nInstall packages:\n```bash\nbun install @trpc/server trpc-bun-adapter\n```\n\nCreate a server.ts file with the following content:\n```ts\nimport {initTRPC} from '@trpc/server';\nimport {createBunServeHandler} from 'trpc-bun-adapter';\n\nconst t = initTRPC.create();\n\nexport const router = t.router({\n    ping: t.procedure.query(() => \"pong\"),\n});\n\nBun.serve(createBunServeHandler({ router }));\n```\n\nTo start the server, run:\n```bash\nbun run server.ts\nbun run --watch server.ts # to restart on file changes\n```\n\nCheck that it works:\n```bash\ncurl http://localhost:3000/ping\n```\n\n## Example\n\nfor a full example, see the [example](./example/) directory.\n\n## API Reference\n\nEnsure you have created a `router.ts` file as outlined in the tRPC documentation: [Define Routers](https://trpc.io/docs/server/routers).\n\n### createBunServeHandler\n\nCreates a Bun serve handler:\n\n```ts\nimport {createBunServeHandler, CreateBunContextOptions} from 'trpc-bun-adapter';\nimport {router} from './router';\n\nconst createContext = (opts: CreateBunContextOptions) => ({\n    user: 1,\n});\n\nBun.serve(\n    createBunServeHandler(\n        {\n            router,\n            // optional arguments:\n            endpoint: '/trpc', // Default to \"\"\n            createContext,\n            onError: console.error,\n            responseMeta(opts) {\n                return {\n                    status: 202,\n                    headers: {},\n                }\n            },\n            batching: {\n                enabled: true,\n            },\n        },\n        {\n            // Bun serve options\n            port: 3001,\n            fetch(request, server) {\n                // will be executed if it's not a TRPC request\n                return new Response(\"Hello world\");\n            },\n        },\n    ),\n);\n```\n\nTo add response headers like Cross-origin resource sharing (CORS) use `responseMeta` option:\n```ts\nBun.serve(\n   createBunServeHandler({\n         router: appRouter,\n         responseMeta(opts) {\n            return {\n               status: 200,\n               headers: {\n                  \"Access-Control-Allow-Origin\": \"*\",\n                  \"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n                  \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\"\n               }\n            };\n         }\n      }\n   )\n);\n```\n\n### createBunHttpHandler\n\nCreates a Bun HTTP handler for tRPC HTTP requests:\n\n```ts\nimport {createBunHttpHandler, CreateBunContextOptions} from 'trpc-bun-adapter';\nimport {router} from './router';\n\nconst createContext = (opts: CreateBunContextOptions) => ({\n    user: 1,\n});\n\nconst bunHandler = createBunHttpHandler({\n    router,\n    // optional arguments:\n    endpoint: '/trpc', // Default to \"\"\n    createContext,\n    onError: console.error,\n    responseMeta(opts) {\n        return {\n            status: 202,\n            headers: {},\n        }\n    },\n    batching: {\n        enabled: true,\n    },\n    emitWsUpgrades: false, // pass true to upgrade to WebSocket\n});\n\nBun.serve({\n    fetch(request, response) {\n        return bunHandler(request, response) ?? new Response(\"Not found\", {status: 404});\n    }\n});\n```\n\n### createBunWsHandler\n\nCreates a Bun WebSocket handler for tRPC websocket requests:\n\n```ts\nimport { createBunWSHandler, CreateBunContextOptions } from './src';\nimport { router } from './router';\n\nconst createContext = (opts: CreateBunContextOptions) => ({\n    user: 1,\n});\n\nconst websocket = createBunWSHandler({\n    router,\n    // optional arguments:\n    createContext,\n    onError: console.error,\n    batching: {\n        enabled: true,\n    },\n});\n\nBun.serve({\n    fetch(request, server) {\n        const data = {\n            req: request // This is required for the adapter to work properly.\n        };\n        if (server.upgrade(request, { data })) {\n            return;\n        }\n\n        return new Response(\"Please use websocket protocol\", {status: 404});\n    },\n    websocket,\n});\n```\n\n> Note that it is required to store the request object on the socket data context in order for this adapter to work.\n\n### CreateBunContextOptions\n\nTo ensure your router recognizes the context type, define a `createContext` function utilizing the `CreateBunContextOptions` type:\n\n```ts\nimport { initTRPC } from '@trpc/server';\nimport type { CreateBunContextOptions } from \"src/createBunHttpHandler\";\n\nexport const createContext = async (opts: CreateBunContextOptions) => {\n    return {\n        authorization: req.headers.get('Authorization')\n    };\n};\n```\n\nWith `createContext` defined, you can use it in your router to access the context, such as the authorization information:\n```ts\nconst t = initTRPC.context<typeof createContext>().create();\n\nexport const router = t.router({\n    session: t.procedure.query(({ ctx }) => ctx.authorization),\n});\n```\n\nFinally, pass your `createContext` function besides `router` to `createBunHttpHandler`. \nThis integrates your custom context into the HTTP handler setup:\n```ts\ncreateBunHttpHandler({\n    router,\n    createContext,\n})\n```\n\nRead more documentation about tRPC contexts here: [Contexts](https://trpc.io/docs/server/context)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/cah4a/trpc-bun-adapter/blob/main/LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues and pull requests.\n","readmeFilename":"README.md"}