@dif.sh/cli 0.5.0 → 0.6.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/README.md +5 -6
- package/bin/dif.js +9 -1
- package/install.js +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# @dif.sh/cli
|
|
2
2
|
|
|
3
|
-
The dif.sh CLI, packaged for npm.
|
|
3
|
+
The dif.sh CLI, packaged for npm. dif is feature flags and A/B tests that
|
|
4
|
+
live in your repo as Markdown files: one command to install, no signup.
|
|
4
5
|
|
|
5
6
|
```sh
|
|
6
7
|
npm install -g @dif.sh/cli
|
|
7
8
|
dif --help
|
|
8
9
|
```
|
|
9
10
|
|
|
10
|
-
Under the hood, this package downloads the
|
|
11
|
+
Under the hood, this package downloads the Rust binary from the
|
|
11
12
|
[dif-sh/dif](https://github.com/dif-sh/dif) GitHub release matching its own
|
|
12
13
|
version, drops it in `node_modules/@dif.sh/cli/bin/`, and exposes a thin
|
|
13
14
|
Node shim as the `dif` command.
|
|
@@ -17,12 +18,10 @@ If you'd rather skip the wrapper entirely, install the binary directly:
|
|
|
17
18
|
```sh
|
|
18
19
|
# macOS / Linux
|
|
19
20
|
curl -fsSL https://dif.sh/install.sh | sh
|
|
20
|
-
|
|
21
|
-
# macOS via Homebrew
|
|
22
|
-
brew install dif-sh/tap/dif
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
Full documentation lives at [www.dif.sh/docs](https://www.dif.sh/docs); the
|
|
24
|
+
source is in [the main repo](https://github.com/dif-sh/dif).
|
|
26
25
|
|
|
27
26
|
## Platforms
|
|
28
27
|
|
package/bin/dif.js
CHANGED
|
@@ -32,4 +32,12 @@ if (result.error) {
|
|
|
32
32
|
process.exit(1);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
if (result.signal) {
|
|
36
|
+
// The binary was killed by a signal. Re-raise it so our own exit status
|
|
37
|
+
// reflects that (128+n convention) instead of reporting success — CI
|
|
38
|
+
// scripts checking `$?` must not treat an interrupted build as passing.
|
|
39
|
+
process.kill(process.pid, result.signal);
|
|
40
|
+
// If the signal was caught/ignored (e.g. exotic handlers), still fail.
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
process.exit(result.status ?? 1);
|
package/install.js
CHANGED
|
Binary file
|