Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shared): install the relay client on Windows ARM64 #16715

ClosedRigoGarcia-ai(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/16715/headopened View on GitHub

Showing 2 changed files with 52 additions and 5 deletions.

x
0 of 2 viewed, 2 left
42 additions and 0 deletionspackages/shared/src/relayClient.test.tsModified
View file
@@ -199,6 +199,48 @@
​
+ 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* RelayClient.makeCloudflaredRelayClient({ baseDir });
+​
+ expect(yield* manager.resolve).toEqual({
+ status: "missing",
+ version: RelayClient.CLOUDFLARED_VERSION,
+ });
+ const error = yield* manager.install.pipe(Effect.flip);
+ expect(requestedUrls).toEqual([
+ `https://github.com/cloudflare/cloudflared/releases/download/${RelayClient.CLOUDFLARED_VERSION}/cloudflared-windows-amd64.exe`,
+ ]);
+ expect(error).toBeInstanceOf(RelayClient.RelayClientInstallError);
+ expect(error.reason).toBe("invalid_checksum");
+ }).pipe(
+ Effect.scoped,
+ Effect.provide(
+ Layer.mergeAll(
+ NodeServices.layer,
+ Layer.succeed(
+ HttpClient.HttpClient,