@trycourier/cli 3.1.5 → 3.1.6
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/bin/courier.js +21 -0
- package/package.json +2 -2
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.
|
|
3
|
+
"version": "3.1.6",
|
|
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"
|