@fachkraftfreund/n8n-nodes-supabase 1.2.21 → 1.2.22

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.
@@ -609,6 +609,19 @@ class Supabase {
609
609
  },
610
610
  },
611
611
  },
612
+ {
613
+ displayName: 'Single Result Item',
614
+ name: 'singleItem',
615
+ type: 'boolean',
616
+ default: false,
617
+ description: 'Whether to return all rows wrapped in a single n8n item (as a "data" array) instead of one item per row',
618
+ displayOptions: {
619
+ show: {
620
+ resource: ['database'],
621
+ operation: ['read'],
622
+ },
623
+ },
624
+ },
612
625
  {
613
626
  displayName: 'Bucket',
614
627
  name: 'bucket',
@@ -341,6 +341,11 @@ async function handleRead(supabase, itemIndex, hostUrl) {
341
341
  },
342
342
  });
343
343
  }
344
+ const singleItem = this.getNodeParameter('singleItem', itemIndex, false);
345
+ if (singleItem && returnData.length > 0) {
346
+ const allRows = returnData.map(item => item.json);
347
+ return [{ json: { data: allRows, count: allRows.length } }];
348
+ }
344
349
  return returnData;
345
350
  }
346
351
  async function handleDelete(supabase, itemIndex, hostUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fachkraftfreund/n8n-nodes-supabase",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "Comprehensive n8n community node for Supabase with database and storage operations",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",