deepseek-tui 0.8.14 → 0.8.16
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 +2 -2
- package/scripts/artifacts.js +1 -1
- package/scripts/preflight-glibc.js +1 -1
- package/scripts/run.js +22 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepseek-tui",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"deepseekBinaryVersion": "0.8.
|
|
3
|
+
"version": "0.8.16",
|
|
4
|
+
"deepseekBinaryVersion": "0.8.16",
|
|
5
5
|
"description": "Install and run deepseek and deepseek-tui binaries from GitHub release artifacts.",
|
|
6
6
|
"author": "Hmbown",
|
|
7
7
|
"license": "MIT",
|
package/scripts/artifacts.js
CHANGED
|
@@ -50,7 +50,7 @@ function unsupportedBuildHint() {
|
|
|
50
50
|
"No prebuilt binary is available for this platform/architecture combo.",
|
|
51
51
|
"You can still run DeepSeek TUI by building from source with Cargo:",
|
|
52
52
|
"",
|
|
53
|
-
" # Requires Rust 1.
|
|
53
|
+
" # Requires Rust 1.88+ (https://rustup.rs)",
|
|
54
54
|
" cargo install deepseek-tui-cli --locked # provides `deepseek`",
|
|
55
55
|
" cargo install deepseek-tui --locked # provides `deepseek-tui`",
|
|
56
56
|
"",
|
|
@@ -68,7 +68,7 @@ function buildFromSourceHint() {
|
|
|
68
68
|
return [
|
|
69
69
|
"You can still run DeepSeek TUI by building from source with Cargo:",
|
|
70
70
|
"",
|
|
71
|
-
" # Requires Rust 1.
|
|
71
|
+
" # Requires Rust 1.88+ (https://rustup.rs)",
|
|
72
72
|
" cargo install deepseek-tui-cli --locked # provides `deepseek`",
|
|
73
73
|
" cargo install deepseek-tui --locked # provides `deepseek-tui`",
|
|
74
74
|
"",
|
package/scripts/run.js
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
const { spawnSync } = require("child_process");
|
|
2
2
|
const { getBinaryPath } = require("./install");
|
|
3
3
|
|
|
4
|
+
const pkg = require("../package.json");
|
|
5
|
+
|
|
6
|
+
function isVersionFlag() {
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
return args.includes("--version") || args.includes("-v") || args.includes("-V");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function handleVersionFallback(binaryName) {
|
|
12
|
+
if (isVersionFlag()) {
|
|
13
|
+
const binVersion = pkg.deepseekBinaryVersion || pkg.version;
|
|
14
|
+
console.log(`${binaryName} (npm wrapper) v${pkg.version}`);
|
|
15
|
+
console.log(`binary version: v${binVersion}`);
|
|
16
|
+
console.log(`repo: ${pkg.repository?.url || "N/A"}`);
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
4
21
|
async function run(binaryName) {
|
|
22
|
+
// Intercept --version before attempting binary download/launch
|
|
23
|
+
handleVersionFallback(binaryName);
|
|
24
|
+
|
|
5
25
|
const binaryPath = await getBinaryPath(binaryName);
|
|
6
26
|
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
7
27
|
stdio: "inherit",
|
|
8
28
|
});
|
|
9
29
|
if (result.error) {
|
|
30
|
+
// If binary fails and user asked for --version, show npm version instead
|
|
31
|
+
handleVersionFallback(binaryName);
|
|
10
32
|
throw result.error;
|
|
11
33
|
}
|
|
12
34
|
process.exit(result.status ?? 1);
|