{"_id":"@awari/transport-peerjs","_rev":"6-33fce5a5e3332cdb6e67f92f3db3d77b","name":"@awari/transport-peerjs","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@awari/transport-peerjs","version":"0.0.1","_id":"@awari/transport-peerjs@0.0.1","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"dist":{"shasum":"b76a69c71d8467f5571c87dfff7761c7c58c7a35","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.1.tgz","fileCount":10,"integrity":"sha512-xrz9ZJ70lM9nMbsEZ3WZB7+BlwURXusg4zmD5sQw4SpPgi9JGHXC3BNUSJs92jN7mL5NYH5M/Uiz4O31435yfg==","signatures":[{"sig":"MEYCIQDibTDanWqyWotNFxaYktVEL2nlLY1UoAE+7iyu6g8c3wIhAKFqwc+mmt4OiwAo5zrUfMyGpDOxv7EQsEti04jlLRUp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13573},"main":"dist/index.js","type":"module","_from":"file:awari-transport-peerjs-0.0.1.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"tsc -p tsconfig.json && node --test dist","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"_resolved":"C:\\Users\\Adam\\AppData\\Local\\Temp\\e26ad2efc61cbe609a6210955ffe068d\\awari-transport-peerjs-0.0.1.tgz","_integrity":"sha512-xrz9ZJ70lM9nMbsEZ3WZB7+BlwURXusg4zmD5sQw4SpPgi9JGHXC3BNUSJs92jN7mL5NYH5M/Uiz4O31435yfg==","_npmVersion":"10.8.2","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.1","@awari/protocol":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/transport-peerjs_0.0.1_1784059095381_0.6495249719836191","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@awari/transport-peerjs","version":"0.0.2","_id":"@awari/transport-peerjs@0.0.2","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"dist":{"shasum":"93acb0269c1cc3c4c5df4ab718d479d611928a23","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.2.tgz","fileCount":10,"integrity":"sha512-ul8RO9sprHqbQXcauxEPq08FHzZsDXJ+nULoWq9X4/hT4HjlGFul0mTGe4l0AlQOyFMYgGwNdzq/k9MSwFV2Sg==","signatures":[{"sig":"MEUCIDWw1VdnahDgRJIhqWLZNUOSRk7eZPQBbiCDww16tTxiAiEA/+soWrj6mrCcb4TTBOB1BbmxC5l385WUfOJrTJMnvGc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13573},"main":"dist/index.js","type":"module","_from":"file:awari-transport-peerjs-0.0.2.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"tsc -p tsconfig.json && node --test dist","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"_resolved":"C:\\Users\\Adam\\AppData\\Local\\Temp\\c64e69cec91f1509f0b619503a95ab91\\awari-transport-peerjs-0.0.2.tgz","_integrity":"sha512-ul8RO9sprHqbQXcauxEPq08FHzZsDXJ+nULoWq9X4/hT4HjlGFul0mTGe4l0AlQOyFMYgGwNdzq/k9MSwFV2Sg==","_npmVersion":"10.8.2","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.2","@awari/protocol":"0.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/transport-peerjs_0.0.2_1784060658943_0.33398810346819374","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@awari/transport-peerjs","version":"0.0.3","_id":"@awari/transport-peerjs@0.0.3","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"dist":{"shasum":"fd5f86a67d49c88f744e6e429679d069f210bc62","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.3.tgz","fileCount":10,"integrity":"sha512-nia1WXtM92FIBikJJZRetQKMrFCTqkBml9UpmXf2G2QLEN+MTC4A7jbDK43Y1skj5+5X/aVPRr08ytxWjBL3JA==","signatures":[{"sig":"MEYCIQCKmUV66k+XjYl2iPOl5MOja7bxMuouM1qnGzhxcaTPiQIhAJx8gEylqNyDtwMvUblUGtFq5xxwsjlXXMzw5wtZhP2X","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14152},"main":"dist/index.js","type":"module","_from":"file:awari-transport-peerjs-0.0.3.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"tsc -p tsconfig.json && node --test dist","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"_resolved":"C:\\Users\\Adam\\AppData\\Local\\Temp\\489a3a9b413d21ab35326976f7d72e55\\awari-transport-peerjs-0.0.3.tgz","_integrity":"sha512-nia1WXtM92FIBikJJZRetQKMrFCTqkBml9UpmXf2G2QLEN+MTC4A7jbDK43Y1skj5+5X/aVPRr08ytxWjBL3JA==","_npmVersion":"10.8.2","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.3","@awari/protocol":"0.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/transport-peerjs_0.0.3_1784064238118_0.455397094504463","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@awari/transport-peerjs","version":"0.0.4","_id":"@awari/transport-peerjs@0.0.4","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"dist":{"shasum":"ae4623a98ee201d7a1e964a91f975651e87f09c9","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.4.tgz","fileCount":10,"integrity":"sha512-nFfkKQHweKU5Tx1fMsKI91gnL+Q9Vh16UYFD0LtRAgd/+AiWFqZlwGcs4cI28mJovnrAT1t8g4dzGLTl6nTF/Q==","signatures":[{"sig":"MEUCIB0h8d4IDV9ytErrDjTiHBxF6s+EaD/tHnLAzoBY5ysVAiEA+0zkIu+AkN4D+RdpGlZdLEI4GnIXjvPNOaDCHzR1K9c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31029},"main":"dist/index.js","type":"module","_from":"file:awari-transport-peerjs-0.0.4.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"tsc -p tsconfig.json && node --test dist/*.test.js","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"_resolved":"C:\\Users\\Lucy\\AppData\\Local\\Temp\\aea5b3957cd30a25892ef3691feb2e06\\awari-transport-peerjs-0.0.4.tgz","_integrity":"sha512-nFfkKQHweKU5Tx1fMsKI91gnL+Q9Vh16UYFD0LtRAgd/+AiWFqZlwGcs4cI28mJovnrAT1t8g4dzGLTl6nTF/Q==","_npmVersion":"10.9.3","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.4","@awari/protocol":"0.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/transport-peerjs_0.0.4_1784764226842_0.9845383341406073","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@awari/transport-peerjs","version":"0.0.5","_id":"@awari/transport-peerjs@0.0.5","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"dist":{"shasum":"602482cacda5b11b47ebf590d5617af68f1ce3e3","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.5.tgz","fileCount":10,"integrity":"sha512-cRKssFU7wlkyyTvsZvVeBUNxi3wlr53VSAFmpjDvc2pNNN+wLOz3vdmELoXcfhu2rARdeM76B9A9KUWInF648Q==","signatures":[{"sig":"MEUCIQC9g1ZlGqHfAE+yS9Xs63aC2dc3nUjncOh2NstoNdl5RwIgE+azXgdGYaJGl8QWNBhy+w92qA+Tqo67IAuuMKSdahc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42750},"main":"dist/index.js","type":"module","_from":"file:awari-transport-peerjs-0.0.5.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"tsc -p tsconfig.json && node --test dist/*.test.js","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"_resolved":"C:\\Users\\Lucy\\AppData\\Local\\Temp\\b05a16cfb40f1e1347333b4e9db0dac9\\awari-transport-peerjs-0.0.5.tgz","_integrity":"sha512-cRKssFU7wlkyyTvsZvVeBUNxi3wlr53VSAFmpjDvc2pNNN+wLOz3vdmELoXcfhu2rARdeM76B9A9KUWInF648Q==","_npmVersion":"10.9.3","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.5","@awari/protocol":"0.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/transport-peerjs_0.0.5_1784828481580_0.25001038597961145","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@awari/transport-peerjs","version":"0.0.6","description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"peerjs":"^1.5.4","@awari/core":"0.0.6","@awari/protocol":"0.0.6"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"tsc -p tsconfig.json && node --test dist/*.test.js"},"_id":"@awari/transport-peerjs@0.0.6","_integrity":"sha512-Ve+Mjvn6REvPCIBBBQud6V9TTyL6iwooC5R85sRAm3OlEQ7XLkPO/h1ftSwm0F59l4ToXQ826G361qbdO6O9SQ==","_resolved":"C:\\Users\\Lucy\\AppData\\Local\\Temp\\7e65c58f2aabaa4d97289682cae7ad80\\awari-transport-peerjs-0.0.6.tgz","_from":"file:awari-transport-peerjs-0.0.6.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Ve+Mjvn6REvPCIBBBQud6V9TTyL6iwooC5R85sRAm3OlEQ7XLkPO/h1ftSwm0F59l4ToXQ826G361qbdO6O9SQ==","shasum":"9a30cf76ca996da6391f1a45366a3f535584571b","tarball":"https://registry.npmjs.org/@awari/transport-peerjs/-/transport-peerjs-0.0.6.tgz","fileCount":10,"unpackedSize":42750,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHXm01vrHi9cQZJ9BKuBO5YuGC6mIdsEwIQYuLBRTlzTAiEA/jeePTJc9LHiEG/sffQqW98reEDiFd9FOcxkWduoBdE="}]},"_npmUser":{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"},"directories":{},"maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/transport-peerjs_0.0.6_1784846857861_0.9837530547725264"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-14T19:58:15.230Z","modified":"2026-07-23T22:47:38.172Z","0.0.1":"2026-07-14T19:58:15.515Z","0.0.2":"2026-07-14T20:24:19.083Z","0.0.3":"2026-07-14T21:23:58.304Z","0.0.4":"2026-07-22T23:50:27.009Z","0.0.5":"2026-07-23T17:41:21.727Z","0.0.6":"2026-07-23T22:47:38.022Z"},"description":"PeerJS-backed implementation of @awari/core's Transport interface, using PeerJS's public broker for signaling.","maintainers":[{"name":"ahoff-npm","email":"adamhoffmang@gmail.com"}],"readme":"# @awari/transport-peerjs\r\n\r\nPeerJS-backed implementation of `@awari/core`'s `Transport` interface, using PeerJS's default public broker for WebRTC signaling. This is the only package that knows PeerJS exists — everything above it (routing, connection planning, ranking) depends only on the `Transport` interface, so a different transport can be swapped in later without touching them.\r\n\r\nSee [ADR 0008](../../specs/decisions/0008-peerjs-transport.md) for the reasoning, including why this can be built and type-checked here but not exercised by automated tests (it needs a real browser WebRTC environment).\r\n\r\n## Configuring ICE servers / a self-hosted broker\r\n\r\n`createPeerJsTransport` takes an optional `peerOptions`, passed straight through\r\nto the underlying PeerJS `Peer` — use it to override the defaults that don't\r\nsuit your environment.\r\n\r\n**The quick way — drop in a built-in preset** (`IceProvider` / `ICE_SERVERS`):\r\n\r\n```ts\r\nimport { createPeerJsTransport, ICE_SERVERS, IceProvider } from \"@awari/transport-peerjs\";\r\n\r\nconst transport = createPeerJsTransport({\r\n  peerOptions: { config: { iceServers: ICE_SERVERS[IceProvider.Google] } },\r\n});\r\n```\r\n\r\n`IceProvider` has `Google` (STUN), `Cloudflare` (STUN), and `OpenRelay` (STUN +\r\nTURN). **These point at third-party infrastructure this package neither\r\noperates nor endorses** — the STUN entries are stable and free; the Open Relay\r\nTURN uses shared public credentials and is best-effort only (rate-limited, may\r\nbe down), so verify it before relying on it and use `selfHostedTurn(...)` for\r\nproduction. Endpoints can change without notice.\r\n\r\n**The full control way — hand-write `peerOptions`:**\r\n\r\n```ts\r\nconst transport = createPeerJsTransport({\r\n  peerOptions: {\r\n    // Replace PeerJS's default cloud ICE config (whose public TURN servers —\r\n    // e.g. eu-0.turn.peerjs.com — are flaky and, in some runtimes like\r\n    // Electron/restricted DNS, fail to even resolve: a\r\n    // `net::ERR_NAME_NOT_RESOLVED` / socket_manager error in the WebRTC log).\r\n    config: {\r\n      iceServers: [\r\n        { urls: \"stun:stun.l.google.com:19302\" },\r\n        // For peers on different networks you need a reachable TURN relay:\r\n        // { urls: \"turn:your-turn.example.com:3478\", username: \"u\", credential: \"p\" },\r\n      ],\r\n    },\r\n    // Or point at your own PeerServer instead of the public broker:\r\n    // host: \"peer.example.com\", port: 443, path: \"/\", secure: true,\r\n  },\r\n});\r\n```\r\n\r\nPassing `config.iceServers` **replaces** PeerJS's default list (it doesn't\r\nmerge), so include STUN yourself if you still want it. STUN-only is enough for\r\nsame-machine/LAN peers; cross-network peers behind symmetric NAT need a real\r\nTURN relay.\r\n","readmeFilename":"README.md"}