@supacloud/js 0.44.0 → 0.45.0

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/dist/index.cjs CHANGED
@@ -2499,7 +2499,7 @@ function createQueryAdapter(client, options) {
2499
2499
  return {
2500
2500
  queryKey: Object.freeze([...key, captured]),
2501
2501
  queryFn: async ({ signal }) => await call(proc, captured, { signal }) ?? null,
2502
- meta: { ...opts?.meta, tags: Object.freeze([...opts?.tags ?? []]) }
2502
+ meta: { ...opts?.meta, tags: Object.freeze([...opts?.tags ?? metadata.tags ?? []]) }
2503
2503
  };
2504
2504
  }
2505
2505
  };
@@ -2516,10 +2516,11 @@ function createQueryAdapter(client, options) {
2516
2516
  meta: { ...opts?.meta },
2517
2517
  onSuccess: async (data, variables, context) => {
2518
2518
  const target = opts?.queryClient ?? options.queryClient;
2519
- if (opts?.invalidateTags?.length && target === undefined)
2519
+ const invalidateTags = opts?.invalidateTags ?? metadata.invalidateTags;
2520
+ if (invalidateTags?.length && target === undefined)
2520
2521
  throw new Error("No QueryClient provided for invalidation");
2521
- if (target !== undefined && opts?.invalidateTags?.length)
2522
- await invalidateByTags(target, opts.invalidateTags, prefix);
2522
+ if (target !== undefined && invalidateTags?.length)
2523
+ await invalidateByTags(target, invalidateTags, prefix);
2523
2524
  return opts?.onSuccess?.(data, variables, context);
2524
2525
  }
2525
2526
  })
package/dist/index.mjs CHANGED
@@ -2407,7 +2407,7 @@ function createQueryAdapter(client, options) {
2407
2407
  return {
2408
2408
  queryKey: Object.freeze([...key, captured]),
2409
2409
  queryFn: async ({ signal }) => await call(proc, captured, { signal }) ?? null,
2410
- meta: { ...opts?.meta, tags: Object.freeze([...opts?.tags ?? []]) }
2410
+ meta: { ...opts?.meta, tags: Object.freeze([...opts?.tags ?? metadata.tags ?? []]) }
2411
2411
  };
2412
2412
  }
2413
2413
  };
@@ -2424,10 +2424,11 @@ function createQueryAdapter(client, options) {
2424
2424
  meta: { ...opts?.meta },
2425
2425
  onSuccess: async (data, variables, context) => {
2426
2426
  const target = opts?.queryClient ?? options.queryClient;
2427
- if (opts?.invalidateTags?.length && target === undefined)
2427
+ const invalidateTags = opts?.invalidateTags ?? metadata.invalidateTags;
2428
+ if (invalidateTags?.length && target === undefined)
2428
2429
  throw new Error("No QueryClient provided for invalidation");
2429
- if (target !== undefined && opts?.invalidateTags?.length)
2430
- await invalidateByTags(target, opts.invalidateTags, prefix);
2430
+ if (target !== undefined && invalidateTags?.length)
2431
+ await invalidateByTags(target, invalidateTags, prefix);
2431
2432
  return opts?.onSuccess?.(data, variables, context);
2432
2433
  }
2433
2434
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/js",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "Platform SDK for SupaCloud, built on top of supabase-js",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -105,8 +105,8 @@
105
105
  }
106
106
  },
107
107
  "dependencies": {
108
- "@supacloud/contracts": "0.12.0",
109
- "@supacloud/query": "0.4.0",
108
+ "@supacloud/contracts": "0.13.0",
109
+ "@supacloud/query": "0.5.0",
110
110
  "rxjs": "7.8.2"
111
111
  },
112
112
  "devDependencies": {