@rharkor/caching-for-turbo 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +10 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -204362,7 +204362,6 @@ const timingProvider = (name, tracker, fn) => {
|
|
|
204362
204362
|
|
|
204363
204363
|
|
|
204364
204364
|
|
|
204365
|
-
|
|
204366
204365
|
//* Cache API
|
|
204367
204366
|
async function saveCache(ctx, hash, tag, stream) {
|
|
204368
204367
|
if (!env.valid) {
|
|
@@ -204404,11 +204403,9 @@ async function getCache(ctx, hash) {
|
|
|
204404
204403
|
return [size, readableStream, artifactTag];
|
|
204405
204404
|
}
|
|
204406
204405
|
async function deleteCache() {
|
|
204407
|
-
core_core.error(`Cannot delete github cache automatically.`);
|
|
204408
204406
|
throw new Error(`Cannot delete github cache automatically.`);
|
|
204409
204407
|
}
|
|
204410
204408
|
async function listCache() {
|
|
204411
|
-
core_core.error(`Cannot list github cache automatically.`);
|
|
204412
204409
|
throw new Error(`Cannot list github cache automatically.`);
|
|
204413
204410
|
}
|
|
204414
204411
|
const getGithubProvider = (tracker) => {
|
|
@@ -204763,7 +204760,16 @@ async function cleanup(ctx, tracker) {
|
|
|
204763
204760
|
throw new Error('Invalid max-size provided');
|
|
204764
204761
|
}
|
|
204765
204762
|
const provider = getProvider(tracker);
|
|
204766
|
-
|
|
204763
|
+
let files;
|
|
204764
|
+
try {
|
|
204765
|
+
files = await provider.list();
|
|
204766
|
+
}
|
|
204767
|
+
catch (e) {
|
|
204768
|
+
const msg = `Provider does not support listing: ${e.message}
|
|
204769
|
+
Exiting early, no files were cleaned up.`;
|
|
204770
|
+
ctx.log.info(msg);
|
|
204771
|
+
return;
|
|
204772
|
+
}
|
|
204767
204773
|
const fileToDelete = [];
|
|
204768
204774
|
if (maxAgeParsed) {
|
|
204769
204775
|
const now = new Date();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rharkor/caching-for-turbo",
|
|
3
3
|
"description": "Sets up Turborepo Remote Caching to work with GitHub Actions built-in cache",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/rharkor/caching-for-turbo",
|
|
7
7
|
"repository": {
|