@revkeen/cli-binary 0.1.1 → 0.2.1
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/package.json +3 -2
- package/run.js +15 -0
- package/bin/revkeen +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revkeen/cli-binary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "RevKeen CLI — manage payments, subscriptions & billing from your terminal",
|
|
5
5
|
"bin": {
|
|
6
6
|
"revkeen": "run.js"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"install.js",
|
|
13
13
|
"run.js",
|
|
14
|
-
"bin/"
|
|
14
|
+
"bin/LICENSE",
|
|
15
|
+
"bin/README.md"
|
|
15
16
|
],
|
|
16
17
|
"os": [
|
|
17
18
|
"darwin",
|
package/run.js
CHANGED
|
@@ -4,10 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
const { execFileSync } = require("child_process");
|
|
6
6
|
const path = require("path");
|
|
7
|
+
const { existsSync } = require("fs");
|
|
7
8
|
|
|
8
9
|
const binaryName = process.platform === "win32" ? "revkeen.exe" : "revkeen";
|
|
9
10
|
const binaryPath = path.join(__dirname, "bin", binaryName);
|
|
10
11
|
|
|
12
|
+
// The binary is not published; install.js fetches the right one for this platform
|
|
13
|
+
// at postinstall. Absent means postinstall was skipped (npm install
|
|
14
|
+
// --ignore-scripts) or it failed, and a raw ENOENT from execFileSync says none of
|
|
15
|
+
// that.
|
|
16
|
+
if (!existsSync(binaryPath)) {
|
|
17
|
+
console.error(`revkeen: no binary at ${binaryPath}.
|
|
18
|
+
|
|
19
|
+
It is downloaded when this package is installed, so this usually means install
|
|
20
|
+
scripts were skipped (npm install --ignore-scripts) or the download failed.
|
|
21
|
+
|
|
22
|
+
Fetch it with: node ${path.join(__dirname, "install.js")}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
11
26
|
try {
|
|
12
27
|
execFileSync(binaryPath, process.argv.slice(2), { stdio: "inherit" });
|
|
13
28
|
} catch (err) {
|
package/bin/revkeen
DELETED
|
Binary file
|