Skip to content

Commit e18b6a4

Browse files
authored
New features (#5)
* Add campaign tools and tests * Add content protection system * Add more docs and health checks
1 parent d40e7ff commit e18b6a4

22 files changed

Lines changed: 3511 additions & 44 deletions

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,45 @@ and this project adheres to
88

99
## [Unreleased]
1010

11+
## [2.3.0] - 2025-10-28
12+
13+
### Added
14+
15+
- **Campaign Tools Menu** - Automated campaign/promo branch management
16+
- Create Promo Branch: One-command promo branch creation from shop/main
17+
- Push Promo to Main: Automated PR creation to merge campaign content back
18+
- End Promo: Cleanup and delete campaign branches
19+
- List Active Promos: Show all active campaign branches across shops
20+
- Implements Shopify's recommended branch-per-campaign workflow
21+
- 11 comprehensive tests
22+
- **Content Protection System** - Config-based content overwrite prevention
23+
- Per-shop content protection settings (strict/warn/off modes)
24+
- Global settings for default protection behavior (settings.json)
25+
- STRICT mode: Blocks cross-shop content sync, requires 'OVERRIDE' confirmation
26+
- WARN mode: Shows warning, requires explicit confirmation
27+
- Verbose/quiet verbosity controls
28+
- Tools → Content Protection menu for configuration
29+
- Show Protection Status for all shops
30+
- Enable/Disable protection per shop or for all shops
31+
- Smart detection: Only blocks cross-shop (main → shop-a), allows within-shop (shop-a → shop-a)
32+
- 14 comprehensive tests
33+
- **Shop Health Check** - Diagnostic tool for verifying shop setup
34+
- Check single shop or all shops
35+
- Configuration validation (JSON, domains, branches)
36+
- Credentials verification (file exists, tokens present, permissions)
37+
- Git branch validation (existence, sync status)
38+
- Content protection status display
39+
- Actionable recommendations for issues
40+
- Informational only (no auto-fix, always exits successfully)
41+
- 8 comprehensive tests
42+
43+
### Changed
44+
45+
- **Content detection improved** - Now enforces protection based on shop config
46+
- Integrates with content protection settings
47+
- Shows appropriate warnings based on protection mode
48+
- Better UX messaging (explains protection is working, not broken)
49+
1150
## [2.2.4] - 2025-10-28
1251

1352
### Add npm package versioning badges to README.md

README.md

Lines changed: 96 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ themes, or any existing Shopify theme that needs multi-shop capabilities.
2828
- **⚡ Modern GitHub Flow** - Simple, PR-based development workflow
2929
- **🧪 Interactive Testing** - Test against real Shopify preview themes
3030

31-
### 🛡️ Built-In Safeguards (v2.1.0+)
32-
33-
- **🚨 Content Detection** - Warns before overwriting shop-specific settings
31+
### 🛡️ Built-In Safeguards
32+
33+
- **🚨 Content Protection** (v2.3.0+) - Config-based prevention of content
34+
overwrites with strict/warn/off modes
35+
- **🏥 Health Check** (v2.3.0+) - Comprehensive diagnostics for configuration,
36+
credentials, and branches
37+
- **🎯 Campaign Tools** (v2.3.0+) - Automated campaign lifecycle management with
38+
one-command promo workflows
3439
- **🔒 Security Audit** - `multi-shop audit` command checks permissions and
3540
credentials
3641
- **✅ Tests** - Unit, integration, security, E2E, and performance tests
@@ -263,26 +268,99 @@ When you merge features to main:
263268
3. **Shop teams create final PRs**: `shop-a/staging → shop-a/main`,
264269
`shop-b/staging → shop-b/main`, etc.
265270

266-
### Campaign Management (Per Shop)
271+
### Campaign Management (Per Shop) - v2.3.0+
272+
273+
**New Campaign Tools Menu** automates the entire campaign lifecycle:
267274

268275
```bash
269-
# Create promo for specific shop
276+
# 1. Create promo branch (one command)
270277
pnpm run shop → Campaign Tools → Create Promo Branch
271278
# → Select shop: shop-a
272279
# → Promo name: summer-sale
273-
#Creates: shop-a/promo-summer-sale
280+
#Automatically creates and pushes: shop-a/promo-summer-sale
274281

275-
# Connect promo theme in Shopify admin (shop-a only)
282+
# 2. Connect promo theme in Shopify admin
276283
# → Add theme → Connect from GitHub → shop-a/promo-summer-sale
277284

278-
# Launch promo (shop-a only)
285+
# 3. Customize in Shopify Theme Editor
286+
# → Changes auto-sync back to promo branch
287+
288+
# 4. Launch promo
279289
# → Publish theme or use Launchpad app
280290

281-
# Push content back to shop main (keeps shop-a/main current)
291+
# 5. Push content back to main (one command)
282292
pnpm run shop → Campaign Tools → Push Promo to Main
293+
# → Select promo: shop-a/promo-summer-sale
283294
# → Creates PR: shop-a/promo-summer-sale → shop-a/main
295+
296+
# 6. List all active campaigns
297+
pnpm run shop → Campaign Tools → List Active Promos
298+
# → Shows all promo branches across all shops
299+
300+
# 7. Clean up after campaign
301+
pnpm run shop → Campaign Tools → End Promo
302+
# → Select and delete finished promo branch
303+
```
304+
305+
**Content Protection Integration:** Campaign content merges respect your Content
306+
Protection settings, ensuring intentional content changes.
307+
308+
### Content Protection (v2.3.0+)
309+
310+
**Config-based safeguards** prevent accidental content overwrites:
311+
312+
```bash
313+
# View protection status
314+
pnpm run shop → Tools → Content Protection → Show Protection Status
315+
316+
# Configure individual shop
317+
pnpm run shop → Tools → Content Protection → Configure Shop Protection
318+
# → Select shop
319+
# → Enable/Disable
320+
# → Choose mode: strict (block), warn (confirm), or off
321+
# → Choose verbosity: verbose or quiet
322+
323+
# Enable protection for all shops
324+
pnpm run shop → Tools → Content Protection → Enable All Shops
325+
326+
# Configure global defaults
327+
pnpm run shop → Tools → Content Protection → Global Settings
328+
```
329+
330+
**Three Protection Modes:**
331+
332+
- **Strict** - Blocks cross-shop content syncs, requires 'OVERRIDE' to proceed
333+
- **Warn** - Shows warning with file list, requires confirmation (default)
334+
- **Off** - No protection, content syncs freely
335+
336+
**Smart Detection:** Distinguishes between risky cross-shop operations
337+
(`main → shop-a`) and safe within-shop operations
338+
(`shop-a/main → shop-a/staging`).
339+
340+
### Health Check (v2.3.0+)
341+
342+
**Diagnostic tool** verifies your shop configuration:
343+
344+
```bash
345+
# Check single shop (detailed)
346+
pnpm run shop → Tools → Health Check → Check Single Shop
347+
# → Verifies: configuration, credentials, branches, content protection
348+
349+
# Check all shops (quick overview)
350+
pnpm run shop → Tools → Health Check → Check All Shops
351+
# → Shows status for every configured shop
284352
```
285353

354+
**What it checks:**
355+
356+
- Configuration file validity (JSON, required fields, domains)
357+
- Credentials existence, tokens presence, file permissions
358+
- Git branch existence and sync status
359+
- Content Protection status and settings
360+
361+
**Actionable recommendations** without auto-fixing - tells you exactly what
362+
commands to run.
363+
286364
---
287365

288366
## 📋 Development Workflow
@@ -478,6 +556,14 @@ git branch --show-current
478556
# Should be: feature/name or shop-a/name for auto-detection
479557
```
480558

559+
**"Not sure what's wrong?" - Run Health Check (v2.3.0+)**
560+
561+
```bash
562+
pnpm run shop → Tools → Health Check
563+
# Comprehensive diagnostics with actionable recommendations
564+
# Checks: config, credentials, branches, content protection
565+
```
566+
481567
---
482568

483569
## 📚 Documentation
@@ -517,7 +603,7 @@ npm publish
517603

518604
## 📄 License
519605

520-
MIT © [ShopDevs](https://shopdevs.com)
606+
MIT © [Brandt Milczewski](https://github.com/brandtam)
521607

522608
---
523609

0 commit comments

Comments
 (0)