Files
hyperframes/packages/cli/src/cloud/mediaExtensions.ts
T
James RussoandClaude Opus 5.5 89a7aa3004 fix(cli): copy only media, font, CSS and JS files from outside the project (#7636)
* fix(cli): copy only media, font, CSS and JS files from outside the project

Publish, cloud render and feedback now copy an outside reference into _ext/
only when its extension is an image, video, audio, font, CSS or JS type,
taken from studio-server's MIME map (new ./mime subpath; .avif added).
Anything else outside the project is left out with a warning and a
left_out entry whose reason is file_type; telemetry counts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): keep the new outside-type file under its package's comment share

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): copy the outside media cloud render re-encodes or converts

The outside allowlist now also takes the video, audio and still-image
extensions cloud render re-encodes or converts (.avi, .ogv, .aiff, .tif,
.bmp and the rest), from one shared list offload imports too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 03:24:23 +00:00

33 lines
503 B
TypeScript

export const VIDEO_EXTS = new Set([
".mp4",
".m4v",
".mov",
".webm",
".mkv",
".avi",
".mpg",
".mpeg",
".ts",
".m2ts",
".mts",
".flv",
".wmv",
".ogv",
".3gp",
]);
export const AUDIO_EXTS = new Set([
".wav",
".mp3",
".m4a",
".aac",
".ogg",
".oga",
".opus",
".flac",
".aif",
".aiff",
".wma",
]);
// Still images the API refuses; converted to PNG unless animated.
export const CONVERTIBLE_IMAGE_EXTS = new Set([".gif", ".avif", ".bmp", ".tif", ".tiff"]);