Skip to content

Commit 2f06132

Browse files
authored
Fix main CI release checks (#1047)
1 parent 2de1804 commit 2f06132

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

apps/desktop/src/main/sidecar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ export async function attachToSupervisedDaemon(): Promise<SidecarConnection | nu
481481
isReachable: isDaemonReachable,
482482
isPidAlive,
483483
});
484-
if (decision._tag === "Attach") {
484+
if (decision.kind === "attach") {
485485
const { manifest, authToken } = decision;
486486
const origin = manifest.connection.origin;
487487
const url = new URL(origin);
@@ -500,7 +500,7 @@ export async function attachToSupervisedDaemon(): Promise<SidecarConnection | nu
500500
};
501501
}
502502

503-
if (decision._tag === "RemoveStaleManifest") {
503+
if (decision.kind === "remove-stale-manifest") {
504504
removeManifestIfOwnedBy(dataDir, decision.pid);
505505
return null;
506506
}

apps/desktop/src/main/supervised-daemon.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe("resolveSupervisedDaemonAttach", () => {
3232
},
3333
});
3434

35-
expect(decision._tag).toBe("Attach");
35+
expect(decision.kind).toBe("attach");
3636
expect(pidProbeCount).toBe(0);
3737
});
3838

@@ -42,6 +42,6 @@ describe("resolveSupervisedDaemonAttach", () => {
4242
isPidAlive: () => false,
4343
});
4444

45-
expect(decision).toEqual({ _tag: "RemoveStaleManifest", pid: 1234 });
45+
expect(decision).toEqual({ kind: "remove-stale-manifest", pid: 1234 });
4646
});
4747
});

apps/desktop/src/main/supervised-daemon.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ type CliDaemonManifest = ExecutorLocalServerManifest & { readonly kind: "cli-dae
44

55
type SupervisedDaemonAttachDecision =
66
| {
7-
readonly _tag: "Attach";
7+
readonly kind: "attach";
88
readonly manifest: CliDaemonManifest;
99
readonly authToken: string;
1010
}
11-
| { readonly _tag: "RemoveStaleManifest"; readonly pid: number }
12-
| { readonly _tag: "Unavailable" };
11+
| { readonly kind: "remove-stale-manifest"; readonly pid: number }
12+
| { readonly kind: "unavailable" };
1313

1414
export const resolveSupervisedDaemonAttach = async (
1515
manifest: ExecutorLocalServerManifest | null,
@@ -18,18 +18,18 @@ export const resolveSupervisedDaemonAttach = async (
1818
readonly isPidAlive: (pid: number) => boolean;
1919
},
2020
): Promise<SupervisedDaemonAttachDecision> => {
21-
if (!manifest || manifest.kind !== "cli-daemon") return { _tag: "Unavailable" };
21+
if (!manifest || manifest.kind !== "cli-daemon") return { kind: "unavailable" };
2222
const cliManifest = { ...manifest, kind: "cli-daemon" as const };
2323

2424
if (await input.isReachable(cliManifest.connection.origin)) {
2525
const auth = cliManifest.connection.auth;
2626
const authToken = auth && auth.kind === "bearer" ? auth.token : "";
27-
return { _tag: "Attach", manifest: cliManifest, authToken };
27+
return { kind: "attach", manifest: cliManifest, authToken };
2828
}
2929

3030
if (!input.isPidAlive(cliManifest.pid)) {
31-
return { _tag: "RemoveStaleManifest", pid: cliManifest.pid };
31+
return { kind: "remove-stale-manifest", pid: cliManifest.pid };
3232
}
3333

34-
return { _tag: "Unavailable" };
34+
return { kind: "unavailable" };
3535
};

apps/local/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ESNext",
44
"module": "ESNext",
55
"moduleResolution": "bundler",
6+
"allowImportingTsExtensions": true,
67
"strict": true,
78
"esModuleInterop": true,
89
"skipLibCheck": true,

0 commit comments

Comments
 (0)