@palgroup/simstream 0.6.0 → 0.7.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.
package/dist/index.d.ts CHANGED
@@ -183,6 +183,14 @@ export declare class SimStream {
183
183
  screen?: string;
184
184
  variant?: string;
185
185
  }): Promise<void>;
186
+ /**
187
+ * Press one of the simulator's hardware buttons.
188
+ *
189
+ * ‼️ A VIEWER EMBEDDED IN A PANEL CANNOT REACH THESE. The viewer page carries touch and keyboard,
190
+ * but home, lock and siri are the device's own buttons and live outside the screen it draws — so a
191
+ * customer showing the simulator inside their own product has no way to send them without this.
192
+ */
193
+ pressButton(session: string, button: 'home' | 'lock' | 'siri'): Promise<void>;
186
194
  /**
187
195
  * The language and theme the app renders in, changed live.
188
196
  *
package/dist/index.js CHANGED
@@ -163,6 +163,18 @@ class SimStream {
163
163
  if (res.status !== 200)
164
164
  throw await this.errorFor(res);
165
165
  }
166
+ /**
167
+ * Press one of the simulator's hardware buttons.
168
+ *
169
+ * ‼️ A VIEWER EMBEDDED IN A PANEL CANNOT REACH THESE. The viewer page carries touch and keyboard,
170
+ * but home, lock and siri are the device's own buttons and live outside the screen it draws — so a
171
+ * customer showing the simulator inside their own product has no way to send them without this.
172
+ */
173
+ async pressButton(session, button) {
174
+ const res = await this.request('POST', '/api/session/button', { session, button });
175
+ if (res.status !== 200)
176
+ throw await this.errorFor(res);
177
+ }
166
178
  /**
167
179
  * The language and theme the app renders in, changed live.
168
180
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palgroup/simstream",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Start and drive remote iOS simulator sessions.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",