@hermenics/deepseek-code 0.6.15 → 0.6.17
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/dist/cli.mjs +360 -357
- package/dist/deepseek.mjs +29 -0
- package/package.json +2 -2
- package/dist/deepseek +0 -25
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// DeepSeek Code launcher — runs on Linux, macOS and Windows.
|
|
3
|
+
import { dirname, join } from 'node:path'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
5
|
+
|
|
6
|
+
const MIN_BUN = [1, 1]
|
|
7
|
+
const version = typeof Bun !== 'undefined' ? Bun.version : undefined
|
|
8
|
+
if (!version) {
|
|
9
|
+
console.error('DeepSeek Code requires Bun 1.1+ at runtime. Install Bun: https://bun.sh')
|
|
10
|
+
process.exit(1)
|
|
11
|
+
}
|
|
12
|
+
const [major = 0, minor = 0] = version.split('.').map(Number)
|
|
13
|
+
if (major < MIN_BUN[0] || (major === MIN_BUN[0] && minor < MIN_BUN[1])) {
|
|
14
|
+
console.error(`DeepSeek Code requires Bun 1.1+ (found ${version}).`)
|
|
15
|
+
process.exit(1)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Restore the terminal even when the app dies without running its own cleanup.
|
|
19
|
+
// (SIGKILL cannot be intercepted on any platform — bash traps could not either.)
|
|
20
|
+
const restore = () => {
|
|
21
|
+
if (process.stdout.isTTY) process.stdout.write('\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?25h')
|
|
22
|
+
}
|
|
23
|
+
process.on('exit', restore)
|
|
24
|
+
for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
|
|
25
|
+
// Windows raises SIGINT/SIGTERM only in limited cases; registering is harmless.
|
|
26
|
+
try { process.on(signal, restore) } catch {}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
await import(join(dirname(fileURLToPath(import.meta.url)), 'cli.mjs'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hermenics/deepseek-code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"description": "An AI-powered coding assistant that lives in your terminal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"bin": {
|
|
16
|
-
"deepseek": "dist/deepseek"
|
|
16
|
+
"deepseek": "dist/deepseek.mjs"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist/",
|
package/dist/deepseek
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
SELF="$0"
|
|
3
|
-
while [ -L "$SELF" ]; do
|
|
4
|
-
DIR="$(cd "$(dirname "$SELF")" && pwd -P)"
|
|
5
|
-
SELF="$(readlink "$SELF")"
|
|
6
|
-
[[ "$SELF" != /* ]] && SELF="$DIR/$SELF"
|
|
7
|
-
done
|
|
8
|
-
DIR="$(cd "$(dirname "$SELF")" && pwd -P)"
|
|
9
|
-
# Restore terminal on exit (handles SIGKILL where Node cleanup can't run)
|
|
10
|
-
_restore_terminal() { { [ -t 0 ] || [ -t 1 ] || [ -t 2 ]; } && printf '\033[?1000l\033[?1002l\033[?1003l\033[?25h' > /dev/tty 2>/dev/null; }
|
|
11
|
-
trap _restore_terminal EXIT
|
|
12
|
-
if ! command -v bun >/dev/null 2>&1; then
|
|
13
|
-
echo "DeepSeek Code requires Bun 1.1+ at runtime. Install Bun: https://bun.sh" >&2
|
|
14
|
-
exit 1
|
|
15
|
-
fi
|
|
16
|
-
BUN_VERSION="$(bun --version)"
|
|
17
|
-
if [[ ! "$BUN_VERSION" =~ ^([0-9]+).([0-9]+) ]]; then
|
|
18
|
-
echo "Could not determine the installed Bun version." >&2
|
|
19
|
-
exit 1
|
|
20
|
-
fi
|
|
21
|
-
if (( BASH_REMATCH[1] < 1 || (BASH_REMATCH[1] == 1 && BASH_REMATCH[2] < 1) )); then
|
|
22
|
-
echo "DeepSeek Code requires Bun 1.1+ (found $BUN_VERSION)." >&2
|
|
23
|
-
exit 1
|
|
24
|
-
fi
|
|
25
|
-
bun "$DIR/cli.mjs" "$@"
|