serve-sim 0.1.34 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serve-sim",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Evan Bacon",
package/src/middleware.ts CHANGED
@@ -466,9 +466,9 @@ function listAllSimulators(): SimctlDevice[] {
466
466
  const data = JSON.parse(output) as SimctlAllList;
467
467
  const out: SimctlDevice[] = [];
468
468
  for (const [runtime, devices] of Object.entries(data.devices)) {
469
- // Only iOS (skip watchOS / tvOS / visionOS for the grid MVP — the helper
470
- // is iOS-focused and the bezel/touch model assumes a phone-shaped device).
471
- if (!/SimRuntime\.iOS-/i.test(runtime)) continue;
469
+ // Keep this to touch-capable simulator families that serve-sim can frame
470
+ // and inject into. tvOS is intentionally left out for now.
471
+ if (!/SimRuntime\.(iOS|watchOS|visionOS|xrOS)-/i.test(runtime)) continue;
472
472
  for (const d of devices) {
473
473
  if (d.isAvailable === false) continue;
474
474
  out.push({ ...d, runtime: runtime.replace(/^.*SimRuntime\./, "") });
@@ -748,7 +748,7 @@ export function simMiddleware(options?: SimMiddlewareOptions) {
748
748
  return;
749
749
  }
750
750
 
751
- // Grid JSON: every iOS simulator, annotated with running helper info if any.
751
+ // Grid JSON: every supported simulator, annotated with running helper info if any.
752
752
  if (url === base + "/grid/api") {
753
753
  const states = readServeSimStates();
754
754
  const helperByUdid = new Map(states.map((s) => [s.device, s] as const));