@yoqa/runner 0.3.15 → 0.3.16

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16801,7 +16801,7 @@ function getCatalogDb() {
16801
16801
  // package.json
16802
16802
  var package_default = {
16803
16803
  name: "@yoqa/runner",
16804
- version: "0.3.15",
16804
+ version: "0.3.16",
16805
16805
  description: "Yoqa local runner \u2014 Appium + catalog HTTP API (Bun). Start with yoqa serve or the yoqa-runner bin.",
16806
16806
  license: "UNLICENSED",
16807
16807
  type: "module",
@@ -17020,6 +17020,9 @@ function mergeCapabilities(appCaps, caseCaps) {
17020
17020
  function looksLikePhysicalIosUdid(udid) {
17021
17021
  return /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{16}$/.test(udid.trim());
17022
17022
  }
17023
+ function iosSessionCreateTimeoutMs(deviceId) {
17024
+ return looksLikePhysicalIosUdid(deviceId) ? 60000 : 240000;
17025
+ }
17023
17026
  async function buildW3cCapabilities(options, mjpegPort) {
17024
17027
  const merged = mergeCapabilities(options.appCaps, options.caseCaps);
17025
17028
  const platformName = options.platform === "ios" ? "iOS" : "Android";
@@ -17038,28 +17041,32 @@ async function buildW3cCapabilities(options, mjpegPort) {
17038
17041
  if (options.platform === "android" && options.appPackage && !caps["appium:appPackage"]) {
17039
17042
  caps["appium:appPackage"] = options.appPackage;
17040
17043
  }
17041
- if (options.platform === "ios" && looksLikePhysicalIosUdid(options.deviceId)) {
17042
- const prep = await loadDevicePrep(options.deviceId);
17043
- if (!prep) {
17044
- throw new Error(`iOS device ${options.deviceId} is not prepared. Run device setup so WebDriverAgent is installed before starting a run.`);
17045
- }
17046
- if (caps["appium:usePreinstalledWDA"] === undefined) {
17047
- caps["appium:usePreinstalledWDA"] = true;
17048
- }
17049
- if (!caps["appium:updatedWDABundleId"]) {
17050
- caps["appium:updatedWDABundleId"] = prep.bundleId;
17051
- }
17052
- if (!caps["appium:xcodeOrgId"]) {
17053
- caps["appium:xcodeOrgId"] = prep.developmentTeam;
17054
- }
17055
- if (!caps["appium:xcodeSigningId"]) {
17056
- caps["appium:xcodeSigningId"] = "Apple Development";
17044
+ if (options.platform === "ios") {
17045
+ const physical = looksLikePhysicalIosUdid(options.deviceId);
17046
+ if (physical) {
17047
+ const prep = await loadDevicePrep(options.deviceId);
17048
+ if (!prep) {
17049
+ throw new Error(`iOS device ${options.deviceId} is not prepared. Run device setup so WebDriverAgent is installed before starting a run.`);
17050
+ }
17051
+ if (caps["appium:usePreinstalledWDA"] === undefined) {
17052
+ caps["appium:usePreinstalledWDA"] = true;
17053
+ }
17054
+ if (!caps["appium:updatedWDABundleId"]) {
17055
+ caps["appium:updatedWDABundleId"] = prep.bundleId;
17056
+ }
17057
+ if (!caps["appium:xcodeOrgId"]) {
17058
+ caps["appium:xcodeOrgId"] = prep.developmentTeam;
17059
+ }
17060
+ if (!caps["appium:xcodeSigningId"]) {
17061
+ caps["appium:xcodeSigningId"] = "Apple Development";
17062
+ }
17057
17063
  }
17064
+ const wdaTimeoutMs = iosSessionCreateTimeoutMs(options.deviceId);
17058
17065
  if (caps["appium:wdaLaunchTimeout"] === undefined) {
17059
- caps["appium:wdaLaunchTimeout"] = 60000;
17066
+ caps["appium:wdaLaunchTimeout"] = wdaTimeoutMs;
17060
17067
  }
17061
17068
  if (caps["appium:wdaConnectionTimeout"] === undefined) {
17062
- caps["appium:wdaConnectionTimeout"] = 60000;
17069
+ caps["appium:wdaConnectionTimeout"] = wdaTimeoutMs;
17063
17070
  }
17064
17071
  if (caps["appium:waitForIdleTimeout"] === undefined) {
17065
17072
  caps["appium:waitForIdleTimeout"] = 0;
@@ -17285,14 +17292,16 @@ async function createDeviceSession(options) {
17285
17292
  const port = await ensureAppiumServer();
17286
17293
  const mjpegPort = await pickMjpegPort();
17287
17294
  const capabilities = await buildW3cCapabilities(options, mjpegPort);
17295
+ const simulatorIos = options.platform === "ios" && !looksLikePhysicalIosUdid(options.deviceId);
17296
+ const sessionCreateTimeoutMs = simulatorIos ? iosSessionCreateTimeoutMs(options.deviceId) : 60000;
17288
17297
  const browser = await remote({
17289
17298
  hostname: APPIUM_HOST,
17290
17299
  port,
17291
17300
  path: "/",
17292
17301
  capabilities,
17293
17302
  logLevel: "silent",
17294
- connectionRetryCount: 2,
17295
- connectionRetryTimeout: 60000
17303
+ connectionRetryCount: simulatorIos ? 0 : 2,
17304
+ connectionRetryTimeout: sessionCreateTimeoutMs
17296
17305
  });
17297
17306
  await applyMjpegSettings(browser, {
17298
17307
  platform: options.platform,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoqa/runner",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Yoqa local runner — Appium + catalog HTTP API (Bun). Start with yoqa serve or the yoqa-runner bin.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",