← back to Marketing Command Center
chore: lint fixes (jget r.ok guard, .env value quoting per unquoted-sourcing rule, comment typo), v1.0.1 (session close)
df1e6233a6ce5f225337b02a9c6a728e14f482eb · 2026-07-14 13:13:52 -0700 · Steve
Files touched
M modules/accounts/index.jsM modules/channels/index.jsM package-lock.jsonM package.jsonM public/panels/accounts.js
Diff
commit df1e6233a6ce5f225337b02a9c6a728e14f482eb
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 14 13:13:52 2026 -0700
chore: lint fixes (jget r.ok guard, .env value quoting per unquoted-sourcing rule, comment typo), v1.0.1 (session close)
---
modules/accounts/index.js | 2 +-
modules/channels/index.js | 6 +++++-
package-lock.json | 4 ++--
package.json | 2 +-
public/panels/accounts.js | 6 +++++-
5 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/modules/accounts/index.js b/modules/accounts/index.js
index f47722b..eab1f04 100644
--- a/modules/accounts/index.js
+++ b/modules/accounts/index.js
@@ -91,7 +91,7 @@ function buildAccounts() {
list.push(linkedinAccount());
- // Stable, sensible order: Social Media Media leads with the big four, then the rest.
+ // Stable, sensible order: the big four lead, then the rest.
const ORDER = ['facebook', 'instagram', 'tiktok', 'youtube', 'linkedin', 'bluesky', 'threads'];
list.sort((a, b) => {
const ia = ORDER.indexOf(a.platform), ib = ORDER.indexOf(b.platform);
diff --git a/modules/channels/index.js b/modules/channels/index.js
index 03fd2bf..191b756 100644
--- a/modules/channels/index.js
+++ b/modules/channels/index.js
@@ -139,7 +139,11 @@ function setEnvKeys(updates) {
try { lines = fs.readFileSync(ENV_PATH, 'utf8').split('\n'); } catch { /* new file */ }
for (const [k, v] of Object.entries(updates)) {
lines = lines.filter(l => !l.startsWith(k + '='));
- if (v !== '' && v != null) { lines.push(`${k}=${v}`); process.env[k] = String(v); }
+ // Single-quote the .env value so a token containing a space / # / <> can't
+ // abort a `set -a` shell `source` at that line (Steve's env-unquoted-value
+ // sourcing bug). loadEnv() strips surrounding quotes on read, so process.env
+ // still gets the raw value below — round-trip stays clean.
+ if (v !== '' && v != null) { lines.push(`${k}='${String(v).replace(/'/g, "'\\''")}'`); process.env[k] = String(v); }
else { delete process.env[k]; }
}
const out = lines.join('\n').replace(/\n{3,}/g, '\n\n').replace(/^\n+/, '');
diff --git a/package-lock.json b/package-lock.json
index 29a8163..ea18ba0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "marketing-command-center",
- "version": "1.0.0",
+ "version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "marketing-command-center",
- "version": "1.0.0",
+ "version": "1.0.1",
"dependencies": {
"express": "^4.22.2"
}
diff --git a/package.json b/package.json
index 890185a..4e0c3fd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "marketing-command-center",
- "version": "1.0.0",
+ "version": "1.0.1",
"description": "DW Marketing Command Center — Constant Contact, marketing calendar, suggested copy, on-demand layouts",
"main": "server.js",
"scripts": {
diff --git a/public/panels/accounts.js b/public/panels/accounts.js
index 1fe0f99..ee69a14 100644
--- a/public/panels/accounts.js
+++ b/public/panels/accounts.js
@@ -11,7 +11,11 @@ window.MCC_PANELS['accounts'] = {
const esc = s => String(s == null ? '' : s).replace(/[&<>"]/g, c =>
({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
const $ = sel => root.querySelector(sel);
- const jget = async u => (await fetch(ORIGIN + u, { credentials: 'same-origin' })).json();
+ const jget = async u => {
+ const r = await fetch(ORIGIN + u, { credentials: 'same-origin' });
+ if (!r.ok) throw new Error(`${u} → HTTP ${r.status}`);
+ return r.json();
+ };
const FACETS = [
{ key: 'all', label: 'All accounts', dot: null },
← f872cf0 channels: three-valued is_valid guard so a Graph rate-limit/
·
back to Marketing Command Center
·
channels: Instagram-account selector — pick 1-to-all IG acco f2636e3 →