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>
This commit is contained in:
James Russo
2026-11-13 03:24:23 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent b54e4981f2
commit 89a7aa3004
15 changed files with 320 additions and 58 deletions
+4
View File
@@ -138,6 +138,10 @@ Local images outside the project referenced by an `<img>` or `<source>` element'
`srcset` are included too. Their size or pixel-density descriptors are preserved,
and your source files stay unchanged.
Only images, video, audio, fonts, CSS and JS files are copied from outside the
project. Any other outside file, such as a Lottie `.json` or a `.pdf`, is left
out with a warning naming it; move it into the project folder to include it.
Before sharing source, remove secrets and confirm that every included media file
can be shared. Tell a reviewer whether you need feedback on story, visuals,
timing, facts, or final approval.
+10 -7
View File
@@ -2674,13 +2674,16 @@ authenticating, uploading, or starting anything. If you are over, add only
paths you have verified are unneeded to `.hyperframesignore`.
A file outside the project folder that a composition points at is copied into
the zip, unless it sits in a private location (env files, Git data, hidden,
system and app-data folders) or is reached from a file that came in with an
imported project: then it is left out, with a warning naming it. Under
`--json`, the result lists those as `left_out`, each with the `file` that points
at it, the `reference` as written, its `path` from the project folder, the
`reason` (`blocklisted` or `received`) and `levels_up`, how many folders above
the project it is. A full run also prints each as a `{"event":"left_out",…}`
the zip only if it is an image, video, audio, font, CSS or JS file, judged by
its extension. Any other outside file (a Lottie `.json`, a `.pdf`, a file with
no extension), one in a private location (env files, Git data, hidden, system
and app-data folders), and one reached from a file that came in with an
imported project are left out, with a warning naming each. To include such a
file, move it into the project folder. Under `--json`, the result lists those
as `left_out`, each with the `file` that points at it, the `reference` as
written, its `path` from the project folder, the `reason` (`blocklisted`,
`received` or `file_type`) and `levels_up`, how many folders above the project
it is. A full run also prints each as a `{"event":"left_out",…}`
line on stderr, so a wrapper can ask with `--dry-run --json` before uploading
and still hear about each one during the run.