diff --git a/src/client/dev-dist/sw.js b/src/client/dev-dist/sw.js index 9f2990e..ceac523 100644 --- a/src/client/dev-dist/sw.js +++ b/src/client/dev-dist/sw.js @@ -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"), { diff --git a/src/server/services/ScryfallService.ts b/src/server/services/ScryfallService.ts index 7067963..cd3566e 100644 --- a/src/server/services/ScryfallService.ts +++ b/src/server/services/ScryfallService.ts @@ -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