Move database work off the main thread on Node.js 24 and improve message handling and runtime diagnostics. Preserve migration, restart, and concurrency coverage with the async SQLite driver.
18 lines
424 B
Bash
18 lines
424 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
# Prefer bundled node when present; fall back to $PATH.
|
|
if [[ -x "./node" ]]; then
|
|
NODE_BIN="./node"
|
|
else
|
|
NODE_BIN="$(command -v node || true)"
|
|
if [[ -z "$NODE_BIN" ]]; then
|
|
echo "error: 'node' not found on PATH and no bundled ./node; install Node.js 24+." >&2
|
|
exit 127
|
|
fi
|
|
fi
|
|
|
|
"$NODE_BIN" ./check-node-version.cjs
|
|
exec "$NODE_BIN" ./index.mjs "$@"
|