Files
hyperframes/packages/studio-server/tsup.config.ts
Miguel Ángel 67eab59f44 feat(studio-server): serve H.264 proxies from the preview route (#2590)
* feat(studio-server): serve H.264 proxies from the preview route

Wires the codec manifest and the transcoder into the preview surface: the route
negotiates a proxy via a query param and serves it through the existing range
and ETag machinery, composition HTML carries a codec map for the runtime, and
hostile assets pre-warm so a first play does not wait on a cold transcode.
Exposes the three subpath exports the CLI surfaces consume upstack.

Drops the TEMP fallow entry added with the transcoder: it has real importers now.

* fix(studio-server): publish media proxy exports

* fix(parsers): scan HTML comments linearly
2026-07-16 23:00:48 -04:00

31 lines
1.2 KiB
TypeScript

import { defineConfig } from "tsup";
export default defineConfig({
entry: {
index: "src/index.ts",
"helpers/screenshotClip": "src/helpers/screenshotClip.ts",
"helpers/mediaCodecMap": "src/helpers/mediaCodecMap.ts",
"helpers/proxyTranscoder": "src/helpers/proxyTranscoder.ts",
"helpers/mediaProxyPreview": "src/helpers/mediaProxyPreview.ts",
"helpers/manualEditsRenderScript": "src/helpers/manualEditsRenderScript.ts",
"helpers/studioMotionRenderScript": "src/helpers/studioMotionRenderScript.ts",
"helpers/draftMarkers": "src/helpers/draftMarkers.ts",
"helpers/finiteMutation": "src/helpers/finiteMutation.ts",
"helpers/sourceMutation": "src/helpers/sourceMutation.ts",
},
format: ["esm"],
outDir: "dist",
target: "node22",
platform: "node",
bundle: true,
// Split shared chunks so every entry (index + helper subpaths) imports ONE
// copy of stateful modules — proxyTranscoder's in-flight dedupe, transcode
// semaphore, and negative cache must be process-global, not per-entry.
// With splitting off, each entry inlined its own copy and a pre-warm from
// media-proxy-preview couldn't dedupe against a route's proxy-transcoder.
splitting: true,
sourcemap: true,
clean: true,
dts: true,
});