@svadmin/supabase 0.11.2 → 0.11.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/supabase",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Supabase adapters — DataProvider, AuthProvider, LiveProvider, AuditHandler",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "peerDependencies": {
27
- "@svadmin/core": "^0.25.3",
27
+ "@svadmin/core": "^0.27.1",
28
28
  "@supabase/supabase-js": "^2.0.0",
29
29
  "@refinedev/supabase": "^5.0.0",
30
30
  "@supacloud/js": "^0.12.0"
@@ -1,7 +1,6 @@
1
1
  import type { DataProvider } from '@svadmin/core';
2
2
  import { createRefineAdapter } from '@svadmin/refine-adapter';
3
3
  // Static import — dynamic import() gets dropped by Vite/Rollup in static SPA builds
4
- // @ts-ignore Peer dependency
5
4
  import { dataProvider as refineDataProvider } from '@refinedev/supabase';
6
5
 
7
6
  /**
@@ -54,7 +54,7 @@ export function createSupabaseLiveProvider(client: SupabaseClient): LiveProvider
54
54
  return {
55
55
  subscribe({ resource, callback }) {
56
56
  if (!subscribers.has(resource)) subscribers.set(resource, new Set());
57
- subscribers.get(resource)!.add(callback);
57
+ subscribers.get(resource)?.add(callback);
58
58
 
59
59
  getOrCreateChannel(resource);
60
60
 
package/src/supacloud.ts CHANGED
@@ -23,7 +23,7 @@ export interface SupaCloudTaskClient<TTask extends SupaCloudTaskRecord = SupaClo
23
23
  subscribe?(
24
24
  taskId: string,
25
25
  callback: (task: TTask) => void
26
- ): TaskSubscription | (() => void) | void;
26
+ ): TaskSubscription | (() => void) | undefined;
27
27
  }
28
28
 
29
29
  export interface CreateSupaCloudTaskProviderOptions<
@@ -41,7 +41,7 @@ export interface CreateSupaCloudTaskLiveProviderOptions<
41
41
  }
42
42
 
43
43
  function normalizeTaskSubscription(
44
- subscription: TaskSubscription | (() => void) | void,
44
+ subscription: TaskSubscription | (() => void) | undefined,
45
45
  ): (() => void) | undefined {
46
46
  if (!subscription) return undefined;
47
47
  if (typeof subscription === 'function') return subscription;