fix: ensure Scryfall set cache directory exists and update service worker revision for index.html.
All checks were successful
Build and Deploy / build (push) Successful in 2m3s
All checks were successful
Build and Deploy / build (push) Successful in 2m3s
This commit is contained in:
@@ -82,7 +82,7 @@ define(['./workbox-5a5d9309'], (function (workbox) { 'use strict';
|
||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.g6k3e4tvo1g"
|
||||
"revision": "0.lnjaj3n52vg"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
||||
@@ -267,6 +267,9 @@ export class ScryfallService {
|
||||
|
||||
// Save Set Cache
|
||||
if (allCards.length > 0) {
|
||||
if (!fs.existsSync(path.dirname(setCachePath))) {
|
||||
fs.mkdirSync(path.dirname(setCachePath), { recursive: true });
|
||||
}
|
||||
fs.writeFileSync(setCachePath, JSON.stringify(allCards, null, 2));
|
||||
|
||||
// Smartly save individuals: only if missing from cache
|
||||
|
||||
Reference in New Issue
Block a user