mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
Replace Sharp image backend with Photon (#86437)
* refactor: replace sharp image backend with photon * refactor: remove whatsapp jimp dependency * chore: remove stale sharp install workarounds * test: keep image fixtures off photon * test: use valid prompt image fixtures * test: account for optimized PNG fixtures * test: use valid minimax image fixtures
This commit is contained in:
committed by
GitHub
parent
32ddfc22f5
commit
b9f975b64e
@@ -59,7 +59,6 @@ if [[ -n "${OPENCLAW_NODE_VERSION:-}" ]]; then
|
||||
fi
|
||||
MIN_NODE_VERSION="22.19.0"
|
||||
APK_NODE_BIN_DIR="/usr/bin"
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS="${SHARP_IGNORE_GLOBAL_LIBVIPS:-1}"
|
||||
NPM_LOGLEVEL="${OPENCLAW_NPM_LOGLEVEL:-error}"
|
||||
INSTALL_METHOD="${OPENCLAW_INSTALL_METHOD:-npm}"
|
||||
GIT_DIR="${OPENCLAW_GIT_DIR:-${OPENCLAW_EFFECTIVE_HOME}/openclaw}"
|
||||
@@ -85,7 +84,6 @@ Usage: install-cli.sh [options]
|
||||
--set-npm-prefix Force npm prefix to ~/.npm-global if current prefix is not writable (Linux)
|
||||
|
||||
Environment variables:
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 Default: 1 (avoid sharp building against global libvips)
|
||||
OPENCLAW_NPM_LOGLEVEL=error|warn|notice Default: error (hide npm deprecation noise)
|
||||
OPENCLAW_INSTALL_METHOD=git|npm
|
||||
OPENCLAW_HOME=...
|
||||
@@ -819,7 +817,7 @@ ensure_pnpm() {
|
||||
|
||||
emit_json "{\"event\":\"step\",\"name\":\"pnpm\",\"status\":\"start\",\"method\":\"npm\"}"
|
||||
log "Installing pnpm via npm..."
|
||||
SHARP_IGNORE_GLOBAL_LIBVIPS="$SHARP_IGNORE_GLOBAL_LIBVIPS" "$(npm_bin)" install -g --prefix "$PREFIX" pnpm@11
|
||||
"$(npm_bin)" install -g --prefix "$PREFIX" pnpm@11
|
||||
detect_pnpm_cmd || true
|
||||
emit_json "{\"event\":\"step\",\"name\":\"pnpm\",\"status\":\"ok\"}"
|
||||
return 0
|
||||
@@ -967,14 +965,14 @@ install_openclaw() {
|
||||
fi
|
||||
|
||||
if [[ "${requested}" == "latest" ]]; then
|
||||
if ! env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "SHARP_IGNORE_GLOBAL_LIBVIPS=$SHARP_IGNORE_GLOBAL_LIBVIPS" "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@latest"; then
|
||||
if ! env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@latest"; then
|
||||
log "npm install openclaw@latest failed; retrying openclaw@next"
|
||||
emit_json "{\"event\":\"step\",\"name\":\"openclaw\",\"status\":\"retry\",\"version\":\"next\"}"
|
||||
env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "SHARP_IGNORE_GLOBAL_LIBVIPS=$SHARP_IGNORE_GLOBAL_LIBVIPS" "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@next"
|
||||
env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@next"
|
||||
requested="next"
|
||||
fi
|
||||
else
|
||||
env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "SHARP_IGNORE_GLOBAL_LIBVIPS=$SHARP_IGNORE_GLOBAL_LIBVIPS" "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@${requested}"
|
||||
env -u NPM_CONFIG_BEFORE -u npm_config_before -u NPM_CONFIG_MIN_RELEASE_AGE -u npm_config_min_release_age -u npm_config_min-release-age "$(npm_bin)" install -g --prefix "$(node_dir)" "${npm_args[@]}" "openclaw@${requested}"
|
||||
fi
|
||||
|
||||
mkdir -p "${PREFIX}/bin"
|
||||
@@ -1070,7 +1068,7 @@ install_openclaw_from_git() {
|
||||
|
||||
local install_lockfile_flag
|
||||
install_lockfile_flag="$(git_install_lockfile_flag "$repo_dir" "$git_ref")"
|
||||
CI="${CI:-true}" SHARP_IGNORE_GLOBAL_LIBVIPS="$SHARP_IGNORE_GLOBAL_LIBVIPS" run_pnpm -C "$repo_dir" install "$install_lockfile_flag"
|
||||
CI="${CI:-true}" run_pnpm -C "$repo_dir" install "$install_lockfile_flag"
|
||||
|
||||
if ! run_pnpm -C "$repo_dir" ui:build; then
|
||||
log "UI build failed; continuing (CLI may still work)"
|
||||
|
||||
Reference in New Issue
Block a user