import type { MediaSettings } from "@rakazo/contracts"; import { createImageOperations } from "./media/image-operations.js"; import { createVideoOperations } from "./media/video-operations.js"; import type { MediaOperationRegistration } from "./media-runtime.js"; export interface MediaOperationDeps { /** Current deployment-wide media backends; read per call so edits apply without a restart. */ loadSettings(): Promise; } /** * Every media operation this deployment can run. The API and the worker build their runtime * from this one list, so both processes run the same operations. */ export function createMediaOperations(deps: MediaOperationDeps): MediaOperationRegistration[] { return [...createImageOperations(deps), ...createVideoOperations()]; }