Repository navigation
Add active-timeline opt-in and compile into app-created projects - #140
Closed
renezander030 wants to merge 2 commits into
Closed
renezander030 wants to merge 2 commits into
renezander030 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #139, which contains all changes from this PR in the single v0.28.0 release.
Existing projects on unverified nested storage layouts can ignore edits to root mirrors. A newly generated project can also be rejected as coming from an unusual path. This adds two explicit alternatives for #50 and #52:
--active-timelinefollows the validatedTimelines/project.jsonpointer. It rejects invalid, deleted, symlinked or conflicting selected documents, keeps root and active IDs, and preserves other timelines. Existing automatic selection stays unchanged. Library callers can useloadDraft(path, { activeTimeline: true }).compile --into <project>fills an empty project created in CapCut. It preserves each document's identity, app markers and unknown settings, copies content-correct media into project assets, and commits import registration with the timeline. It handles metadata files that also contain a timeline without duplicate writes. The shared store index is untouched.Every root and active mirror must be empty. Changes during staging invalidate that check even with
--force-write. Pointer and sidecar conflicts also remain mandatory; version and editor checks retain their existing behavior. Failed copies and partial commits clean up only newly owned assets.--check,--planand--dry-runvalidate the destination without writing. Queue locks serialize compilation with edits through root and nested file aliases, and restore commits active mirrors together.Validation: the required commit hook rebuilt the CLI and ran all 1,135 tests (1,134 passed; one platform-specific test skipped). Lint and 52 focused safety/queue tests pass. A fresh npm tarball passes the repository smoke suite and an additional actual-FFmpeg-media shell-compilation check covering intrinsic video/audio duration, source in-point, dimensions, registration links, public library options, unchanged store/pointer, and nonempty-project refusal. All 13 GitHub CI checks pass on
a27bbed3889250a3a189dd21fd00c4ae2eea9315(run), including Node 18/20/22, lint, Wasm, Linux/macOS/Windows smoke checks, and the Python client matrix.CapCut desktop acceptance remains unverified for the new opt-in paths. Create an empty project in the app, quit CapCut, check the compile plan, compile into it, then open/save/close/reopen in the app to confirm persistence. These changes do not establish compatibility with every app version; #50 and #52 remain open pending that check.
This PR is based on #139 so its diff contains only the issue fixes. Merge it after the parent PR has been reviewed and merged. English/Chinese guidance and the command registry are updated; publication remains pending review.