@bostonuniversity/buwp-local 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/buwp-local.js CHANGED
@@ -24,6 +24,7 @@ const packageJson = JSON.parse(
24
24
  import startCommand from '../lib/commands/start.js';
25
25
  import stopCommand from '../lib/commands/stop.js';
26
26
  import destroyCommand from '../lib/commands/destroy.js';
27
+ import updateCommand from '../lib/commands/update.js';
27
28
  import logsCommand from '../lib/commands/logs.js';
28
29
  import wpCommand from '../lib/commands/wp.js';
29
30
  import shellCommand from '../lib/commands/shell.js';
@@ -60,6 +61,13 @@ program
60
61
  .option('-f, --force', 'Skip confirmation prompt')
61
62
  .action(destroyCommand);
62
63
 
64
+ // Update command
65
+ program
66
+ .command('update')
67
+ .description('Update Docker images and recreate containers')
68
+ .option('--all', 'Update all service images (default: WordPress only)')
69
+ .action(updateCommand);
70
+
63
71
  // Logs command
64
72
  program
65
73
  .command('logs')
@@ -88,6 +96,7 @@ program
88
96
  .option('--plugin', 'Non-interactive: initialize as plugin')
89
97
  .option('--mu-plugin', 'Non-interactive: initialize as mu-plugin')
90
98
  .option('--theme', 'Non-interactive: initialize as theme')
99
+ .option('--sandbox', 'Non-interactive: initialize as sandbox')
91
100
  .option('-f, --force', 'Overwrite existing configuration')
92
101
  .action(initCommand);
93
102
 
package/docs/CHANGELOG.md CHANGED
@@ -5,7 +5,24 @@ All notable changes to buwp-local will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.7.0]
9
+
10
+ ### Added
11
+ - **`update` command** - Pull latest Docker images and recreate containers without losing data
12
+ - Pull WordPress image only by default (typical use case)
13
+ - `--all` flag to update all service images (Redis, S3 proxy, etc.)
14
+ - Safely applies security updates and WordPress core updates
15
+ - Data preserved: Database, WordPress files, volume mappings
16
+
17
+ - **Non-interactive sandbox initialization** - Add `--sandbox` flag to `init` command for scripted setup of sandbox-type projects
18
+
19
+ ### Changed
20
+ - **`init` command** - Now supports `--sandbox` flag for non-interactive initialization
21
+
22
+ ## [0.6.3]
23
+
24
+ ### Added
25
+ - Documentation for volume mapping and xdebug
9
26
 
10
27
  ## [0.6.2]
11
28
 
package/docs/COMMANDS.md CHANGED
@@ -115,6 +115,46 @@ npx buwp-local destroy --force
115
115
 
116
116
  ---
117
117
 
118
+ ### `update`
119
+
120
+ Update Docker images and recreate containers without losing data.
121
+
122
+ ```bash
123
+ npx buwp-local update [options]
124
+ ```
125
+
126
+ **Options:**
127
+ - `--all` - Update all service images (default: WordPress image only)
128
+
129
+ **Examples:**
130
+ ```bash
131
+ # Update WordPress image only (recommended)
132
+ npx buwp-local update
133
+
134
+ # Update all service images (Redis, S3 proxy, etc.)
135
+ npx buwp-local update --all
136
+ ```
137
+
138
+ **What it does:**
139
+ - Checks if environment exists and Docker is running
140
+ - Pulls latest Docker images from registry
141
+ - Recreates containers with new images using `--force-recreate`
142
+ - Loads credentials from Keychain and/or `.env.local`
143
+ - **Preserves volumes** - Database and WordPress files untouched
144
+ - Shows success message confirming what was preserved
145
+
146
+ **Use cases:**
147
+ - Pull latest WordPress updates without losing development work
148
+ - Update only WordPress image (typical use case) or all services
149
+ - Safe alternative to `destroy` when you only want to refresh images
150
+
151
+ **Key difference from `stop/start`:**
152
+ - `stop` → `start`: Reuses existing containers (no new images)
153
+ - `update`: Pulls new images and recreates containers (gets updates)
154
+ - `destroy`: Removes everything including volumes (fresh start)
155
+
156
+ ---
157
+
118
158
  ### `logs`
119
159
 
120
160
  View logs from Docker containers.
@@ -183,8 +183,11 @@ npx buwp-local destroy
183
183
  ## Next Steps
184
184
 
185
185
  - **[Commands Reference](COMMANDS.md)** - Full list of available commands
186
+ - **[Volume Mapping Patterns](VOLUME_MAPPINGS.md)** - Advanced multi-repo workflows
187
+ - **[Xdebug Setup](XDEBUG.md)** - Configure step debugging for your pattern
186
188
  - **[Credential Management](CREDENTIALS.md)** - Detailed guide to managing secrets
187
189
  - **[Multi-Project Setup](MULTI_PROJECT.md)** - Run multiple projects simultaneously
190
+ - **[Migration from VM Sandboxes](MIGRATION_FROM_VM.md)** - Transitioning from traditional VMs
188
191
  - **[Architecture](ARCHITECTURE.md)** - Understand how buwp-local works
189
192
 
190
193
  ## Troubleshooting
@@ -224,7 +224,7 @@ Check volume mappings in `.buwp-local.json`:
224
224
  # Verify Keychain entries
225
225
  npx buwp-local keychain list
226
226
 
227
- # Or use .env.local fallback
227
+ # Or use .env.local fallback --- this is a nice idea, but the actual command does not yet exist
228
228
  npx buwp-local keychain export > .env.local
229
229
  ```
230
230
 
package/docs/ROADMAP.md CHANGED
@@ -10,7 +10,7 @@ Strategic direction and development priorities for buwp-local.
10
10
 
11
11
  **Key Features:**
12
12
  - macOS Keychain integration for secure credential storage
13
- - Automatic hex decoding for legacy multiline credentials
13
+ - Automatic hex decoding for large multiline credentials like Shibboleth keys and certs
14
14
  - Credential validation on startup with interactive setup
15
15
  - Multi-project support with isolated Docker volumes
16
16
  - Smart initialization for plugins, themes, and mu-plugins
@@ -110,11 +110,12 @@ hostile.remove('127.0.0.1', config.hostname);
110
110
  - Guide users on setting up access to private registries (ghcr.io)
111
111
  - Automatic check for registry login or existing image on `start`
112
112
 
113
- ### Planned for v0.6.2
113
+ ### Shipped in v0.6.2
114
114
 
115
- - ***Get spaces in volume mappings working correctly***
115
+ - **Fix issues with spaces in paths**
116
116
  - Fix issues with spaces in host paths causing Docker errors
117
- - Ensure cross-platform compatibility (Windows, macOS, Linux)
117
+
118
+ ### Planned for v0.6.3
118
119
 
119
120
  - **Basic docs on existing Xdebug features**
120
121
  - Quickstart guide for enabling and using Xdebug in containers
@@ -122,6 +123,35 @@ hostile.remove('127.0.0.1', config.hostname);
122
123
  - **Volume Mapping pattern guide**
123
124
  - Documentation on different volume mapping strategies for various development workflows
124
125
 
126
+ ### Shipped in v0.6.3
127
+
128
+ **Focus:** Documentation refinement based on real user patterns
129
+
130
+ **Key Deliverables:**
131
+
132
+ 1. **Volume Mapping Patterns Guide** ✅
133
+ - Comprehensive [VOLUME_MAPPINGS.md](VOLUME_MAPPINGS.md) documenting 3 patterns:
134
+ - **Pattern A:** In-Repo Development (self-contained, wp-env style)
135
+ - **Pattern B:** Sandbox Coordination (base camp maps multiple repos)
136
+ - **Pattern C:** Monolithic Sandbox (full WordPress for IDE context)
137
+ - Based on real user workflows discovered during initial rollout
138
+ - Decision trees, comparison tables, and migration guides
139
+ - Advanced topics: switching patterns, hybrid setups, performance considerations
140
+
141
+ 2. **Xdebug Configuration Guide** ✅
142
+ - Comprehensive [XDEBUG.md](XDEBUG.md) with pattern-specific pathMappings
143
+ - VSCode, PHPStorm, and Zed examples for each pattern
144
+ - Multi-root workspace setup for Pattern B
145
+ - Troubleshooting breakpoints, performance, and common issues
146
+
147
+ 3. **Cross-Reference Documentation** ✅
148
+ - Updated readme.md with links to new guides
149
+ - Added callouts in MULTI_PROJECT.md pointing to Pattern B
150
+ - Enhanced GETTING_STARTED.md next steps section
151
+ - Improved discoverability across documentation
152
+
153
+ **Result:** Documentation now accurately reflects real-world development workflows, making it easier for new users to adopt appropriate patterns.
154
+
125
155
  ## Next Phase: v0.7.0 - Developer Experience
126
156
 
127
157
  **Status:** Planned
@@ -130,7 +160,16 @@ hostile.remove('127.0.0.1', config.hostname);
130
160
 
131
161
  ### Potential Features
132
162
 
133
- - **Security Checks**
163
+ - **Docker Image Update Command** 🎯 (Proposed for v0.7.0)
164
+ - **Problem:** Stopping and restarting containers reuses existing images; newer images aren't pulled
165
+ - **Solution:** Add `buwp-local update` command that:
166
+ - Pulls latest Docker images from registry
167
+ - Recreates containers with new images
168
+ - Preserves volumes (database, WordPress data)
169
+ - **Benefit:** Safe, explicit way to apply WordPress/service updates without `destroy`
170
+ - **Implementation:** Wrapper around `docker-compose pull && docker-compose up -d --force-recreate`
171
+
172
+ - **Database Security**
134
173
  - Check database access on db port (e.g. `localhost:3306`)
135
174
  - Consider more stringent default database passwords
136
175
  - The database can have restricted content in it, so we need to ensure that users are aware of this and take appropriate measures.
@@ -139,8 +178,12 @@ hostile.remove('127.0.0.1', config.hostname);
139
178
  - Command to help generate Xdebug configuration for IDEs (VSCode, Zed)
140
179
  - Documentation on usage patterns
141
180
 
181
+ - **Interactive setup assistant for adding volume mappings**
182
+ - Guided prompts to add common volume mappings post-initialization
183
+ - Suggestions based on detected project structure
184
+
142
185
  - **Improved Windows and Linux support**
143
- - Multiplatform /etc/hosts hostname management
186
+ - Multiplatform /etc/hosts hostname guide
144
187
  - Evaluate credential storage solutions for non-macOS platforms (https://www.npmjs.com/package/keytar)
145
188
 
146
189
  - **Project Status & Listing**
@@ -148,10 +191,11 @@ hostile.remove('127.0.0.1', config.hostname);
148
191
  - View all running projects: `buwp-local list`
149
192
  - Quick status checks: `buwp-local status`
150
193
 
151
- - **Health Checks**
194
+ - **Health Checks and Network Ports**
152
195
  - Verify services are running properly
153
196
  - Database connectivity validation
154
197
  - Clear diagnostics on failures
198
+ - Advice and assistance on port conflicts
155
199
 
156
200
  - **Improved Error Messages**
157
201
  - Docker startup failures → actionable solutions
@@ -164,8 +208,12 @@ hostile.remove('127.0.0.1', config.hostname);
164
208
  - **Docker Volume management assistant**
165
209
  - listing and cleanup of unused volumes
166
210
 
211
+ - **Unit tests**
212
+ - Core modules (config, keychain, docker-compose)
213
+ - Command tests (init, start, stop, destroy, wp)
214
+
167
215
  ### Prioritization
168
- Will be informed by feedback from initial 2-3 users and actual pain points observed during rollout.
216
+ Will be informed by feedback from initial small group of users and actual pain points observed during rollout.
169
217
 
170
218
  ---
171
219
 
@@ -174,13 +222,12 @@ Will be informed by feedback from initial 2-3 users and actual pain points obser
174
222
  **Status:** Conceptual
175
223
  **Timeline:** TBD based on team feedback
176
224
 
177
- ### Potential Features (Lower Priority)
225
+ ### Potential Features
178
226
 
179
- - **SSL Certificate Generation** - Local HTTPS with mkcert
180
- - **Database Backup/Restore** - Simplified snapshots and recovery
181
- - **Performance Monitoring** - Real-time resource usage tracking
182
- - **Team Configuration Sync** - Share project configurations across team
183
227
  - **Cross-Platform Support** - Windows WSL2 and Linux credential storage
228
+ - **SSL Certificate Generation** - Local HTTPS with mkcert
229
+ - **Real support for runnning on ports other than 443**
230
+ - **Potential GUI from Electron or SwiftUI**
184
231
 
185
232
  **Note:** Automatic `/etc/hosts` management deferred pending user feedback. See "Lessons Learned" section above for details on the `hostile` library approach.
186
233
 
@@ -195,7 +242,7 @@ Will be informed by feedback from initial 2-3 users and actual pain points obser
195
242
  **Focus:** Robustness, clear setup, good documentation
196
243
 
197
244
  ### Stage 2: Team Rollout
198
- **Users:** 10-15 developers
245
+ **Users:** 5-10 developers
199
246
  **Goal:** Find and fix real-world issues
200
247
  **Release:** v0.7.0+
201
248
  **Focus:** Developer experience, error handling