← back to Dw Pitch Followup
chore: lint (esc XSS autofix + enrich-disco psql guard), refactor, v0.4.0 (session close)
395d98e5f02005ce68a8eacbc8118f0114be299b · 2026-07-13 12:25:24 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files touched
M package-lock.jsonM package.jsonM scripts/enrich-disco.js
Diff
commit 395d98e5f02005ce68a8eacbc8118f0114be299b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 13 12:25:24 2026 -0700
chore: lint (esc XSS autofix + enrich-disco psql guard), refactor, v0.4.0 (session close)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
package-lock.json | 4 ++--
package.json | 2 +-
scripts/enrich-disco.js | 9 ++++++++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0424df8..7c40918 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "dw-pitch-followup",
- "version": "0.3.0",
+ "version": "0.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dw-pitch-followup",
- "version": "0.3.0",
+ "version": "0.4.0",
"dependencies": {
"express": "^4.22.2"
}
diff --git a/package.json b/package.json
index cdc74e5..b38abf2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dw-pitch-followup",
- "version": "0.3.0",
+ "version": "0.4.0",
"private": true,
"type": "module",
"description": "DW client follow-up pitch lists + selection viewer. Read-only over FileMaker (Clients/WALLPAPER/invoice) + George (Gmail thread context). No sends, no Gmail drafts — Steve selects pitches from the viewer.",
diff --git a/scripts/enrich-disco.js b/scripts/enrich-disco.js
index c064799..3be70e9 100644
--- a/scripts/enrich-disco.js
+++ b/scripts/enrich-disco.js
@@ -40,7 +40,14 @@ const arr = '{' + [...skus].map((s) => '"' + s.replace(/[^A-Za-z0-9._-]/g, '') +
const q = `SELECT upper(combo_sku), max(date_discontinued) FROM disco_items
WHERE upper(combo_sku) = ANY('${arr}') AND coalesce(date_discontinued,'') <> ''
GROUP BY 1`;
-const out = execFileSync(PSQL, [CONN, '-tAF', '\t', '-c', q], { maxBuffer: 256 * 1024 * 1024 }).toString();
+let out = '';
+try {
+ out = execFileSync(PSQL, [CONN, '-tAF', '\t', '-c', q], { maxBuffer: 256 * 1024 * 1024 }).toString();
+} catch (e) {
+ // psql absent / DB down / query error → leave lists.json untouched (safe) and exit non-zero.
+ console.error('[enrich-disco] psql failed:', e.message);
+ process.exit(1);
+}
const discoMap = new Map();
for (const line of out.split('\n')) {
if (!line.trim()) continue;
← 4c40379 auto-save: 2026-07-13T12:24:56 (1 files) — public/index.html
·
back to Dw Pitch Followup
·
pitch: redefine "Invoiced · No Order" list as real quotes ne a59c63b →