laracrew 0.1.1 → 0.2.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/CHANGELOG.md +81 -2
- package/README.md +638 -598
- package/dist/index.js +154 -35
- package/dist/index.js.map +1 -1
- package/examples/README.md +7 -1
- package/examples/django-celery/stack.yaml +5 -0
- package/examples/node-api-and-web/stack.yaml +5 -2
- package/examples/polyglot-microservices/stack.yaml +4 -2
- package/package.json +63 -55
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,82 @@ Planned, in order — see `.claude/PLAN.md`:
|
|
|
17
17
|
- `laracrew run <task>` for one-shot cross-project sequences
|
|
18
18
|
- Background daemon: `up --detach`, `attach`, `status`, `logs -f`
|
|
19
19
|
|
|
20
|
+
## [0.2.0] — 2026-09-20
|
|
21
|
+
|
|
22
|
+
Graceful shutdown for any process, not only Laravel queue workers, and a `doctor` that only
|
|
23
|
+
applies its Laravel checks to Laravel.
|
|
24
|
+
|
|
25
|
+
laracrew has always been able to *run* anything — the supervisor takes a command and knows
|
|
26
|
+
nothing about the language behind it. But the two things that made it more than a process
|
|
27
|
+
runner, the graceful stop and the pre-flight checks, both assumed PHP. This release closes that
|
|
28
|
+
gap. Existing stack files keep working unchanged.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **`stop.exec`** — any command as the first step of the stop ladder. It runs in the service's
|
|
33
|
+
`cwd`, with the service's environment, and laracrew waits `graceMs` for the process to exit by
|
|
34
|
+
itself before escalating to the signal and the tree kill. A Celery worker, a BullMQ consumer or
|
|
35
|
+
a Compose project now shuts down as carefully as a queue worker:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
stop: { exec: ["celery", "-A", "app", "control", "shutdown"], graceMs: 25000 }
|
|
39
|
+
stop: { exec: "npm run drain", graceMs: 10000 }
|
|
40
|
+
stop: { exec: ["docker", "compose", "stop"], graceMs: 30000 }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **`doctor` checks external dependencies.** Every `external: true` service is probed through the
|
|
44
|
+
`tcp` or `http` gate it already declares, so a stack's Postgres, RabbitMQ or HTTP dependency is
|
|
45
|
+
verified before boot — whatever the stack is written in.
|
|
46
|
+
- `doctor` reads `REDIS_URL` when a project sets it instead of `REDIS_HOST` / `REDIS_PORT`.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- **`stop.artisan` is now shorthand for `stop.exec`.** It resolves to `<project php> artisan
|
|
51
|
+
<command>`, run from the project root even when the service sets its own `cwd`. Behaviour for
|
|
52
|
+
existing Laravel stacks is unchanged; a service may declare one or the other, not both. A
|
|
53
|
+
service that declares its own graceful step now replaces an inherited one in either direction,
|
|
54
|
+
so a stack can default to `artisan: queue:restart` and still give one service its own `exec`.
|
|
55
|
+
- **`doctor` applies each check only where it means something.** It works out which projects run
|
|
56
|
+
PHP (from their commands and from `stop.artisan`) and which talk to Redis (from their `.env`
|
|
57
|
+
and their commands). A stack with no PHP in it gets no PHP findings; a stack with no Redis gets
|
|
58
|
+
no Redis findings. Laravel stacks see exactly what they saw before.
|
|
59
|
+
- A Redis address already covered by an `external: true` service's gate is no longer probed a
|
|
60
|
+
second time from the project's `.env`.
|
|
61
|
+
- `laracrew --help` and the generated `projects.yaml` no longer describe projects as Laravel-only.
|
|
62
|
+
`php:` is documented as what it is: the binary the `stop.artisan` shorthand runs.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **`laracrew --version` reported `0.1.0` on every release.** The version was a hardcoded
|
|
67
|
+
constant that nobody bumped, so `0.1.1` and `0.1.2` both identified themselves as `0.1.0`. It is
|
|
68
|
+
now baked in from `package.json` at build time, with a test that fails if the two ever disagree.
|
|
69
|
+
- **`stop.artisan` on a service with no project was silently ignored** — the graceful step was
|
|
70
|
+
skipped and nothing said so. It is now a config error that names `stop.exec` as the way out.
|
|
71
|
+
- **`doctor` failed on a machine without PHP** for a stack that contains no PHP: `php --version`
|
|
72
|
+
ran for every declared project and a missing binary was a blocking `✖` with exit code 1.
|
|
73
|
+
- **False Redis collision between projects that never touch Redis.** Two projects with no `.env`
|
|
74
|
+
both resolved to the same synthesized default namespace and were reported as sharing it.
|
|
75
|
+
- The "no `artisan` file" and "`.env` is missing or empty" warnings no longer fire for projects
|
|
76
|
+
that are not PHP projects.
|
|
77
|
+
|
|
78
|
+
### Notes
|
|
79
|
+
|
|
80
|
+
- 244 tests. The graceful stop step had no coverage before this release; it now has unit tests
|
|
81
|
+
for both outcomes (the process exits by itself, and the ladder escalating when it does not),
|
|
82
|
+
plus tests for every new config error.
|
|
83
|
+
- The npm description and `laracrew --help` now say "your projects" rather than "your Laravel
|
|
84
|
+
projects". The README still leads with the Laravel story, which is what the tool was built for.
|
|
85
|
+
|
|
86
|
+
## [0.1.2] — 2026-09-20
|
|
87
|
+
|
|
88
|
+
### Added
|
|
89
|
+
|
|
90
|
+
- `repository`, `homepage` and `bugs` metadata, so the npm page links back to the source.
|
|
91
|
+
|
|
92
|
+
## [0.1.1] — 2026-09-20
|
|
93
|
+
|
|
94
|
+
First release published to npm. No code changes from `0.1.0`.
|
|
95
|
+
|
|
20
96
|
## [0.1.0] — 2026-09-19
|
|
21
97
|
|
|
22
98
|
First release. Boots and supervises the long-running processes of several Laravel projects at
|
|
@@ -90,5 +166,8 @@ once, from one command.
|
|
|
90
166
|
- Accepted by the schema but not yet acted on: `watch`, `metrics` (read by `doctor` only), and
|
|
91
167
|
`hooks`. Stack files written today stay valid.
|
|
92
168
|
|
|
93
|
-
[Unreleased]: https://github.com/
|
|
94
|
-
[0.
|
|
169
|
+
[Unreleased]: https://github.com/vidux/laracrew/compare/v0.2.0...HEAD
|
|
170
|
+
[0.2.0]: https://github.com/vidux/laracrew/compare/v0.1.2...v0.2.0
|
|
171
|
+
[0.1.2]: https://github.com/vidux/laracrew/compare/v0.1.1...v0.1.2
|
|
172
|
+
[0.1.1]: https://github.com/vidux/laracrew/releases/tag/v0.1.1
|
|
173
|
+
[0.1.0]: https://github.com/vidux/laracrew/releases/tag/v0.1.0
|