← back to Filemaker Mcp
chore: lint, refactor, v0.2.3 (session close)
72102362090410c929d3522e0ce3e5e25cc9050d · 2026-07-16 09:56:29 -0700 · steve@designerwallcoverings.com
- findDuplicates: rename inner accumulator e→entry (was shadowing catch(e))
- annotate best-effort client-refresh catch
Author: steve@designerwallcoverings.com
Files touched
M lib/sync-core.jsM package-lock.jsonM package.json
Diff
commit 72102362090410c929d3522e0ce3e5e25cc9050d
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Thu Jul 16 09:56:29 2026 -0700
chore: lint, refactor, v0.2.3 (session close)
- findDuplicates: rename inner accumulator e→entry (was shadowing catch(e))
- annotate best-effort client-refresh catch
Author: steve@designerwallcoverings.com
---
lib/sync-core.js | 8 ++++----
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/sync-core.js b/lib/sync-core.js
index 361a4d3..9056a50 100644
--- a/lib/sync-core.js
+++ b/lib/sync-core.js
@@ -76,9 +76,9 @@ export async function findDuplicates({ fields }) {
for (const r of recs) {
// confirm phone match by normalized last-10 to avoid wildcard false positives
if (why === 'Phone' && last10(r.fieldData['Phone']) !== phone10) continue;
- const e = hits.get(r.recordId) || { recordId: r.recordId, acct: r.fieldData['Account Number'], company: r.fieldData['Company'], why: [] };
- if (!e.why.includes(why)) e.why.push(why);
- hits.set(r.recordId, e);
+ const entry = hits.get(r.recordId) || { recordId: r.recordId, acct: r.fieldData['Account Number'], company: r.fieldData['Company'], why: [] };
+ if (!entry.why.includes(why)) entry.why.push(why);
+ hits.set(r.recordId, entry);
}
}
if (hits.size) return [...hits.values()]; // first tier with a match wins
@@ -108,7 +108,7 @@ export async function syncOrder(order, { commit = true } = {}) {
for (const k of ['Address', 'City', 'State', 'Zip', 'Phone', 'Email address']) {
if (mapped.fields[k]) refresh[k] = mapped.fields[k];
}
- try { await fm.updateRecord('Clients', LAYOUT, dupes[0].recordId, refresh, { dryRun: false }); clientAction = 'updated'; } catch {}
+ try { await fm.updateRecord('Clients', LAYOUT, dupes[0].recordId, refresh, { dryRun: false }); clientAction = 'updated'; } catch { /* best-effort refresh — do not block invoicing */ }
}
} else if (commit) {
const res = await fm.createRecord('Clients', LAYOUT, mapped.fields, { dryRun: false });
diff --git a/package-lock.json b/package-lock.json
index 880bc1d..bfd7826 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "filemaker-mcp",
- "version": "0.2.2",
+ "version": "0.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "filemaker-mcp",
- "version": "0.2.2",
+ "version": "0.2.3",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.4",
"amazon-cognito-identity-js": "^6.3.12",
diff --git a/package.json b/package.json
index 28d2ff1..78c20eb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "filemaker-mcp",
- "version": "0.2.2",
+ "version": "0.2.3",
"private": true,
"type": "module",
"description": "MCP server + CLI for reading and (confirmed) updating Designer Wallcoverings' FileMaker Cloud files (Clients, Invoice, WALLPAPER) via the FileMaker Data API.",
← 8e0d01f auto-save: 2026-07-16T09:42:29 (1 files) — scripts/audit-cli
·
back to Filemaker Mcp
·
add scripts/fetch-clients.js — page entire Clients file to M d91bd91 →