refactor(client): sign relay request URLs built from the HttpApi contract (#17602)
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a1db449fe4
commit
0e7abea7c9
9 files changed
+41
-52
No files matched your search
@@ -13,10 +13,7 @@ import { HttpClient } from "effect/http";
|
||||
import * as RemoteEnvironmentAuthorization from "../authorization/service.ts";
|
||||
import type { PreparedConnection } from "../connection/model.ts";
|
||||
import * as ManagedRelay from "../relay/managedRelay.ts";
|
||||
import {
|
||||
makeEnvironmentHttpApiUrlBuilder,
|
||||
type RemoteEnvironmentRequestError,
|
||||
} from "../rpc/http.ts";
|
||||
import { type RemoteEnvironmentRequestError } from "../rpc/http.ts";
|
||||
import { executeAuthenticatedEnvironmentHttpRequest } from "./environmentHttpAuth.ts";
|
||||
|
||||
const DEFAULT_PULL_REQUEST_DIFF_TIMEOUT_MS = 60_000;
|
||||
@@ -54,7 +51,7 @@ export const fetchEnvironmentPullRequestDiff = Effect.fn(
|
||||
...input,
|
||||
group: "pullRequests",
|
||||
method: "POST",
|
||||
url: (httpBaseUrl) => makeEnvironmentHttpApiUrlBuilder(httpBaseUrl).pullRequests.diff(),
|
||||
url: (urls) => urls.diff(),
|
||||
timeoutMs: input.timeoutMs ?? DEFAULT_PULL_REQUEST_DIFF_TIMEOUT_MS,
|
||||
request: ({ client, headers }) => client.diff({ payload: input.diff, headers }),
|
||||
}).pipe(
|
||||
|
||||
Reference in new issue
Block a user