Files
hyperframes/packages/studio-server/tsup.config.ts
T
Miguel Ángel d159ec51c0 fix(studio-server): sub-composition previews build off the request thread within a deadline (#7857)
* test(studio-server): a sub-composition build past its deadline is refused off the request thread

* fix(studio-server): sub-composition previews build off the request thread within a deadline

* fix(studio-server): every parse of a sub-composition page runs on the build worker

* test(studio-server): a page built inside its deadline keeps the request thread free

* test(studio-server): a refused page leaves the next one built whole, hf-ids and all

* chore(studio-server): the build worker's comments fit its package's share
2026-11-16 07:10:02 +00:00

43 lines
1.9 KiB
TypeScript

import { defineConfig } from "tsup";
export default defineConfig({
entry: {
index: "src/index.ts",
// Beside the chunks that start it (subCompositionBuild.ts looks next to itself).
subCompositionWorker: "src/helpers/subCompositionWorker.ts",
"helpers/screenshotClip": "src/helpers/screenshotClip.ts",
"helpers/mediaCodecMap": "src/helpers/mediaCodecMap.ts",
"helpers/proxyTranscoder": "src/helpers/proxyTranscoder.ts",
"helpers/loudness": "src/helpers/loudness.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",
"helpers/safePath": "src/helpers/safePath.ts",
"helpers/requestIdentity": "src/helpers/requestIdentity.ts",
"helpers/hfIdPersist": "src/helpers/hfIdPersist.ts",
"helpers/encoderOptions": "src/helpers/encoderOptions.ts",
"helpers/mediaRange": "src/helpers/mediaRange.ts",
"helpers/mime": "src/helpers/mime.ts",
"helpers/outsideFile": "src/helpers/outsideFile.ts",
"history/index": "src/history/index.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,
clean: true,
dts: true,
// An optional dependency, so tsup would otherwise inline it.
external: ["sharp"],
});