@dryfit/cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +76 -2
- package/dist/dryfit.mjs +4160 -0
- package/package.json +63 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dryfit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dryfit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Test unreleased npm libraries inside real consumer apps, the way they will actually be installed.
|
|
4
|
+
|
|
5
|
+
dryfit runs a private local registry, publishes every library change as a unique dev version, installs it
|
|
6
|
+
into the consumer apps you choose, clears the framework caches that would hide it, and puts every consumer
|
|
7
|
+
back exactly as it was when you are done. No symlinks, no `file:` paths, no duplicate framework copies.
|
|
8
|
+
|
|
9
|
+
Website and docs: **[mikheil-gigauri.github.io/dryfit](https://mikheil-gigauri.github.io/dryfit/)**
|
|
10
|
+
|
|
11
|
+
## Using it
|
|
12
|
+
|
|
13
|
+
You need Node 22.12 or newer, macOS or Linux, and apps that install with npm, pnpm, Yarn 2+ or Bun. In the
|
|
14
|
+
folder of the library you are working on:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx @dryfit/cli init # remembers where your projects live; starts dryfit
|
|
18
|
+
npx @dryfit/cli add # detects Nx, Angular CLI or a build script
|
|
19
|
+
npx @dryfit/cli consumers # who uses it; nothing changes yet
|
|
20
|
+
npx @dryfit/cli link ../shop ../admin # opt in: snapshot, dev install, commit guard
|
|
21
|
+
npx @dryfit/cli watch # every save: build, publish, install, clear caches
|
|
22
|
+
npx @dryfit/cli restore ../shop ../admin # back to exactly what you had
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Once you use it daily, `npm install --global @dryfit/cli` puts `dryfit` on your PATH, and
|
|
26
|
+
`dryfit daemon install` starts it at login. `dryfit status` shows what is linked and running,
|
|
27
|
+
`dryfit doctor` checks the setup, and every command takes `--json` for scripts and agents.
|
|
28
|
+
|
|
29
|
+
Consumers that run together, such as a federation host and its remotes, can be saved as a group
|
|
30
|
+
(`dryfit group save checkout ../shell ../cart`), linked and restored together (`--group checkout`), and
|
|
31
|
+
dryfit warns when they end up on different dev versions.
|
|
32
|
+
|
|
33
|
+
On macOS, the menu bar app shows all of this and drives it without a terminal:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
brew install --cask mikheil-gigauri/dryfit/dryfit
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The [getting started guide](https://mikheil-gigauri.github.io/dryfit/guides/getting-started/) walks
|
|
40
|
+
through it, and the [design decisions](docs/adr/README.md) explain why it works the way it does.
|
|
41
|
+
|
|
42
|
+
## Development
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install
|
|
46
|
+
npm test # unit tests, about two seconds
|
|
47
|
+
npm run test:integration # real Verdaccio, npm, pnpm, Yarn, Bun and git
|
|
48
|
+
npm run typecheck
|
|
49
|
+
npm run lint
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Requires Node 22.12 or newer.
|
|
53
|
+
|
|
54
|
+
The menu bar app in `apps/menubar` needs Xcode 26 or newer. Run it through `xcrun` so the Xcode toolchain is
|
|
55
|
+
used, not another `swift` on your PATH:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm run menubar:test # view-model, API-contract and light/dark snapshot tests
|
|
59
|
+
npm run menubar:e2e # the menu's full cycle against a real daemon, in a throwaway sandbox
|
|
60
|
+
npm run menubar:bundle # builds apps/menubar/build/Dryfit.app
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The website lives in `apps/site` (Astro and Starlight, Node 22.23.4 or newer):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm run dev -w @dryfit/site # http://localhost:4321/dryfit/
|
|
67
|
+
npm run build -w @dryfit/site # generates the CLI reference and design pages, then builds
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
After changing the daemon's API, run `npm run api:export -w @dryfit/cli` so both sides share the new
|
|
71
|
+
contract. `SNAPSHOT_RECORD=1 npm run menubar:test` records the snapshots again after a deliberate UI change.
|
|
72
|
+
|
|
73
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how changes and releases work.
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT
|