openclaw/scripts/materialize-vercel-cli.sh
Peter Steinberger 60dcc53827
chore(deps): refresh seven-day-cooled runtimes and tooling (#131719)
* chore(deps): refresh cooled runtimes and tooling

Refresh selections published strictly before 2026-08-21T02:01:28Z while preserving inherited dependency identities and existing policy.

* fix(build): keep meeting CLI metadata dependency-light

Keep Teams and Zoom metadata discovery out of the meeting runtime graph, preserve CLI descriptors and output modes, and remove the unused factory that has not shipped in a stable release. Import-boundary regressions fail before the repair; all 21 focused tests and normal metadata generation pass without changing render deadlines or concurrency.

Defer the OpenShell dependency bump until its separately owned host-gateway fixture repair is available. Retain the existing version and installer reference; do not ship a policy or test workaround.

* test(cli): type-check meeting metadata registrations

* test(plugins): sync CLI metadata snapshot mocks

Cover the config-wide snapshot and projection exports used by the current main runtime load context. The original fixture failed 19 of 25 tests after the progressive cache update (#131442); all 25 now pass on both main and this candidate without changing production behavior or assertions.
2026-08-28 06:38:50 -07:00

71 lines
2.5 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
source_root="${1:?trusted Vercel CLI source root is required}"
destination="${2:?Vercel CLI destination is required}"
github_output="${3:-}"
package_json="${source_root}/package.json"
package_lock="${source_root}/package-lock.json"
expected_lock_sha256="4cea63abc4e89d659902aae28dd3e88973fdff9cdd2d2f5e234315d3a3bb680e"
expected_vercel_integrity="sha512-Bj/SN1qln/9guMcIz4gEGn+Ij+amGtkT2kqxwUAFgrLU2Hr0zYk4kX4QfxmZEs6WhheAaMlblVw2VUF2JFP5fA=="
test -f "${package_json}"
test -f "${package_lock}"
if [[ -e "${destination}" || -L "${destination}" ]]; then
echo "Vercel CLI destination must not already exist: ${destination}" >&2
exit 1
fi
install -d -m 0700 "${destination}"
install -m 0600 "${package_json}" "${destination}/package.json"
install -m 0600 "${package_lock}" "${destination}/package-lock.json"
lock_sha256="$(
VERCEL_CLI_LOCK="${package_lock}" \
node -e "const { createHash } = require('node:crypto'); const { readFileSync } = require('node:fs'); process.stdout.write(createHash('sha256').update(readFileSync(process.env.VERCEL_CLI_LOCK)).digest('hex'));"
)"
[[ "${lock_sha256}" == "${expected_lock_sha256}" ]] || {
echo "Pinned Vercel CLI lock SHA-256 mismatch." >&2
exit 1
}
vercel_integrity="$(
VERCEL_CLI_LOCK="${package_lock}" \
node -p "require(require('node:path').resolve(process.env.VERCEL_CLI_LOCK)).packages['node_modules/vercel'].integrity"
)"
[[ "${vercel_integrity}" == "${expected_vercel_integrity}" ]] || {
echo "Pinned Vercel CLI integrity mismatch." >&2
exit 1
}
# Install with lifecycle scripts disabled before any credential is exposed to
# the CLI process. The committed lock fixes the complete dependency closure.
(
cd "${destination}"
npm ci \
--ignore-scripts \
--no-audit \
--no-fund \
--omit=dev
)
vercel_version="$(
VERCEL_CLI_ROOT="${destination}" \
node -p "require(require('node:path').join(process.env.VERCEL_CLI_ROOT, 'node_modules/vercel/package.json')).version"
)"
[[ "${vercel_version}" == "59.3.0" ]] || {
echo "Pinned Vercel CLI version mismatch: ${vercel_version}" >&2
exit 1
}
test -x "${destination}/node_modules/.bin/vercel"
vercel_cli="${destination}/node_modules/.bin/vercel"
echo "Materialized vercel@${vercel_version} from lock ${lock_sha256}."
if [[ -n "${github_output}" ]]; then
{
echo "cli=${vercel_cli}"
echo "integrity=${vercel_integrity}"
echo "lock_sha256=${lock_sha256}"
echo "version=${vercel_version}"
} >> "${github_output}"
fi