@trycourier/cli 3.1.5 → 3.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/README.md CHANGED
@@ -10,8 +10,6 @@ npm install -g @trycourier/cli
10
10
 
11
11
  ### Other install methods
12
12
 
13
- - **Homebrew**: `brew install trycourier/courier/courier`
14
- - **Go**: `go install github.com/trycourier/courier-cli/cmd/courier@latest`
15
13
  - **Binary**: [GitHub Releases](https://github.com/trycourier/courier-cli/releases)
16
14
 
17
15
  ## Usage
package/bin/courier.js ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const path = require("path");
6
+ const { execFileSync } = require("child_process");
7
+
8
+ const binary = process.platform === "win32" ? "courier.exe" : "courier";
9
+ const binPath = path.join(__dirname, binary);
10
+
11
+ try {
12
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
13
+ } catch (err) {
14
+ if (err.status !== undefined) {
15
+ process.exit(err.status);
16
+ }
17
+ console.error(`Failed to run Courier CLI: ${err.message}`);
18
+ console.error(`Expected binary at: ${binPath}`);
19
+ console.error(`Try reinstalling: npm install -g @trycourier/cli`);
20
+ process.exit(1);
21
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@trycourier/cli",
3
- "version": "3.1.5",
3
+ "version": "3.2.0",
4
4
  "description": "Courier CLI – manage notifications from the command line",
5
5
  "bin": {
6
- "courier": "./bin/courier"
6
+ "courier": "./bin/courier.js"
7
7
  },
8
8
  "scripts": {
9
9
  "postinstall": "node install.js"