| 1 | import * as Config from "effect/Config"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import Events from "./Events.ts"; |
| 4 | import { ai } from "./ai/index.ts"; |
| 5 | import { forms } from "./forms/index.ts"; |
| 6 | |
| 7 | export const features = Effect.gen(function* () { |
| 8 | yield* Events; |
| 9 | const enableAI = yield* Config.String("NEON_EXAMPLE_AI").pipe( |
| 10 | Config.withDefault("false"), |
| 11 | ); |
| 12 | const enableForms = yield* Config.String("NEON_EXAMPLE_FORMS").pipe( |
| 13 | Config.withDefault("false"), |
| 14 | ); |
| 15 | return { |
| 16 | ai: enableAI === "true" ? yield* ai : undefined, |
| 17 | forms: enableForms === "true" ? yield* forms : undefined, |
| 18 | }; |
| 19 | }); |