@yoqa/cli 0.3.23 → 0.3.24

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/main.js +32 -4
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -7174,6 +7174,31 @@ function formatRunReportGithubSummary(doc) {
7174
7174
  return lines.join(`
7175
7175
  `);
7176
7176
  }
7177
+ // ../runner-client/src/xml-entities.ts
7178
+ var NAMED = {
7179
+ amp: "&",
7180
+ lt: "<",
7181
+ gt: ">",
7182
+ quot: '"',
7183
+ apos: "'"
7184
+ };
7185
+ function decodeXmlEntities(value) {
7186
+ return value.replace(/&(#x[0-9a-fA-F]+|#\d+|[a-zA-Z][a-zA-Z0-9]+);/g, (entity, body) => {
7187
+ if (body.startsWith("#")) {
7188
+ const code = body[1] === "x" || body[1] === "X" ? Number.parseInt(body.slice(2), 16) : Number.parseInt(body.slice(1), 10);
7189
+ if (!Number.isFinite(code) || code < 0 || code > 1114111) {
7190
+ return entity;
7191
+ }
7192
+ try {
7193
+ return String.fromCodePoint(code);
7194
+ } catch {
7195
+ return entity;
7196
+ }
7197
+ }
7198
+ return NAMED[body] ?? entity;
7199
+ });
7200
+ }
7201
+
7177
7202
  // ../runner-client/src/shell-script.ts
7178
7203
  function shellSingleQuote(value) {
7179
7204
  return `'${value.replace(/'/g, `'\\''`)}'`;
@@ -7460,12 +7485,15 @@ function sleepMs(ms, signal) {
7460
7485
  signal?.addEventListener("abort", onAbort, { once: true });
7461
7486
  });
7462
7487
  }
7488
+ function normalizedLabel(value) {
7489
+ return decodeXmlEntities(value ?? "").trim().toLowerCase();
7490
+ }
7463
7491
  function screenHasText(elements, text) {
7464
- const needle = text.trim().toLowerCase();
7492
+ const needle = normalizedLabel(text);
7465
7493
  if (!needle)
7466
7494
  return false;
7467
7495
  return (elements ?? []).some((el) => {
7468
- const label = el.label?.toLowerCase() ?? "";
7496
+ const label = normalizedLabel(el.label);
7469
7497
  const type = el.type?.toLowerCase() ?? "";
7470
7498
  return label.includes(needle) || type.includes(needle);
7471
7499
  });
@@ -8015,7 +8043,7 @@ var {
8015
8043
  // package.json
8016
8044
  var package_default = {
8017
8045
  name: "@yoqa/cli",
8018
- version: "0.3.23",
8046
+ version: "0.3.24",
8019
8047
  description: "Yoqa CLI — drive local mobile QA from the terminal or CI (talks to the Yoqa runner over HTTP)",
8020
8048
  license: "UNLICENSED",
8021
8049
  type: "module",
@@ -8053,7 +8081,7 @@ var package_default = {
8053
8081
  health: "bun run src/main.ts health"
8054
8082
  },
8055
8083
  dependencies: {
8056
- "@yoqa/runner": "0.3.23"
8084
+ "@yoqa/runner": "0.3.24"
8057
8085
  },
8058
8086
  devDependencies: {
8059
8087
  "@types/node": "^22.15.30",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoqa/cli",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "Yoqa CLI — drive local mobile QA from the terminal or CI (talks to the Yoqa runner over HTTP)",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "health": "bun run src/main.ts health"
39
39
  },
40
40
  "dependencies": {
41
- "@yoqa/runner": "0.3.23"
41
+ "@yoqa/runner": "0.3.24"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.15.30",