Unlock features without credits/Stripe, point docs to docs.songs2vid.com, and drop leftover billing admin surfaces. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
565 B
TypeScript
18 lines
565 B
TypeScript
import { Plan } from "@prisma/client";
|
|
|
|
/**
|
|
* Self-hosted / OSS edition. Prefer S2VID_EDITION; S2YT_EDITION kept for older compose files.
|
|
*/
|
|
export function isSelfHostedEdition(): boolean {
|
|
const edition =
|
|
process.env.S2VID_EDITION?.trim() || process.env.S2YT_EDITION?.trim() || "";
|
|
// Default to self-hosted for this OSS package when unset
|
|
if (!edition) return true;
|
|
return edition === "selfhosted";
|
|
}
|
|
|
|
/** All Pro features are unlocked in the OSS / self-hosted edition. */
|
|
export function hasProFeatures(_plan?: Plan): boolean {
|
|
return true;
|
|
}
|