Initial commit: PodcastYes — AI podcast platform

This commit is contained in:
Leon Serfaty
2026-06-07 03:58:32 -04:00
commit 155507f21a
151 changed files with 19826 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { LocalStorageProvider } from "./local";
import type { StorageProvider } from "./types";
export * from "./types";
// Registry: today only local disk. To add S3/R2 later, implement StorageProvider
// in lib/storage/s3.ts and switch on an env flag here — no call-site changes.
let provider: StorageProvider | null = null;
export function storage(): StorageProvider {
if (!provider) provider = new LocalStorageProvider();
return provider;
}
/** Convenience for the worker / asset route which need the on-disk path. */
export function localStorage(): LocalStorageProvider {
const s = storage();
if (s instanceof LocalStorageProvider) return s;
throw new Error("Local filesystem path requested but active storage is not local");
}