@swmansion/argent 0.25.1-next.31 → 0.25.1-next.32
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 +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/tool-server.cjs +14 -43
- package/package.json +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -21857,7 +21857,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21857
21857
|
var SESSION_ID2 = randomUUID5();
|
|
21858
21858
|
function readCliVersion() {
|
|
21859
21859
|
if (true) {
|
|
21860
|
-
return "0.25.1-next.
|
|
21860
|
+
return "0.25.1-next.32";
|
|
21861
21861
|
}
|
|
21862
21862
|
return "0.0.0";
|
|
21863
21863
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -16710,7 +16710,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16710
16710
|
var SESSION_ID = randomUUID4();
|
|
16711
16711
|
function readCliVersion() {
|
|
16712
16712
|
if (true) {
|
|
16713
|
-
return "0.25.1-next.
|
|
16713
|
+
return "0.25.1-next.32";
|
|
16714
16714
|
}
|
|
16715
16715
|
return "0.0.0";
|
|
16716
16716
|
}
|
package/dist/tool-server.cjs
CHANGED
|
@@ -94704,7 +94704,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
94704
94704
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
94705
94705
|
function readCliVersion() {
|
|
94706
94706
|
if (true) {
|
|
94707
|
-
return "0.25.1-next.
|
|
94707
|
+
return "0.25.1-next.32";
|
|
94708
94708
|
}
|
|
94709
94709
|
return "0.0.0";
|
|
94710
94710
|
}
|
|
@@ -125765,7 +125765,7 @@ init_adb();
|
|
|
125765
125765
|
|
|
125766
125766
|
// ../tool-server/src/utils/poll-describe-tree.ts
|
|
125767
125767
|
async function pollDescribeTree(args) {
|
|
125768
|
-
const { fetchTree
|
|
125768
|
+
const { fetchTree, timeoutMs, pollIntervalMs, signal, onSample } = args;
|
|
125769
125769
|
const start2 = Date.now();
|
|
125770
125770
|
const deadline = start2 + timeoutMs;
|
|
125771
125771
|
let polls = 0;
|
|
@@ -125784,7 +125784,7 @@ async function pollDescribeTree(args) {
|
|
|
125784
125784
|
for (; ; ) {
|
|
125785
125785
|
if (signal?.aborted) return outcome(void 0, true);
|
|
125786
125786
|
const remaining = Math.max(0, deadline - Date.now());
|
|
125787
|
-
const settled = await settleWithin(
|
|
125787
|
+
const settled = await settleWithin(fetchTree(), remaining, signal);
|
|
125788
125788
|
polls += 1;
|
|
125789
125789
|
if (settled.type === "aborted") return outcome(void 0, true);
|
|
125790
125790
|
lastAttemptSettled = settled.type !== "timeout";
|
|
@@ -131945,23 +131945,6 @@ function deriveSelector(node) {
|
|
|
131945
131945
|
if (node.role && !GENERIC_ROLES.has(node.role.toLowerCase())) return { role: node.role };
|
|
131946
131946
|
return null;
|
|
131947
131947
|
}
|
|
131948
|
-
async function fetchTree(registry2, device, opts = {}) {
|
|
131949
|
-
if (device.platform === "ios" || device.platform === "ios-remote") {
|
|
131950
|
-
return describeIos(registry2, device, { bundleId: opts.bundleId });
|
|
131951
|
-
}
|
|
131952
|
-
if (device.platform === "android") {
|
|
131953
|
-
return describeAndroid(registry2, device.id);
|
|
131954
|
-
}
|
|
131955
|
-
if (device.platform === "chromium") {
|
|
131956
|
-
const ref = chromiumCdpRef(device);
|
|
131957
|
-
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
131958
|
-
return describeChromium(api);
|
|
131959
|
-
}
|
|
131960
|
-
if (device.platform === "vega") {
|
|
131961
|
-
return describeVega(device.id);
|
|
131962
|
-
}
|
|
131963
|
-
throw new Error(`ui-tree matching is not supported on platform "${device.platform}"`);
|
|
131964
|
-
}
|
|
131965
131948
|
|
|
131966
131949
|
// ../tool-server/src/tools/await-ui-element/index.ts
|
|
131967
131950
|
var AWAIT_UI_ELEMENT_TOOL_ID = "await-ui-element";
|
|
@@ -132076,7 +132059,7 @@ function timeoutNote(params, lastTree, fetchError, lastData) {
|
|
|
132076
132059
|
return appendDiagnostics(base, lastData);
|
|
132077
132060
|
}
|
|
132078
132061
|
function createAwaitUiElementTool(registry2) {
|
|
132079
|
-
async function
|
|
132062
|
+
async function fetchTree(device, params, services, isTvOs, androidIsTv) {
|
|
132080
132063
|
if (device.platform === "ios" || device.platform === "ios-remote") {
|
|
132081
132064
|
if (device.kind === "device") {
|
|
132082
132065
|
return describeIosDevice(registry2, device);
|
|
@@ -132158,7 +132141,7 @@ tap/navigation to wait for the next screen, or before tapping an element that ap
|
|
|
132158
132141
|
let everMatched = false;
|
|
132159
132142
|
let lastTrustedReadAt;
|
|
132160
132143
|
const poll = await pollDescribeTree({
|
|
132161
|
-
fetchTree: () =>
|
|
132144
|
+
fetchTree: () => fetchTree(device, params, services, isTvOs, androidIsTv),
|
|
132162
132145
|
timeoutMs,
|
|
132163
132146
|
pollIntervalMs,
|
|
132164
132147
|
signal,
|
|
@@ -134831,7 +134814,7 @@ function treeSignature(root) {
|
|
|
134831
134814
|
return parts2.join("\n");
|
|
134832
134815
|
}
|
|
134833
134816
|
function createAwaitScreenIdleTool(registry2) {
|
|
134834
|
-
function
|
|
134817
|
+
function fetchTree(device, services, isTvOs, androidIsTv) {
|
|
134835
134818
|
if (device.platform === "ios" || device.platform === "ios-remote") {
|
|
134836
134819
|
if (device.kind === "device") {
|
|
134837
134820
|
return describeIosDevice(registry2, device);
|
|
@@ -134879,7 +134862,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
|
|
|
134879
134862
|
let stableSignature;
|
|
134880
134863
|
let stableSince = 0;
|
|
134881
134864
|
const poll = await pollDescribeTree({
|
|
134882
|
-
fetchTree: () =>
|
|
134865
|
+
fetchTree: () => fetchTree(device, services, isTvOs, androidIsTv),
|
|
134883
134866
|
timeoutMs: params.timeoutMs ?? DEFAULT_TIMEOUT_MS4,
|
|
134884
134867
|
pollIntervalMs: params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2,
|
|
134885
134868
|
signal: ctx?.signal,
|
|
@@ -148174,9 +148157,7 @@ async function queryVegaTree(device) {
|
|
|
148174
148157
|
|
|
148175
148158
|
// ../tool-server/src/tools/flows/flow-tree.ts
|
|
148176
148159
|
async function fetchFlowTree(registry2, device, target) {
|
|
148177
|
-
|
|
148178
|
-
if (!source) return fetchTree(registry2, device);
|
|
148179
|
-
return source(registry2, device, target);
|
|
148160
|
+
return FLOW_TREE_SOURCES[device.platform](registry2, device, target);
|
|
148180
148161
|
}
|
|
148181
148162
|
var FLOW_TREE_SOURCES = {
|
|
148182
148163
|
// Simulator iOS uses the injected hierarchy and an optional target.
|
|
@@ -148192,9 +148173,6 @@ var FLOW_TREE_SOURCES = {
|
|
|
148192
148173
|
"chromium": (registry2, device) => queryChromiumTree(registry2, device),
|
|
148193
148174
|
"vega": (_registry, device) => queryVegaTree(device)
|
|
148194
148175
|
};
|
|
148195
|
-
function supportsFlowTree(platform) {
|
|
148196
|
-
return FLOW_TREE_SOURCES[platform] !== void 0;
|
|
148197
|
-
}
|
|
148198
148176
|
|
|
148199
148177
|
// ../tool-server/src/tools/flows/flow-pixels.ts
|
|
148200
148178
|
var fs53 = __toESM(require("node:fs/promises"));
|
|
@@ -148638,12 +148616,10 @@ async function runDirective(env, step) {
|
|
|
148638
148616
|
}
|
|
148639
148617
|
async function settleForGesture(env) {
|
|
148640
148618
|
let warning;
|
|
148641
|
-
|
|
148642
|
-
|
|
148643
|
-
|
|
148644
|
-
|
|
148645
|
-
warning = unsettledGestureWarning(err);
|
|
148646
|
-
}
|
|
148619
|
+
try {
|
|
148620
|
+
await settleTree(env, { skipProvenOutage: true });
|
|
148621
|
+
} catch (err) {
|
|
148622
|
+
warning = unsettledGestureWarning(err);
|
|
148647
148623
|
}
|
|
148648
148624
|
if (env.signal?.aborted) return { aborted: true };
|
|
148649
148625
|
return warning !== void 0 ? { warning } : {};
|
|
@@ -149526,9 +149502,6 @@ function fallbackSourceWarning(source, platform) {
|
|
|
149526
149502
|
function platformOf(udid) {
|
|
149527
149503
|
return typeof udid === "string" ? authoringPlatform(resolveDevice(udid).platform) : void 0;
|
|
149528
149504
|
}
|
|
149529
|
-
function hasRunnerTree(udid) {
|
|
149530
|
-
return typeof udid === "string" && supportsFlowTree(resolveDevice(udid).platform);
|
|
149531
|
-
}
|
|
149532
149505
|
var UNSUPPORTED_PLATFORM = {
|
|
149533
149506
|
divergence: "The recorder and the runner read different projections of the screen.",
|
|
149534
149507
|
read: "No read-only tool is known to report the runner's projection on this platform \u2014 keep the step raw"
|
|
@@ -149602,7 +149575,6 @@ function unmetWaitWarningFor(cause) {
|
|
|
149602
149575
|
}
|
|
149603
149576
|
function indeterminateReasonCaveat(udid) {
|
|
149604
149577
|
if (platformOf(udid) !== "ios") return "";
|
|
149605
|
-
if (!hasRunnerTree(udid)) return "";
|
|
149606
149578
|
return ". One thing that reason cannot see is this step: the probe predicts an `await:`/`assert:` directive, and no directive takes a bundleId, so neither this probe nor the runner accepts one (the `bundleId` on this step reached the live wait only)";
|
|
149607
149579
|
}
|
|
149608
149580
|
var CANCELLED_PROBE_WARNING = "recorded, but the re-probe against the tree the RUNNER reads was cancelled before it answered. The step itself ran and is written to the flow; only the verdict is missing, so whether it would convert to `await:`/`assert:` is UNKNOWN, not known-bad \u2014 record the wait again, uncancelled, before trusting the conversion";
|
|
@@ -149667,9 +149639,8 @@ async function probeAgainstRunnerTree(registry2, ctx, args) {
|
|
|
149667
149639
|
// The reason is quoted whole rather than through `cappedReason`; see
|
|
149668
149640
|
// {@link MAX_PROBE_REASON_CHARS}.
|
|
149669
149641
|
warning: `this check could not be re-verified against the tree the RUNNER reads (${outcome.reason ?? "no reason given"}), so it passed against the tree \`${AWAIT_UI_ELEMENT_TOOL_ID}\` reads and nothing else. Whether it would convert to \`await:\`/\`assert:\` is UNKNOWN, not known-bad \u2014 ` + // A timeout and an outage need different next moves: "once that tree
|
|
149670
|
-
// source is back" is nonsense for a source that never left
|
|
149671
|
-
|
|
149672
|
-
(timedOut2 ? `re-record this step when the device is quieter, or settle the conversion directly by putting the directive in a flow and running \`flow-execute\`, which has no such ceiling` : (hasRunnerTree(args.udid) ? `re-probe once that tree source is back before trusting the conversion` : `this platform's runner has no tree to probe, so the conversion stays unverified`) + indeterminateReasonCaveat(args.udid))
|
|
149642
|
+
// source is back" is nonsense for a source that never left.
|
|
149643
|
+
(timedOut2 ? `re-record this step when the device is quieter, or settle the conversion directly by putting the directive in a flow and running \`flow-execute\`, which has no such ceiling` : `re-probe once that tree source is back before trusting the conversion` + indeterminateReasonCaveat(args.udid))
|
|
149673
149644
|
};
|
|
149674
149645
|
}
|
|
149675
149646
|
return {
|
package/package.json
CHANGED