Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(client): reduce remote request and message sync overhead #11029

MergedBil0000(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/11029/headmerged by juliusmarminge View on GitHub

Showing 12 changed files with 30 additions and 16 deletions (loading 9).

x
0 of 12 viewed, 12 left
13 additions and 13 deletionspackages/client-runtime/src/authorization/remote.tsModified
View file
@@ -11,7 +11,7 @@
import { environmentEndpointUrl } from "../environment/endpoint.ts";
import {
executeEnvironmentHttpRequest,
- makeEnvironmentHttpApiClient,
+ makeEnvironmentHttpApiGroupClient,
type RemoteEnvironmentRequestError,
} from "../rpc/http.ts";
​
@@ -93,11 +93,11 @@
readonly dpopProof: string;
readonly timeoutMs?: number;
}) {
- const client = yield* makeEnvironmentHttpApiClient(input.httpBaseUrl);
+ const client = yield* makeEnvironmentHttpApiGroupClient(input.httpBaseUrl, "auth");
const response = yield* executeEnvironmentHttpRequest(
environmentEndpointUrl(input.httpBaseUrl, "/oauth/token"),
input.timeoutMs ?? DEFAULT_REMOTE_REQUEST_TIMEOUT_MS,
- client.auth.token({
+ client.token({
headers: { dpop: input.dpopProof },
payload: {
grant_type: AuthTokenExchangeGrantType,
@@ -121,11 +121,11 @@
readonly clientMetadata?: AuthClientPresentationMetadata;
readonly timeoutMs?: number;
}) {
- const client = yield* makeEnvironmentHttpApiClient(input.httpBaseUrl);