diff --git a/packages/cdn/vite.config.ts b/packages/cdn/vite.config.ts index 358106fc12..b20cc552a5 100644 --- a/packages/cdn/vite.config.ts +++ b/packages/cdn/vite.config.ts @@ -48,7 +48,8 @@ const cdnPresets = [ // `development` condition to html's dev output and the prod build follows `default`. // `simple-moq-video` is deliberately kept off the CDN: the MoQ engine has no error slot yet, so the element cannot // report a failed transport, an unsupported codec, or a bad catalog. Publishing it would ship a player that fails -// silently. Remove it from this list once the engine surfaces errors. +// silently. Remove it from this list, and from `CDN_EXCLUDED_MEDIA` in the installation workspace contract test, once +// the engine surfaces errors. const cdnMediaExclusions = new Set(['media/simple-moq-video']); const cdnHtmlDefinitionEntries = cdnHtmlEntries(resolve(htmlDistDir, 'define')).filter( ({ name }) => !cdnMediaExclusions.has(name) diff --git a/packages/installation/src/tests/workspace-contract.test.ts b/packages/installation/src/tests/workspace-contract.test.ts index a7a81c4dfc..cc91e91472 100644 --- a/packages/installation/src/tests/workspace-contract.test.ts +++ b/packages/installation/src/tests/workspace-contract.test.ts @@ -36,6 +36,9 @@ const extensionPackages = new Set( Object.values(INSTALLATION_EXTENSION_DEFINITIONS).map(({ packageName }) => packageName) ); +/** Definitions the CDN build leaves out; mirrors `cdnMediaExclusions` in `packages/cdn/vite.config.ts`. */ +const CDN_EXCLUDED_MEDIA = new Set(['simple-moq-video']); + describe('installation workspace contract', () => { it('keeps CDN media support aligned with the definitions its build republishes', () => { const definitions = globSync('packages/html/src/define/media/**/*.ts', { cwd: workspaceRoot }) @@ -45,6 +48,7 @@ describe('installation workspace contract', () => { .replace(/\/index\.ts$/, '') .replace(/\.ts$/, '') ) + .filter((subpath) => !CDN_EXCLUDED_MEDIA.has(subpath)) .sort(); expect([...CDN_MEDIA_SUBPATHS].sort()).toEqual(definitions);