@swmansion/argent 0.35.1-next.13 → 0.35.1-next.14

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/cli-cmds.mjs CHANGED
@@ -41106,6 +41106,23 @@ ${renderSummary(report, { withDevice: true })}`);
41106
41106
  return exitAfterFlush(report.ok ? 0 : 1);
41107
41107
  }
41108
41108
 
41109
+ // ../argent-cli/src/run-device-env.ts
41110
+ var DEVICE_ENV_VAR = "ARGENT_UDID";
41111
+ var DEVICE_FIELDS = ["udid", "device_id"];
41112
+ function requiredDeviceField(schema) {
41113
+ const properties = schema?.properties ?? {};
41114
+ const required2 = schema?.required ?? [];
41115
+ return DEVICE_FIELDS.find(
41116
+ (name) => required2.includes(name) && properties[name] && !isRetiredField(properties[name])
41117
+ );
41118
+ }
41119
+ function applyDeviceFromEnv(payload, schema, env = process.env) {
41120
+ const deviceId = env[DEVICE_ENV_VAR]?.trim();
41121
+ if (!deviceId) return;
41122
+ const field = requiredDeviceField(schema);
41123
+ if (field && !Object.hasOwn(payload, field)) payload[field] = deviceId;
41124
+ }
41125
+
41109
41126
  // ../argent-cli/src/run.ts
41110
41127
  function splitOptions(argv) {
41111
41128
  let json2 = false;
@@ -41217,6 +41234,9 @@ Examples:
41217
41234
  argent run run-sequence --udid <UDID> --steps-json '[{"tool":"button","args":{"button":"home"}}]'
41218
41235
  argent run gesture-tap --args '{"udid":"<UDID>","x":0.5,"y":0.5}'
41219
41236
 
41237
+ Set ARGENT_UDID to use that device when a tool needs --udid or --device_id
41238
+ and the call does not pass one.
41239
+
41220
41240
  Exits 1 when the tool fails. Also exits 1 when the result reports that the
41221
41241
  call did not do its job: an e2e test that does not pass, an await-ui-element
41222
41242
  or await-network-request wait with success=false, a run-sequence that a step
@@ -41343,6 +41363,7 @@ settled=false or debugger-status's not_connected.
41343
41363
  for (const [k, v] of Object.entries(parsed.args)) {
41344
41364
  payload[k] = v;
41345
41365
  }
41366
+ applyDeviceFromEnv(payload, schema);
41346
41367
  const missing = findMissingRequired(payload, schema);
41347
41368
  if (missing.length > 0) {
41348
41369
  await failValidation({ missing, invalid: [], rawIssues: null }, "cli_run_required_flags");
@@ -75028,6 +75028,12 @@ var import_semver2 = __toESM(require_semver2());
75028
75028
  // ../tool-server/package.json
75029
75029
  var version2 = "0.35.0";
75030
75030
 
75031
+ // ../tool-server/src/utils/update-check-env.ts
75032
+ function isUpdateCheckDisabled() {
75033
+ const raw = process.env.ARGENT_DISABLE_UPDATE_CHECK;
75034
+ return raw === "1" || raw?.toLowerCase() === "true";
75035
+ }
75036
+
75031
75037
  // ../tool-server/src/utils/update-checker.ts
75032
75038
  var import_update_core = __toESM(require_dist7());
75033
75039
  init_src();
@@ -75127,6 +75133,10 @@ function startUpdateChecker(options = {}) {
75127
75133
  if (interval) {
75128
75134
  clearInterval(interval);
75129
75135
  }
75136
+ if (isUpdateCheckDisabled()) {
75137
+ return { dispose() {
75138
+ } };
75139
+ }
75130
75140
  check2(options, generation).catch(() => {
75131
75141
  });
75132
75142
  const lifecycleInterval = setInterval(() => {
@@ -78920,6 +78930,7 @@ var updateArgentTool = {
78920
78930
  id: "update-argent",
78921
78931
  description: "Apply a pending Argent update. Call this only when the user has explicitly consented in this conversation to updating Argent, e.g. after an update notification reports a new version. Returns { message } with the update status, version info, and whether the tool server restarts. Fails if no update is available or an update is already in progress.",
78922
78932
  zodSchema,
78933
+ hideWhen: isUpdateCheckDisabled,
78923
78934
  interaction: {
78924
78935
  startedMsg: () => `Updating Argent to ${getUpdateState().installableVersion ?? "latest"}`,
78925
78936
  completedMsg: () => `Updated Argent to ${getUpdateState().installableVersion ?? "latest"}`,
@@ -173423,6 +173434,7 @@ var dismissUpdateTool = {
173423
173434
  id: "dismiss-update",
173424
173435
  description: "Postpone the Argent update reminder and the automatic update, on every tool-server on this machine, when the user wants it later or tomorrow, wants it stopped, or never wants it (87600 hours). Installs nothing. A memory or a reminder of your own does not change it. Returns { message, remindersResumeAt, persisted, pendingVersion }: tell the user when reminders resume, and if persisted is false, that it did not fully hold.",
173425
173436
  zodSchema: zodSchema79,
173437
+ hideWhen: isUpdateCheckDisabled,
173426
173438
  interaction: {
173427
173439
  startedMsg: () => "Dismissing Argent update",
173428
173440
  completedMsg: () => "Dismissed Argent update",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.35.1-next.13",
3
+ "version": "0.35.1-next.14",
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": "eb7163afb29cd09a2d784f78f33cc51cdd9e8edb"
101
+ "gitHead": "417672a11432f176fd4c1c28da3babc53057b58e"
102
102
  }