mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
fix(cli): files from outside the project are uploaded only once approved (#7995)
* fix(cli): files from outside the project are uploaded only once approved publish, cloud render and feedback --file-issue copied every image, video, audio, font and CSS file a composition named from outside the project folder, and every project file that links outside it, and only listed them. A project that came from someone else could pull a file from anywhere on the uploader's disk into an upload. Now each such file needs approval. In a terminal the command lists them and asks, defaulting to no; a yes is remembered per project in the CLI's config folder (~/.hyperframes/outside-files.json), never in the project. --yes, --json, --dry-run and unattended runs leave them out with a warning naming each file and saying how to include it. --include-outside-files uploads them without asking. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): check the approvals file mode only where files have POSIX modes 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:
co-authored by
Claude Opus 5.5
parent
346579b6b9
commit
22b615f1a7
@@ -129,21 +129,29 @@ publish creates a claimable link. Sign in when the CLI should own the project
|
||||
immediately, update an existing link, or publish into a shared space.
|
||||
|
||||
A local video poster referenced with a relative path, such as
|
||||
`../shared/poster.png`, is copied into the published project even when it lives
|
||||
outside the project directory. Percent-encoded paths work too, such as
|
||||
`../shared/poster.png`, can be copied into the published project even when it
|
||||
lives outside the project directory, once you approve it (see below).
|
||||
Percent-encoded paths work too, such as
|
||||
`../shared/poster%20art.svg` for `poster art.svg` or
|
||||
`../shared/%E5%B0%81%E9%9D%A2.svg` for `封面.svg`.
|
||||
|
||||
Local images outside the project referenced by an `<img>` or `<source>` element's
|
||||
`srcset` are included too. Their size or pixel-density descriptors are preserved,
|
||||
`srcset` can be included the same way. Their size or pixel-density descriptors are preserved,
|
||||
and your source files stay unchanged.
|
||||
|
||||
Only images, video, audio, fonts and CSS files are copied from outside the
|
||||
project. Any other outside file, such as a script, a Lottie `.json` or a `.pdf`,
|
||||
is left out with a warning naming it; move it into the project folder to include
|
||||
it. Before uploading, `publish` lists every file it is about to copy from outside
|
||||
the project folder, including files the project only links to, so you can see
|
||||
what leaves your computer.
|
||||
it.
|
||||
|
||||
Nothing from outside the project folder is uploaded without your say. Before
|
||||
uploading, `publish` lists each such file, including files the project only
|
||||
links to, and asks whether to upload them. The answer defaults to no, which
|
||||
leaves them out. A yes is remembered for that project in your user config
|
||||
folder (`~/.hyperframes/outside-files.json`), never in the project, so the next
|
||||
publish asks only about new files. With `--yes`, or when nobody can answer the
|
||||
prompt, outside files are left out with a warning naming each one. Pass
|
||||
`--include-outside-files` to upload them without asking.
|
||||
|
||||
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,
|
||||
|
||||
+14
-4
@@ -1174,6 +1174,7 @@ npx hyperframes publish --space <space-id>
|
||||
| `--update <url-or-id>` | Update an existing project in place. Requires sign-in. |
|
||||
| `--space <space-id>` | Publish into a shared team space. Requires sign-in. |
|
||||
| `--proxy` / `--no-proxy` | Bake H.264 proxies for browser-hostile codecs, or skip them |
|
||||
| `--include-outside-files` | Upload files from outside the project folder without asking. Otherwise they need your approval, and `--yes` leaves them out |
|
||||
|
||||
`publish` zips the project, uploads it, and prints a URL that resolves to stored
|
||||
content — so it keeps working after the CLI exits. No local server stays alive,
|
||||
@@ -2823,14 +2824,22 @@ same share as the project is copied like any other. 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`, `file_type`, `private` or `network_share`) and `levels_up`, how many folders above the project
|
||||
`received`, `file_type`, `private`, `network_share` or `not_approved`) 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.
|
||||
|
||||
Before uploading, the command also names every file it carries from outside the
|
||||
project folder: each file a composition points at, and each project file that is
|
||||
a link to a file outside the project. It prints the list and carries on. Under
|
||||
A file from outside the project folder that would be copied (each file a
|
||||
composition points at, and each project file that is a link to a file outside
|
||||
the project) is uploaded only when you approve it. Run in a terminal, the
|
||||
command lists those files and asks, defaulting to no. A yes is remembered for
|
||||
that project in `~/.hyperframes/outside-files.json`, never in the project. Under
|
||||
`--json` or `--dry-run`, or when nobody can answer, they are left out with the
|
||||
`not_approved` reason and a warning naming each one. `--include-outside-files`
|
||||
uploads them without asking; `hyperframes publish` and `hyperframes feedback
|
||||
--file-issue` take the same flag and ask the same way unless given `--yes`.
|
||||
|
||||
Before uploading, the command names every outside file it carries. Under
|
||||
`--json`, the result lists them as `outside_files`, with the same `file`,
|
||||
`reference`, `path` and `levels_up` fields, and each is printed as a
|
||||
`{"event":"outside_file",…}` line on stderr. For a project link, `file` and
|
||||
@@ -2852,6 +2861,7 @@ Render parameters mirror local `hyperframes render` where they overlap:
|
||||
| `--title` | — | Free-text label echoed back in detail responses |
|
||||
| `--output` / `-o` | `renders/<render_id>.<ext>` | Where the downloaded video lands |
|
||||
| `--dry-run` | off | Build and inspect the zip without authenticating, uploading, or rendering |
|
||||
| `--include-outside-files` | off | Upload files from outside the project folder without asking. Otherwise only approved ones go |
|
||||
|
||||
Lifecycle and control:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user