Diff for commit fbca410Close Diff
src/factory.tsadded
+9-0
| 1 | import { Effect } from "effect"; | ||
| 2 | |||
| 3 | export interface FactoryConfig { | ||
| 4 | readonly runtime: string; | ||
| 5 | readonly storage: string; | ||
| 6 | } | ||
| 7 | |||
| 8 | export const describeFactory = (config: FactoryConfig): Effect.Effect<string> => | ||
| 9 | Effect.succeed(`effect-forge running on ${config.runtime} (${config.storage})`); |
| @@ -0,0 +1,9 @@ | ||
| 1 | +import { Effect } from "effect"; | |
| 2 | + | |
| 3 | +export interface FactoryConfig { | |
| 4 | + readonly runtime: string; | |
| 5 | + readonly storage: string; | |
| 6 | +} | |
| 7 | + | |
| 8 | +export const describeFactory = (config: FactoryConfig): Effect.Effect<string> => | |
| 9 | + Effect.succeed(`effect-forge running on ${config.runtime} (${config.storage})`); | |
src/index.tsmodified
+7-1
| 1 | import { Effect } from "effect"; | 1 | import { Effect } from "effect"; |
| 2 | import { describeFactory } from "./factory.js"; | ||
| 2 | 3 | ||
| 3 | export const main = Effect.succeed("Hello from effect-forge.dev on Cloudflare Workers!"); | 4 | export const main = describeFactory({ |
| 5 | runtime: "cloudflare-workers", | ||
| 6 | storage: "d1+r2+sqlite-do", | ||
| 7 | }); | ||
| 8 | |||
| 9 | export { describeFactory }; |
| @@ -1,3 +1,9 @@ | ||
| 1 | 1 | import { Effect } from "effect"; |
| 2 | +import { describeFactory } from "./factory.js"; | |
| 2 | 3 | |
| 3 | -export const main = Effect.succeed("Hello from effect-forge.dev on Cloudflare Workers!"); | |
| 4 | +export const main = describeFactory({ | |
| 5 | + runtime: "cloudflare-workers", | |
| 6 | + storage: "d1+r2+sqlite-do", | |
| 7 | +}); | |
| 8 | + | |
| 9 | +export { describeFactory }; | |
Commit History
- feat: add typed FactoryConfig helper moduleValidate Repo/check: successvalidate/check: successEffect Forge Demo <demo@effect-forge.dev> · Dec 5, 2026 · 17:58 UTC
- Initial commit: README, Effect program, and Actions workflowValidate Repo/check: successEffect Forge Demo <demo@effect-forge.dev> · Dec 5, 2026 · 17:58 UTC