Skip to content

Commit 46487a4

Browse files
authored
Merge pull request #1994 from Automattic/ops/1976-cloudflare-d1-provision
Preserve Durable Object class during D1 cutover
2 parents f042397 + 7d8ec50 commit 46487a4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/runtime-cloudflare/src/worker-d1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { D1RevisionCoordinator } from "./d1-revision-coordinator.js"
2+
export { WordPressStateCoordinator } from "./state-coordinator.js"
23
import type { SiteContext } from "./site-context.js"
34
import { createCloudflareRuntime, type RuntimeEnv } from "./worker.js"
45

tests/cloudflare-runtime.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ test("Cloudflare runtime injects composable coordinators without moving PHP out
343343
const corpus = await readFile(new URL("../packages/runtime-cloudflare/src/wordpress-runtime-corpus.ts", import.meta.url), "utf8")
344344

345345
assert.match(worker, /return await runCoordinatedWordPressRequest\(request, env, coordinator, site, route\.kind\)/)
346+
assert.match(d1Entry, /export \{ WordPressStateCoordinator \} from "\.\/state-coordinator\.js"/)
346347
assert.match(worker, /const cachedRuntimes = new Map/)
347348
assert.match(worker, /cachedRuntimes\.get\(site\.id\)/)
348349
assert.match(worker, /promise\.catch\(\(\) =>/)

0 commit comments

Comments
 (0)