@nativesquare/soma 0.16.0 → 0.16.1

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
@@ -6,7 +6,7 @@
6
6
  "bugs": {
7
7
  "url": "https://github.com/NativeSquare/soma/issues"
8
8
  },
9
- "version": "0.16.0",
9
+ "version": "0.16.1",
10
10
  "license": "Apache-2.0",
11
11
  "keywords": [
12
12
  "convex",
@@ -685,6 +685,16 @@ export class SomaGarmin {
685
685
  return new Response("Invalid JSON body", { status: 400 });
686
686
  }
687
687
 
688
+ const rawItemCount = Array.isArray(payload)
689
+ ? payload.length
690
+ : payload && typeof payload === "object"
691
+ ? (Object.values(payload)[0] as unknown[] | undefined)
692
+ ?.length ?? 0
693
+ : 0;
694
+ console.log(
695
+ `[soma:garmin:webhook] received dataType=${dataType} items=${rawItemCount}`,
696
+ );
697
+
688
698
  let result: GarminWebhookActionResult | undefined;
689
699
  try {
690
700
  result = await ctx.runAction(route.action, { payload, autoIngest });
@@ -697,6 +707,9 @@ export class SomaGarmin {
697
707
  }
698
708
 
699
709
  if (result) {
710
+ console.log(
711
+ `[soma:garmin:webhook] processed dataType=${dataType} items=${result.items.length} errors=${result.errors.length}`,
712
+ );
700
713
  const event: GarminWebhookEvent = {
701
714
  dataType,
702
715
  errors: result.errors,