@swmansion/argent 0.33.1-next.18 → 0.33.1-next.19

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
@@ -36069,7 +36069,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
36069
36069
  var SESSION_ID2 = randomUUID5();
36070
36070
  function readCliVersion() {
36071
36071
  if (true) {
36072
- return "0.33.1-next.18";
36072
+ return "0.33.1-next.19";
36073
36073
  }
36074
36074
  return "0.0.0";
36075
36075
  }
@@ -16986,7 +16986,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16986
16986
  var SESSION_ID = randomUUID4();
16987
16987
  function readCliVersion() {
16988
16988
  if (true) {
16989
- return "0.33.1-next.18";
16989
+ return "0.33.1-next.19";
16990
16990
  }
16991
16991
  return "0.0.0";
16992
16992
  }
@@ -101278,7 +101278,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
101278
101278
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
101279
101279
  function readCliVersion() {
101280
101280
  if (true) {
101281
- return "0.33.1-next.18";
101281
+ return "0.33.1-next.19";
101282
101282
  }
101283
101283
  return "0.0.0";
101284
101284
  }
@@ -152326,6 +152326,8 @@ function parseResolvedActivity(raw) {
152326
152326
  if (/^android\/.*(Resolver|Chooser)Activity$/.test(last)) return null;
152327
152327
  return last;
152328
152328
  }
152329
+ var LAUNCHER = "android.intent.category.LAUNCHER";
152330
+ var LEANBACK_LAUNCHER = "android.intent.category.LEANBACK_LAUNCHER";
152329
152331
  async function resolveLauncherActivity(udid, bundleId, isTv = false) {
152330
152332
  let lastRaw = "";
152331
152333
  const resolveFor = async (category) => {
@@ -152339,11 +152341,11 @@ async function resolveLauncherActivity(udid, bundleId, isTv = false) {
152339
152341
  return parseResolvedActivity(raw);
152340
152342
  };
152341
152343
  if (isTv) {
152342
- const leanback = await resolveFor("android.intent.category.LEANBACK_LAUNCHER");
152343
- if (leanback) return leanback;
152344
+ const leanback = await resolveFor(LEANBACK_LAUNCHER);
152345
+ if (leanback) return { component: leanback, category: LEANBACK_LAUNCHER };
152344
152346
  }
152345
152347
  const launcher = await resolveFor();
152346
- if (launcher) return launcher;
152348
+ if (launcher) return { component: launcher, category: LAUNCHER };
152347
152349
  const pmPath = await adbShell(udid, `pm path ${shellQuote2(bundleId)}; true`);
152348
152350
  throw new FailureError(
152349
152351
  `Could not resolve a ${isTv ? "LEANBACK_LAUNCHER or LAUNCHER" : "LAUNCHER"} activity for ${bundleId}. ` + (pmPath.includes("package:") ? `It is installed but declares no such activity: pass an explicit \`activity\`. ` : `It is not installed on ${udid}: install it with \`reinstall-app\`. `) + `(resolve-activity output: ${lastRaw.trim() || "empty"})`,
@@ -152367,17 +152369,22 @@ async function followNativeNetworkCapture(udid, bundleId) {
152367
152369
  return {};
152368
152370
  }
152369
152371
  }
152372
+ function launcherStartArgs(category) {
152373
+ return category ? ` -a android.intent.action.MAIN -c ${shellQuote2(category)}` : "";
152374
+ }
152370
152375
  var androidImpl = {
152371
152376
  requires: ["adb"],
152372
152377
  handler: async (_services, params) => {
152373
152378
  let component;
152379
+ let category = null;
152374
152380
  if (params.activity) {
152375
152381
  component = normalizeActivityComponent(params.bundleId, params.activity);
152376
152382
  } else {
152377
152383
  const isTv = await isAndroidTv(params.udid);
152378
- component = await resolveLauncherActivity(params.udid, params.bundleId, isTv);
152384
+ ({ component, category } = await resolveLauncherActivity(params.udid, params.bundleId, isTv));
152379
152385
  }
152380
- const out = await adbShell(params.udid, `am start -W -n ${shellQuote2(component)}`, {
152386
+ const start2 = `am start -W${launcherStartArgs(category)} -n ${shellQuote2(component)}`;
152387
+ const out = await adbShell(params.udid, start2, {
152381
152388
  timeoutMs: 3e4
152382
152389
  });
152383
152390
  assertAmStartOk(out);
@@ -152795,13 +152802,15 @@ var androidImpl2 = {
152795
152802
  const { udid, bundleId, activity } = params;
152796
152803
  await adbShell(udid, `am force-stop ${shellQuote2(bundleId)}`, { timeoutMs: 15e3 });
152797
152804
  let component;
152805
+ let category = null;
152798
152806
  if (activity) {
152799
152807
  component = normalizeActivityComponent(bundleId, activity);
152800
152808
  } else {
152801
152809
  const isTv = await isAndroidTv(udid);
152802
- component = await resolveLauncherActivity(udid, bundleId, isTv);
152810
+ ({ component, category } = await resolveLauncherActivity(udid, bundleId, isTv));
152803
152811
  }
152804
- const out = await adbShell(udid, `am start -W -n ${shellQuote2(component)}`, {
152812
+ const start2 = `am start -W${launcherStartArgs(category)} -n ${shellQuote2(component)}`;
152813
+ const out = await adbShell(udid, start2, {
152805
152814
  timeoutMs: 3e4
152806
152815
  });
152807
152816
  try {
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.33.1-next.18",
3
+ "version": "0.33.1-next.19",
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",