Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647#!/bin/bashset -euo pipefailscript_path="${BASH_SOURCE[0]}"runtime="${AESEL_JS_RUNTIME:-${EASEL_JS_RUNTIME:-node}}"# Bun can resolve the installed symlink in the runtime we are already opening.# Keep Node's shell path for Macs that rely on the bundled Node executable.if [[ "$runtime" == bun || "$runtime" == */bun ]]; then exec "$runtime" --eval ' const fs = require("node:fs"), path = require("node:path"), url = require("node:url"); const root = path.dirname(path.dirname(fs.realpathSync(process.argv[1]))); const helpers = path.resolve(root, "../../Helpers"); try { fs.accessSync(path.join(helpers, "node"), fs.constants.X_OK); process.env.PATH = helpers + path.delimiter + (process.env.PATH || ""); } catch {} process.argv[1] = path.join(root, "src/terminal-cli.mjs"); // Reify must execute its new entry, not repeat this bootstrap. const evaluated = process.execArgv.indexOf("--eval"); if (evaluated >= 0) process.execArgv.splice(evaluated, 2); import(url.pathToFileURL(process.argv[1]).href); ' "$script_path" "$@"filaunch_directory="$PWD"[[ "$script_path" == /* ]] || script_path="$PWD/$script_path"while [[ -L "$script_path" ]]; do cd -P "${script_path%/*}" script_directory="$PWD" link_target="$(command -p readlink "$script_path")" if [[ "$link_target" == /* ]]; then script_path="$link_target" else script_path="$script_directory/$link_target" fidonecd -P "${script_path%/*}/.."PROJECT_DIR="$PWD"cd "$launch_directory"# Prefer the runtime carried by the native Mac bundle.if [[ -x "$PROJECT_DIR/../../Helpers/node" ]]; then PATH="$PROJECT_DIR/../../Helpers:$PATH"fi# exec performs the PATH search itself. Capturing command -v in a subshell# first adds another macOS process launch to every open.exec "$runtime" "$PROJECT_DIR/src/terminal-cli.mjs" "$@"