@adventurelabs/scout-core 1.0.20 → 1.0.21

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.
@@ -11,15 +11,19 @@ export function useScoutDbListener() {
11
11
  const supabase = useRef(null);
12
12
  const dispatch = useAppDispatch();
13
13
  function handleTagInserts(payload) {
14
+ console.log("[DB Listener] Tag INSERT received:", payload.new);
14
15
  dispatch(addTag(payload.new));
15
16
  }
16
17
  function handleTagDeletes(payload) {
18
+ console.log("[DB Listener] Tag DELETE received:", payload.old);
17
19
  dispatch(deleteTag(payload.old));
18
20
  }
19
21
  function handleTagUpdates(payload) {
22
+ console.log("[DB Listener] Tag UPDATE received:", payload.new);
20
23
  dispatch(updateTag(payload.new));
21
24
  }
22
25
  async function handleDeviceInserts(payload) {
26
+ console.log("[DB Listener] Device INSERT received:", payload.new);
23
27
  const response_device = await get_device_by_id(payload.new.id);
24
28
  if (response_device.status == EnumWebResponse.SUCCESS &&
25
29
  response_device.data) {
@@ -30,9 +34,11 @@ export function useScoutDbListener() {
30
34
  }
31
35
  }
32
36
  function handleDeviceDeletes(payload) {
37
+ console.log("[DB Listener] Device DELETE received:", payload.old);
33
38
  dispatch(deleteDevice(payload.old));
34
39
  }
35
40
  async function handleDeviceUpdates(payload) {
41
+ console.log("[DB Listener] Device UPDATE received:", payload.new);
36
42
  const response_device = await get_device_by_id(payload.new.id);
37
43
  if (response_device.status == EnumWebResponse.SUCCESS &&
38
44
  response_device.data) {
@@ -43,12 +49,15 @@ export function useScoutDbListener() {
43
49
  }
44
50
  }
45
51
  function handlePlanInserts(payload) {
52
+ console.log("[DB Listener] Plan INSERT received:", payload.new);
46
53
  dispatch(addPlan(payload.new));
47
54
  }
48
55
  function handlePlanDeletes(payload) {
56
+ console.log("[DB Listener] Plan DELETE received:", payload.old);
49
57
  dispatch(deletePlan(payload.old));
50
58
  }
51
59
  function handlePlanUpdates(payload) {
60
+ console.log("[DB Listener] Plan UPDATE received:", payload.new);
52
61
  dispatch(updatePlan(payload.new));
53
62
  }
54
63
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adventurelabs/scout-core",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Core utilities and helpers for Adventure Labs Scout applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",