@swmansion/argent 0.34.1-next.103 → 0.34.1-next.105

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/cli-cmds.mjs CHANGED
@@ -38575,7 +38575,7 @@ function isCi(env = process.env) {
38575
38575
  var SESSION_ID2 = randomUUID5();
38576
38576
  function readCliVersion() {
38577
38577
  if (true) {
38578
- return "0.34.1-next.103";
38578
+ return "0.34.1-next.105";
38579
38579
  }
38580
38580
  return "0.0.0";
38581
38581
  }
@@ -16998,7 +16998,7 @@ function isCi(env = process.env) {
16998
16998
  var SESSION_ID = randomUUID4();
16999
16999
  function readCliVersion() {
17000
17000
  if (true) {
17001
- return "0.34.1-next.103";
17001
+ return "0.34.1-next.105";
17002
17002
  }
17003
17003
  return "0.0.0";
17004
17004
  }
@@ -72948,7 +72948,7 @@ function isCi(env = process.env) {
72948
72948
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
72949
72949
  function readCliVersion() {
72950
72950
  if (true) {
72951
- return "0.34.1-next.103";
72951
+ return "0.34.1-next.105";
72952
72952
  }
72953
72953
  return "0.0.0";
72954
72954
  }
@@ -131909,6 +131909,37 @@ var import_node_child_process37 = require("node:child_process");
131909
131909
  var import_node_util27 = require("node:util");
131910
131910
  init_src2();
131911
131911
  init_external_devices();
131912
+
131913
+ // ../tool-server/src/utils/ios-front-app.ts
131914
+ var IN_FRONT_TIMEOUT_MS = 5e3;
131915
+ var IN_FRONT_POLL_MS = 100;
131916
+ async function awaitIosAppInFront(registry2, device, bundleId, signal) {
131917
+ const deadline = Date.now() + IN_FRONT_TIMEOUT_MS;
131918
+ const remaining = () => deadline - Date.now();
131919
+ if (signal?.aborted) return;
131920
+ const tv = await settleWithin(
131921
+ isTvOsSimulator(device.id).catch(() => false),
131922
+ remaining(),
131923
+ signal
131924
+ );
131925
+ if (tv.type !== "value" || tv.value || remaining() <= 0) return;
131926
+ const ref = axServiceRef(device);
131927
+ const service = await settleWithin(
131928
+ registry2.resolveService(ref.urn, ref.options),
131929
+ remaining(),
131930
+ signal
131931
+ );
131932
+ if (service.type !== "value") return;
131933
+ const frontBundleId = async () => (await service.value.foregroundApp()).bundleId;
131934
+ while (remaining() > 0) {
131935
+ const front = await settleWithin(frontBundleId(), remaining(), signal);
131936
+ if (front.type !== "value" || front.value === bundleId) return;
131937
+ const delay3 = Math.min(IN_FRONT_POLL_MS, remaining());
131938
+ if (delay3 <= 0 || !await sleepOrAbort(delay3, signal)) return;
131939
+ }
131940
+ }
131941
+
131942
+ // ../tool-server/src/tools/launch-app/platforms/ios.ts
131912
131943
  var execFileAsync27 = (0, import_node_util27.promisify)(import_node_child_process37.execFile);
131913
131944
  function makeIosImpl(registry2) {
131914
131945
  return {
@@ -131970,6 +132001,7 @@ function makeIosImpl(registry2) {
131970
132001
  { cause: err instanceof Error ? err : new Error(String(err)) }
131971
132002
  );
131972
132003
  }
132004
+ await awaitIosAppInFront(registry2, device, params.bundleId, options?.signal);
131973
132005
  const capture = nativeDevtools ? await settleWithin(
131974
132006
  nativeDevtools.networkCaptureAfterLaunch(params.bundleId),
131975
132007
  void 0,
@@ -132516,6 +132548,7 @@ function makeIosImpl2(registry2) {
132516
132548
  { cause: err instanceof Error ? err : new Error(String(err)) }
132517
132549
  );
132518
132550
  }
132551
+ await awaitIosAppInFront(registry2, device, bundleId, options?.signal);
132519
132552
  const capture = nativeDevtools ? await settleWithin(
132520
132553
  nativeDevtools.networkCaptureAfterLaunch(bundleId),
132521
132554
  void 0,
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.34.1-next.103",
3
+ "version": "0.34.1-next.105",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
6
6
  "license": "Apache-2.0",
@@ -98,5 +98,5 @@
98
98
  "vitest": "^5.0.5",
99
99
  "yaml": "^2.9.1"
100
100
  },
101
- "gitHead": "7ee60ff2dde6677a5555a0898b092bde0d9e1b41"
101
+ "gitHead": "c89f0f6d8b61a8cd09c9264a21ebae1c753936c9"
102
102
  }