theus-cli 0.1.18 → 0.2.0
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 +14 -8
- package/cli.js +9714 -8645
- package/package.json +101 -3
package/bin/theus
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
#!/
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Theus launcher — type `theus` to start from any project.
|
|
3
|
+
# Runs the project's Bun entrypoint with the build shims preloaded.
|
|
4
|
+
# Any arguments are passed through, e.g. theus --help or theus -p "hola".
|
|
4
5
|
set -euo pipefail
|
|
5
6
|
|
|
6
7
|
SOURCE="${BASH_SOURCE[0]}"
|
|
@@ -9,16 +10,21 @@ while [[ -L "$SOURCE" ]]; do
|
|
|
9
10
|
SOURCE="$(readlink "$SOURCE")"
|
|
10
11
|
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
11
12
|
done
|
|
12
|
-
|
|
13
|
+
PROJ="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
|
|
13
14
|
|
|
14
15
|
if ! command -v bun >/dev/null 2>&1; then
|
|
15
|
-
echo "theus: Bun no
|
|
16
|
+
echo "theus: Bun no está instalado. Instálalo con: curl -fsSL https://bun.sh/install | bash" >&2
|
|
16
17
|
exit 1
|
|
17
18
|
fi
|
|
18
19
|
|
|
19
|
-
if [[ ! -f "$
|
|
20
|
-
echo "theus: no encuentro el
|
|
20
|
+
if [[ ! -f "$PROJ/entrypoints/cli.tsx" || ! -f "$PROJ/bun-shims/preload.ts" ]]; then
|
|
21
|
+
echo "theus: no encuentro el runtime en $PROJ" >&2
|
|
21
22
|
exit 1
|
|
22
23
|
fi
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
if [[ "${1:-}" == "login" || "${1:-}" == "signin" || "${1:-}" == "entrar" ]]; then
|
|
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" "$@"
|