@fachkraftfreund/n8n-nodes-supabase 1.4.3 → 1.4.5
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,10 +11,15 @@ const supabaseClient_2 = require("./utils/supabaseClient");
|
|
|
11
11
|
function escapeRegExp(s) {
|
|
12
12
|
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
13
13
|
}
|
|
14
|
+
const INVISIBLE_CHARS_RE = /[\u200B-\u200D\u2060\uFEFF]/g;
|
|
15
|
+
function stripInvisibleChars(s) {
|
|
16
|
+
return s.replace(INVISIBLE_CHARS_RE, '');
|
|
17
|
+
}
|
|
14
18
|
function escapeCsvField(value, delimiter, quoteChar) {
|
|
15
19
|
if (value === null || value === undefined)
|
|
16
20
|
return '';
|
|
17
|
-
|
|
21
|
+
let str = typeof value === 'object' ? JSON.stringify(value) : String(value);
|
|
22
|
+
str = stripInvisibleChars(str);
|
|
18
23
|
if (str.includes(delimiter) ||
|
|
19
24
|
str.includes(quoteChar) ||
|
|
20
25
|
str.includes('\n') ||
|
|
@@ -833,7 +833,7 @@ async function handleBatchCount(supabase, itemCount) {
|
|
|
833
833
|
const whereClauses = [];
|
|
834
834
|
const staticFilters = baseFilters.filter(f => f.column !== groupByColumn);
|
|
835
835
|
for (const f of staticFilters) {
|
|
836
|
-
const col = `"${f.column}"`;
|
|
836
|
+
const col = f.column.includes('.') ? f.column.split('.').map(p => `"${p}"`).join('.') : `"${f.column}"`;
|
|
837
837
|
switch (f.operator) {
|
|
838
838
|
case 'eq':
|
|
839
839
|
whereClauses.push(`${col} = '${String(f.value).replace(/'/g, "''")}'`);
|
package/package.json
CHANGED