From c783d145ca41ad0f565e6821c6c039080b6ac06e Mon Sep 17 00:00:00 2001 From: 4gray Date: Mon, 27 Jul 2026 01:18:50 +0200 Subject: [PATCH] fix(release): repair the screenshot capture after the catalog reorder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two problems the poster catalog introduced in the release capture driver. The mock server no longer starts. `capture-app-driver.ts` spawns `tsx apps/xtream-mock-server/src/main.ts` directly, and the generator now imports `@iptvnator/shared/marketing-fixtures`; without `--tsconfig tsconfig.base.json` tsx does not resolve that path alias and the process exits with `Cannot find module '@iptvnator/shared/marketing-fixtures'`. Verified both ways: bare invocation fails, with the flag the server reports Listening. Both mock projects' own serve targets already pass the flag — this raw spawn was the site that got missed. The seeded dashboard backdrops pointed at the wrong movies (Codex P2, verified). VOD stream ids are `MARKETING_VOD_STREAM_ID_BASE + index` and the generator now lists POSTER_SHOWCASE_MOVIES first, so 62000-62002 became Black Harbor, The Paper Astronaut and Summer Static, while the driver still mapped those ids to Crimson Skylark, The Voltage Guard and Midnight Mantle — release screenshots would have shown each title under another film's backdrop. Titles updated, with a comment recording the coupling. Deriving the titles from the fixture list would be drift-proof, but `tools/release` is `type:tool` with no depConstraint entry, so `@nx/enforce-module-boundaries` forbids it depending on any library. Left as a comment rather than loosening the boundary policy from inside this PR. Co-Authored-By: Claude Opus 5 --- tools/release/capture-app-driver.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tools/release/capture-app-driver.ts b/tools/release/capture-app-driver.ts index bd643d07f..59fe2436f 100644 --- a/tools/release/capture-app-driver.ts +++ b/tools/release/capture-app-driver.ts @@ -72,7 +72,14 @@ export async function ensureXtreamMockServer( const child = spawn( path.join(workspaceRoot, 'node_modules/.bin/tsx'), - ['apps/xtream-mock-server/src/main.ts'], + // The mock server imports `@iptvnator/shared/marketing-fixtures`, and + // tsx only resolves that path alias when pointed at the base config — + // matching how the project's own serve target invokes it. + [ + '--tsconfig', + 'tsconfig.base.json', + 'apps/xtream-mock-server/src/main.ts', + ], { cwd: workspaceRoot, env: { ...process.env, NODE_ENV: 'development', PORT: '3211' }, @@ -217,10 +224,15 @@ async function seedDashboardActivity(page: Page): Promise { `${XTREAM_MOCK_ORIGIN}/assets/marketing/backdrop/${title .toLowerCase() .replace(/[^a-z0-9]+/g, '-')}.svg?size=${encodeURIComponent('1280x720')}`; + // Xtream VOD stream ids are assigned by array position + // (`MARKETING_VOD_STREAM_ID_BASE + index` in marketing.generator.ts), and + // the generator lists POSTER_SHOWCASE_MOVIES first. Keep these three titles + // in step with the first three entries of that fixture list, otherwise the + // seeded backdrops belong to different movies than the ids resolve to. const items = [ - { xtreamId: 62000, type: 'movie', backdropUrl: backdrop('Crimson Skylark'), recent: true }, - { xtreamId: 62001, type: 'movie', backdropUrl: backdrop('The Voltage Guard'), recent: true }, - { xtreamId: 62002, type: 'movie', backdropUrl: backdrop('Midnight Mantle'), recent: false }, + { xtreamId: 62000, type: 'movie', backdropUrl: backdrop('Black Harbor'), recent: true }, + { xtreamId: 62001, type: 'movie', backdropUrl: backdrop('The Paper Astronaut'), recent: true }, + { xtreamId: 62002, type: 'movie', backdropUrl: backdrop('Summer Static'), recent: false }, { xtreamId: 72000, type: 'series', backdropUrl: backdrop('Skyline Sentinels'), recent: true }, { xtreamId: 72001, type: 'series', backdropUrl: backdrop('The Aegis Club'), recent: false }, ] as const;