Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): discover iOS simulators before their first boot #24027

ClosednateEc(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/24027/headopened View on GitHub

Showing 6 changed files with 68 additions and 10 deletions (loading 4).

x
0 of 6 viewed, 6 left
67 additions and 9 deletionsapps/server/src/device/DeviceHubOperations.tsModified
View file
@@ -8,6 +8,7 @@
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
import * as Schema from "effect/Schema";
+import * as Result from "effect/Result";
import { HttpClient, HttpClientError, HttpClientRequest, HttpClientResponse } from "effect/http";
​
import type { DeviceHostReady, DeviceOperations, HostDevice } from "./DeviceHost.ts";
@@ -35,6 +36,22 @@
Schema.Array(Schema.Struct({ message: Schema.String, error: Schema.optional(Schema.String) })),
),
});
+const SimctlDeviceList = Schema.fromJsonString(
+ Schema.Struct({
+ devices: Schema.Record(
+ Schema.String,
+ Schema.Array(
+ Schema.Struct({
+ udid: Schema.String,
+ name: Schema.String,
+ state: Schema.String,
+ isAvailable: Schema.Boolean,
+ }),
+ ),
+ ),
+ }),
+);
+const decodeSimctlDeviceList = Schema.decodeUnknownEffect(SimctlDeviceList);
const HubActionResult = Schema.Struct({