wachi 0.3.0 → 0.3.2
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 +19 -7
- package/bin/wachi.js +17 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -16,17 +16,20 @@ wachi monitors RSS feeds for new content and pushes notifications to 90+ service
|
|
|
16
16
|
## Install
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
#
|
|
20
|
-
npx wachi --help
|
|
21
|
-
bunx wachi --help
|
|
19
|
+
# ephemeral run
|
|
20
|
+
npx wachi@latest --help
|
|
21
|
+
bunx wachi@latest --help
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# persistent global install
|
|
24
24
|
npm i -g wachi
|
|
25
|
-
bun
|
|
25
|
+
bun install -g wachi
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# standalone binary (macOS/Linux)
|
|
28
28
|
curl -fsSL https://raw.githubusercontent.com/ysm-dev/wachi/main/install.sh | sh
|
|
29
29
|
|
|
30
|
+
# standalone binary (Windows PowerShell)
|
|
31
|
+
powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/ysm-dev/wachi/main/install.ps1 | iex"
|
|
32
|
+
|
|
30
33
|
# homebrew
|
|
31
34
|
brew tap ysm-dev/tap && brew install wachi
|
|
32
35
|
```
|
|
@@ -76,9 +79,18 @@ wachi check Check all subscriptions for changes
|
|
|
76
79
|
|
|
77
80
|
wachi test -n <name> Send a test notification
|
|
78
81
|
|
|
79
|
-
wachi upgrade Update
|
|
82
|
+
wachi upgrade Update a persistent wachi install
|
|
80
83
|
```
|
|
81
84
|
|
|
85
|
+
`wachi upgrade` follows the original install method:
|
|
86
|
+
|
|
87
|
+
- npm global -> `npm install -g wachi@latest`
|
|
88
|
+
- bun global -> `bun install -g wachi@latest`
|
|
89
|
+
- Homebrew -> `brew upgrade wachi`
|
|
90
|
+
- standalone binary -> downloads the latest GitHub Release and replaces the current binary
|
|
91
|
+
|
|
92
|
+
Ephemeral runs via `npx` and `bunx` are not persistent installs, so they are not upgraded in place. Re-run them with `@latest` instead.
|
|
93
|
+
|
|
82
94
|
**Global flags:** `--json` / `-j` for machine-readable output, `--verbose` / `-V` for detailed logs, `--config` / `-C` for custom config path.
|
|
83
95
|
|
|
84
96
|
## Examples
|
package/bin/wachi.js
CHANGED
|
@@ -17,10 +17,15 @@ const key = `${process.platform}-${process.arch}`;
|
|
|
17
17
|
const packageName = PLATFORM_PACKAGE_MAP[key];
|
|
18
18
|
const require = createRequire(import.meta.url);
|
|
19
19
|
const args = process.argv.slice(2);
|
|
20
|
+
const wrapperPath = fileURLToPath(import.meta.url);
|
|
20
21
|
|
|
21
22
|
const runBinary = (binaryPath) => {
|
|
22
23
|
const result = spawnSync(binaryPath, args, {
|
|
23
24
|
stdio: "inherit",
|
|
25
|
+
env: {
|
|
26
|
+
...process.env,
|
|
27
|
+
WACHI_WRAPPER_PATH: wrapperPath,
|
|
28
|
+
},
|
|
24
29
|
});
|
|
25
30
|
|
|
26
31
|
if (result.error) {
|
|
@@ -37,7 +42,11 @@ const runBinary = (binaryPath) => {
|
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
if (typeof result.signal === "string") {
|
|
40
|
-
process.stderr.write(
|
|
45
|
+
process.stderr.write(
|
|
46
|
+
`Error: wachi binary terminated by signal ${result.signal}.\n` +
|
|
47
|
+
"The process was killed externally (e.g. by the OS, another process, or resource limits).\n" +
|
|
48
|
+
"Try running the command again. If it persists, check system resource usage or try reinstalling wachi.\n",
|
|
49
|
+
);
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
process.exit(1);
|
|
@@ -98,6 +107,10 @@ if (binaryPath) {
|
|
|
98
107
|
if (existsSync(sourceEntry)) {
|
|
99
108
|
const fallback = spawnSync(process.env.BUN_BINARY || "bun", ["run", sourceEntry, ...args], {
|
|
100
109
|
stdio: "inherit",
|
|
110
|
+
env: {
|
|
111
|
+
...process.env,
|
|
112
|
+
WACHI_WRAPPER_PATH: wrapperPath,
|
|
113
|
+
},
|
|
101
114
|
});
|
|
102
115
|
|
|
103
116
|
if (typeof fallback.status === "number") {
|
|
@@ -113,7 +126,9 @@ if (existsSync(sourceEntry)) {
|
|
|
113
126
|
if (!packageName) {
|
|
114
127
|
process.stderr.write(
|
|
115
128
|
`Error: Unsupported platform for prebuilt binaries (${key}).\n` +
|
|
116
|
-
"The published wachi package is binary-only.\n"
|
|
129
|
+
"The published wachi package is binary-only.\n" +
|
|
130
|
+
`Supported platforms: ${Object.keys(PLATFORM_PACKAGE_MAP).join(", ")}.\n` +
|
|
131
|
+
"Install from source with Bun, or use a supported platform.\n",
|
|
117
132
|
);
|
|
118
133
|
process.exit(1);
|
|
119
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wachi",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Subscribe any link and get notified on change",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"zod-validation-error": "5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@wachi-cli/darwin-arm64": "0.3.
|
|
52
|
-
"@wachi-cli/darwin-x64": "0.3.
|
|
53
|
-
"@wachi-cli/linux-arm64": "0.3.
|
|
54
|
-
"@wachi-cli/linux-x64": "0.3.
|
|
55
|
-
"@wachi-cli/win32-x64": "0.3.
|
|
51
|
+
"@wachi-cli/darwin-arm64": "0.3.2",
|
|
52
|
+
"@wachi-cli/darwin-x64": "0.3.2",
|
|
53
|
+
"@wachi-cli/linux-arm64": "0.3.2",
|
|
54
|
+
"@wachi-cli/linux-x64": "0.3.2",
|
|
55
|
+
"@wachi-cli/win32-x64": "0.3.2"
|
|
56
56
|
}
|
|
57
57
|
}
|