sootsim 0.1.214 → 0.1.216
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/detox/index.ts +30 -16
- package/dist-cli/bin.js +4 -4
- package/dist-cli/chunks/{agent-QE4ZAHV2.js → agent-RMGUE35J.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-E5HCJNYH.js → agent-wrapper-PNKMWDVX.js} +2 -2
- package/dist-cli/chunks/{app-fonts-4ADYMRQO.js → app-fonts-Z6SGSVKJ.js} +2 -2
- package/dist-cli/chunks/{assert-QZSX66RW.js → assert-ELIDRXY7.js} +2 -2
- package/dist-cli/chunks/{auth-LW224VBS.js → auth-2NJA7QI6.js} +2 -2
- package/dist-cli/chunks/beta-MTYUL7U7.js +2 -0
- package/dist-cli/chunks/{camera-MPIQ3JAA.js → camera-XICNRGGO.js} +2 -2
- package/dist-cli/chunks/{chunk-3CNHHY7U.js → chunk-2FNN7T63.js} +1 -1
- package/dist-cli/chunks/{chunk-USSUXBPG.js → chunk-4BUASWNE.js} +1 -1
- package/dist-cli/chunks/{chunk-I4UH6RI5.js → chunk-4XCGYTBN.js} +2 -2
- package/dist-cli/chunks/chunk-5LT4NR6Y.js +1 -0
- package/dist-cli/chunks/chunk-6KRC622O.js +1 -0
- package/dist-cli/chunks/{chunk-Z6X2QRA3.js → chunk-6TZMBHQ5.js} +3 -3
- package/dist-cli/chunks/{chunk-4RHFQCED.js → chunk-7SPHDLSB.js} +2 -2
- package/dist-cli/chunks/{chunk-6QMGV5H7.js → chunk-AWSL2LAA.js} +2 -2
- package/dist-cli/chunks/{chunk-L3CQVAWX.js → chunk-BGDEZZWT.js} +2 -2
- package/dist-cli/chunks/{chunk-DUGNFSB5.js → chunk-CCFLATUR.js} +2 -2
- package/dist-cli/chunks/{chunk-USW3U45B.js → chunk-CQSIRKJ2.js} +2 -2
- package/dist-cli/chunks/{chunk-KHIKG5LO.js → chunk-CRU7UL5Q.js} +1 -1
- package/dist-cli/chunks/{chunk-CZZZC3BU.js → chunk-CU3LQUJD.js} +2 -2
- package/dist-cli/chunks/chunk-DA7KPSMF.js +2 -0
- package/dist-cli/chunks/{chunk-SLX3HZPR.js → chunk-DRFWZ74H.js} +1 -1
- package/dist-cli/chunks/{chunk-XJEIT5CH.js → chunk-G6VHJWGQ.js} +1 -1
- package/dist-cli/chunks/{chunk-RRFWPEQ6.js → chunk-GIZDZKHC.js} +1 -1
- package/dist-cli/chunks/{chunk-IUTSWOUM.js → chunk-GPLW7IL5.js} +2 -2
- package/dist-cli/chunks/{chunk-QPZW76ZB.js → chunk-HBCEGJQH.js} +2 -2
- package/dist-cli/chunks/chunk-HIDDRHAN.js +99 -0
- package/dist-cli/chunks/chunk-HKKKZRKS.js +89 -0
- package/dist-cli/chunks/{chunk-DABWOLOT.js → chunk-HZCW6RRE.js} +2 -2
- package/dist-cli/chunks/{chunk-2344ZBLD.js → chunk-J4GDWHXE.js} +2 -2
- package/dist-cli/chunks/{chunk-TI2ZOHON.js → chunk-J74AW22R.js} +1 -1
- package/dist-cli/chunks/{chunk-6LJUMA3J.js → chunk-LWECTC6A.js} +2 -2
- package/dist-cli/chunks/{chunk-6EP67RW7.js → chunk-M2DYRSIS.js} +2 -2
- package/dist-cli/chunks/chunk-P5JY275Q.js +119 -0
- package/dist-cli/chunks/{chunk-XQP4TU6P.js → chunk-P735P65P.js} +93 -65
- package/dist-cli/chunks/{chunk-R35AOOU4.js → chunk-QNRORBZE.js} +2 -2
- package/dist-cli/chunks/{chunk-TX53NA5W.js → chunk-RESHDGBU.js} +1 -1
- package/dist-cli/chunks/{chunk-Y3T4POUK.js → chunk-S3C2S27B.js} +2 -2
- package/dist-cli/chunks/{chunk-AYY7JBXA.js → chunk-SBP46OOV.js} +1 -1
- package/dist-cli/chunks/{chunk-5LD4QHER.js → chunk-SPKRGAWR.js} +6 -6
- package/dist-cli/chunks/{chunk-YVIUYF5U.js → chunk-SSLFXUZQ.js} +1 -1
- package/dist-cli/chunks/chunk-TNPHXSMV.js +2 -0
- package/dist-cli/chunks/{chunk-AXXJSIT3.js → chunk-U7UICUB4.js} +2 -2
- package/dist-cli/chunks/{chunk-LRIZ5ACL.js → chunk-UGNYHNBN.js} +3 -3
- package/dist-cli/chunks/{chunk-GTRGDGRK.js → chunk-UPLXEL4D.js} +1 -1
- package/dist-cli/chunks/{chunk-2HCVCJB7.js → chunk-URGNAE7V.js} +31 -31
- package/dist-cli/chunks/{chunk-5P6QAHAI.js → chunk-VDONTXCB.js} +1 -1
- package/dist-cli/chunks/{chunk-L5XB3GRM.js → chunk-VSGSEQE7.js} +2 -2
- package/dist-cli/chunks/{chunk-BNUZWRON.js → chunk-VURHG6DO.js} +1 -1
- package/dist-cli/chunks/{chunk-KPRSDBWU.js → chunk-YN44PKW5.js} +1 -1
- package/dist-cli/chunks/cli-version-BP5GKAZ6.js +2 -0
- package/dist-cli/chunks/{compat-IZXTAA6Q.js → compat-MF7YZPCS.js} +3 -3
- package/dist-cli/chunks/{config-KV7J63HM.js → config-WJSCJ622.js} +2 -2
- package/dist-cli/chunks/{control-CRJA7SXC.js → control-AZFQJXJ5.js} +2 -2
- package/dist-cli/chunks/daemon-MU77JEAP.js +2 -0
- package/dist-cli/chunks/{debug-ZCPDU23K.js → debug-LIXGHFHV.js} +3 -3
- package/dist-cli/chunks/{desktop-HKTZX7OT.js → desktop-T7GTXHL4.js} +3 -3
- package/dist-cli/chunks/{detox-LNWHCNFM.js → detox-WV5FD4G6.js} +2 -2
- package/dist-cli/chunks/{device-AV34WOXK.js → device-GPHUF3BL.js} +2 -2
- package/dist-cli/chunks/{diagnose-7INR3HKD.js → diagnose-OAXHSPXW.js} +2 -2
- package/dist-cli/chunks/drivers-LJAA7XSZ.js +2 -0
- package/dist-cli/chunks/film-ZBYERRWW.js +69 -0
- package/dist-cli/chunks/flow-TXG46ARF.js +2 -0
- package/dist-cli/chunks/help-BVVLN5KL.js +2 -0
- package/dist-cli/chunks/{home-paths-ML5HT67C.js → home-paths-T3SY5QGR.js} +2 -2
- package/dist-cli/chunks/inspect-7SHQVCCL.js +2 -0
- package/dist-cli/chunks/install-desktop-RFGXCZRS.js +2 -0
- package/dist-cli/chunks/{login-IND3C7NP.js → login-QS2GVTJJ.js} +4 -4
- package/dist-cli/chunks/{logout-H6R4RQK7.js → logout-I752SSKU.js} +2 -2
- package/dist-cli/chunks/{maestro-IVTBNNF6.js → maestro-RDBKRP4O.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-WCFBU5JM.js → maestro-generate-JOTQKAEH.js} +3 -3
- package/dist-cli/chunks/mode-Z4W3XXXU.js +24 -0
- package/dist-cli/chunks/optional-demo-registry-JTRVZB45.js +2 -0
- package/dist-cli/chunks/{perf-TNLPQUZI.js → perf-RXXW5GRA.js} +2 -2
- package/dist-cli/chunks/{record-MBJMHM23.js → record-527ZYKHE.js} +3 -3
- package/dist-cli/chunks/runtime-DOAHJLEK.js +2 -0
- package/dist-cli/chunks/{screenshot-command-Q5TFWB2R.js → screenshot-command-OBPEZJLR.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-AW5VYVOF.js → screenshots-capture-VC752Q3V.js} +2 -2
- package/dist-cli/chunks/{serve-L5XOVSCM.js → serve-NU6WWN2K.js} +2 -2
- package/dist-cli/chunks/{setup-TKXVNVBX.js → setup-6BJWI3PC.js} +3 -3
- package/dist-cli/chunks/{skills-GFZ5Z46I.js → skills-L7JPAJEZ.js} +2 -2
- package/dist-cli/chunks/{storage-SW3CLSLM.js → storage-XIZZSPC3.js} +2 -2
- package/dist-cli/chunks/store-3UAGOXD4.js +2 -0
- package/dist-cli/chunks/telemetry-IXCWQVEB.js +2 -0
- package/dist-cli/chunks/{timeline-LVV6HPFG.js → timeline-3MAGSV2V.js} +2 -2
- package/dist-cli/chunks/{upgrade-B22ZDON2.js → upgrade-YDHOHVYZ.js} +2 -2
- package/dist-cli/chunks/upload-YQVEPIO7.js +2 -0
- package/dist-cli/chunks/{version-G2X5AZHL.js → version-QDGDS5P2.js} +2 -2
- package/dist-cli/chunks/web-BK6VHH5W.js +2 -0
- package/dist-cli/chunks/{what-happened-2DEQUI25.js → what-happened-4GGACNI4.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +108 -12
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +57 -9
- package/dist-lib/sdk.mjs +57 -9
- package/dist-lib/skills.cjs +41 -15
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/soot/SKILL.md +1 -0
- package/skills/sootsim-debug/SKILL.md +6 -8
- package/skills/sootsim-perf/SKILL.md +4 -4
- package/dist-cli/chunks/beta-VXRR4GRU.js +0 -2
- package/dist-cli/chunks/chunk-FZPRFSTA.js +0 -2
- package/dist-cli/chunks/chunk-NQDDEWYD.js +0 -1
- package/dist-cli/chunks/chunk-T7CWPTU7.js +0 -2
- package/dist-cli/chunks/chunk-TQ7WAA2M.js +0 -119
- package/dist-cli/chunks/chunk-WEBUMXLD.js +0 -97
- package/dist-cli/chunks/chunk-WF6AY4K4.js +0 -1
- package/dist-cli/chunks/cli-version-5DZ5FKJC.js +0 -2
- package/dist-cli/chunks/daemon-LOYTWGGF.js +0 -2
- package/dist-cli/chunks/drivers-Z2TX4DMF.js +0 -2
- package/dist-cli/chunks/flow-7XFQKTBU.js +0 -2
- package/dist-cli/chunks/help-ODEIEVZ6.js +0 -2
- package/dist-cli/chunks/inspect-KFGNZ2E3.js +0 -2
- package/dist-cli/chunks/install-desktop-GTMDR7D5.js +0 -2
- package/dist-cli/chunks/mode-OXPEBMF2.js +0 -111
- package/dist-cli/chunks/optional-demo-registry-CHOUOWFF.js +0 -2
- package/dist-cli/chunks/runtime-NCWCN66Y.js +0 -2
- package/dist-cli/chunks/store-5AQQ6HKE.js +0 -2
- package/dist-cli/chunks/telemetry-L2M7NRKA.js +0 -2
- package/dist-cli/chunks/upload-UQRYTSL2.js +0 -2
- package/dist-cli/chunks/web-YCDMLF4V.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-G6VHJWGQ.js";import{g as A,i as _}from"./chunk-SPKRGAWR.js";import"./chunk-VURHG6DO.js";import{b as k}from"./chunk-YN44PKW5.js";import"./chunk-RESHDGBU.js";import"./chunk-J74AW22R.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=A(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim what-happened \u2014 show recent events from the semantic timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -44,6 +44,91 @@ var fs = __toESM(require("fs"), 1);
|
|
|
44
44
|
var path = __toESM(require("path"), 1);
|
|
45
45
|
var import_playwright = require("playwright");
|
|
46
46
|
|
|
47
|
+
// ../../scripts/lib/reap-browser.ts
|
|
48
|
+
var import_node_child_process = require("node:child_process");
|
|
49
|
+
function rootChromePid(b) {
|
|
50
|
+
const w = b;
|
|
51
|
+
if (w && typeof w.process === "function") {
|
|
52
|
+
try {
|
|
53
|
+
const p = w.process();
|
|
54
|
+
if (p && typeof p.pid === "number" && p.pid > 0) return p.pid;
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (w && typeof w.browser === "function") {
|
|
59
|
+
try {
|
|
60
|
+
const child = w.browser();
|
|
61
|
+
if (child) return rootChromePid(child);
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function killTree(pid) {
|
|
68
|
+
let kids = [];
|
|
69
|
+
try {
|
|
70
|
+
kids = (0, import_node_child_process.execSync)(`pgrep -P ${pid} || true`).toString().split("\n").filter(Boolean);
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
for (const k of kids) killTree(Number(k));
|
|
74
|
+
try {
|
|
75
|
+
process.kill(pid, "SIGKILL");
|
|
76
|
+
} catch {
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
var reapPids = /* @__PURE__ */ new Set();
|
|
80
|
+
var installed = false;
|
|
81
|
+
function installReaper() {
|
|
82
|
+
if (installed) return;
|
|
83
|
+
installed = true;
|
|
84
|
+
const reap = () => {
|
|
85
|
+
for (const pid of reapPids) killTree(pid);
|
|
86
|
+
};
|
|
87
|
+
process.on("SIGTERM", () => {
|
|
88
|
+
reap();
|
|
89
|
+
process.exit(0);
|
|
90
|
+
});
|
|
91
|
+
process.on("SIGINT", () => {
|
|
92
|
+
reap();
|
|
93
|
+
process.exit(0);
|
|
94
|
+
});
|
|
95
|
+
process.on("exit", reap);
|
|
96
|
+
}
|
|
97
|
+
async function launchReapedScoped(launch) {
|
|
98
|
+
const browser = await launch();
|
|
99
|
+
const root = rootChromePid(browser);
|
|
100
|
+
const mine = /* @__PURE__ */ new Set();
|
|
101
|
+
if (root != null) {
|
|
102
|
+
mine.add(root);
|
|
103
|
+
reapPids.add(root);
|
|
104
|
+
installReaper();
|
|
105
|
+
}
|
|
106
|
+
const evented = browser;
|
|
107
|
+
if (typeof evented.on === "function") {
|
|
108
|
+
evented.on("disconnected", () => {
|
|
109
|
+
for (const pid of mine) reapPids.delete(pid);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const reapNow = () => {
|
|
113
|
+
for (const pid of mine) {
|
|
114
|
+
killTree(pid);
|
|
115
|
+
reapPids.delete(pid);
|
|
116
|
+
}
|
|
117
|
+
mine.clear();
|
|
118
|
+
};
|
|
119
|
+
return { browser, reapNow };
|
|
120
|
+
}
|
|
121
|
+
function gpuChromeArgs() {
|
|
122
|
+
const angle = process.platform === "darwin" ? "metal" : process.platform === "linux" ? "vulkan" : "default";
|
|
123
|
+
return [
|
|
124
|
+
`--use-angle=${angle}`,
|
|
125
|
+
"--enable-gpu",
|
|
126
|
+
"--enable-gpu-rasterization",
|
|
127
|
+
"--enable-zero-copy",
|
|
128
|
+
"--ignore-gpu-blocklist"
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
|
|
47
132
|
// detox/gestures.ts
|
|
48
133
|
async function waitForSootsimGestureHandler(page, viewTag, handlerName) {
|
|
49
134
|
await page.waitForFunction(
|
|
@@ -743,6 +828,7 @@ var BASE_URL = process.env.SOOTSIM_URL || "http://localhost:5173";
|
|
|
743
828
|
var SCREENSHOT_DIR = process.env.SOOTSIM_SCREENSHOT_DIR || path.join(process.cwd(), "test", "detox-driver", "screenshots");
|
|
744
829
|
var DETOX_PLATFORM = process.env.SOOTSIM_PLATFORM === "android" ? "android" : "ios";
|
|
745
830
|
var _browser = null;
|
|
831
|
+
var _reapBrowserNow = null;
|
|
746
832
|
var _context = null;
|
|
747
833
|
var _page = null;
|
|
748
834
|
var _synchronizationEnabled = false;
|
|
@@ -874,6 +960,8 @@ async function waitForSootsimShellReady(page, timeout = 3e4) {
|
|
|
874
960
|
}
|
|
875
961
|
};
|
|
876
962
|
const isTenantOnly = new URL(window.location.href).searchParams.get("renderMode") === "tenant-only";
|
|
963
|
+
const currentUrl = new URL(window.location.href);
|
|
964
|
+
const expectsInitialAppPaint = currentUrl.searchParams.has("test") || currentUrl.pathname.includes("/app/");
|
|
877
965
|
let shellHost = null;
|
|
878
966
|
while (Date.now() < deadline) {
|
|
879
967
|
const candidate = window.SootSim?.bridges?.shellHost;
|
|
@@ -890,7 +978,7 @@ async function waitForSootsimShellReady(page, timeout = 3e4) {
|
|
|
890
978
|
if (shellHost.ready && typeof shellHost.ready.then === "function") {
|
|
891
979
|
await withTimeout("sootsim shell ready", shellHost.ready);
|
|
892
980
|
}
|
|
893
|
-
if (shellHost.firstContentPainted && typeof shellHost.firstContentPainted.then === "function") {
|
|
981
|
+
if (!expectsInitialAppPaint && shellHost.firstContentPainted && typeof shellHost.firstContentPainted.then === "function") {
|
|
894
982
|
await withTimeout(
|
|
895
983
|
"sootsim shell first content paint",
|
|
896
984
|
shellHost.firstContentPainted
|
|
@@ -970,9 +1058,15 @@ async function closeContext() {
|
|
|
970
1058
|
async function closeBrowser() {
|
|
971
1059
|
if (!_browser) return;
|
|
972
1060
|
const browser = _browser;
|
|
1061
|
+
const reapBrowserNow = _reapBrowserNow;
|
|
973
1062
|
_browser = null;
|
|
1063
|
+
_reapBrowserNow = null;
|
|
974
1064
|
await closeContext();
|
|
975
|
-
|
|
1065
|
+
try {
|
|
1066
|
+
await browser.close();
|
|
1067
|
+
} finally {
|
|
1068
|
+
reapBrowserNow?.();
|
|
1069
|
+
}
|
|
976
1070
|
}
|
|
977
1071
|
async function waitForSootsimIdle(page, maxMs = 3e3) {
|
|
978
1072
|
const result = await page.evaluate(
|
|
@@ -1557,10 +1651,16 @@ var device = {
|
|
|
1557
1651
|
_platform: DETOX_PLATFORM,
|
|
1558
1652
|
async launchApp(opts) {
|
|
1559
1653
|
if (!_browser) {
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1654
|
+
const launched = await launchReapedScoped(
|
|
1655
|
+
() => import_playwright.chromium.launch({
|
|
1656
|
+
channel: "chrome",
|
|
1657
|
+
headless: true,
|
|
1658
|
+
args: [...gpuChromeArgs(), "--enable-unsafe-webgpu"],
|
|
1659
|
+
ignoreDefaultArgs: ["--enable-unsafe-swiftshader"]
|
|
1660
|
+
})
|
|
1661
|
+
);
|
|
1662
|
+
_browser = launched.browser;
|
|
1663
|
+
_reapBrowserNow = launched.reapNow;
|
|
1564
1664
|
}
|
|
1565
1665
|
if (!_page || opts?.newInstance || opts?.delete || opts?.recordVideoDir) {
|
|
1566
1666
|
await closeContext();
|
|
@@ -1914,11 +2014,7 @@ var device = {
|
|
|
1914
2014
|
var sootExpect = createExpect(findNodeByMatcher, getPage);
|
|
1915
2015
|
var sootWaitFor = createWaitFor(findNodeByMatcher, getPage);
|
|
1916
2016
|
async function cleanup() {
|
|
1917
|
-
|
|
1918
|
-
await _browser.close();
|
|
1919
|
-
_browser = null;
|
|
1920
|
-
_page = null;
|
|
1921
|
-
}
|
|
2017
|
+
await closeBrowser();
|
|
1922
2018
|
}
|
|
1923
2019
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1924
2020
|
0 && (module.exports = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.mjs
CHANGED
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1551,6 +1551,7 @@ async function tapResolvedTarget(bridge, args) {
|
|
|
1551
1551
|
} catch {
|
|
1552
1552
|
}
|
|
1553
1553
|
const deadline = Date.now() + timing.deadlineMs;
|
|
1554
|
+
let lastOffscreenAt = null;
|
|
1554
1555
|
while (Date.now() <= deadline || attempts === 0) {
|
|
1555
1556
|
attempts++;
|
|
1556
1557
|
const payload = await args.resolve();
|
|
@@ -1559,14 +1560,30 @@ async function tapResolvedTarget(bridge, args) {
|
|
|
1559
1560
|
return { payload, result: null, attempts, failure: "special" };
|
|
1560
1561
|
}
|
|
1561
1562
|
if (payload && typeof payload.cx === "number" && typeof payload.cy === "number") {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1563
|
+
if (payload.offscreen) {
|
|
1564
|
+
lastResult = {
|
|
1565
|
+
hit: false,
|
|
1566
|
+
reason: "offscreen",
|
|
1567
|
+
x: payload.cx,
|
|
1568
|
+
y: payload.cy,
|
|
1569
|
+
screen: payload.screen
|
|
1570
|
+
};
|
|
1571
|
+
const at = `${Math.round(payload.cx)},${Math.round(payload.cy)}`;
|
|
1572
|
+
if (lastOffscreenAt === at) {
|
|
1573
|
+
return { payload, result: lastResult, attempts, failure: "missed" };
|
|
1574
|
+
}
|
|
1575
|
+
lastOffscreenAt = at;
|
|
1576
|
+
} else {
|
|
1577
|
+
lastOffscreenAt = null;
|
|
1578
|
+
const result = await bridge.send({
|
|
1579
|
+
type: "tap",
|
|
1580
|
+
x: payload.cx,
|
|
1581
|
+
y: payload.cy,
|
|
1582
|
+
target: tapTargetFromPayload(payload, args.textFallback)
|
|
1583
|
+
});
|
|
1584
|
+
lastResult = result;
|
|
1585
|
+
if (isTapSuccess(result)) return { payload, result, attempts };
|
|
1586
|
+
}
|
|
1570
1587
|
}
|
|
1571
1588
|
const remaining = deadline - Date.now();
|
|
1572
1589
|
if (remaining <= 0) break;
|
|
@@ -1621,9 +1638,17 @@ async function tapById(bridge, query, opts = {}) {
|
|
|
1621
1638
|
resolved && typeof resolved.cy === 'number'
|
|
1622
1639
|
? resolved.cy
|
|
1623
1640
|
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
1641
|
+
const scrEl = document.querySelector('canvas[data-surface-id]')
|
|
1642
|
+
const scr =
|
|
1643
|
+
scrEl && scrEl.clientWidth > 40 && scrEl.clientHeight > 40
|
|
1644
|
+
? { width: scrEl.clientWidth, height: scrEl.clientHeight }
|
|
1645
|
+
: null
|
|
1646
|
+
const offscreen =
|
|
1647
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
1624
1648
|
return {
|
|
1625
1649
|
cx,
|
|
1626
1650
|
cy,
|
|
1651
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
1627
1652
|
match: {
|
|
1628
1653
|
nodeId: n.nodeId ?? null,
|
|
1629
1654
|
id: n.id,
|
|
@@ -1764,9 +1789,17 @@ async function tapByText(bridge, query, options = {}, opts = {}) {
|
|
|
1764
1789
|
resolved && typeof resolved.cy === 'number'
|
|
1765
1790
|
? resolved.cy
|
|
1766
1791
|
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
1792
|
+
const scrEl = document.querySelector('canvas[data-surface-id]')
|
|
1793
|
+
const scr =
|
|
1794
|
+
scrEl && scrEl.clientWidth > 40 && scrEl.clientHeight > 40
|
|
1795
|
+
? { width: scrEl.clientWidth, height: scrEl.clientHeight }
|
|
1796
|
+
: null
|
|
1797
|
+
const offscreen =
|
|
1798
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
1767
1799
|
return {
|
|
1768
1800
|
cx,
|
|
1769
1801
|
cy,
|
|
1802
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
1770
1803
|
match: {
|
|
1771
1804
|
nodeId: n.nodeId ?? null,
|
|
1772
1805
|
id: n.id,
|
|
@@ -1819,6 +1852,12 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1819
1852
|
absolutePosition: byTestId.absolutePosition,
|
|
1820
1853
|
layout: byTestId.layout,
|
|
1821
1854
|
},
|
|
1855
|
+
screen: (() => {
|
|
1856
|
+
const el = document.querySelector('canvas[data-surface-id]')
|
|
1857
|
+
return el && el.clientWidth > 40 && el.clientHeight > 40
|
|
1858
|
+
? { width: el.clientWidth, height: el.clientHeight }
|
|
1859
|
+
: null
|
|
1860
|
+
})(),
|
|
1822
1861
|
}
|
|
1823
1862
|
}
|
|
1824
1863
|
const byText = await t.findByText(${arg})
|
|
@@ -1834,6 +1873,12 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1834
1873
|
absolutePosition: byText.absolutePosition,
|
|
1835
1874
|
layout: byText.layout,
|
|
1836
1875
|
},
|
|
1876
|
+
screen: (() => {
|
|
1877
|
+
const el = document.querySelector('canvas[data-surface-id]')
|
|
1878
|
+
return el && el.clientWidth > 40 && el.clientHeight > 40
|
|
1879
|
+
? { width: el.clientWidth, height: el.clientHeight }
|
|
1880
|
+
: null
|
|
1881
|
+
})(),
|
|
1837
1882
|
}
|
|
1838
1883
|
}
|
|
1839
1884
|
return { strategy: 'none' }
|
|
@@ -1843,10 +1888,13 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1843
1888
|
const node = payload.node;
|
|
1844
1889
|
const cx = node.absolutePosition.x + node.layout.width / 2;
|
|
1845
1890
|
const cy = node.absolutePosition.y + node.layout.height / 2;
|
|
1891
|
+
const screen = payload.screen ?? null;
|
|
1892
|
+
const offscreen = !!screen && (cx < 0 || cy < 0 || cx > screen.width || cy > screen.height);
|
|
1846
1893
|
return {
|
|
1847
1894
|
...payload,
|
|
1848
1895
|
cx,
|
|
1849
1896
|
cy,
|
|
1897
|
+
...offscreen ? { offscreen: true, screen } : {},
|
|
1850
1898
|
target: {
|
|
1851
1899
|
id: node.id,
|
|
1852
1900
|
testID: node.testID,
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.216 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// cli/commands/inspect/core.ts
|
|
4
4
|
function resolveMaxMsFlag(args, fallbackMs) {
|
|
@@ -1461,6 +1461,7 @@ async function tapResolvedTarget(bridge, args) {
|
|
|
1461
1461
|
} catch {
|
|
1462
1462
|
}
|
|
1463
1463
|
const deadline = Date.now() + timing.deadlineMs;
|
|
1464
|
+
let lastOffscreenAt = null;
|
|
1464
1465
|
while (Date.now() <= deadline || attempts === 0) {
|
|
1465
1466
|
attempts++;
|
|
1466
1467
|
const payload = await args.resolve();
|
|
@@ -1469,14 +1470,30 @@ async function tapResolvedTarget(bridge, args) {
|
|
|
1469
1470
|
return { payload, result: null, attempts, failure: "special" };
|
|
1470
1471
|
}
|
|
1471
1472
|
if (payload && typeof payload.cx === "number" && typeof payload.cy === "number") {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1473
|
+
if (payload.offscreen) {
|
|
1474
|
+
lastResult = {
|
|
1475
|
+
hit: false,
|
|
1476
|
+
reason: "offscreen",
|
|
1477
|
+
x: payload.cx,
|
|
1478
|
+
y: payload.cy,
|
|
1479
|
+
screen: payload.screen
|
|
1480
|
+
};
|
|
1481
|
+
const at = `${Math.round(payload.cx)},${Math.round(payload.cy)}`;
|
|
1482
|
+
if (lastOffscreenAt === at) {
|
|
1483
|
+
return { payload, result: lastResult, attempts, failure: "missed" };
|
|
1484
|
+
}
|
|
1485
|
+
lastOffscreenAt = at;
|
|
1486
|
+
} else {
|
|
1487
|
+
lastOffscreenAt = null;
|
|
1488
|
+
const result = await bridge.send({
|
|
1489
|
+
type: "tap",
|
|
1490
|
+
x: payload.cx,
|
|
1491
|
+
y: payload.cy,
|
|
1492
|
+
target: tapTargetFromPayload(payload, args.textFallback)
|
|
1493
|
+
});
|
|
1494
|
+
lastResult = result;
|
|
1495
|
+
if (isTapSuccess(result)) return { payload, result, attempts };
|
|
1496
|
+
}
|
|
1480
1497
|
}
|
|
1481
1498
|
const remaining = deadline - Date.now();
|
|
1482
1499
|
if (remaining <= 0) break;
|
|
@@ -1531,9 +1548,17 @@ async function tapById(bridge, query, opts = {}) {
|
|
|
1531
1548
|
resolved && typeof resolved.cy === 'number'
|
|
1532
1549
|
? resolved.cy
|
|
1533
1550
|
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
1551
|
+
const scrEl = document.querySelector('canvas[data-surface-id]')
|
|
1552
|
+
const scr =
|
|
1553
|
+
scrEl && scrEl.clientWidth > 40 && scrEl.clientHeight > 40
|
|
1554
|
+
? { width: scrEl.clientWidth, height: scrEl.clientHeight }
|
|
1555
|
+
: null
|
|
1556
|
+
const offscreen =
|
|
1557
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
1534
1558
|
return {
|
|
1535
1559
|
cx,
|
|
1536
1560
|
cy,
|
|
1561
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
1537
1562
|
match: {
|
|
1538
1563
|
nodeId: n.nodeId ?? null,
|
|
1539
1564
|
id: n.id,
|
|
@@ -1674,9 +1699,17 @@ async function tapByText(bridge, query, options = {}, opts = {}) {
|
|
|
1674
1699
|
resolved && typeof resolved.cy === 'number'
|
|
1675
1700
|
? resolved.cy
|
|
1676
1701
|
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
1702
|
+
const scrEl = document.querySelector('canvas[data-surface-id]')
|
|
1703
|
+
const scr =
|
|
1704
|
+
scrEl && scrEl.clientWidth > 40 && scrEl.clientHeight > 40
|
|
1705
|
+
? { width: scrEl.clientWidth, height: scrEl.clientHeight }
|
|
1706
|
+
: null
|
|
1707
|
+
const offscreen =
|
|
1708
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
1677
1709
|
return {
|
|
1678
1710
|
cx,
|
|
1679
1711
|
cy,
|
|
1712
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
1680
1713
|
match: {
|
|
1681
1714
|
nodeId: n.nodeId ?? null,
|
|
1682
1715
|
id: n.id,
|
|
@@ -1729,6 +1762,12 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1729
1762
|
absolutePosition: byTestId.absolutePosition,
|
|
1730
1763
|
layout: byTestId.layout,
|
|
1731
1764
|
},
|
|
1765
|
+
screen: (() => {
|
|
1766
|
+
const el = document.querySelector('canvas[data-surface-id]')
|
|
1767
|
+
return el && el.clientWidth > 40 && el.clientHeight > 40
|
|
1768
|
+
? { width: el.clientWidth, height: el.clientHeight }
|
|
1769
|
+
: null
|
|
1770
|
+
})(),
|
|
1732
1771
|
}
|
|
1733
1772
|
}
|
|
1734
1773
|
const byText = await t.findByText(${arg})
|
|
@@ -1744,6 +1783,12 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1744
1783
|
absolutePosition: byText.absolutePosition,
|
|
1745
1784
|
layout: byText.layout,
|
|
1746
1785
|
},
|
|
1786
|
+
screen: (() => {
|
|
1787
|
+
const el = document.querySelector('canvas[data-surface-id]')
|
|
1788
|
+
return el && el.clientWidth > 40 && el.clientHeight > 40
|
|
1789
|
+
? { width: el.clientWidth, height: el.clientHeight }
|
|
1790
|
+
: null
|
|
1791
|
+
})(),
|
|
1747
1792
|
}
|
|
1748
1793
|
}
|
|
1749
1794
|
return { strategy: 'none' }
|
|
@@ -1753,10 +1798,13 @@ async function tapBest(bridge, query, opts = {}) {
|
|
|
1753
1798
|
const node = payload.node;
|
|
1754
1799
|
const cx = node.absolutePosition.x + node.layout.width / 2;
|
|
1755
1800
|
const cy = node.absolutePosition.y + node.layout.height / 2;
|
|
1801
|
+
const screen = payload.screen ?? null;
|
|
1802
|
+
const offscreen = !!screen && (cx < 0 || cy < 0 || cx > screen.width || cy > screen.height);
|
|
1756
1803
|
return {
|
|
1757
1804
|
...payload,
|
|
1758
1805
|
cx,
|
|
1759
1806
|
cy,
|
|
1807
|
+
...offscreen ? { offscreen: true, screen } : {},
|
|
1760
1808
|
target: {
|
|
1761
1809
|
id: node.id,
|
|
1762
1810
|
testID: node.testID,
|