2023-08-17 18:44:59 +02:00
|
|
|
import { features } from "@budibase/backend-core"
|
2023-08-17 17:39:25 +02:00
|
|
|
import env from "./environment"
|
|
|
|
|
|
|
|
enum WorkerFeature {}
|
|
|
|
|
2023-08-17 18:44:59 +02:00
|
|
|
const featureList: WorkerFeature[] = features.processFeatureEnvVar(
|
|
|
|
Object.values(WorkerFeature),
|
|
|
|
env.WORKER_FEATURES
|
|
|
|
)
|
2023-08-17 17:39:25 +02:00
|
|
|
|
|
|
|
export function isFeatureEnabled(feature: WorkerFeature) {
|
|
|
|
return featureList.includes(feature)
|
|
|
|
}
|