feat: limit medium-probability cards and sync Docker dev dependencies

This commit is contained in:
2026-09-02 12:28:55 +09:00
parent 7308428945
commit 1e3d1d0b08
7 changed files with 138 additions and 11 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -eu
cd /app
# Reused dependency volumes can lag behind the bind-mounted source tree.
# Include the Node runtime so native modules are refreshed after image upgrades.
dependency_hash="$(
{
sha256sum package.json package-lock.json
node -p 'process.version + ":" + process.platform + ":" + process.arch'
} | sha256sum | cut -d ' ' -f 1
)"
stamp_path="node_modules/.holodream-dependencies"
installed_hash="$(cat "$stamp_path" 2>/dev/null || true)"
if [ "$dependency_hash" != "$installed_hash" ]; then
echo 'Synchronizing development dependencies with package-lock.json...'
npm ci --include=dev
printf '%s\n' "$dependency_hash" > "$stamp_path"
fi
exec "$@"