Stopped mid-implementation for the handover to the project thread. Not typechecked or tested; do not merge as is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138YqDj3ttfayRwuMKKrqVj
20 lines
761 B
TypeScript
20 lines
761 B
TypeScript
import { mediaConfigFromEnv } from "@rakazo/adapters";
|
|
|
|
export interface MediaEnv {
|
|
/** Generic sidecar connection; unset keeps Media Studio hidden (except the scripted emulator). */
|
|
mediaWorkerUrl: string | undefined;
|
|
mediaWorkerToken: string | undefined;
|
|
/** Absolute directory of private platform profiles that override the builtin ones. */
|
|
mediaProfilesDir: string;
|
|
}
|
|
|
|
/** Media Studio settings, read through the adapters' single media config parser. */
|
|
export function readMediaEnv(source: NodeJS.ProcessEnv = process.env): MediaEnv {
|
|
const config = mediaConfigFromEnv(source);
|
|
return {
|
|
mediaWorkerUrl: config.workerUrl ?? undefined,
|
|
mediaWorkerToken: config.workerToken ?? undefined,
|
|
mediaProfilesDir: config.profilesDir,
|
|
};
|
|
}
|