feat: TypeScript installation wizard with @clack/prompts TUI (#1)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -37,8 +37,21 @@ if [ ! -f "$WORK_DIR/bootstrap/install.sh" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[mosaic] Running install..."
|
||||
cd "$WORK_DIR/bootstrap"
|
||||
|
||||
# Prefer TypeScript wizard if Node.js 18+ and bundle are available
|
||||
WIZARD_BIN="$WORK_DIR/bootstrap/dist/mosaic-wizard.mjs"
|
||||
if command -v node >/dev/null 2>&1 && [ -f "$WIZARD_BIN" ]; then
|
||||
NODE_MAJOR="$(node -e 'console.log(process.versions.node.split(".")[0])')"
|
||||
if [ "$NODE_MAJOR" -ge 18 ] 2>/dev/null; then
|
||||
echo "[mosaic] Running wizard installer (Node.js $NODE_MAJOR detected)..."
|
||||
node "$WIZARD_BIN" --source-dir "$WORK_DIR/bootstrap"
|
||||
echo "[mosaic] Cleaning up temporary files..."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[mosaic] Running legacy install..."
|
||||
bash install.sh
|
||||
|
||||
echo "[mosaic] Cleaning up temporary files..."
|
||||
|
||||
Reference in New Issue
Block a user