Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(contracts): device hosts as a tagged union with EAS hosts #21842

Mergedjuliusmarmingemerged 8 commits intodevice/webrtc-stream fromrefs/pull/21842/headmerged by juliusmarminge View on GitHub

Showing 13 changed files with 29 additions and 9 deletions (loading 10).

x
0 of 13 viewed, 13 left
6 additions and 1 deletionapps/server/src/device/DeviceService.test.tsModified
View file
@@ -1245,7 +1245,12 @@
const initial = yield* service.state;
expect(yield* update([])).toEqual(initial);
- const host: SshDeviceHostConfig = { id: "remote", label: "Remote", target: "remote-fixture" };
+ const host: SshDeviceHostConfig = {
+ kind: "ssh",
+ id: "remote",
+ label: "Remote",
+ target: "remote-fixture",
+ };
const added = yield* update([host]);
expect(added.hosts.map((entry) => entry.id)).toEqual([LOCAL_DEVICE_HOST_ID, host.id]);
expect(yield* update([{ ...host }])).toEqual(added);
16 additions and 6 deletionsapps/server/src/device/DeviceService.tsModified
View file
@@ -17,6 +17,8 @@
type DeviceSession,
type DeviceShutdownInput,
type DeviceSummary,
+ type DeviceHostConfig,
+ type EasDeviceHostConfig,
type SshDeviceHostConfig,
type DeviceHostSummary,
LOCAL_DEVICE_HOST_ID,
@@ -916,11 +918,11 @@
yield* Effect.context<Effect.Services<ReturnType<typeof SshDeviceHost.make>>>();