@stim-cli/server 1.20.1 → 1.21.0

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.
@@ -64,6 +64,7 @@ public enum ProcessStream {
64
64
  arguments: [String],
65
65
  cwd: String,
66
66
  environment: [String: String]? = nil,
67
+ standardInput: FileHandle? = nil,
67
68
  onLine: @escaping @Sendable (OutputLine) -> Void,
68
69
  onExit: @escaping @Sendable (Int32) -> Void
69
70
  ) throws -> Process {
@@ -72,7 +73,7 @@ public enum ProcessStream {
72
73
  process.arguments = arguments
73
74
  process.currentDirectoryURL = URL(fileURLWithPath: cwd)
74
75
  if let environment { process.environment = environment }
75
- process.standardInput = FileHandle.nullDevice
76
+ process.standardInput = standardInput ?? FileHandle.nullDevice
76
77
  let out = Pipe()
77
78
  let err = Pipe()
78
79
  process.standardOutput = out
@@ -190,12 +190,6 @@ public enum SimulatorPosture {
190
190
  /// call it off the main thread.
191
191
  public static func isAvailable(udid: String) -> Bool { connection(udid: udid) != nil }
192
192
 
193
- /// The posture Stim Desktop last moved this simulator to, if any.
194
- public static func lastPosture(udid: String) -> DuoPosture? {
195
- guard let angle = lastAngle(udid: udid) else { return nil }
196
- return DuoPosture.allCases.first { $0.hingeAngle == angle }
197
- }
198
-
199
193
  /// The hinge angle Stim Desktop last moved this simulator to, in degrees.
200
194
  public static func lastAngle(udid: String) -> Double? {
201
195
  lock.lock()