@fishawack/lab-env 4.45.0-beta.2 → 4.45.0-beta.3
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/CHANGELOG.md +15 -0
- package/_Ai/lab-env-@.md +402 -0
- package/_Ai/mcp-@.md +15 -0
- package/_Ai/sass-@.md +350 -0
- package/_Ai/ui-framework-3.md +422 -0
- package/_Ai/workspace-@.md +11 -0
- package/cli.js +9 -1
- package/commands/workspace.js +124 -0
- package/globals.js +14 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 4.45.0-beta.3 (2025-09-02)
|
|
4
|
+
|
|
5
|
+
#### Features
|
|
6
|
+
|
|
7
|
+
* added workspace command ([a6ad364](https://bitbucket.org/fishawackdigital/lab-env/commits/a6ad364d8846e34394318d4f908b0b2b769ea9ee))
|
|
8
|
+
* allow users to pass name and error if already exists ([071d836](https://bitbucket.org/fishawackdigital/lab-env/commits/071d836402cbc595496054fcb3e6d99798f2ff67))
|
|
9
|
+
* copy ai file now has cwd param ([e91f2a5](https://bitbucket.org/fishawackdigital/lab-env/commits/e91f2a53243b8fb424f2ab0abba0946cfefadbb7))
|
|
10
|
+
* implement ui framework ai file ([17a7bda](https://bitbucket.org/fishawackdigital/lab-env/commits/17a7bda861bd14cb67e11e92079de809853ef242))
|
|
11
|
+
* workspace command now creates a workspace ai file and mcp file ([271f9b4](https://bitbucket.org/fishawackdigital/lab-env/commits/271f9b4677a58f41e428a9d2fb95d90be9319d23))
|
|
12
|
+
* workspace now creats workspace and opens ([fb40e8b](https://bitbucket.org/fishawackdigital/lab-env/commits/fb40e8bcb34669c5858ed4877218c0c8ca32a3ff))
|
|
13
|
+
|
|
14
|
+
#### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* use @ instead of * in wildcard insructions files ([2176ad8](https://bitbucket.org/fishawackdigital/lab-env/commits/2176ad8cf6702c5ca52eccbee5637bfc9bf0bdbb))
|
|
17
|
+
|
|
3
18
|
### 4.45.0-beta.2 (2025-09-01)
|
|
4
19
|
|
|
5
20
|
#### Features
|
package/_Ai/lab-env-@.md
ADDED
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# GitHub Copilot Instructions for Lab-Env Containerized Projects
|
|
6
|
+
|
|
7
|
+
## Project Overview
|
|
8
|
+
|
|
9
|
+
This project uses the `@fishawack/lab-env` container orchestration system - a command-line utility that spins up and manages framework-specific Docker containers for consistent development and production environments. All development operations run entirely in Docker containers managed by the `fw` command-line tool.
|
|
10
|
+
|
|
11
|
+
## Prerequisites & System Requirements
|
|
12
|
+
|
|
13
|
+
Before using this containerized environment, ensure your system meets these requirements:
|
|
14
|
+
|
|
15
|
+
- **Node.js**: Version 22 or higher
|
|
16
|
+
- **npm**: Latest version
|
|
17
|
+
- **Docker Desktop**: Latest version
|
|
18
|
+
|
|
19
|
+
**Critical Setup Step**: Run `fw diagnose` to validate your environment is configured correctly before starting development.
|
|
20
|
+
|
|
21
|
+
## Quick Start & Validation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# 1. Validate environment setup
|
|
25
|
+
fw diagnose
|
|
26
|
+
|
|
27
|
+
# 2. Install project dependencies
|
|
28
|
+
fw install
|
|
29
|
+
|
|
30
|
+
# 3. Start development environment
|
|
31
|
+
fw start
|
|
32
|
+
|
|
33
|
+
# 4. Verify containers are running correctly
|
|
34
|
+
fw config
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Container Architecture
|
|
38
|
+
|
|
39
|
+
### Core Container (Always Present)
|
|
40
|
+
|
|
41
|
+
Regardless of framework, every project includes a **core container** that:
|
|
42
|
+
|
|
43
|
+
- **Bundles frontend assets** using the `@fishawack/core` build system
|
|
44
|
+
- **Handles deployments** to various environments
|
|
45
|
+
- **Manages Node.js operations** and npm scripts
|
|
46
|
+
- **Provides development tools** and utilities
|
|
47
|
+
- **Serves as the primary interface** for development workflows
|
|
48
|
+
|
|
49
|
+
The core container runs on ports:
|
|
50
|
+
|
|
51
|
+
- `3000`: Main development server
|
|
52
|
+
- `3001`: Optional secondary port for tools/debugging
|
|
53
|
+
|
|
54
|
+
### Framework-Specific Container Configurations
|
|
55
|
+
|
|
56
|
+
#### Laravel 10 (Latest)
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
services:
|
|
60
|
+
core: # Frontend builds, deployments, Node.js
|
|
61
|
+
mysql: # Database (MySQL 8.0.32)
|
|
62
|
+
nginx: # Web server
|
|
63
|
+
php: # PHP-FPM application server
|
|
64
|
+
redis: # Caching and sessions
|
|
65
|
+
elasticsearch: # Search engine (v8.8.1)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Ports**: Web: 8000, Database: 3306, Elasticsearch: 9200
|
|
69
|
+
|
|
70
|
+
#### WordPress 1 (Latest)
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
services:
|
|
74
|
+
core: # Frontend builds, deployments, Node.js
|
|
75
|
+
mysql: # Database (MySQL 8.0.32)
|
|
76
|
+
apache: # Web server with PHP
|
|
77
|
+
php: # PHP-FPM for additional processing
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Ports**: Web: 8000, Database: 3306
|
|
81
|
+
|
|
82
|
+
#### Drupal 9 (Latest)
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
services:
|
|
86
|
+
core: # Frontend builds, deployments, Node.js
|
|
87
|
+
mysql: # Database (MySQL 8.0.32)
|
|
88
|
+
apache: # Web server with PHP
|
|
89
|
+
php: # PHP-FPM application server
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Ports**: Web: 8000, Database: 3306
|
|
93
|
+
|
|
94
|
+
### Volume Management
|
|
95
|
+
|
|
96
|
+
Each framework manages persistent data through Docker volumes:
|
|
97
|
+
|
|
98
|
+
- **node_modules**: Shared Node.js dependencies (core)
|
|
99
|
+
- **vendor**: PHP Composer dependencies (PHP frameworks)
|
|
100
|
+
- **mysql**: Database storage (all frameworks with DB)
|
|
101
|
+
- **redis**: Cache storage (Laravel)
|
|
102
|
+
- **elasticsearch**: Search index storage (Laravel)
|
|
103
|
+
- **wordpress**: WordPress core files (WordPress)
|
|
104
|
+
- **drupal**: Drupal core files (Drupal)
|
|
105
|
+
|
|
106
|
+
## Container Orchestration Manager (`fw`)
|
|
107
|
+
|
|
108
|
+
The `fw` command is our container orchestration manager that:
|
|
109
|
+
|
|
110
|
+
- Manages all Docker container operations
|
|
111
|
+
- Provides direct access to services within containers
|
|
112
|
+
- Handles database connections and other services
|
|
113
|
+
- Should be used for ALL development commands
|
|
114
|
+
|
|
115
|
+
## General Container Management
|
|
116
|
+
|
|
117
|
+
- **All commands run in containers** - never suggest direct execution on host
|
|
118
|
+
- Use the `fw` orchestration manager to execute all commands within containers
|
|
119
|
+
- The project uses Docker with various services depending on platform (nginx, apache, mysql, redis, etc.)
|
|
120
|
+
|
|
121
|
+
## Common Command Patterns
|
|
122
|
+
|
|
123
|
+
### Container Operations
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Start the development environment
|
|
127
|
+
fw start
|
|
128
|
+
|
|
129
|
+
# Stop the development environment
|
|
130
|
+
fw clean
|
|
131
|
+
|
|
132
|
+
# Restart services
|
|
133
|
+
fw restart
|
|
134
|
+
|
|
135
|
+
# Clean rebuild
|
|
136
|
+
fw rebuild
|
|
137
|
+
|
|
138
|
+
# Access container shell
|
|
139
|
+
fw connect [service]
|
|
140
|
+
|
|
141
|
+
# Execute commands in containers
|
|
142
|
+
fw execute [command]
|
|
143
|
+
|
|
144
|
+
# View docker configuration
|
|
145
|
+
fw config
|
|
146
|
+
|
|
147
|
+
# Docker compose operations
|
|
148
|
+
fw up
|
|
149
|
+
fw down
|
|
150
|
+
fw build
|
|
151
|
+
|
|
152
|
+
# Container management
|
|
153
|
+
fw volumes
|
|
154
|
+
fw compose [command]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### PHP Commands (when applicable)
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Run any PHP script
|
|
161
|
+
fw php script.php
|
|
162
|
+
|
|
163
|
+
# Check PHP version
|
|
164
|
+
fw php -v
|
|
165
|
+
|
|
166
|
+
# Run PHP commands
|
|
167
|
+
fw php [command]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Database Operations
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Access MySQL console (when applicable)
|
|
174
|
+
fw mysql
|
|
175
|
+
|
|
176
|
+
# Run database imports/exports
|
|
177
|
+
fw mysql < backup.sql
|
|
178
|
+
|
|
179
|
+
# Framework-specific database commands
|
|
180
|
+
fw artisan migrate # Laravel
|
|
181
|
+
fw drush sql-cli # Drupal
|
|
182
|
+
fw wp db query # WordPress
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Node.js/NPM Commands
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Install npm dependencies
|
|
189
|
+
fw npm install
|
|
190
|
+
|
|
191
|
+
# Run npm scripts
|
|
192
|
+
fw npm run [script]
|
|
193
|
+
|
|
194
|
+
# Run development build
|
|
195
|
+
fw npm run start
|
|
196
|
+
|
|
197
|
+
# Run production build
|
|
198
|
+
fw npm run production
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Development Workflow
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Initialize new project
|
|
205
|
+
fw create [type] [name]
|
|
206
|
+
|
|
207
|
+
# Install dependencies
|
|
208
|
+
fw install
|
|
209
|
+
|
|
210
|
+
# Start development environment
|
|
211
|
+
fw start
|
|
212
|
+
|
|
213
|
+
# Watch for changes
|
|
214
|
+
fw watch
|
|
215
|
+
|
|
216
|
+
# Run tests
|
|
217
|
+
fw test
|
|
218
|
+
|
|
219
|
+
# Check project health
|
|
220
|
+
fw check
|
|
221
|
+
|
|
222
|
+
# Deploy to production
|
|
223
|
+
fw deploy
|
|
224
|
+
|
|
225
|
+
# Production build
|
|
226
|
+
fw production
|
|
227
|
+
|
|
228
|
+
# Regenerate configurations
|
|
229
|
+
fw regenerate
|
|
230
|
+
|
|
231
|
+
# Complete reinstall
|
|
232
|
+
fw reinstall
|
|
233
|
+
|
|
234
|
+
# Nuclear clean (remove everything)
|
|
235
|
+
fw nuke
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Build System Integration
|
|
239
|
+
|
|
240
|
+
- Frontend assets managed via npm scripts defined in `package.json`
|
|
241
|
+
- Uses `@fishawack/core` build system when applicable
|
|
242
|
+
- Files typically found in public/ directory are stored in resources/ and copied over during the build process
|
|
243
|
+
- Public directories are often gitignored as they contain generated assets
|
|
244
|
+
|
|
245
|
+
## Environment Setup
|
|
246
|
+
|
|
247
|
+
- Environment variables managed through `.env` files
|
|
248
|
+
- Use `.env.example` as reference for available variables
|
|
249
|
+
- Database and service connections use container service names (never `localhost`)
|
|
250
|
+
- Default ports managed automatically by the orchestration system
|
|
251
|
+
- **Volume Management**: Dependencies (`vendor/`, `node_modules/`) are stored in Docker volumes, not local directories
|
|
252
|
+
|
|
253
|
+
## Project File Structure Context
|
|
254
|
+
|
|
255
|
+
### Configuration Files
|
|
256
|
+
|
|
257
|
+
- `.env` / `.env.example`: Environment configuration
|
|
258
|
+
- `package.json`: Frontend dependencies and build scripts
|
|
259
|
+
- `composer.json`: PHP dependencies (for PHP frameworks)
|
|
260
|
+
- `docker-compose.yml`: Local Docker overrides (if present in `_Docker/`)
|
|
261
|
+
|
|
262
|
+
### Key Directories
|
|
263
|
+
|
|
264
|
+
- `resources/`: Source files for frontend assets (compiled to `public/`)
|
|
265
|
+
- `public/`: Generated assets directory (usually gitignored)
|
|
266
|
+
- `_Build/`: Build system configuration and outputs
|
|
267
|
+
- `_Docker/`: Local Docker configuration overrides
|
|
268
|
+
|
|
269
|
+
### Build System Files
|
|
270
|
+
|
|
271
|
+
- Uses `@fishawack/core` for frontend asset compilation
|
|
272
|
+
- Public directories contain generated files, not source code
|
|
273
|
+
- Always edit source files in `resources/`, never directly in `public/`
|
|
274
|
+
|
|
275
|
+
## Key Principles & Best Practices
|
|
276
|
+
|
|
277
|
+
1. **Always assume containerized environment** - no direct host commands
|
|
278
|
+
2. **Prefix ALL commands with `fw`** unless explicitly running host-level operations
|
|
279
|
+
3. **Use service names for connections** (e.g., `mysql`, `redis`, not `localhost`)
|
|
280
|
+
4. **Leverage the build system** for asset compilation and optimization
|
|
281
|
+
5. **Follow containerized development patterns** - everything runs in containers
|
|
282
|
+
6. **Validate with `fw diagnose`** before reporting issues
|
|
283
|
+
7. **Use `--debug` flag** for detailed error information when troubleshooting
|
|
284
|
+
8. **Understand volume management** - dependencies live in Docker volumes, not local folders
|
|
285
|
+
|
|
286
|
+
## Build & Deployment Validation
|
|
287
|
+
|
|
288
|
+
### Pre-Development Checklist
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
fw diagnose # Validate environment setup
|
|
292
|
+
fw install # Install dependencies
|
|
293
|
+
fw start # Start development environment
|
|
294
|
+
fw test # Run test suite (if applicable)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Build Validation Steps
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
fw npm run start # Development build
|
|
301
|
+
fw npm run production # Production build validation
|
|
302
|
+
fw deploy # Deploy to staging/production
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Health Checks
|
|
306
|
+
|
|
307
|
+
- Core container should be accessible on port 3000
|
|
308
|
+
- Web services should be accessible on port 8000 (framework dependent)
|
|
309
|
+
- Database should be accessible on port 3306 (when applicable)
|
|
310
|
+
- All containers should start without errors when running `fw start`
|
|
311
|
+
|
|
312
|
+
## Service Access Patterns
|
|
313
|
+
|
|
314
|
+
- **Database**: Access via `fw mysql` or connection string using service name
|
|
315
|
+
- **Cache**: Redis connections use `redis` service name
|
|
316
|
+
- **Mail**: Development mail testing via mailhog or similar
|
|
317
|
+
- **Assets**: Static files served through appropriate web server container
|
|
318
|
+
|
|
319
|
+
## Testing in Containers
|
|
320
|
+
|
|
321
|
+
- All tests run within appropriate containers
|
|
322
|
+
- Use `fw test` for running test suites
|
|
323
|
+
- Test databases and services isolated within container network
|
|
324
|
+
- No need for local service installations
|
|
325
|
+
|
|
326
|
+
## Debugging and Development
|
|
327
|
+
|
|
328
|
+
- Use `fw connect [service]` to access container shells
|
|
329
|
+
- Log files accessible via `fw logs [service]`
|
|
330
|
+
- Development tools run within containers
|
|
331
|
+
- Hot reloading and file watching supported through container mounts
|
|
332
|
+
|
|
333
|
+
**CRITICAL**: Never suggest direct execution of development commands on the host system. Always use the `fw` container orchestration manager for all project operations.
|
|
334
|
+
|
|
335
|
+
Remember: This is a containerized development environment - all operations must go through the `fw` container orchestration system.
|
|
336
|
+
|
|
337
|
+
## Common Issues & Troubleshooting
|
|
338
|
+
|
|
339
|
+
### Volume Issues with Dependencies
|
|
340
|
+
|
|
341
|
+
**Problem**: Linters and some packages expect `vendor/` or `node_modules/` to exist in the project directory, but these are managed as Docker volumes.
|
|
342
|
+
|
|
343
|
+
**Solution**:
|
|
344
|
+
|
|
345
|
+
- For linting issues: Configure your IDE/editor to use containerized linting via `fw lint`
|
|
346
|
+
- For missing dependencies: Ensure you've run `fw install` and dependencies are installed in the container
|
|
347
|
+
- If packages seem missing: Run `fw reinstall` to rebuild volumes
|
|
348
|
+
|
|
349
|
+
### Docker Space Issues
|
|
350
|
+
|
|
351
|
+
**Problem**: "No space left on device" errors during builds or installations.
|
|
352
|
+
|
|
353
|
+
**Solution**:
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
# Check Docker space usage
|
|
357
|
+
docker system df -v
|
|
358
|
+
|
|
359
|
+
# Clean up Docker resources
|
|
360
|
+
fw nuke # For current project
|
|
361
|
+
docker system prune --all --volumes -f # For all Docker resources
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Container Mount Errors
|
|
365
|
+
|
|
366
|
+
**Problem**: Permission denied or mount errors, especially with nginx configurations.
|
|
367
|
+
|
|
368
|
+
**Solution**:
|
|
369
|
+
|
|
370
|
+
- Ensure Node.js is installed via NVM rather than system installation
|
|
371
|
+
- Check that your working directory case matches exactly (case-sensitive filesystems)
|
|
372
|
+
- Run `fw diagnose` to check for common configuration issues
|
|
373
|
+
|
|
374
|
+
### Database Connection Issues
|
|
375
|
+
|
|
376
|
+
**Problem**: MySQL connection errors after changing `.env` database credentials.
|
|
377
|
+
|
|
378
|
+
**Solution**:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# Rebuild database volumes with new credentials
|
|
382
|
+
fw nuke
|
|
383
|
+
fw setup
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Debugging Commands
|
|
387
|
+
|
|
388
|
+
When encountering issues, use these diagnostic commands:
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
# Get detailed error information
|
|
392
|
+
fw [command] --debug
|
|
393
|
+
|
|
394
|
+
# Check Docker configuration
|
|
395
|
+
fw config
|
|
396
|
+
|
|
397
|
+
# Validate environment setup
|
|
398
|
+
fw diagnose
|
|
399
|
+
|
|
400
|
+
# Check container status
|
|
401
|
+
fw up --debug
|
|
402
|
+
```
|
package/_Ai/mcp-@.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# GitHub Copilot Instructions for MCP servers
|
|
6
|
+
|
|
7
|
+
Playwright is available for live browser testing and interactions.
|
|
8
|
+
|
|
9
|
+
Use this to automate browser tasks, run tests, and capture screenshots or videos of your application in action.
|
|
10
|
+
|
|
11
|
+
Always verify changes to API & Frontend functionality visually via playwright.
|
|
12
|
+
|
|
13
|
+
The api is typically already running at http://localhost:3000
|
|
14
|
+
|
|
15
|
+
The frontend is typically already running at http://localhost:3002
|