← back to Dwjs Consolidation 2026 04 23
wire archive-guard into reactivate.js — block re-activation of protected SKUs
845a724a74d15d1ef0b46f87be30692c05eba20d · 2026-05-11 18:01:21 -0700 · Steve
Files touched
Diff
commit 845a724a74d15d1ef0b46f87be30692c05eba20d
Author: Steve <steve@designerwallcoverings.com>
Date: Mon May 11 18:01:21 2026 -0700
wire archive-guard into reactivate.js — block re-activation of protected SKUs
---
reactivate.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/reactivate.js b/reactivate.js
index 4ed465c..3893d23 100644
--- a/reactivate.js
+++ b/reactivate.js
@@ -3,6 +3,7 @@
// Status → ACTIVE via productChangeStatus mutation.
const https = require('https');
const fs = require('fs');
+const { isProtected } = require('/Users/stevestudio2/Projects/_shared/archive-guard');
const STORE='designer-laboratory-sandbox.myshopify.com';
const TOKEN='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';
@@ -48,7 +49,15 @@ for (const p of Object.values(products)) {
const bolt = p.variants.find(v => !/sample/i.test(v.sku+v.title));
const sample = p.variants.find(v => /sample/i.test(v.sku+v.title));
const body = (p.bodyHtml||'').trim().length >= 10;
- if (img && bolt && bolt.price>0 && sample && body) targets.push(p);
+ if (img && bolt && bolt.price>0 && sample && body) {
+ // archive-guard: never re-activate intentionally-archived SKUs
+ const allSkus = p.variants.map(v => v.sku).filter(Boolean);
+ if (allSkus.some(s => isProtected(s))) {
+ log(`SKIP archive-guard ${p.id}: protected SKU in ${JSON.stringify(allSkus)}`);
+ continue;
+ }
+ targets.push(p);
+ }
}
log(`qualifying archived products: ${targets.length}`);
← 7626a9a initial scaffold (gitify-all 2026-05-06)
·
back to Dwjs Consolidation 2026 04 23
·
York/Brewster double-roll MOQ audit (vendor-scoped, env-ref c20e2c7 →