sedum-cli 0.1.0-alpha.18 → 0.1.0-alpha.21
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/README.md +65 -0
- package/dist/{affected-selection-DAQPGKOZ.js → affected-selection-NTBVWIK5.js} +10 -50
- package/dist/auth-command-TSTYIWGX.js +634 -0
- package/dist/chunk-CGDXQY2Y.js +208 -0
- package/dist/{chunk-SI2F6MBN.js → chunk-DXNJ3PGB.js} +44 -18
- package/dist/{chunk-FG46OUHT.js → chunk-FOGLJA3Z.js} +4 -2
- package/dist/{chunk-KZF4NZ6M.js → chunk-J7CLCLHW.js} +267 -354
- package/dist/chunk-JYWNBHN7.js +109 -0
- package/dist/chunk-NIUOM3FA.js +50 -0
- package/dist/{chunk-EPXLY5Q4.js → chunk-PX6PJ7U2.js} +291 -174
- package/dist/{chunk-6ILFLNDI.js → chunk-QVCT63FH.js} +1 -1
- package/dist/cli.js +10 -3
- package/dist/cloud-command-YYQ47FTU.js +329 -0
- package/dist/cloud-upload-IGNNU5WX.js +243 -0
- package/dist/{doctor-command-7IBKI5YO.js → doctor-command-OFMURNPN.js} +5 -2
- package/dist/{explore-command-QZCKFDYM.js → explore-command-KMS6UAPM.js} +3 -2
- package/dist/index.d.ts +21 -0
- package/dist/index.js +5 -3
- package/dist/{init-command-MBTLGU5J.js → init-command-IXR3YUQW.js} +3 -2
- package/dist/{run-command-P55TKTX3.js → run-command-6UTIJAHU.js} +39 -22
- package/package.json +6 -5
|
@@ -5,20 +5,22 @@ import {
|
|
|
5
5
|
} from "./chunk-EFRMSNBD.js";
|
|
6
6
|
import {
|
|
7
7
|
discoverRunTests
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QVCT63FH.js";
|
|
9
9
|
import {
|
|
10
10
|
createCliProvider
|
|
11
11
|
} from "./chunk-N5CTUO2A.js";
|
|
12
12
|
import {
|
|
13
13
|
DetectorUnsupportedError,
|
|
14
|
-
ProjectConfigError,
|
|
15
14
|
canonicalDiagnosticError,
|
|
16
15
|
flowDiagnostic,
|
|
17
|
-
loadProjectConfig,
|
|
18
16
|
outputDiagnostic,
|
|
19
17
|
setupDiagnostic,
|
|
20
18
|
stopsRun
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CGDXQY2Y.js";
|
|
20
|
+
import {
|
|
21
|
+
ProjectConfigError,
|
|
22
|
+
loadProjectConfig
|
|
23
|
+
} from "./chunk-J7CLCLHW.js";
|
|
22
24
|
|
|
23
25
|
// src/run-command/implementation.ts
|
|
24
26
|
import {
|
|
@@ -65,9 +67,11 @@ async function discoverCommandTests(config, options, safeText2) {
|
|
|
65
67
|
options.filters
|
|
66
68
|
);
|
|
67
69
|
const selected = options.shard ? shardTests(selection.tests, options.shard) : selection.tests;
|
|
70
|
+
const nonBlocking = options.nonBlockingLabels ?? [];
|
|
68
71
|
const files = selected.map((test) => ({
|
|
69
72
|
file: path.join(config.projectRoot, test.file),
|
|
70
|
-
id: test.id
|
|
73
|
+
id: test.id,
|
|
74
|
+
blocking: !test.tags.some((tag) => nonBlocking.includes(tag))
|
|
71
75
|
}));
|
|
72
76
|
const problems = [
|
|
73
77
|
...selection.problems,
|
|
@@ -1065,10 +1069,10 @@ function validateVision(config) {
|
|
|
1065
1069
|
// src/run-command/support.ts
|
|
1066
1070
|
import { safeText } from "@sedum-dev/core";
|
|
1067
1071
|
import path8 from "path";
|
|
1068
|
-
function verifyGraceMs(value) {
|
|
1069
|
-
if (value === void 0) return
|
|
1072
|
+
function verifyGraceMs(value, configured = 5e3) {
|
|
1073
|
+
if (value === void 0) return configured;
|
|
1070
1074
|
const parsed = Number(value);
|
|
1071
|
-
return Number.isFinite(parsed) && parsed >= 0 && parsed <= 12e4 ? parsed :
|
|
1075
|
+
return Number.isFinite(parsed) && parsed >= 0 && parsed <= 12e4 ? parsed : configured;
|
|
1072
1076
|
}
|
|
1073
1077
|
function strayRejectionDiagnostic(strays, config) {
|
|
1074
1078
|
const stray = strays[0];
|
|
@@ -1182,15 +1186,19 @@ async function visionModel(config) {
|
|
|
1182
1186
|
return IMAGE_MODEL;
|
|
1183
1187
|
}
|
|
1184
1188
|
async function selectTests(request, lanes, providerConcurrency, visionModel2) {
|
|
1185
|
-
await request.recorder.selectTests(
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1189
|
+
await request.recorder.selectTests(
|
|
1190
|
+
request.files.length,
|
|
1191
|
+
{
|
|
1192
|
+
parallel: { requested: request.options.parallel ?? 1, lanes },
|
|
1193
|
+
shard: request.options.shard ? {
|
|
1194
|
+
...request.options.shard,
|
|
1195
|
+
globalSelectedTests: request.globalSelectedTests
|
|
1196
|
+
} : null,
|
|
1197
|
+
providerConcurrency,
|
|
1198
|
+
...visionModel2 ? { vision: { model: visionModel2 } } : {}
|
|
1199
|
+
},
|
|
1200
|
+
request.files.filter((test) => !test.blocking).map((test) => test.id)
|
|
1201
|
+
);
|
|
1194
1202
|
if (request.discoveryProblems.length)
|
|
1195
1203
|
await request.recorder.addDiscoveryProblems(request.discoveryProblems);
|
|
1196
1204
|
}
|
|
@@ -1273,7 +1281,10 @@ function testDependencies(request, resources, slot) {
|
|
|
1273
1281
|
browserKind: config.browser,
|
|
1274
1282
|
viewport: config.viewport,
|
|
1275
1283
|
verifyPolicy: config.thresholds,
|
|
1276
|
-
verifyGraceMs: verifyGraceMs(
|
|
1284
|
+
verifyGraceMs: verifyGraceMs(
|
|
1285
|
+
process.env.SEDUM_VERIFY_GRACE_MS,
|
|
1286
|
+
config.stepTimeoutMs
|
|
1287
|
+
),
|
|
1277
1288
|
...config.baseUrl ? { baseUrl: config.baseUrl } : {},
|
|
1278
1289
|
...options.urlOverride ? { urlOverride: options.urlOverride } : {},
|
|
1279
1290
|
...options.headed ? { headless: false, headedOverlay: true } : {},
|
|
@@ -1300,10 +1311,16 @@ async function handleOperationalFailure(request, slot, result, outcome) {
|
|
|
1300
1311
|
request.config.providerName,
|
|
1301
1312
|
request.config.apiKeyEnv
|
|
1302
1313
|
);
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1314
|
+
if (stopsRun(result.code)) {
|
|
1315
|
+
outcome.operational ??= diagnostic;
|
|
1316
|
+
return "stop";
|
|
1317
|
+
}
|
|
1318
|
+
const recording = request.recorder.testAt(slot.ordinal);
|
|
1319
|
+
if (slot.test.blocking || !recording) {
|
|
1320
|
+
outcome.operational ??= diagnostic;
|
|
1321
|
+
outcome.erroredTests += 1;
|
|
1322
|
+
}
|
|
1323
|
+
await recording?.errorTest(canonicalDiagnosticError(diagnostic));
|
|
1307
1324
|
return "complete";
|
|
1308
1325
|
}
|
|
1309
1326
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sedum-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.21",
|
|
4
4
|
"description": "Plain-English browser tests on Playwright. Write steps as sentences, keep TypeScript, and run the suite on every pull request.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"playwright",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"commander": "14.0.2",
|
|
44
44
|
"minimatch": "10.2.6",
|
|
45
45
|
"yaml": "2.9.1",
|
|
46
|
-
"
|
|
47
|
-
"@sedum-dev/
|
|
48
|
-
"@sedum-dev/provider-
|
|
49
|
-
"@sedum-dev/
|
|
46
|
+
"zod": "4.6.7",
|
|
47
|
+
"@sedum-dev/core": "0.1.0-alpha.21",
|
|
48
|
+
"@sedum-dev/provider-clef": "0.1.0-alpha.21",
|
|
49
|
+
"@sedum-dev/provider-typesafe": "0.1.0-alpha.21",
|
|
50
|
+
"@sedum-dev/reporters": "0.1.0-alpha.21"
|
|
50
51
|
},
|
|
51
52
|
"scripts": {
|
|
52
53
|
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean --out-dir dist",
|