Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): install the T3 Connect relay client on Windows ARM64 #14840

Closedzachspartofaday(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/14840/headopened View on GitHub

Showing 2 changed files with 47 additions and 5 deletions.

x
0 of 2 viewed, 2 left
38 additions and 0 deletionspackages/shared/src/relayClient.test.tsModified
View file
@@ -203,6 +203,44 @@
​
+ it.effect("downloads the pinned x64 Windows asset on Windows ARM64", () => {
+ const requestedUrls: Array<string> = [];
+ return Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const baseDir = yield* fileSystem.makeTempDirectoryScoped({
+ prefix: "t3-cloudflared-test-",
+ });
+ const manager = yield* makeCloudflaredRelayClient({ baseDir });
+​
+ expect(yield* manager.resolve).toEqual({ status: "missing", version: CLOUDFLARED_VERSION });
+ const error = yield* manager.install.pipe(Effect.flip);
+ expect(requestedUrls).toEqual([
+ `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-windows-amd64.exe`,
+ ]);
+ expect(error.reason).toBe("invalid_checksum");
+ }).pipe(
+ Effect.scoped,
+ Effect.provide(
+ Layer.mergeAll(
+ NodeServices.layer,
+ Layer.succeed(
+ HttpClient.HttpClient,
+ HttpClient.make((request) =>
+ Effect.sync(() => {
+ requestedUrls.push(request.url);
+ return HttpClientResponse.fromWeb(request, new Response(new Uint8Array()));