@swmansion/argent 0.25.2-next.9 → 0.25.3-next.0
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/bin/darwin/simulator-server +0 -0
- package/bin/linux/simulator-server +0 -0
- package/bin/linux-arm64/simulator-server +0 -0
- package/bin/win32/simulator-server.exe +0 -0
- package/dist/cli-cmds.mjs +18 -7
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +10 -2
- package/dist/tool-server.cjs +32 -10
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/cli-cmds.mjs
CHANGED
|
@@ -21872,7 +21872,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21872
21872
|
var SESSION_ID2 = randomUUID5();
|
|
21873
21873
|
function readCliVersion() {
|
|
21874
21874
|
if (true) {
|
|
21875
|
-
return "0.25.
|
|
21875
|
+
return "0.25.3-next.0";
|
|
21876
21876
|
}
|
|
21877
21877
|
return "0.0.0";
|
|
21878
21878
|
}
|
|
@@ -23182,6 +23182,13 @@ function stepIndent(depth) {
|
|
|
23182
23182
|
if (typeof depth !== "number" || !Number.isInteger(depth) || depth <= 0) return "";
|
|
23183
23183
|
return " ".repeat(Math.min(depth, MAX_RENDER_DEPTH));
|
|
23184
23184
|
}
|
|
23185
|
+
function durationSuffix(ms) {
|
|
23186
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms < 0) return "";
|
|
23187
|
+
const tenths = Math.round(ms / 100);
|
|
23188
|
+
if (tenths < 600) return ` (${(tenths / 10).toFixed(1)}s)`;
|
|
23189
|
+
const seconds = Math.round(ms / 1e3);
|
|
23190
|
+
return ` (${Math.floor(seconds / 60)}m ${seconds % 60}s)`;
|
|
23191
|
+
}
|
|
23185
23192
|
function printHelp(toStderr = false) {
|
|
23186
23193
|
const print = toStderr ? console.error : console.log;
|
|
23187
23194
|
print(`Usage: argent flow <subcommand> [options]
|
|
@@ -23305,7 +23312,7 @@ function renderStepLine(s, n2, topFlow) {
|
|
|
23305
23312
|
const label = what ? `${s.kind} ${what}` : s.kind;
|
|
23306
23313
|
const reason = s.reason ? ` \u2014 ${s.reason}` : "";
|
|
23307
23314
|
const glyph = s.status === "pass" && s.warning ? "\u26A0" : STATUS_GLYPH[s.status];
|
|
23308
|
-
return ` ${glyph} ${String(n2).padStart(2)} ${stepIndent(s.depth)}${label}${where}${reason}`;
|
|
23315
|
+
return ` ${glyph} ${String(n2).padStart(2)} ${stepIndent(s.depth)}${label}${where}${durationSuffix(s.durationMs)}${reason}`;
|
|
23309
23316
|
}
|
|
23310
23317
|
function renderUnderStepLine(s, n2, text2) {
|
|
23311
23318
|
return `${" ".repeat(5 + Math.max(2, String(n2).length))}${stepIndent(s.depth)}${text2}`;
|
|
@@ -23328,7 +23335,7 @@ function renderSummary(report, opts = {}) {
|
|
|
23328
23335
|
const where = opts.withDevice && report.device ? ` (started on ${report.device})` : "";
|
|
23329
23336
|
const nothingCounted = report.ok && report.passed + report.failed + report.errored + report.skipped === 0;
|
|
23330
23337
|
const note = nothingCounted ? " (no test steps)" : "";
|
|
23331
|
-
return `${report.ok ? "PASS" : "FAIL"}${where} \u2014 ${report.passed} passed, ${report.failed} failed, ${report.errored} errored, ${report.skipped} skipped${warningsNote}${note}`;
|
|
23338
|
+
return `${report.ok ? "PASS" : "FAIL"}${where} \u2014 ${report.passed} passed, ${report.failed} failed, ${report.errored} errored, ${report.skipped} skipped${warningsNote}${note}${durationSuffix(report.durationMs)}`;
|
|
23332
23339
|
}
|
|
23333
23340
|
function renderArtifactLines(report) {
|
|
23334
23341
|
const lines = [];
|
|
@@ -23366,8 +23373,8 @@ function renderFailedSteps(report) {
|
|
|
23366
23373
|
}
|
|
23367
23374
|
return lines;
|
|
23368
23375
|
}
|
|
23369
|
-
function renderBatchSummary(counts) {
|
|
23370
|
-
return `${counts.failed === 0 ? "PASS" : "FAIL"} \u2014 ${counts.total} flow${counts.total === 1 ? "" : "s"}: ${counts.passed} passed, ${counts.failed} failed, ${counts.skipped} skipped`;
|
|
23376
|
+
function renderBatchSummary(counts, durationMs) {
|
|
23377
|
+
return `${counts.failed === 0 ? "PASS" : "FAIL"} \u2014 ${counts.total} flow${counts.total === 1 ? "" : "s"}: ${counts.passed} passed, ${counts.failed} failed, ${counts.skipped} skipped${durationSuffix(durationMs)}`;
|
|
23371
23378
|
}
|
|
23372
23379
|
var SAFE_ARTIFACT_NAME = FLOW_NAME_PATTERN;
|
|
23373
23380
|
var SAFE_FLOW_NAME = FLOW_NAME_PATTERN;
|
|
@@ -23682,6 +23689,7 @@ async function runFlowDirectory(dir, args, projectRoot, options) {
|
|
|
23682
23689
|
const { callTool, baseUrl } = createToolsClient({ paths: options.paths });
|
|
23683
23690
|
const outputBase = args.output ? path14.resolve(args.output) : void 0;
|
|
23684
23691
|
const results = [];
|
|
23692
|
+
const batchStartedAt = Date.now();
|
|
23685
23693
|
let stopped = false;
|
|
23686
23694
|
for (const [i2, rel] of flows.entries()) {
|
|
23687
23695
|
if (!args.json) console.log(`[${i2 + 1}/${flows.length}] ${rel}`);
|
|
@@ -23737,11 +23745,14 @@ async function runFlowDirectory(dir, args, projectRoot, options) {
|
|
|
23737
23745
|
failed: results.filter((r2) => r2.status === "fail").length,
|
|
23738
23746
|
skipped: results.filter((r2) => r2.status === "skip").length
|
|
23739
23747
|
};
|
|
23748
|
+
const durationMs = Date.now() - batchStartedAt;
|
|
23740
23749
|
if (args.json) {
|
|
23741
|
-
console.log(
|
|
23750
|
+
console.log(
|
|
23751
|
+
JSON.stringify({ ok: counts.failed === 0, ...counts, durationMs, flows: results }, null, 2)
|
|
23752
|
+
);
|
|
23742
23753
|
} else {
|
|
23743
23754
|
console.log(`
|
|
23744
|
-
${renderBatchSummary(counts)}`);
|
|
23755
|
+
${renderBatchSummary(counts, durationMs)}`);
|
|
23745
23756
|
}
|
|
23746
23757
|
return exitAfterFlush(counts.failed === 0 ? 0 : 1);
|
|
23747
23758
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -16725,7 +16725,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16725
16725
|
var SESSION_ID = randomUUID4();
|
|
16726
16726
|
function readCliVersion() {
|
|
16727
16727
|
if (true) {
|
|
16728
|
-
return "0.25.
|
|
16728
|
+
return "0.25.3-next.0";
|
|
16729
16729
|
}
|
|
16730
16730
|
return "0.0.0";
|
|
16731
16731
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -18542,6 +18542,13 @@ function stepIndent(depth) {
|
|
|
18542
18542
|
if (typeof depth !== "number" || !Number.isInteger(depth) || depth <= 0) return "";
|
|
18543
18543
|
return " ".repeat(Math.min(depth, MAX_RENDER_DEPTH));
|
|
18544
18544
|
}
|
|
18545
|
+
function durationSuffix(ms) {
|
|
18546
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms < 0) return "";
|
|
18547
|
+
const tenths = Math.round(ms / 100);
|
|
18548
|
+
if (tenths < 600) return ` (${(tenths / 10).toFixed(1)}s)`;
|
|
18549
|
+
const seconds = Math.round(ms / 1e3);
|
|
18550
|
+
return ` (${Math.floor(seconds / 60)}m ${seconds % 60}s)`;
|
|
18551
|
+
}
|
|
18545
18552
|
function stepLabel(step) {
|
|
18546
18553
|
if (step.kind === "echo") return step.message ?? "";
|
|
18547
18554
|
if (step.tool) return step.tool;
|
|
@@ -18565,9 +18572,10 @@ async function flowRunToMcpContent(result, ctx) {
|
|
|
18565
18572
|
const reason = step.reason ?? step.error;
|
|
18566
18573
|
const suffix = reason ? ` \u2014 ${reason}` : "";
|
|
18567
18574
|
const warning = step.warning ? ` \u26A0 ${step.warning}` : "";
|
|
18575
|
+
const timing = step.kind === "echo" ? "" : durationSuffix(step.durationMs);
|
|
18568
18576
|
blocks.push({
|
|
18569
18577
|
type: "text",
|
|
18570
|
-
text: `[${num}] ${glyph}${stepIndent(step.depth)}${stepLabel(step)}${suffix}${warning}`
|
|
18578
|
+
text: `[${num}] ${glyph}${stepIndent(step.depth)}${stepLabel(step)}${timing}${suffix}${warning}`
|
|
18571
18579
|
});
|
|
18572
18580
|
const scriptLog = typeof step.scriptLog === "string" ? step.scriptLog : "";
|
|
18573
18581
|
const scriptLogTruncated = step.scriptLogTruncated === true;
|
|
@@ -18589,7 +18597,7 @@ async function flowRunToMcpContent(result, ctx) {
|
|
|
18589
18597
|
const note = result.ok && counted === 0 ? " (no test steps)" : "";
|
|
18590
18598
|
blocks.push({
|
|
18591
18599
|
type: "text",
|
|
18592
|
-
text: `${result.ok ? "PASS" : "FAIL"} \u2014 ${result.passed ?? 0} passed, ${result.failed ?? 0} failed, ${result.errored ?? 0} errored, ${result.skipped ?? 0} skipped${note}`
|
|
18600
|
+
text: `${result.ok ? "PASS" : "FAIL"} \u2014 ${result.passed ?? 0} passed, ${result.failed ?? 0} failed, ${result.errored ?? 0} errored, ${result.skipped ?? 0} skipped${note}${durationSuffix(result.durationMs)}`
|
|
18593
18601
|
});
|
|
18594
18602
|
} else {
|
|
18595
18603
|
blocks.push({ type: "text", text: `Flow "${result.flow}" complete.` });
|
package/dist/tool-server.cjs
CHANGED
|
@@ -94804,7 +94804,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
94804
94804
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
94805
94805
|
function readCliVersion() {
|
|
94806
94806
|
if (true) {
|
|
94807
|
-
return "0.25.
|
|
94807
|
+
return "0.25.3-next.0";
|
|
94808
94808
|
}
|
|
94809
94809
|
return "0.0.0";
|
|
94810
94810
|
}
|
|
@@ -96164,7 +96164,7 @@ var import_node_path6 = __toESM(require("node:path"));
|
|
|
96164
96164
|
var import_semver2 = __toESM(require_semver2());
|
|
96165
96165
|
|
|
96166
96166
|
// ../tool-server/package.json
|
|
96167
|
-
var version2 = "0.25.
|
|
96167
|
+
var version2 = "0.25.2";
|
|
96168
96168
|
|
|
96169
96169
|
// ../tool-server/src/utils/update-checker.ts
|
|
96170
96170
|
var import_update_core = __toESM(require_dist4());
|
|
@@ -154798,6 +154798,7 @@ Returns a per-step report: the first failure stops the run and the rest report a
|
|
|
154798
154798
|
fileInputs: fileInputs3,
|
|
154799
154799
|
services: () => ({}),
|
|
154800
154800
|
async execute(_services, params, ctx) {
|
|
154801
|
+
const runStartedAt = Date.now();
|
|
154801
154802
|
const signal = ctx?.signal;
|
|
154802
154803
|
const { filePath, flowName, viaUpload } = await resolveFlowSource(
|
|
154803
154804
|
params,
|
|
@@ -154840,6 +154841,7 @@ Returns a per-step report: the first failure stops the run and the rest report a
|
|
|
154840
154841
|
executionPrerequisite: flow.executionPrerequisite
|
|
154841
154842
|
};
|
|
154842
154843
|
}
|
|
154844
|
+
const resolveStartedAt = Date.now();
|
|
154843
154845
|
const resolved = await resolveRunDevice(
|
|
154844
154846
|
registry2,
|
|
154845
154847
|
ctx,
|
|
@@ -154872,6 +154874,7 @@ Returns a per-step report: the first failure stops the run and the rest report a
|
|
|
154872
154874
|
stopped: false,
|
|
154873
154875
|
pinned: statusBarPinned,
|
|
154874
154876
|
owned: resolved.booted ? [resolved.booted] : [],
|
|
154877
|
+
...resolved.booted ? { hoistedBootMs: Date.now() - resolveStartedAt } : {},
|
|
154875
154878
|
chromiumLaunched: false,
|
|
154876
154879
|
snapshotApps: /* @__PURE__ */ new Map(),
|
|
154877
154880
|
projectRoot: params.project_root,
|
|
@@ -154897,7 +154900,8 @@ Returns a per-step report: the first failure stops the run and the rest report a
|
|
|
154897
154900
|
device?.id ?? "",
|
|
154898
154901
|
flow.executionPrerequisite,
|
|
154899
154902
|
state3.reports,
|
|
154900
|
-
aborted2
|
|
154903
|
+
aborted2,
|
|
154904
|
+
{ startedAt: runStartedAt, durationMs: Date.now() - runStartedAt }
|
|
154901
154905
|
);
|
|
154902
154906
|
}
|
|
154903
154907
|
};
|
|
@@ -155038,7 +155042,7 @@ async function frontChromiumPage(registry2, device) {
|
|
|
155038
155042
|
} catch {
|
|
155039
155043
|
}
|
|
155040
155044
|
}
|
|
155041
|
-
function summarize(flowName, deviceId, executionPrerequisite, steps, aborted2) {
|
|
155045
|
+
function summarize(flowName, deviceId, executionPrerequisite, steps, aborted2, timing) {
|
|
155042
155046
|
let passed = 0;
|
|
155043
155047
|
let failed2 = 0;
|
|
155044
155048
|
let skipped = 0;
|
|
@@ -155064,7 +155068,8 @@ function summarize(flowName, deviceId, executionPrerequisite, steps, aborted2) {
|
|
|
155064
155068
|
failed: failed2,
|
|
155065
155069
|
skipped,
|
|
155066
155070
|
errored,
|
|
155067
|
-
steps
|
|
155071
|
+
steps,
|
|
155072
|
+
...timing
|
|
155068
155073
|
};
|
|
155069
155074
|
}
|
|
155070
155075
|
function pushReport(state3, report) {
|
|
@@ -155155,7 +155160,13 @@ async function execSteps(state3, steps, scope) {
|
|
|
155155
155160
|
await execBlockStep(state3, step, scope);
|
|
155156
155161
|
continue;
|
|
155157
155162
|
}
|
|
155163
|
+
let startedAt = Date.now();
|
|
155164
|
+
if (step.kind === "launch" && state3.hoistedBootMs !== void 0) {
|
|
155165
|
+
startedAt -= state3.hoistedBootMs;
|
|
155166
|
+
state3.hoistedBootMs = void 0;
|
|
155167
|
+
}
|
|
155158
155168
|
const report = await execLeafStep(state3, step, index, scope);
|
|
155169
|
+
if (report.status !== "skip") report.durationMs = Date.now() - startedAt;
|
|
155159
155170
|
pushReport(state3, report);
|
|
155160
155171
|
if (report.status === "fail" || report.status === "error") state3.stopped = true;
|
|
155161
155172
|
}
|
|
@@ -155198,6 +155209,7 @@ async function execWhenStep(state3, step, scope) {
|
|
|
155198
155209
|
...depthOf(scope)
|
|
155199
155210
|
};
|
|
155200
155211
|
const inner = childScope(scope);
|
|
155212
|
+
const guardStartedAt = Date.now();
|
|
155201
155213
|
let met;
|
|
155202
155214
|
if (step.condition.kind === "platform") {
|
|
155203
155215
|
const guardEnv = deviceEnv(state3);
|
|
@@ -155214,7 +155226,8 @@ async function execWhenStep(state3, step, scope) {
|
|
|
155214
155226
|
pushReport(state3, {
|
|
155215
155227
|
...marker,
|
|
155216
155228
|
status: "error",
|
|
155217
|
-
reason: `could not evaluate when guard (${label}): ${probe3.reason}
|
|
155229
|
+
reason: `could not evaluate when guard (${label}): ${probe3.reason}`,
|
|
155230
|
+
durationMs: Date.now() - guardStartedAt
|
|
155218
155231
|
});
|
|
155219
155232
|
state3.stopped = true;
|
|
155220
155233
|
reportBlockSkipped(state3, step.steps, inner, "when guard errored");
|
|
@@ -155227,12 +155240,18 @@ async function execWhenStep(state3, step, scope) {
|
|
|
155227
155240
|
pushReport(state3, {
|
|
155228
155241
|
...marker,
|
|
155229
155242
|
status: "skip",
|
|
155230
|
-
reason: `condition not met (${label}) \u2014 block skipped (${n} step${n === 1 ? "" : "s"})
|
|
155243
|
+
reason: `condition not met (${label}) \u2014 block skipped (${n} step${n === 1 ? "" : "s"})`,
|
|
155244
|
+
durationMs: Date.now() - guardStartedAt
|
|
155231
155245
|
});
|
|
155232
155246
|
reportBlockSkipped(state3, step.steps, inner, "when block skipped");
|
|
155233
155247
|
return;
|
|
155234
155248
|
}
|
|
155235
|
-
pushReport(state3, {
|
|
155249
|
+
pushReport(state3, {
|
|
155250
|
+
...marker,
|
|
155251
|
+
status: "pass",
|
|
155252
|
+
reason: `condition met (${label})`,
|
|
155253
|
+
durationMs: Date.now() - guardStartedAt
|
|
155254
|
+
});
|
|
155236
155255
|
await execSteps(state3, step.steps, inner);
|
|
155237
155256
|
}
|
|
155238
155257
|
function baselineKeyFor(canonicalPath, flowName) {
|
|
@@ -155243,6 +155262,7 @@ async function execRunStep(state3, step, scope) {
|
|
|
155243
155262
|
const index = state3.reports.length;
|
|
155244
155263
|
const target = step.flow;
|
|
155245
155264
|
const display = runDisplayName(target, scope);
|
|
155265
|
+
const startedAt = Date.now();
|
|
155246
155266
|
const fail = (reason) => {
|
|
155247
155267
|
pushReport(state3, {
|
|
155248
155268
|
index,
|
|
@@ -155251,7 +155271,8 @@ async function execRunStep(state3, step, scope) {
|
|
|
155251
155271
|
flow: display,
|
|
155252
155272
|
target,
|
|
155253
155273
|
reason,
|
|
155254
|
-
...depthOf(scope)
|
|
155274
|
+
...depthOf(scope),
|
|
155275
|
+
durationMs: Date.now() - startedAt
|
|
155255
155276
|
});
|
|
155256
155277
|
state3.stopped = true;
|
|
155257
155278
|
};
|
|
@@ -155289,7 +155310,8 @@ async function execRunStep(state3, step, scope) {
|
|
|
155289
155310
|
status: "pass",
|
|
155290
155311
|
flow: display,
|
|
155291
155312
|
target,
|
|
155292
|
-
...depthOf(scope)
|
|
155313
|
+
...depthOf(scope),
|
|
155314
|
+
durationMs: Date.now() - startedAt
|
|
155293
155315
|
});
|
|
155294
155316
|
await execSteps(
|
|
155295
155317
|
state3,
|
package/package.json
CHANGED