theus-cli 0.1.14 → 0.1.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/bin/theus +8 -14
- package/cli.js +973 -610
- package/package.json +3 -100
package/bin/theus
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# Any arguments are passed through, e.g. theus --help or theus -p "hola".
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Launcher de Theus CLI (paquete de release).
|
|
3
|
+
# Ejecuta el bundle self-contained cli.js con Bun.
|
|
5
4
|
set -euo pipefail
|
|
6
5
|
|
|
7
6
|
SOURCE="${BASH_SOURCE[0]}"
|
|
@@ -10,21 +9,16 @@ while [[ -L "$SOURCE" ]]; do
|
|
|
10
9
|
SOURCE="$(readlink "$SOURCE")"
|
|
11
10
|
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
12
11
|
done
|
|
13
|
-
|
|
12
|
+
APP="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
|
|
14
13
|
|
|
15
14
|
if ! command -v bun >/dev/null 2>&1; then
|
|
16
|
-
echo "theus: Bun no
|
|
15
|
+
echo "theus: Bun no esta instalado. Instalalo desde https://bun.sh y reintenta." >&2
|
|
17
16
|
exit 1
|
|
18
17
|
fi
|
|
19
18
|
|
|
20
|
-
if [[ ! -f "$
|
|
21
|
-
echo "theus: no encuentro el
|
|
19
|
+
if [[ ! -f "$APP/cli.js" ]]; then
|
|
20
|
+
echo "theus: no encuentro el bundle en $APP/cli.js. Reinstala con: curl -fsSL https://theus.pe/install.sh | bash" >&2
|
|
22
21
|
exit 1
|
|
23
22
|
fi
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
shift
|
|
27
|
-
exec bun --preload "$PROJ/bun-shims/preload.ts" "$PROJ/entrypoints/theus-login.ts" "$@"
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
exec bun --preload "$PROJ/bun-shims/preload.ts" "$PROJ/entrypoints/cli.tsx" "$@"
|
|
24
|
+
exec bun "$APP/cli.js" "$@"
|