Files
hyperframes/packages/studio-server/tsup.config.ts
T
James RussoandClaude Opus 5.5 89a7aa3004 fix(cli): copy only media, font, CSS and JS files from outside the project (#7636)
* fix(cli): copy only media, font, CSS and JS files from outside the project

Publish, cloud render and feedback now copy an outside reference into _ext/
only when its extension is an image, video, audio, font, CSS or JS type,
taken from studio-server's MIME map (new ./mime subpath; .avif added).
Anything else outside the project is left out with a warning and a
left_out entry whose reason is file_type; telemetry counts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): keep the new outside-type file under its package's comment share

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): copy the outside media cloud render re-encodes or converts

The outside allowlist now also takes the video, audio and still-image
extensions cloud render re-encodes or converts (.avi, .ogv, .aiff, .tif,
.bmp and the rest), from one shared list offload imports too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 03:24:23 +00:00

40 lines
1.7 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/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",
"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"],
});