spine-framework 0.1.11 → 0.1.13
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,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { createClient } from '@supabase/supabase-js'
|
|
18
|
-
import ws from 'ws'
|
|
19
18
|
|
|
20
19
|
// ─── ENVIRONMENT RESOLUTION ──────────────────────────────────────────────────
|
|
21
20
|
|
|
@@ -74,8 +73,7 @@ const dbSchema: string = _env.DB_SCHEMA || 'public'
|
|
|
74
73
|
* ```
|
|
75
74
|
*/
|
|
76
75
|
export const adminDb = createClient(supabaseUrl, supabaseServiceKey, {
|
|
77
|
-
db: { schema: dbSchema }
|
|
78
|
-
realtime: { transport: ws as any },
|
|
76
|
+
db: { schema: dbSchema }
|
|
79
77
|
})
|
|
80
78
|
|
|
81
79
|
// ─── CHUNK_START: SHARED_DB_GET_USER_DB ──────────────────────────────────────────────
|
package/bin/spine-framework.cjs
CHANGED
|
@@ -24,7 +24,7 @@ for (let i = 0; i < args.length; i++) {
|
|
|
24
24
|
if (args[i] === '--service-role-key' && args[i + 1]) childEnv.SUPABASE_SERVICE_ROLE_KEY = args[++i]
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const entry = resolve(pkgRoot, '
|
|
27
|
+
const entry = resolve(pkgRoot, 'bin/ws-shim.ts')
|
|
28
28
|
|
|
29
29
|
// Find tsx: prefer consuming project's copy, fall back to our own
|
|
30
30
|
const tsxPaths = [
|
package/bin/ws-shim.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Polyfill globalThis.WebSocket with the 'ws' package for Node < 22.
|
|
2
|
+
// Required by supabase-js Realtime client which checks for WebSocket at construction time.
|
|
3
|
+
if (typeof globalThis.WebSocket === 'undefined') {
|
|
4
|
+
try {
|
|
5
|
+
const { WebSocket } = require('ws')
|
|
6
|
+
globalThis.WebSocket = WebSocket
|
|
7
|
+
} catch {}
|
|
8
|
+
}
|
package/bin/ws-shim.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Entry point for the CLI on Node < 22.
|
|
2
|
+
// Sets globalThis.WebSocket before any supabase-js module is imported,
|
|
3
|
+
// preventing the "Node.js 20 detected without native WebSocket" crash.
|
|
4
|
+
import { WebSocket } from 'ws'
|
|
5
|
+
if (typeof globalThis.WebSocket === 'undefined') {
|
|
6
|
+
;(globalThis as any).WebSocket = WebSocket
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Now import the real CLI — all supabase createClient() calls happen after this point
|
|
10
|
+
await import('../.framework/cli/index.ts')
|
|
@@ -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;AA0BH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,OAAO,iFAElB,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"}
|