spine-framework 0.1.36 → 0.1.38
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.
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { createClient } from '@supabase/supabase-js'
|
|
18
|
+
import WebSocket from 'ws'
|
|
19
|
+
|
|
20
|
+
// WebSocket constructor for Supabase Realtime in Node.js environment
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
const RealtimeWebSocket = WebSocket as any
|
|
18
23
|
|
|
19
24
|
// ─── ENVIRONMENT RESOLUTION ──────────────────────────────────────────────────
|
|
20
25
|
|
|
@@ -74,7 +79,8 @@ const dbSchema: string = _env.DB_SCHEMA || 'public'
|
|
|
74
79
|
*/
|
|
75
80
|
export const adminDb = createClient(supabaseUrl, supabaseServiceKey, {
|
|
76
81
|
db: { schema: dbSchema },
|
|
77
|
-
auth: { autoRefreshToken: false, persistSession: false }
|
|
82
|
+
auth: { autoRefreshToken: false, persistSession: false },
|
|
83
|
+
realtime: { transport: RealtimeWebSocket }
|
|
78
84
|
})
|
|
79
85
|
|
|
80
86
|
// ─── CHUNK_START: SHARED_DB_GET_USER_DB ──────────────────────────────────────────────
|
|
@@ -95,6 +101,7 @@ export function getUserDb(jwt: string) {
|
|
|
95
101
|
return createClient(supabaseUrl, supabaseAnonKey, {
|
|
96
102
|
db: { schema: dbSchema },
|
|
97
103
|
auth: { autoRefreshToken: false, persistSession: false },
|
|
104
|
+
realtime: { transport: RealtimeWebSocket }, // WebSocket for Node.js 20+
|
|
98
105
|
global: {
|
|
99
106
|
headers: {
|
|
100
107
|
Authorization: `Bearer ${jwt}`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../.framework/functions/_shared/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../.framework/functions/_shared/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA+BH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,OAAO,iFAIlB,CAAA;AAGF;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,mFAWpC;AAKD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IACxB,IAAI,EAAE,CAAC,GAAG,IAAI,CAAA;IACd,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,KAAK;;;;;;;;CAQjB,CAAA"}
|
package/package-project.json
CHANGED