mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-16 07:17:44 +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>
22 lines
850 B
TypeScript
22 lines
850 B
TypeScript
import * as Cloudflare from "@/Cloudflare/index.ts";
|
|
import * as Neon from "@/Neon/index.ts";
|
|
import * as Effect from "effect/Effect";
|
|
|
|
/**
|
|
* Shared Neon Postgres origin + Hyperdrive Connection bound by both
|
|
* binding-test workers (effect-worker via `Cloudflare.Hyperdrive.Connect`
|
|
* and async-worker via `env: { HD: Connection }`). Because both workers
|
|
* bind this same Connection, the metadata they read back over `fetch`
|
|
* (host / port / user / database / connection string) must agree with the
|
|
* Neon origin that fronts it.
|
|
*/
|
|
export const HyperdriveConnection = Effect.gen(function* () {
|
|
const project = yield* Neon.Project("HyperdriveBindingProject");
|
|
const connection = yield* Cloudflare.Hyperdrive.Connection(
|
|
"HyperdriveBindingConnection",
|
|
{
|
|
origin: project.origin,
|
|
},
|
|
);
|
|
return { project, connection };
|
|
});
|