mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-22 01:02:41 +00:00
* fix(daemon): keep lifecycle operations on the selected instance Restart reconstructed launch inputs and address fallback could redirect a home-selected shutdown to another daemon. Let supervisors publish bound endpoints, retain their worker restart contract, and share captured local lifecycle ownership between CLI and Desktop. * test(daemon): verify bounded desktop readiness and cancellable artifacts * test(cli): verify reload target hints and durable offline pairing * test(daemon): align lifecycle fixtures with ownership and targeting * fix(daemon): preserve reachability when status details time out Provider discovery can outlast a status request after authentication succeeds. Keep local connection facts separate from unavailable details, while explicit remote queries retain their error outcome. Migrate CLI and packaged Desktop fixtures to persistent managed configuration and explicit targets. Isolate generic Git observation from forge discovery and reuse disposable CLI homes on Windows. * test(daemon): observe restart through the worker status RPC The bounded CLI status observation may omit worker details while an authenticated connection remains healthy. Exercise the app-style restart through its full RPC and retain the replacement observation, with a real slow provider probe covering the distinction.
48 lines
1.7 KiB
Bash
Executable File
48 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
SCRIPT_PATH=$0
|
|
case "$SCRIPT_PATH" in
|
|
/*) ;;
|
|
*) SCRIPT_PATH="$(pwd)/$SCRIPT_PATH" ;;
|
|
esac
|
|
|
|
# Follow symlinks so `/usr/local/bin/paseo` resolves back into the app bundle.
|
|
while [ -L "$SCRIPT_PATH" ]; do
|
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$SCRIPT_PATH")" && pwd)
|
|
LINK_TARGET=$(readlink "$SCRIPT_PATH")
|
|
case "$LINK_TARGET" in
|
|
/*) SCRIPT_PATH="$LINK_TARGET" ;;
|
|
*) SCRIPT_PATH="${SCRIPT_DIR}/${LINK_TARGET}" ;;
|
|
esac
|
|
done
|
|
|
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$SCRIPT_PATH")" && pwd)
|
|
RESOURCES_DIR=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
|
|
|
|
MACOS_DIR="${RESOURCES_DIR}/../MacOS"
|
|
MACOS_HELPER_EXECUTABLE="${RESOURCES_DIR}/../Frameworks/Paseo Helper.app/Contents/MacOS/Paseo Helper"
|
|
|
|
# macOS CLI invocations must enter Electron through the agent Helper. Launching
|
|
# the main APPL executable here makes later daemon supervision inherit app UI
|
|
# lifecycle behavior.
|
|
if [ -d "${MACOS_DIR}" ]; then
|
|
if [ ! -x "${MACOS_HELPER_EXECUTABLE}" ]; then
|
|
echo "Bundled Paseo Helper executable not found at ${MACOS_HELPER_EXECUTABLE}" >&2
|
|
exit 1
|
|
fi
|
|
APP_EXECUTABLE="${MACOS_HELPER_EXECUTABLE}"
|
|
elif [ -x "${RESOURCES_DIR}/../Paseo.bin" ]; then
|
|
APP_EXECUTABLE="${RESOURCES_DIR}/../Paseo.bin"
|
|
elif [ -x "${RESOURCES_DIR}/../Paseo" ]; then
|
|
APP_EXECUTABLE="${RESOURCES_DIR}/../Paseo"
|
|
else
|
|
echo "Bundled Paseo executable not found relative to ${RESOURCES_DIR}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
RUNNER_PATH="${RESOURCES_DIR}/app.asar.unpacked/dist/daemon/node-entrypoint-runner.js"
|
|
CLI_ENTRYPOINT="${RESOURCES_DIR}/app.asar/node_modules/@getpaseo/cli/dist/index.js"
|
|
|
|
exec env ELECTRON_RUN_AS_NODE=1 PASEO_NODE_ENV=production PASEO_CLI="${SCRIPT_PATH}" "${APP_EXECUTABLE}" --disable-warning=DEP0040 "${RUNNER_PATH}" node-script "${CLI_ENTRYPOINT}" "$@"
|