theus-cli 0.1.13 → 0.1.15

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.
Files changed (3) hide show
  1. package/bin/theus +8 -14
  2. package/cli.js +963 -710
  3. package/package.json +3 -100
package/bin/theus CHANGED
@@ -1,7 +1,6 @@
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".
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
- PROJ="$(cd -P "$(dirname "$SOURCE")/.." && pwd)"
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 está instalado. Instálalo con: curl -fsSL https://bun.sh/install | bash" >&2
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 "$PROJ/entrypoints/cli.tsx" || ! -f "$PROJ/bun-shims/preload.ts" ]]; then
21
- echo "theus: no encuentro el runtime en $PROJ" >&2
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
- 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" "$@"
24
+ exec bun "$APP/cli.js" "$@"