From a8c8572fa0e10042dcd8cbc3f9e8129a6b9bf65a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 6 Jun 2026 16:35:08 +0000 Subject: [PATCH] Tighten relay lock Effect types Co-authored-by: Julius Marminge --- packages/shared/src/relayClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/shared/src/relayClient.ts b/packages/shared/src/relayClient.ts index 8e3edb780c..3bc6e8f000 100644 --- a/packages/shared/src/relayClient.ts +++ b/packages/shared/src/relayClient.ts @@ -367,7 +367,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function const isInstallLockStale = Effect.fn("cloudflared.isInstallLockStale")(function* ( lockPath: string, - ) { + ): Effect.fn.Return { const lockInfo = yield* fileSystem.stat(lockPath).pipe(Effect.option); const lockModifiedAt = Option.flatMap(lockInfo, (info) => info.mtime); if (Option.isNone(lockModifiedAt)) return false; @@ -379,7 +379,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function const attemptAcquireInstallLock = Effect.fn("cloudflared.attemptAcquireInstallLock")(function* ( lockPath: string, - ) { + ): Effect.fn.Return { const acquired = yield* fileSystem.writeFileString(lockPath, "", { flag: "wx" }).pipe( Effect.as(true), Effect.catch((error) => @@ -398,7 +398,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function const acquireInstallLock = Effect.fn("cloudflared.acquireInstallLock")(function* ( lockPath: string, - ) { + ): Effect.fn.Return { return yield* attemptAcquireInstallLock(lockPath).pipe( Effect.retry(retryWhileInstallLockBusy), Effect.catchTag("RelayClientInstallLockBusy", () => @@ -414,7 +414,7 @@ export const makeCloudflaredRelayClient = Effect.fn("cloudflared.make")(function const installUnlocked = Effect.fn("cloudflared.installUnlocked")(function* ( report: (stage: RelayClientInstallProgressStage) => Effect.Effect, - ) { + ): Effect.fn.Return { yield* report("checking"); const existing = yield* resolve; if (existing.status === "available") return existing;