{"_id":"@arpabet/vrpc-nuxt","_rev":"2-2e7c35cdf4472c547f850ac3c7d4680b","name":"@arpabet/vrpc-nuxt","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@arpabet/vrpc-nuxt","version":"0.2.0","keywords":["nuxt","nuxt-module","rpc","websocket","value-rpc"],"license":"Apache-2.0","_id":"@arpabet/vrpc-nuxt@0.2.0","maintainers":[{"name":"karagatan","email":"alex@karagatan.com"}],"homepage":"https://github.com/arpabet/value-rpc-js#readme","bugs":{"url":"https://github.com/arpabet/value-rpc-js/issues"},"dist":{"shasum":"649871d02dfd06fa8a103cf9376f7591a3a98346","tarball":"https://registry.npmjs.org/@arpabet/vrpc-nuxt/-/vrpc-nuxt-0.2.0.tgz","fileCount":6,"integrity":"sha512-ai4cD5OtmBDnaTaD0bjN2mSkvWFvXVsREeNThX/oCgyDJOmlIciSQlYovuCeAu0YCymH6MnUOq+VHIzXDRGFVA==","signatures":[{"sig":"MEQCIAQIIFRPVDXvMqZROhwB9ZCmBWRPCTx4UPzrszD8JbvOAiAY1aOx2z5gJzh/mWGSstihGMlxOlgknDRRGfR8EXxvIQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10764},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.js"}},"gitHead":"c959ca53006317a48d6fd2a7f589e7b1a7286ccc","scripts":{"build":"tsup && rm -rf dist/runtime && cp -R src/runtime dist/runtime","typecheck":"tsc --noEmit"},"_npmUser":{"name":"karagatan","email":"alex@karagatan.com"},"repository":{"url":"git+https://github.com/arpabet/value-rpc-js.git","type":"git","directory":"packages/vrpc-nuxt"},"_npmVersion":"10.9.8","description":"Nuxt module for value-rpc: client plugin, auto-imported composables, runtime config","directories":{},"_nodeVersion":"22.23.1","dependencies":{"defu":"^6.1.4","@nuxt/kit":">=3.13.0 <5","@arpabet/vrpc":"^0.2.0","@arpabet/vrpc-vue":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","typescript":"^5.6.0","@nuxt/schema":">=3.13.0 <5"},"_npmOperationalInternal":{"tmp":"tmp/vrpc-nuxt_0.2.0_1784437599001_0.6926164836253186","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@arpabet/vrpc-nuxt","version":"0.2.1","description":"Nuxt module for value-rpc: client plugin, auto-imported composables, runtime config","license":"Apache-2.0","type":"module","exports":{".":{"types":"./dist/module.d.ts","import":"./dist/module.js"}},"scripts":{"build":"tsup && rm -rf dist/runtime && cp -R src/runtime dist/runtime","typecheck":"tsc --noEmit"},"dependencies":{"@arpabet/vrpc":"^0.2.1","@arpabet/vrpc-vue":"^0.2.1","@nuxt/kit":">=3.13.0 <5","defu":"^6.1.4"},"devDependencies":{"@nuxt/schema":">=3.13.0 <5","tsup":"^8.3.0","typescript":"^5.6.0"},"engines":{"node":">=22"},"keywords":["nuxt","nuxt-module","rpc","websocket","value-rpc"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/arpabet/value-rpc-js.git","directory":"packages/vrpc-nuxt"},"_id":"@arpabet/vrpc-nuxt@0.2.1","gitHead":"43c4f0acdff6bcdbd4b2a7ac29f36f6c6a7ca39e","bugs":{"url":"https://github.com/arpabet/value-rpc-js/issues"},"homepage":"https://github.com/arpabet/value-rpc-js#readme","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-n+rrK2rlqhDeYBq53C2kbytLK1Ve1PwuFTVAx4lkhnAQ1TPoP+LufwyRLR3MfjXFvv29yvBy1+YRs+xd6g9h2A==","shasum":"e7e6db92c871c633dc33cfb6aa6b289ed70eeb1c","tarball":"https://registry.npmjs.org/@arpabet/vrpc-nuxt/-/vrpc-nuxt-0.2.1.tgz","fileCount":6,"unpackedSize":10768,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC5wuMEtv8r+lJl7yk7/8FIvBV2O+vtc6yfrRMKfRDL+gIhAPjkj61wr1kWgSvSSP5T3lzXeXmpbxG9SdSyQspugGxT"}]},"_npmUser":{"name":"karagatan","email":"alex@karagatan.com"},"directories":{},"maintainers":[{"name":"karagatan","email":"alex@karagatan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vrpc-nuxt_0.2.1_1785920099733_0.7687227044545946"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T05:06:38.858Z","modified":"2026-08-05T08:55:00.041Z","0.2.0":"2026-07-19T05:06:39.142Z","0.2.1":"2026-08-05T08:54:59.879Z"},"bugs":{"url":"https://github.com/arpabet/value-rpc-js/issues"},"license":"Apache-2.0","homepage":"https://github.com/arpabet/value-rpc-js#readme","keywords":["nuxt","nuxt-module","rpc","websocket","value-rpc"],"repository":{"type":"git","url":"git+https://github.com/arpabet/value-rpc-js.git","directory":"packages/vrpc-nuxt"},"description":"Nuxt module for value-rpc: client plugin, auto-imported composables, runtime config","maintainers":[{"name":"karagatan","email":"alex@karagatan.com"}],"readme":"# @arpabet/vrpc-nuxt\n\nNuxt 3/4 module for [value-rpc](https://github.com/arpabet/value-rpc).\n\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: [\"@arpabet/vrpc-nuxt\"],\n  vrpc: {\n    url: \"/rpc\",        // same-origin wss in production\n    timeoutMs: 5000,\n  },\n});\n```\n\n- Registers a **client-only** plugin: SSR renders the pending state; the\n  browser connects after hydration (no WebSocket per SSR render).\n- Auto-imports `useVrpc`, `useVrpcCall`, `useVrpcStream`, `useVrpcConnection`.\n- Runtime-config driven: override per deployment with `NUXT_PUBLIC_VRPC_URL`\n  (and `NUXT_PUBLIC_VRPC_TIMEOUT_MS`, …).\n- A relative `url` like `/rpc` is resolved against the page origin with the\n  matching `ws:`/`wss:` scheme.\n\n### Dev connectivity\n\nIn production, serve the app and a same-origin `/rpc` endpoint from one host so\n`url: \"/rpc\"` connects same-origin (no CORS, no origin patterns). In **dev**,\nthe browser and the Go server are on different ports, so either:\n\n- **connect directly** to the server with an absolute dev URL and allow the\n  origin server-side (`valueserver.WithWebSocketOrigins(...)`) — the reliable\n  option, since Nitro's `devProxy` forwards HTTP but does **not** upgrade\n  WebSockets; or\n- use Vite/`@arpabet/vrpc-vue` (whose dev proxy does handle WS) for a same-origin\n  dev experience.\n\nThe `devProxy` option still wires a Nitro `devProxy` entry (useful for any HTTP\nroutes), but do not rely on it for the WebSocket itself.\n\nFor SSR-critical data, query the same Go server from Nitro server routes and\npass results through `useAsyncData`; a shared Nitro-side vrpc client is the\nphase-2 plan (WEB.md §6.6).\n","readmeFilename":"README.md"}