@swmansion/argent 0.34.1-next.4 → 0.34.1-next.6
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 +45 -12
- package/dist/installer.mjs +1 -1
- package/dist/tool-server.cjs +3 -2
- package/package.json +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -36085,7 +36085,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
36085
36085
|
var SESSION_ID2 = randomUUID5();
|
|
36086
36086
|
function readCliVersion() {
|
|
36087
36087
|
if (true) {
|
|
36088
|
-
return "0.34.1-next.
|
|
36088
|
+
return "0.34.1-next.5";
|
|
36089
36089
|
}
|
|
36090
36090
|
return "0.0.0";
|
|
36091
36091
|
}
|
|
@@ -37025,6 +37025,7 @@ function isValidationIssue(value) {
|
|
|
37025
37025
|
}
|
|
37026
37026
|
|
|
37027
37027
|
// ../argent-cli/src/e2e.ts
|
|
37028
|
+
var import_yaml3 = __toESM(require_dist(), 1);
|
|
37028
37029
|
import * as fsp from "node:fs/promises";
|
|
37029
37030
|
import { constants as fsConstants2 } from "node:fs";
|
|
37030
37031
|
import { createHash as createHash5 } from "node:crypto";
|
|
@@ -37161,7 +37162,8 @@ warning, and each script step's output), then its outcome. After the last test
|
|
|
37161
37162
|
it lists every failed test with its reason and a command that re-runs that test
|
|
37162
37163
|
alone, then a final summary; --recursive walks subdirectories too
|
|
37163
37164
|
(__baselines__, node_modules and dot-directories other than .argent are
|
|
37164
|
-
skipped). A
|
|
37165
|
+
skipped). A directory run and list skip a YAML file that is not an e2e test.
|
|
37166
|
+
A test that fails its steps keeps the batch running, as does one the
|
|
37165
37167
|
server rejects up front \u2014 an invalid file, or a device it cannot resolve. A
|
|
37166
37168
|
transport failure, a rejection the server does not mark as validation, or a
|
|
37167
37169
|
reply that is not a report stops the batch and counts the remaining tests
|
|
@@ -37201,8 +37203,8 @@ Subcommands:
|
|
|
37201
37203
|
subdirectories), or in .argent/e2e and
|
|
37202
37204
|
.argent/flows (legacy) with notes on stderr.
|
|
37203
37205
|
--json prints { "e2eTests": [...] } instead, with
|
|
37204
|
-
path per entry, plus name,
|
|
37205
|
-
when no dir is given
|
|
37206
|
+
path and an optional warning per entry, plus name,
|
|
37207
|
+
legacy and shadowedBy when no dir is given
|
|
37206
37208
|
|
|
37207
37209
|
Options (run):
|
|
37208
37210
|
--device <id> Device id to run against (auto-detected when omitted)
|
|
@@ -37603,6 +37605,29 @@ async function isRunnableFlowFile(filePath) {
|
|
|
37603
37605
|
return false;
|
|
37604
37606
|
}
|
|
37605
37607
|
}
|
|
37608
|
+
var E2E_FILE_WARNING_TEXT = {
|
|
37609
|
+
"syntax-error": "has a YAML syntax error",
|
|
37610
|
+
"empty": "is empty"
|
|
37611
|
+
};
|
|
37612
|
+
async function checkE2eTestShape(filePath) {
|
|
37613
|
+
let content;
|
|
37614
|
+
try {
|
|
37615
|
+
content = (await fsp.readFile(filePath, "utf8")).trim();
|
|
37616
|
+
} catch {
|
|
37617
|
+
return "ok";
|
|
37618
|
+
}
|
|
37619
|
+
if (content.length === 0) return "empty";
|
|
37620
|
+
if (!content.includes("steps") && !/^version:/m.test(content)) return "skip";
|
|
37621
|
+
let parsed;
|
|
37622
|
+
try {
|
|
37623
|
+
parsed = (0, import_yaml3.parse)(content, { logLevel: "error" });
|
|
37624
|
+
} catch {
|
|
37625
|
+
return "syntax-error";
|
|
37626
|
+
}
|
|
37627
|
+
if (typeof parsed !== "object" || parsed === null) return "skip";
|
|
37628
|
+
const { version: version2 } = parsed;
|
|
37629
|
+
return Number.isInteger(version2) && Number(version2) > 1 || "steps" in parsed ? "ok" : "skip";
|
|
37630
|
+
}
|
|
37606
37631
|
async function resolveFlowRef(ref, projectRoot) {
|
|
37607
37632
|
if (!SAFE_FLOW_NAME.test(ref)) return { suppliedPath: ref, fromName: false };
|
|
37608
37633
|
const picked = await resolveE2eFile(projectRoot, ref);
|
|
@@ -37646,11 +37671,15 @@ async function collectFlowFiles(dir, recursive2) {
|
|
|
37646
37671
|
}
|
|
37647
37672
|
if (!entry.name.endsWith(".yaml")) continue;
|
|
37648
37673
|
if (!SAFE_FLOW_NAME.test(path17.basename(entry.name, ".yaml"))) continue;
|
|
37649
|
-
|
|
37674
|
+
const filePath = path17.join(current, entry.name);
|
|
37675
|
+
if (!await isRunnableFlowFile(filePath)) continue;
|
|
37676
|
+
const shape = await checkE2eTestShape(filePath);
|
|
37677
|
+
if (shape === "skip") continue;
|
|
37678
|
+
found.push({ path: entryRel, ...shape !== "ok" && { warning: shape } });
|
|
37650
37679
|
}
|
|
37651
37680
|
};
|
|
37652
37681
|
await walk(dir, "");
|
|
37653
|
-
return found.sort();
|
|
37682
|
+
return found.sort((a2, b) => a2.path < b.path ? -1 : a2.path > b.path ? 1 : 0);
|
|
37654
37683
|
}
|
|
37655
37684
|
var RUN_TOOL_ID = "e2e-execute";
|
|
37656
37685
|
function buildRunPayload(flowPath, projectRoot, args) {
|
|
@@ -37783,7 +37812,7 @@ async function runFlowDirectory(dir, args, projectRoot, options) {
|
|
|
37783
37812
|
};
|
|
37784
37813
|
let flows;
|
|
37785
37814
|
try {
|
|
37786
|
-
flows = await collectFlowFiles(dir, args.recursive);
|
|
37815
|
+
flows = (await collectFlowFiles(dir, args.recursive)).map((file2) => file2.path);
|
|
37787
37816
|
} catch {
|
|
37788
37817
|
return reject(`Could not read e2e test directory: ${dir}`);
|
|
37789
37818
|
}
|
|
@@ -37951,9 +37980,9 @@ Pass the fully resolved path to the directory.`
|
|
|
37951
37980
|
let anyDir = false;
|
|
37952
37981
|
const dirs = listDir === void 0 ? E2E_DIRS : [listDir];
|
|
37953
37982
|
for (const dir of dirs) {
|
|
37954
|
-
let
|
|
37983
|
+
let files;
|
|
37955
37984
|
try {
|
|
37956
|
-
|
|
37985
|
+
files = await collectFlowFiles(path17.resolve(dir), listDir === void 0 || recursive2);
|
|
37957
37986
|
} catch (err) {
|
|
37958
37987
|
const code = err.code;
|
|
37959
37988
|
if (listDir === void 0 && (code === "ENOENT" || code === "ENOTDIR")) continue;
|
|
@@ -37962,10 +37991,11 @@ Pass the fully resolved path to the directory.`
|
|
|
37962
37991
|
);
|
|
37963
37992
|
}
|
|
37964
37993
|
anyDir = true;
|
|
37965
|
-
for (const rel of
|
|
37994
|
+
for (const { path: rel, warning } of files) {
|
|
37966
37995
|
const shown = path17.join(dir, rel);
|
|
37996
|
+
const warningField = warning !== void 0 && { warning };
|
|
37967
37997
|
if (listDir !== void 0) {
|
|
37968
|
-
entries.push({ path: optionSafePath(shown) });
|
|
37998
|
+
entries.push({ path: optionSafePath(shown), ...warningField });
|
|
37969
37999
|
continue;
|
|
37970
38000
|
}
|
|
37971
38001
|
const name = path17.dirname(rel) === "." ? path17.basename(rel, ".yaml") : void 0;
|
|
@@ -37975,7 +38005,8 @@ Pass the fully resolved path to the directory.`
|
|
|
37975
38005
|
path: shown,
|
|
37976
38006
|
...name !== void 0 && { name },
|
|
37977
38007
|
legacy: dir !== E2E_DIR,
|
|
37978
|
-
...shadowedBy !== void 0 && { shadowedBy }
|
|
38008
|
+
...shadowedBy !== void 0 && { shadowedBy },
|
|
38009
|
+
...warningField
|
|
37979
38010
|
});
|
|
37980
38011
|
}
|
|
37981
38012
|
}
|
|
@@ -37999,6 +38030,8 @@ Pass the fully resolved path to the directory.`
|
|
|
37999
38030
|
console.error(
|
|
38000
38031
|
`warning: ${entry.path} is shadowed by ${entry.shadowedBy} when run by name`
|
|
38001
38032
|
);
|
|
38033
|
+
if (entry.warning !== void 0)
|
|
38034
|
+
console.error(`warning: ${entry.path} ${E2E_FILE_WARNING_TEXT[entry.warning]}`);
|
|
38002
38035
|
}
|
|
38003
38036
|
const legacyCount = entries.filter((entry) => entry.legacy).length;
|
|
38004
38037
|
if (legacyCount > 0) {
|
package/dist/installer.mjs
CHANGED
|
@@ -16993,7 +16993,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16993
16993
|
var SESSION_ID = randomUUID4();
|
|
16994
16994
|
function readCliVersion() {
|
|
16995
16995
|
if (true) {
|
|
16996
|
-
return "0.34.1-next.
|
|
16996
|
+
return "0.34.1-next.5";
|
|
16997
16997
|
}
|
|
16998
16998
|
return "0.0.0";
|
|
16999
16999
|
}
|
package/dist/tool-server.cjs
CHANGED
|
@@ -101285,7 +101285,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
101285
101285
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
101286
101286
|
function readCliVersion() {
|
|
101287
101287
|
if (true) {
|
|
101288
|
-
return "0.34.1-next.
|
|
101288
|
+
return "0.34.1-next.5";
|
|
101289
101289
|
}
|
|
101290
101290
|
return "0.0.0";
|
|
101291
101291
|
}
|
|
@@ -142967,7 +142967,8 @@ function includesWordsCI(haystack, needle) {
|
|
|
142967
142967
|
function flattenHoisting(node2, project, out, scrollClip = null) {
|
|
142968
142968
|
const view = project(node2);
|
|
142969
142969
|
if (view.skip) return "";
|
|
142970
|
-
if (scrollClip && view.rect && rectFullyOutside(view.rect, scrollClip))
|
|
142970
|
+
if (scrollClip && view.rect && view.rect.w > 0 && view.rect.h > 0 && rectFullyOutside(view.rect, scrollClip))
|
|
142971
|
+
return "";
|
|
142971
142972
|
const childClip = view.scrolls && view.rect ? intersectClip(view.rect, scrollClip) : scrollClip;
|
|
142972
142973
|
const childText = [];
|
|
142973
142974
|
for (const child of view.children) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.6",
|
|
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",
|