mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
7801e3ff346f65d994ef64d9c5d067f3dcd52b87
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
52d43f33a3 |
fix(cli): upload archives never include credential or agent-state files (#7830)
* fix(cli): upload archives never include credential or agent-state files Publish, cloud render and feedback stage the project through one path. It now always leaves out package-manager and Git credentials (.npmrc, .yarnrc, .pypirc, pip.conf, .netrc, .git-credentials, .gitconfig), key files (id_rsa*, id_ed25519*, *.pem, *.key, *.p12, *.pfx), .ssh, .aws, .gnupg, .docker, .kube, .azure, .config/gcloud and .config/gh, agent and editor folders (.claude, .codex, .cursor, .agents, .gemini, .vscode, .idea) and .mcp.json, at any depth and in any letter case. This holds whatever .hyperframesignore says and whatever the HTML or CSS references. A reference can bring back a file the ignore rules skipped only when it is an image, video, audio, font, CSS or JS file, or when it is not in a hidden folder. Every file left out this way is reported, and a file the folder walk already reported is not reported again for each reference. * fix(cli): anchor both alternatives of the key-file pattern * fix(cli): a page's own scripts in a hidden folder still upload |
||
|
|
6a7b4df7c8 |
fix(cli): add lists files from a received config's registry as received (#7820)
* fix(cli): add lists files from a received config's registry as received When a project's hyperframes.json is listed in .hyperframes/received-files.json and names a registry other than the public one, add now lists every file it is about to write in that record before writing any of them. This covers every caller of addToProject: add by name, by tag, several names, and Studio. The decision reads the config the install uses, so a byte-order mark or another spelling of the file on disk is handled the same way. A person's own config, the public registry and a record that cannot be read are left as they are. * fix(cli): list received files as they are written, under a shared lock add now lists each file in the received-files record just before it writes it, using the write-time decision, so a file kept because the person edited it during the download is never listed. When an install fails, it takes back the entries it listed but never wrote. Changes to the record take .hyperframes/received-files.json.lock, created exclusively. A writer retries for about 2 s, takes over a lock older than about 10 s, and always releases it. A writer that cannot take the lock in time fails with a clear error instead of writing past it. * fix(cli): an unreadable config counts as received; a failed install keeps what is on disk add now counts an install as received when hyperframes.json exists but cannot be read or parsed, since that config is not proven to be the person's own. When an install fails, it takes back only the entries it listed whose files are not on disk; files that landed stay listed. * fix(cli): the received-files lock resolves the project folder as the installer does The record's lock and write resolved the project folder with fs.realpathSync, while the containment check resolves targets with the native realpath. The two can spell the same folder differently: a Windows short name or a folder typed in another letter case. The target then looked outside the project and the change was refused. The record now resolves the folder with the installer's realProjectRoot, so the root and target compare in one spelling. The failed-install tests now fail the write by stubbing it, which works on every platform, instead of a read-only folder, which Windows ignores. |
||
|
|
870b1fa4dc |
fix(cli,studio-server): received-file guard covers subfolders and spellings; playlists named as media never reach ffmpeg (#7771)
* fix(cli): a subfolder of an imported project keeps its received-files record Publish, cloud render and feedback now read the received-files record at the nearest folder at or above the one they stage, so staging a subfolder of an imported project still leaves out the outside files its received files reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a received file counts under any spelling of the same file on disk The received-files lookup now also matches a project file that is the same file on disk as a listed path, so a name respelled in letter case on a case-insensitive disk keeps its received status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): cloud render prepares only the GIFs staging kept The entry GIF prep before a cloud render upload now reads only the staged copies it is handed. An image whose source staging left out keeps its reference as written and is never read from disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): never hand a playlist named as media to ffmpeg A media file whose first bytes are an HLS playlist, an XML manifest or a concat script now stays out of ffprobe and ffmpeg: cloud render leaves it in the zip as authored, the media probe reports it as not media, and the proxy copy refuses it. Real media never starts with these bytes, so it probes and transcodes as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): catch playlists with control bytes, and keep them from stills and audio probes A text playlist or concat script is detected whatever bytes follow its first line; only markup must be all text. A still frame and the audio probe behind waveforms, peaks and loudness now refuse a file the probe reads as not media, as the proxy copy already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a parent folder's state the CLI cannot read never marks a project received The walk up for a received-files record now skips a parent whose record cannot be reached. Only a record file that is there but cannot be read or parsed counts every file as received. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a drive that reports no file ids matches no received file by identity Some network and virtual drives report a file id of 0 for every file, so the same-file match now gives such a file no identity instead of matching it to every listed file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio-server): read a media file's first bytes with a read stream The playlist check reads the first 64 bytes through a bounded read stream instead of a raw file descriptor, and the audio-track probe's doc comment sits on its function again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise the packed size budget for the media playlist check Main packs @hyperframes/studio-server close to the 1% tolerance on the 168500 budget, and the playlist check adds about 320 bytes, which put the Build over. Set the budget to 172000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): open media only through self-contained media demuxers Every ffprobe and ffmpeg input that cloud render offload, the publish proxy bake and Studio's media helpers open now carries a demuxer whitelist built from the supported media extensions: MP4/MOV/M4A/AVIF, Matroska/WebM, MXF, AVI, MPEG-PS/TS, FLV, ASF, Ogg, WAV, MP3, AAC, FLAC, AIFF and the still-image formats. Playlist, manifest and concat demuxers can no longer open, whatever a file's bytes say. The proxy's own concat step is left as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): keep media probe argv flat, and expect the demuxer list in loudness args Two probe argv literals built from nested spreads are flat again, so "--" stays the visible second-to-last entry the argv contract checks. The normalize-audio test expects the demuxer list before the input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
c96ff540c4 |
fix(cli): harden lambda destroy, snapshot media, upgrade and project file serving (#7509)
* fix(cli): lambda destroy runs SAM in a private folder and acts only on the selected stack - sam delete outside a checkout runs in a fresh private temp folder, removed afterwards, instead of the shared temp directory. - A stack state file must name the stack it is selected by. - destroy and deploy derive the video repository name from the stack name instead of trusting the recorded value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): snapshot keeps remote clips in a private folder and reads only allowed URLs - A video URL the download policy refuses (plain http, or a private, loopback or link-local host) is no longer handed to FFmpeg; the clip is skipped instead, as render does. - Remote clips are cached in a per-user, owner-only temp folder; a folder open to other users is never reused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): upgrade --project writes package.json through an exclusive temp file The rewrite now uses the shared atomic replace, which creates a fresh, unpredictable sibling with exclusive creation, so an existing package.json.tmp entry is never written through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): keep env files, Git data and tool records out of served and uploaded projects - play and present answer 404 for .env files, .git and the tools' private .hyperframes records, as Studio's preview does for the records. - publish and cloud render never stage an env file or tool record, even when markup references it, and never pull in an env file from outside the project. - Cloud site uploads (Lambda and Cloud Run deploySite) leave env files out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): lambda commands accept a state file whose stack name differs only in case On a case-insensitive disk, deploy --stack-name=Demo and --stack-name=demo share one state file, so a name that matches apart from case is the same stack the user deployed and keeps working as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): snapshot's fallback media folder uses createStagingDir The repository check forbids bare mkdtemp beside a caller-supplied path, because it fails past 260 characters on Windows. Also trims a comment so the new helper file stays within its package's comment share. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): snapshot never hands FFmpeg a remote URL FFmpeg follows redirects and resolves hosts on its own, so a clip the downloader could not fetch must not reach it as a URL. Snapshot now leaves such a clip out and warns, as render does. A fallback media folder is removed when the process exits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): cover .envrc, .env-local and .env_prod, and test present's private-file 404 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |