Skip to content

feat(producer): support entryFile for rendering individual compositions#42

Merged
miguel-heygen merged 6 commits intomainfrom
feat/entry-file-render
Mar 27, 2026
Merged

feat(producer): support entryFile for rendering individual compositions#42
miguel-heygen merged 6 commits intomainfrom
feat/entry-file-render

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Mar 24, 2026

Changes

  • Add optional entryFile parameter to render API endpoints (/v1/render and /v1/render-stream)
  • Enable rendering individual sub-compositions by extracting them from index.html context when the entry file is a <template> wrapper
  • Change base64 audio/video linting from detecting "fabricated" media to prohibiting all inline base64 media
  • Add manifest path resolution for bundled producer deployments

API Changes

  • RenderConfig — new optional entryFile field for specifying HTML file to render
  • server.ts — parses entryFile from request body, validates file exists in project directory
  • executeRenderJob — uses entryFile instead of hardcoded "index.html"

Template Extraction

  • extractStandaloneEntryFromIndex — extracts sub-composition hosts from index.html and creates standalone render context
  • Handles <template> entry files by finding matching data-composition-src in index.html and isolating that host
  • Resets data-start to 0 for standalone rendering

Linting Updates

Usage

POST /v1/render-stream
{ "projectDir": "/path/to/project", "entryFile": "compositions/intro.html" }

Omit entryFile for default behavior (renders index.html).

@miguel-heygen miguel-heygen changed the title feat(producer): support entryFile for rendering individual compositions [WIP] feat(producer): support entryFile for rendering individual compositions Mar 24, 2026
@miguel-heygen miguel-heygen force-pushed the feat/entry-file-render branch from 22065c5 to 100ac63 Compare March 24, 2026 21:43
@miguel-heygen miguel-heygen changed the title [WIP] feat(producer): support entryFile for rendering individual compositions feat(producer): support entryFile for rendering individual compositions Mar 26, 2026
miguel-heygen and others added 4 commits March 26, 2026 18:47
Add optional `entryFile` parameter to the render API. When provided,
the producer renders the specified HTML file instead of defaulting to
index.html. This enables rendering individual sub-compositions
(e.g. `compositions/intro.html`) without wrapping them in a full
project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…compositions

- Add dist-sibling path to manifest resolver (fixes "Missing manifest" when
  running from bundled public-server.js)
- Add wrapSubCompositionAsStandalone: when entryFile is a <template>-based
  sub-composition, creates a standalone HTML document with GSAP + runtime
  so it can render independently
- Extract TARGET_DURATION from composition scripts for data-duration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ging

The renderStream handler was missing entryFile in createRenderJob,
causing all composition renders to fall back to index.html.

Also adds logging for staticDuration and entryFile to help diagnose
duration detection issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix unnecessary escape characters in template literal (no-useless-escape)
- Apply oxfmt formatting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread packages/producer/src/services/renderOrchestrator.ts Outdated
@miguel-heygen miguel-heygen merged commit dc0d69a into main Mar 27, 2026
21 checks passed
Copy link
Copy Markdown
Collaborator Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants