Commit Graph

3 Commits

Author SHA1 Message Date
Fabian @ Blax Software c21553536f fix(ws): resolve a function `url` lazily — don't invoke the getter at construction
createWsClient eagerly invoked a function-form `config.url` to print a dev-time
URL-validation warning. For a module-scope singleton built with
`createVueWsClient({ url: () => useRuntimeConfig().public... })`, that called
useRuntimeConfig() at import time — outside any Nuxt context — and threw
"A composable that requires access to the Nuxt instance was called outside of a
plugin, Nuxt hook, Nuxt middleware, or Vue setup function" (regression vs 0.2.x).

Now only STRING urls are validated eagerly; a function url stays lazy and is
resolved in _getUrl() at connect time (as in 0.2.x). Bump 0.3.1.
2026-06-30 11:53:40 +02:00
Fabian @ Blax Software 46ce034aba feat: configurable appKey, URL validation, connection diagnostics
- types: add appKey to WsClientConfig
- nuxt: read PUSHER_APP_KEY from runtimeConfig, validate wsUrl/appKey
- ws: URL validation, debug logging, 5s connection_established timeout
2026-04-16 08:17:56 +02:00
Fabian @ Blax Software 1c3c618c27 Init 2026-04-07 08:44:00 +02:00