betool-cli 0.4.0 → 0.4.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/bin/betool.js +14 -0
- package/package.json +4 -4
- package/bin/betool +0 -17
- package/bin/betool.cmd +0 -3
- package/bin/betool.exe +0 -0
package/bin/betool.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { execFileSync } = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
6
|
+
const binary = path.join(__dirname, `betool${ext}`);
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
execFileSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
10
|
+
} catch (err) {
|
|
11
|
+
if (err.status != null) process.exit(err.status);
|
|
12
|
+
console.error(`betool: ${err.message}`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "betool-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "betool — Assistant IA conversationnel en CLI",
|
|
5
|
-
"homepage": "https://github.com/yossigabay/betool-
|
|
5
|
+
"homepage": "https://github.com/yossigabay/betool-releases",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/yossigabay/betool-releases.git"
|
|
9
9
|
},
|
|
10
10
|
"license": "UNLICENSED",
|
|
11
11
|
"bin": {
|
|
12
|
-
"betool": "bin/betool"
|
|
12
|
+
"betool": "bin/betool.js"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"postinstall": "node install.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"bin/",
|
|
18
|
+
"bin/betool.js",
|
|
19
19
|
"install.js"
|
|
20
20
|
],
|
|
21
21
|
"os": ["win32", "linux", "darwin"],
|
package/bin/betool
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# betool CLI wrapper — delegates to the downloaded binary
|
|
3
|
-
basedir=$(dirname "$(readlink -f "$0" 2>/dev/null || echo "$0")")
|
|
4
|
-
|
|
5
|
-
if [ -f "$basedir/betool.exe" ]; then
|
|
6
|
-
exec "$basedir/betool.exe" "$@"
|
|
7
|
-
elif [ -f "$basedir/../bin/betool" ] && [ "$(uname)" != "Linux" ] && [ "$(uname)" != "Darwin" ]; then
|
|
8
|
-
exec "$basedir/../bin/betool" "$@"
|
|
9
|
-
else
|
|
10
|
-
# Find the binary next to this script
|
|
11
|
-
binary="$basedir/betool"
|
|
12
|
-
if [ ! -f "$binary" ]; then
|
|
13
|
-
echo "betool: binaire introuvable. Relancez 'npm install -g betool-cli'" >&2
|
|
14
|
-
exit 1
|
|
15
|
-
fi
|
|
16
|
-
exec "$binary" "$@"
|
|
17
|
-
fi
|
package/bin/betool.cmd
DELETED
package/bin/betool.exe
DELETED
|
Binary file
|