{"_id":"j-bidi","_rev":"14-3948e100580a4ef9de8cd5fe49c9310a","name":"j-bidi","dist-tags":{"alpha":"0.0.2-alpha.8","latest":"0.0.5"},"versions":{"0.0.1-pre.1":{"name":"j-bidi","version":"0.0.1-pre.1","_id":"j-bidi@0.0.1-pre.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"63c07c44c09aee6a374038c3020df2f870632979","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.1-pre.1.tgz","fileCount":21,"integrity":"sha512-Wq5w6tdEzTELypl0APbdgHNLJp5HhRTNouhs2zX54ijXr7YUDXE9OtvflCf/rdnHFtluZZw5N9cgaDR6iyY/jA==","signatures":[{"sig":"MEQCICbxOW62T4m4vvTGqnU++/OTSE3HWkJH2uXsuRWxZDinAiBaKj0KcNC3Ao0VI15ZfAgzc46pG55Sl4gTA20jeP1MUg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35264},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"66243ed0106f210a342b594f9db152a855a74fb4","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.11.0","directories":{},"_nodeVersion":"25.8.0","dependencies":{"ws":"^8.20.0","jrx":"^0.2.1","j-atom":"^0.1.0","jdisposer":"^0.0.1","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.1-pre.1_1774499686580_0.20834648215210239","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"j-bidi","version":"0.0.1","_id":"j-bidi@0.0.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"725b4385d0dabf8c17c7e92a6e777b6c0d6323d7","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.1.tgz","fileCount":22,"integrity":"sha512-ag9nXxTYJoxkoFsJm746oztrD62YRIYWC3eOm+9luLY0cTJGUs0hEGW1aGOmsG4MgowKVo1bmUu8B2cBPXAEpA==","signatures":[{"sig":"MEUCIQDB7YZnxDKUCvlzmDSxIUH/B0ngAE0BS6X2DJtMGnZ69wIgRZLJeoNczU2Cose/HnWDP6DgdhU8SKjKGWGbAMqvhMU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40758},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"7a2bdd74ebf5b9b30df808867dd97f34f608435c","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.11.0","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.8.0","dependencies":{"ws":"^8.20.0","jrx":"^0.2.1","j-atom":"^0.1.0","jdisposer":"^0.0.1","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.1_1774501186111_0.7112636939875028","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.1":{"name":"j-bidi","version":"0.0.2-alpha.1","_id":"j-bidi@0.0.2-alpha.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"81ab2d912a146109481f7f53f6fa6aa77648b03a","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.1.tgz","fileCount":22,"integrity":"sha512-utk+6XY2mfiH/k2FvW38mzZu45tHK4D/iTiPTRhESgrytFfBRG3Mz15Xc38cnQKaNfwaYebrbW2f1jY3fxmwgg==","signatures":[{"sig":"MEQCIGhGlafQuS74NLejLhB/+HV9wMdWXQopdf06cjmDY0inAiA66TGKbR/6l+1ce/JG20JcfejUOutNJ1+3FkIYIeMTzA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44133},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"e3a170222085f920b85f5ea529d7ec0e7a5222cc","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"^0.3.0-alpha.1","j-atom":"^0.1.0","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.1_1775433384145_0.33967616053426997","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.2":{"name":"j-bidi","version":"0.0.2-alpha.2","_id":"j-bidi@0.0.2-alpha.2","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"487ac231534ca74e22f582274f8ad456e77e3f57","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.2.tgz","fileCount":22,"integrity":"sha512-VvbyPGL/679n4jcSFSCyEvk1vyF7HkcfaFinKjuw1SCK8jZLQLaPg/ajrx27x/Fh7NVZcvjqkSO2KVe7vrI7Xw==","signatures":[{"sig":"MEUCIQD7gOh8SnYNJpqxU1ntKJ1JdYCeOhpnsQLbsdEp5upgrwIgd42NNv+aKBXI2s3HxoFUgWSM9eJgKFtrRIma8+W2jqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44466},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"d8d16fe6dc510a6f0294cfba8814a5c6ddf33273","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"^0.3.0-alpha.2","j-atom":"^0.2.0-alpha.1","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.2_1775523374972_0.29811569442593333","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.3":{"name":"j-bidi","version":"0.0.2-alpha.3","_id":"j-bidi@0.0.2-alpha.3","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"4bf80a8658a211e495fa9e2b3a218bfcf4eaf09b","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.3.tgz","fileCount":22,"integrity":"sha512-f3w6t3WkOoPaqobkp2Bi8/11mHUIFQu0Tp9sBSAKcW1E8MQ3wcvQIOcZk+1agTQZuA3K5Pfxk+bim/Sjn/z+UA==","signatures":[{"sig":"MEUCIQDgaOMm4hH4VHlPHdmxtKH2QSdXKL/zsGI/hENjUftToQIgAhx6TyuFZHfExBZotbn1gBoa8+ILPTS5OEqX32WTZn4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44466},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"5aa4b9e24ae2ec9d7a1d87149120a86314daf52f","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"^0.3.0-alpha.3","j-atom":"^0.2.0-alpha.1","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.3_1775524799699_0.4489749272951131","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.4":{"name":"j-bidi","version":"0.0.2-alpha.4","_id":"j-bidi@0.0.2-alpha.4","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"a82bb8df0eaba01a588ebeae3be5cbb1ae718243","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.4.tgz","fileCount":22,"integrity":"sha512-3t88eYKa1YmW1FMHcWmzpp2Vudxl4VX+mNg4FtsU0AtwvzRK8mrR6WK0k+XTywbNGyMfhjTR4rJ8QZnTAekvVA==","signatures":[{"sig":"MEUCIQClQJ9f4FUw7SFXwxXc0PDNT0lVm9QETbuXqRyeh/DlfgIgKOCxybyiLqpRvPsfBy6J/JGhYM53ckMc1Zoe4fi4/Sk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44652},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"f56a242f4a42ff17b51d1a8c76b806dd7d745a30","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"^0.3.0-alpha.3","j-atom":"^0.2.0-alpha.1","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.4_1775525468342_0.8214823902541455","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.5":{"name":"j-bidi","version":"0.0.2-alpha.5","_id":"j-bidi@0.0.2-alpha.5","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"0e8f9e8255ded87dfb28811761c6153174eadba7","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.5.tgz","fileCount":22,"integrity":"sha512-1NUL0yv0J/UmNR/jD1qJIKwDhZnk8yXMdTQP8BOEEOzmXM05EH+rsUfwTNGegqDygYwEwgcZyQSjicxREaaDkg==","signatures":[{"sig":"MEUCIQCVBaciwp5z0PJxezOtKNYRk5Fu+H9PrQgPGpFCeuIddwIgLMHOf2OaZ8SUCSueD3/AoDJYcVz/Z74hT2A8NJ3690E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44650},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"5cca0356a6fbbc39a468f1fc24f0cb68429c227a","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"0.8.0-alpha.2","j-atom":"0.2.0-alpha.2","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.5_1775560990908_0.11224462750228792","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.6":{"name":"j-bidi","version":"0.0.2-alpha.6","_id":"j-bidi@0.0.2-alpha.6","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"fecc9157f0312e57211de9daa7653a9d1572a55e","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.6.tgz","fileCount":22,"integrity":"sha512-zMJeU+3G2kYRh3kEznQ31S3ktht2Dz9pts/oPaETxlSEPfjl49nBpplM82MyMHuZgJMCDR6twwgqC7dMqvQEyw==","signatures":[{"sig":"MEUCIQCEQ9IR9KjYJwW/kd0IOuJMBS1GORLYgoxA3vXww8qMpAIgaz+qcn39N//sBd17hGS/ZXr8z1OBQHPx6UK9Mh3DLPs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44782},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"d12857bb772f9129bb19d3547d0b90fec73f30c0","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","jrx":"0.3.0-alpha.6","j-atom":"0.2.0-alpha.2","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.6_1777725970800_0.9720341656303544","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.7":{"name":"j-bidi","version":"0.0.2-alpha.7","_id":"j-bidi@0.0.2-alpha.7","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"c5a008def7fbb7c2cde13671a708bdd7f5467834","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.7.tgz","fileCount":22,"integrity":"sha512-MP8aXcpT8EXo2+4PrFh8h+FVQRfXb0xWKixcVE6Ii3zYnm8UfOFlPnEiRNp9KoMd9FuuNZFLO5ub0M0MxhEIhA==","signatures":[{"sig":"MEUCIH0Kvy0AEvrB+XFyG6CuBo1lYRSbbAbfjoTHtoK2j7bIAiEAurATUNbOfCtp5bO/lr+CeeDyfzelDzKtfXJcvzsgZBs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44833},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"b2a6ac891e41a9ec063832e1731489569cbf3426","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications. Works with both binary and plain JSON encoding. Ships with browser WebSocket and Node.js `ws` backends, or bring your own transport.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","j-atom":"0.2.0-alpha.2","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.7_1777800796064_0.024138231196319637","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-alpha.8":{"name":"j-bidi","version":"0.0.2-alpha.8","_id":"j-bidi@0.0.2-alpha.8","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"ba2cf7e473f6df3f36b163dbaa9a2f7ae7314182","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2-alpha.8.tgz","fileCount":22,"integrity":"sha512-u6e1h6e7J20nIjc6ah/8M2zva9aZg4ycfYf+jHiZURAjIlSDFeN8gFsXKXXMBrt4EOVmC1G/Z56paZPS5oLBVQ==","signatures":[{"sig":"MEQCIFvs0PGjXurSMTVmKQWDqevc3PBtJNQapBnq23pOqfNeAiAi+Dxw2LGiHcgpnvlTW5DKKMOSGucKRJuTcWph311Ixw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44297},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"7c610dddc5ff1ecc0effde1b7e954b51164e5860","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.12.1","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with auto-reconnect and heartbeat.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"ws":"^8.20.0","j-atom":"0.2.0-alpha.2","protobufjs":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"@types/ws":"^8.18.1","typescript":"^6.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2-alpha.8_1778853265255_0.6122600276138408","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"j-bidi","version":"0.0.2","_id":"j-bidi@0.0.2","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"3df310c549a67a823cd98f9d25120e9d6357d058","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.2.tgz","fileCount":20,"integrity":"sha512-oH4H8Gcrl2RAKMkvwYHNuUCa8P89Fc2Wg1eAS0sjXyN2X5YUvKIcrF7ETXlKaO0XoxPjK35q1HbvVZLYO9+uuw==","signatures":[{"sig":"MEUCIQCk3XeUaN9x78VB8KBM5Qc28Mou9pP7MtyELjPaj5t+KAIgFquDnyi5MmD4U3U159nZEB6zCbIPbno51lN9aGhRO0A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDHgObTOg7JdRJl4Jo0SecjKltB/PWmkUhqd7DJtTG75gIhAOOs0Dz9wGQknVO9oE4xQnBtJWSZF6VtvF8G9MS22J8c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32932},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"7caed1ea850e991804f12a91745a37a9c4021c20","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.17.0","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with auto-reconnect and heartbeat.","directories":{},"_nodeVersion":"26.5.0","dependencies":{"ws":"^8.22.0","j-atom":"^0.2.0","protobufjs":"^8.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.2","typescript":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.2_1791397253843_0.8640474224836494","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"j-bidi","version":"0.0.3","_id":"j-bidi@0.0.3","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"c8e9f048225b6cc4df211730f9edd461ee178bf0","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.3.tgz","fileCount":20,"integrity":"sha512-NRp9ABAf5CJeQ0+b5d/OgTP1oRf5bV8lVu9vB/uymF/HE4760EboQpcvaweoXmJjJAGIhVeme9ehlUtbPC84Yg==","signatures":[{"sig":"MEQCIFnmzYZIl2OcW+7VR+n3o2sRMN79a7K5jepqHfXg72MlAiBq/XuEZbF5nYJVypUgQK8MUv/1T1TUXqvD9k1Y6Gq26Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDc7+cJZcp2cuJI4BNoRP8BrGo6qooKk2Zmvn1uD20eFgIgR7oBG2NmFiK8Q+zterKdJno6m5hnTS4wGsN2il5636I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36673},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"a7c451a6b7d646ba3687c94f07437fbf55481877","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.17.0","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with a heartbeat. A connection rejects once its socket closes, so rec","directories":{},"_nodeVersion":"26.5.0","dependencies":{"ws":"^8.22.0","j-atom":"^0.2.0","protobufjs":"^8.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.2","typescript":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.3_1791735051643_0.10190940230608869","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"j-bidi","version":"0.0.4","_id":"j-bidi@0.0.4","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"dist":{"shasum":"dd3f8c0f4518252248e5c48dd7fe806b9be3d99d","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.4.tgz","fileCount":20,"integrity":"sha512-0TJximgjqiri9e1fAQXkFUrhSLKo3eZ/fldU5scLmCat+/OWe4fZEtoFe6ho4WksOYP4oF3rMVoh3/Ca7F9brA==","signatures":[{"sig":"MEUCIGkckpjBI1PouGT+ArlnTswIygosJFUjUVziOUAOJ+LVAiEAlYC4t/8ZqFzUykiURojyRn9krq883DIHvqEfvTQOkh8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFM69AOYs4ALG9MtbmAuhSkClvi2yeJsm/Ye6adDjQQ7AiEAqhBrE3O9IlnWV32izLDC2echlyhfOrQaC7Pl3h9VLcE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36688},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"4d701e893d28f98d93c086f8e1feff6181168c5d","scripts":{"prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.20.0","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with a heartbeat. A connection rejects once its socket closes, so rec","directories":{},"_nodeVersion":"26.12.1","dependencies":{"ws":"^8.22.0","j-atom":"^0.2.0","protobufjs":"^8.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.2","typescript":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/j-bidi_0.0.4_1792975960787_0.5439127098582492","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"_id":"j-bidi@0.0.5","dist":{"shasum":"5d58e66e0a3c643070403e1cf67f5ed18dc580af","tarball":"https://registry.npmjs.org/j-bidi/-/j-bidi-0.0.5.tgz","fileCount":20,"integrity":"sha512-KxitGCgos3XMVsBuUDGH4Z/N2w06npYM7+2AGR081C6LaS2+uf2TchFrltpa5JrDumgUSJsAIganDdWchxUGvA==","signatures":[{"sig":"MEQCIFvj48gwaW9+8FfydX5jl0sCnjTha1tzWfvembCXkwk3AiA3h/i8MF0qL5/D/9J7apxhrlbFybD61jBe1Dq3TE7OnQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCnmMFWeNyuqz+LhBFrIAEGU+OXDl1n/iUPSGFvygdcHgIhAJueNbRX/iC14oDOxCLfNsEmS7ykSHHP2nE4wqWQx5o2"}],"unpackedSize":36703},"name":"j-bidi","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.js"}},"gitHead":"d2c572d961f74600bb78635caaa0926be4170946","scripts":{"prepublishOnly":"npx tsc"},"version":"0.0.5","_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"_npmVersion":"11.20.0","description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with a heartbeat. A connection rejects once its socket closes, so rec","directories":{},"maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"_nodeVersion":"26.12.1","dependencies":{"ws":"^8.22.0","j-atom":"^0.2.0","protobufjs":"^8.8.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.2","typescript":"^7.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/j-bidi_0.0.5_1792976662010_0.9114758305254129"}}},"time":{"created":"2026-03-26T04:34:46.579Z","modified":"2026-10-26T01:04:22.290Z","0.0.1-pre.1":"2026-03-26T04:34:46.725Z","0.0.1":"2026-03-26T04:59:46.243Z","0.0.2-alpha.1":"2026-04-05T23:56:24.285Z","0.0.2-alpha.2":"2026-04-07T00:56:15.116Z","0.0.2-alpha.3":"2026-04-07T01:19:59.848Z","0.0.2-alpha.4":"2026-04-07T01:31:08.510Z","0.0.2-alpha.5":"2026-04-07T11:23:11.045Z","0.0.2-alpha.6":"2026-05-02T12:46:10.962Z","0.0.2-alpha.7":"2026-05-03T09:33:16.215Z","0.0.2-alpha.8":"2026-05-15T13:54:25.392Z","0.0.2":"2026-10-07T18:20:53.954Z","0.0.3":"2026-10-11T16:10:51.743Z","0.0.4":"2026-10-26T00:52:40.870Z","0.0.5":"2026-10-26T01:04:22.104Z"},"description":"Bidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf). Ships with browser WebSocket and Node.js `ws` backends, with a heartbeat. A connection rejects once its socket closes, so rec","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"readme":"# j-bidi\n\nBidirectional messaging library supporting request-response, subscriptions, and push notifications, encoded as binary (protobuf).\nShips with browser WebSocket and Node.js `ws` backends, with a heartbeat. A connection rejects once its socket closes, so reconnecting is a retry loop around it.\n\nIf you only need plain JSON over your own transport (no protobuf, no bundled WebSocket), use [`bidi-plain`](../bidi-plain) instead — it's the transport-agnostic core.\n\n## Requirements\n\nThis library uses the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API (`using`, `DisposableStack`). Your environment needs:\n\n- A **runtime polyfill** (e.g. `core-js`, Node.js ≥ 22, or a browser with native support)\n- A **transpiler** that supports the `using` keyword (TypeScript ≥ 5.2 or Babel with `@babel/plugin-proposal-explicit-resource-management`)\n\n## Install\n\n```bash\nnpm i j-bidi\n```\n\n## Features\n\n- **Request-Response** — RPC-style calls with timeout and AbortSignal support\n- **Subscriptions** — pub/sub pattern with automatic cleanup\n- **Push** — fire-and-forget messages\n- **Ping/Pong** — built-in heartbeat (30s interval, 5s timeout by default)\n- **Reconnect** — a connection rejects once its socket closes, ready for your retry loop\n- **Binary encoding** — compact protobuf wire format\n- **Cross-platform** — browser (WebSocket API) and Node.js (`ws`)\n\n## Usage\n\n### Browser\n\n```ts\nimport {type BidiEndpointBinary, createBidiEndpointWeb} from 'j-bidi'\nimport {makeAtom} from 'j-atom'\n\n// holds the endpoint while a connection is open\nconst endpointAtom = makeAtom<BidiEndpointBinary | undefined>()\n\n// What makes one connection, with a heartbeat\nusing connect = createBidiEndpointWeb(endpointAtom, 'wss://example.com/ws', {\n\tsubscribe(body, onData) {\n\t\tif (body?.path === '/topic') {\n\t\t\treturn dataAtom.sub(data => onData(encode(data)))\n\t\t}\n\t},\n\tasync request(body, signal) {\n\t\tif (body?.path === '/set-config') return updateConfig(body)\n\t},\n\tpush(body) {\n\t\tconsole.log('received push:', body)\n\t},\n})\n\n// Use the endpoint\nconst endpoint = endpointAtom.value\n\n// Subscribe to server data\nusing unsub = endpoint?.subscribe({path: '/topic', name: '/events'}, data => {\n\tconsole.log('event:', data)\n})\n\n// RPC call with timeout and abort\nconst result = await endpoint?.request(\n\t{path: '/service', name: '/query', body: {id: 123}},\n\t{timeout: 30_000},\n)\n\n// Fire-and-forget\nendpoint?.push({path: '/notify', body: {event: 'click'}})\n```\n\nOne connection never resolves, and rejects once its socket closes, misses a pong or can't open. Keep one in a loop to reconnect:\n\n```ts\nlet failures = 0\nwhile (true) {\n\ttry {\n\t\t// its argument is called when the socket opens: start the backoff over\n\t\tusing connection = connect(() => void (failures = 0))\n\t\tawait connection\n\t} catch (e) {\n\t\tconsole.warn(e)\n\t\tawait new Promise(resolve => setTimeout(resolve, Math.min(1000 * 2 ** failures++, 30_000)))\n\t}\n}\n```\n\n### Node.js\n\n```ts\nimport {createBidiEndpointNode} from 'j-bidi/node'\nimport {makeAtom} from 'j-atom'\n\nconst endpointAtom = makeAtom<BidiEndpointBinary | undefined>()\n\n// as in the browser: call `connect(resetBackoff)` in your retry loop\nusing connect = createBidiEndpointNode(endpointAtom, 'wss://example.com/ws', {\n\tsubscribe(body, onData) {\n\t\tif (body?.path === '/topic') {\n\t\t\treturn sensorAtom.sub(data => onData(encode(data)))\n\t\t}\n\t},\n})\n```\n\n### Server-side WebSocket handling\n\n```ts\nimport {createBidiEndpointBinary} from 'j-bidi'\nimport {createNodeWsHeartBeat} from 'j-bidi/node'\n\nwsServer.handleUpgrade(req, socket, head, ws => {\n\tconst stack = new DisposableStack()\n\tstack.use(createNodeWsHeartBeat(ws))\n\n\tconst endpoint = stack.use(createBidiEndpointBinary({\n\t\tsend(message) {\n\t\t\tif (ws.readyState === WebSocket.OPEN) ws.send(message)\n\t\t},\n\t\tsubscribe(body, onData) {\n\t\t\tif (body?.path === '/topic') {\n\t\t\t\treturn dataAtom.sub(data => onData(encode(data)))\n\t\t\t}\n\t\t},\n\t\tasync request(body, signal) {\n\t\t\tswitch (body?.path) {\n\t\t\t\tcase '/set-rtc':\n\t\t\t\t\treturn handleSetRtc(body)\n\t\t\t}\n\t\t},\n\t}))\n\n\tws.on('message', data => {\n\t\tif (data instanceof Uint8Array) endpoint.send(data)\n\t})\n\tws.on('close', () => stack.dispose())\n})\n```\n\n### Custom transport (plain JSON)\n\nFor non-WebSocket transports (Web Workers, `postMessage`, MessageChannel, etc.) using plain JSON, see the sibling [`bidi-plain`](../bidi-plain) package.\n\n## Message Protocol\n\nThe protocol uses 8 message types:\n\n| Path     | Purpose               | Fields                           |\n|----------|-----------------------|----------------------------------|\n| `/ping`  | Heartbeat request     | —                                |\n| `/pong`  | Heartbeat response    | —                                |\n| `/req`   | Request               | `id`, `body?`                    |\n| `/res`   | Response              | `id`, `body?`, `error?`, `code?` |\n| `/sub`   | Subscribe             | `id`, `body?`                    |\n| `/unsub` | Unsubscribe           | `id`                             |\n| `/pub`   | Publish to subscriber | `id`, `body?`                    |\n| `/push`  | Push notification     | `id`, `body`                     |\n\n## API\n\n### `j-bidi`\n\n#### `createBidiEndpointBinary(options)`\n\nCreate a protobuf-encoded endpoint. Options:\n\n- `send(message)` — transport send function (required)\n- `request(body, signal)` — handler for incoming requests\n- `subscribe(body, onData)` — handler for incoming subscriptions, return `Disposable` for cleanup\n- `push(body)` — handler for incoming push messages\n\nReturns a `Disposable` endpoint with:\n\n- `send(message)` — feed incoming messages from the peer\n- `request(body, options?)` — send a request (`options: {timeout?, signal?}`); it rejects with `endpoint disposed` when the endpoint is disposed before the response\n- `subscribe(body, onData)` — subscribe to a topic, returns `Disposable`\n- `push(body)` — send a push message\n- `[Symbol.dispose]()` — cleanup (use with `using`)\n\n#### `createBidiEndpointWeb(endpointAtom, wsUrl, options?)`\n\nPrepare connections over the browser WebSocket, with a heartbeat. Returns a `Disposable` function `connect(resetBackoff)`. Each call opens one connection and returns a `Disposable & Promise<void>` that never resolves, and rejects with an `Error` once the socket closes, misses a pong or can't open. `endpointAtom` holds the endpoint while a connection is open, and `resetBackoff()` is called when one opens. Call `connect` again to reconnect, typically in a retry loop. Options: `subscribe?`, `request?`, `push?`, `pingInterval?` (ms, default `30_000`), `pongTimeout?` (ms, default `5_000`).\n\n### `j-bidi/node`\n\n#### `createBidiEndpointNode(endpointAtom, wsUrl, options?)`\n\nThe same over Node.js `ws`. Returns the same `connect(resetBackoff)` function. Options: same as `createBidiEndpointWeb`.\n\n#### `connectWsNode(options)`\n\nLow-level Node.js WebSocket connection. Returns a `Disposable & Promise<void>`. Options: `url`, `atom`, `resetBackoff?`, `disableDeflate?`.\n\n#### `createNodeWsHeartBeat(ws, options?)`\n\nAdd ping/pong heartbeat to a Node.js WebSocket. Options: `pingInterval?` (ms, default `30_000`), `pongTimeout?` (ms, default `5_000`). Returns a `Disposable` (use with `stack.use()` or `using`).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}