@innertia-solutions/innertia-nuxt 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ export function useRealtime() {
14
14
  pusherAppCluster,
15
15
  pusherWsHost,
16
16
  pusherWsPort,
17
+ pusherForceTLS, // false para Soketi/Reverb local sin TLS (ws). Default true.
17
18
  } = config.public
18
19
 
19
20
  const connect = async () => {
@@ -26,17 +27,20 @@ export function useRealtime() {
26
27
  }
27
28
 
28
29
  const PusherModule = await import('pusher-js')
29
- const Pusher = PusherModule.default ?? PusherModule
30
+ // Interop CJS/ESM: el constructor puede estar en .default, .default.default o el módulo
31
+ const Pusher = PusherModule.default?.default ?? PusherModule.default ?? PusherModule
30
32
 
31
33
  // Build auth headers from all registered interceptors (auth token, X-Tenant-Id, etc.)
32
34
  const { run } = useRequestInterceptors()
33
35
  const authHeaders = {}
34
36
  run(authHeaders)
35
37
 
38
+ const tls = pusherForceTLS !== false // default true; false = ws plano (local)
36
39
  const options = {
37
40
  cluster: pusherAppCluster || 'mt1',
38
- forceTLS: true,
39
- enabledTransports: ['ws', 'wss'],
41
+ forceTLS: tls,
42
+ enabledTransports: tls ? ['ws', 'wss'] : ['ws'],
43
+ disableStats: true,
40
44
  auth: {
41
45
  headers: authHeaders,
42
46
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/innertia-nuxt",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app contexts",
5
5
  "keywords": [
6
6
  "nuxt",