mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-10 20:31:16 +02:00
Prepare Relay production infrastructure for the PlanetScale PS_20 HA topology, upgrade Effect and Alchemy to compatible betas, reconcile migration state, and preserve patched MCP session termination behavior.\n\nCo-authored-by: codex <codex@users.noreply.github.com>
31 lines
867 B
TypeScript
31 lines
867 B
TypeScript
import * as Cloudflare from "@/Cloudflare";
|
|
import * as Alchemy from "@/index";
|
|
import * as Effect from "effect/Effect";
|
|
import * as pathe from "pathe";
|
|
import ImagesEffectWorker from "./effect-worker.ts";
|
|
|
|
export const AsyncWorker = Cloudflare.Worker("ImagesAsyncWorker", {
|
|
main: pathe.resolve(import.meta.dirname, "async-worker.ts"),
|
|
env: {
|
|
MEDIA: Cloudflare.Images.Images("MEDIA"),
|
|
},
|
|
});
|
|
|
|
export type AsyncWorkerEnv = Cloudflare.InferEnv<typeof AsyncWorker>;
|
|
|
|
export default Alchemy.Stack(
|
|
"ImagesBindingStack",
|
|
{
|
|
providers: Cloudflare.providers(),
|
|
state: Cloudflare.state(),
|
|
},
|
|
Effect.gen(function* () {
|
|
const asyncWorker = yield* AsyncWorker;
|
|
const effectWorker = yield* ImagesEffectWorker;
|
|
|
|
return {
|
|
asyncWorkerUrl: asyncWorker.url.as<string>(),
|
|
effectWorkerUrl: effectWorker.url.as<string>(),
|
|
};
|
|
}),
|
|
);
|