From 3056db68a67f6c61f4ae8295346c8ff5821c5307 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 07:23:19 +0000 Subject: [PATCH] Gates that read the poster wall's markup read the lifted PosterSection too: check:packet-variants (its card-deck and packet tapes) and check:poster-fetch-guard (no direct poster fetch) --- internal/check-packet-variants.mjs | 4 +++- internal/check-poster-fetch-guard.mjs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/check-packet-variants.mjs b/internal/check-packet-variants.mjs index 87d3db713..55b568757 100644 --- a/internal/check-packet-variants.mjs +++ b/internal/check-packet-variants.mjs @@ -18,7 +18,9 @@ import { readFileSync } from 'node:fs' const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..') const read = (p) => readFileSync(resolve(ROOT, p), 'utf8') -const WALL = read('library/components/poster/PosterWall.vue') +// The wall's cards are drawn by PosterSection.vue (lifted out of PosterWall.vue, which provides it the shared state), +// so the print-row markup this gate reads lives in BOTH files: read them as one wall. +const WALL = read('library/components/poster/PosterWall.vue') + '\n' + read('library/components/poster/PosterSection.vue') const PRINTS = read('library/composables/usePosterPrints.js') const EN = JSON.parse(read('library/i18n/locales/en/buttons.json')) diff --git a/internal/check-poster-fetch-guard.mjs b/internal/check-poster-fetch-guard.mjs index ba16b7cab..5b67fbfef 100644 --- a/internal/check-poster-fetch-guard.mjs +++ b/internal/check-poster-fetch-guard.mjs @@ -40,7 +40,7 @@ check(await fetchPosterSource('x.html', async () => { throw new Error('offline') 'a network error on the source is thrown as itself, not reported as "not found"') // No caller fetches posters/ directly: every poster fetch goes through the helper. -for (const rel of ['library/composables/usePosterPrints.js', 'library/components/poster/PosterWall.vue']) { +for (const rel of ['library/composables/usePosterPrints.js', 'library/components/poster/PosterWall.vue', 'library/components/poster/PosterSection.vue', 'library/components/poster/PosterSectionView.vue']) { const src = readFileSync(join(REPO, rel), 'utf8') const direct = src.split('\n').filter((l) => /fetch\([^)]*posters\/[^)]*\.(webp|html)/.test(l) && !l.trim().startsWith('//')) check(direct.length === 0, `${rel} fetches a poster directly instead of through poster-fetch.js: ${direct.map((l) => l.trim()).join(' | ')}`)