Add legacy open-source caching module as default

Recover the pre-extraction caching code (from 7a4e0968~1) into a
standalone module at sources/legacy-caching/. This module bundles
@actions/cache@4.0.5 with the existing patch and adapts the old
caching API to the current CacheService interface.

The cache-service-loader now uses the legacy module by default and
only loads the proprietary vendored module when the license is
accepted. Both paths are wrapped in a LoggingCacheService that
identifies which module is active in logs and the Job Summary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daz DeBoer
2026-04-01 13:10:20 -06:00
parent b93d9dccdc
commit e48bd1161b
18 changed files with 4404 additions and 41 deletions
+23
View File
@@ -1,13 +1,27 @@
#!/bin/bash
build_legacy_caching() {
echo "Building legacy caching module..."
cd sources/legacy-caching
npm clean-install
npm run build
cd ../..
}
cd sources
case "$1" in
all)
cd ..
build_legacy_caching
cd sources
npm run all
;;
act)
# Build and copy outputs to the dist directory
cd ..
build_legacy_caching
cd sources
npm run build
cd ..
cp -r sources/dist .
@@ -17,6 +31,9 @@ case "$1" in
git checkout -- dist
;;
dist)
cd ..
build_legacy_caching
cd sources
npm clean-install
npm run build
cd ..
@@ -27,6 +44,9 @@ case "$1" in
./gradlew check
;;
install)
cd ..
build_legacy_caching
cd sources
npm clean-install
npm run build
;;
@@ -35,6 +55,9 @@ case "$1" in
npm test -- $@
;;
*)
cd ..
build_legacy_caching
cd sources
npm run build
;;
esac