Bundle extension (upload hook + API endpoint + admin module) that warms Directus image transform cache in-process with an explicit acceptFormat, so the generated file matches the browser's cache key byte-for-byte. - resumable, window-aware backfill with progress + cancel - system + custom presets, effective-format reporting, shadow warnings - storage breakdown (previews vs originals), human-readable API fields - diagnostics: resolve-plan prediction, per-file generate, ops ring buffer - isolated dev/staging compose stack + deploy/rollback scripts Verified on Directus 11.17.4: 40/40 tests, hash-match gate passed, idempotent backfill, custom fixed-format presets, error surfacing.
13 lines
730 B
Bash
Executable file
13 lines
730 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Roll back a staging deploy to a previous dist backup.
|
|
# Usage: ./dev/rollback-staging.sh <ssh-host> <staging-extensions-root> <backup-stamp>
|
|
set -euo pipefail
|
|
|
|
HOST="${1:?usage: rollback-staging.sh <ssh-host> <staging-extensions-root> <backup-stamp>}"
|
|
EXT_ROOT="${2:?usage: rollback-staging.sh <ssh-host> <staging-extensions-root> <backup-stamp>}"
|
|
STAMP="${3:?usage: rollback-staging.sh <ssh-host> <staging-extensions-root> <backup-stamp>}"
|
|
NAME="directus-extension-generate-image-previews"
|
|
|
|
ssh "$HOST" "test -d '$EXT_ROOT/$NAME/dist.bak-$STAMP' && rm -rf '$EXT_ROOT/$NAME/dist' && cp -a '$EXT_ROOT/$NAME/dist.bak-$STAMP' '$EXT_ROOT/$NAME/dist'"
|
|
|
|
echo "rolled back $HOST:$EXT_ROOT/$NAME to dist.bak-$STAMP"
|