@validate.qa/runner 1.0.77 → 1.0.78
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.js +30 -4
- package/dist/cli.mjs +30 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -86290,11 +86290,25 @@ var require_api_call_redaction = __commonJS({
|
|
|
86290
86290
|
const lower = name.toLowerCase();
|
|
86291
86291
|
return headers.find((h) => h.name?.toLowerCase() === lower)?.value;
|
|
86292
86292
|
}
|
|
86293
|
+
var ENUM_LIKE_FIELD_NAME = /status|state|phase|role|tier|kind|mode|level|category|priority|visibility|^type$|_type$/i;
|
|
86294
|
+
var NEVER_SAMPLE_FIELD_NAME = /password|token|secret|api.?key|auth|bearer|credential|session|email|phone|address|ssn/i;
|
|
86295
|
+
var ENUM_LIKE_VALUE = /^[A-Za-z][A-Za-z0-9_-]{0,29}$/;
|
|
86296
|
+
function enumSampleHint(key, val) {
|
|
86297
|
+
if (typeof val !== "string")
|
|
86298
|
+
return null;
|
|
86299
|
+
if (NEVER_SAMPLE_FIELD_NAME.test(key))
|
|
86300
|
+
return null;
|
|
86301
|
+
if (!ENUM_LIKE_FIELD_NAME.test(key))
|
|
86302
|
+
return null;
|
|
86303
|
+
if (!ENUM_LIKE_VALUE.test(val))
|
|
86304
|
+
return null;
|
|
86305
|
+
return val;
|
|
86306
|
+
}
|
|
86293
86307
|
function extractBodyShape(body) {
|
|
86294
86308
|
if (!body)
|
|
86295
86309
|
return void 0;
|
|
86296
86310
|
try {
|
|
86297
|
-
let describeValue = function(val, depth) {
|
|
86311
|
+
let describeValue = function(val, depth, key) {
|
|
86298
86312
|
if (val === null)
|
|
86299
86313
|
return "null";
|
|
86300
86314
|
if (Array.isArray(val)) {
|
|
@@ -86311,10 +86325,16 @@ var require_api_call_redaction = __commonJS({
|
|
|
86311
86325
|
const subFields = Object.keys(v).slice(0, 15).join(",");
|
|
86312
86326
|
return subFields ? `${k}:{${subFields}}` : k;
|
|
86313
86327
|
}
|
|
86314
|
-
|
|
86328
|
+
const hint = enumSampleHint(k, v);
|
|
86329
|
+
return hint ? `${k}(e.g. "${hint}")` : k;
|
|
86315
86330
|
});
|
|
86316
86331
|
return `object{${fieldDescs.join(",")}}`;
|
|
86317
86332
|
}
|
|
86333
|
+
if (key) {
|
|
86334
|
+
const hint = enumSampleHint(key, val);
|
|
86335
|
+
if (hint)
|
|
86336
|
+
return `string (e.g. "${hint}")`;
|
|
86337
|
+
}
|
|
86318
86338
|
return typeof val;
|
|
86319
86339
|
};
|
|
86320
86340
|
const parsed = JSON.parse(body);
|
|
@@ -86322,7 +86342,7 @@ var require_api_call_redaction = __commonJS({
|
|
|
86322
86342
|
return void 0;
|
|
86323
86343
|
const shape = {};
|
|
86324
86344
|
for (const [key, val] of Object.entries(parsed)) {
|
|
86325
|
-
shape[key] = describeValue(val, 1);
|
|
86345
|
+
shape[key] = describeValue(val, 1, key);
|
|
86326
86346
|
}
|
|
86327
86347
|
return Object.keys(shape).length > 0 ? shape : void 0;
|
|
86328
86348
|
} catch {
|
|
@@ -97641,6 +97661,12 @@ ${testOpen}`;
|
|
|
97641
97661
|
}
|
|
97642
97662
|
}
|
|
97643
97663
|
}
|
|
97664
|
+
const droppedByCalls = codeForMatcherScan.match(/\.get(?:Role|Text|Label|Placeholder|TestId|AltText|Title)\s*\(/g) ?? [];
|
|
97665
|
+
for (const call of droppedByCalls) {
|
|
97666
|
+
const methodName = call.replace(/[\s(]+$/, "").slice(1);
|
|
97667
|
+
logs2?.push(` \u2717 Rejected "${t.name}": "${methodName}" is not a real Playwright method \u2014 likely "${methodName.replace("get", "getBy")}" with "By" dropped`);
|
|
97668
|
+
return false;
|
|
97669
|
+
}
|
|
97644
97670
|
if (code.includes("// TODO")) {
|
|
97645
97671
|
logs2?.push(` \u26A0 "${t.name}" contains TODO comment \u2014 marking as unverified`);
|
|
97646
97672
|
t.tags = t.tags.filter((tag) => tag !== "@verified");
|
|
@@ -353034,7 +353060,7 @@ var require_package4 = __commonJS({
|
|
|
353034
353060
|
"package.json"(exports2, module2) {
|
|
353035
353061
|
module2.exports = {
|
|
353036
353062
|
name: "@validate.qa/runner",
|
|
353037
|
-
version: "1.0.
|
|
353063
|
+
version: "1.0.78",
|
|
353038
353064
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
353039
353065
|
bin: {
|
|
353040
353066
|
"validate-runner": "dist/cli.js"
|
package/dist/cli.mjs
CHANGED
|
@@ -86295,11 +86295,25 @@ var require_api_call_redaction = __commonJS({
|
|
|
86295
86295
|
const lower = name.toLowerCase();
|
|
86296
86296
|
return headers.find((h) => h.name?.toLowerCase() === lower)?.value;
|
|
86297
86297
|
}
|
|
86298
|
+
var ENUM_LIKE_FIELD_NAME = /status|state|phase|role|tier|kind|mode|level|category|priority|visibility|^type$|_type$/i;
|
|
86299
|
+
var NEVER_SAMPLE_FIELD_NAME = /password|token|secret|api.?key|auth|bearer|credential|session|email|phone|address|ssn/i;
|
|
86300
|
+
var ENUM_LIKE_VALUE = /^[A-Za-z][A-Za-z0-9_-]{0,29}$/;
|
|
86301
|
+
function enumSampleHint(key, val) {
|
|
86302
|
+
if (typeof val !== "string")
|
|
86303
|
+
return null;
|
|
86304
|
+
if (NEVER_SAMPLE_FIELD_NAME.test(key))
|
|
86305
|
+
return null;
|
|
86306
|
+
if (!ENUM_LIKE_FIELD_NAME.test(key))
|
|
86307
|
+
return null;
|
|
86308
|
+
if (!ENUM_LIKE_VALUE.test(val))
|
|
86309
|
+
return null;
|
|
86310
|
+
return val;
|
|
86311
|
+
}
|
|
86298
86312
|
function extractBodyShape(body) {
|
|
86299
86313
|
if (!body)
|
|
86300
86314
|
return void 0;
|
|
86301
86315
|
try {
|
|
86302
|
-
let describeValue = function(val, depth) {
|
|
86316
|
+
let describeValue = function(val, depth, key) {
|
|
86303
86317
|
if (val === null)
|
|
86304
86318
|
return "null";
|
|
86305
86319
|
if (Array.isArray(val)) {
|
|
@@ -86316,10 +86330,16 @@ var require_api_call_redaction = __commonJS({
|
|
|
86316
86330
|
const subFields = Object.keys(v).slice(0, 15).join(",");
|
|
86317
86331
|
return subFields ? `${k}:{${subFields}}` : k;
|
|
86318
86332
|
}
|
|
86319
|
-
|
|
86333
|
+
const hint = enumSampleHint(k, v);
|
|
86334
|
+
return hint ? `${k}(e.g. "${hint}")` : k;
|
|
86320
86335
|
});
|
|
86321
86336
|
return `object{${fieldDescs.join(",")}}`;
|
|
86322
86337
|
}
|
|
86338
|
+
if (key) {
|
|
86339
|
+
const hint = enumSampleHint(key, val);
|
|
86340
|
+
if (hint)
|
|
86341
|
+
return `string (e.g. "${hint}")`;
|
|
86342
|
+
}
|
|
86323
86343
|
return typeof val;
|
|
86324
86344
|
};
|
|
86325
86345
|
const parsed = JSON.parse(body);
|
|
@@ -86327,7 +86347,7 @@ var require_api_call_redaction = __commonJS({
|
|
|
86327
86347
|
return void 0;
|
|
86328
86348
|
const shape = {};
|
|
86329
86349
|
for (const [key, val] of Object.entries(parsed)) {
|
|
86330
|
-
shape[key] = describeValue(val, 1);
|
|
86350
|
+
shape[key] = describeValue(val, 1, key);
|
|
86331
86351
|
}
|
|
86332
86352
|
return Object.keys(shape).length > 0 ? shape : void 0;
|
|
86333
86353
|
} catch {
|
|
@@ -97646,6 +97666,12 @@ ${testOpen}`;
|
|
|
97646
97666
|
}
|
|
97647
97667
|
}
|
|
97648
97668
|
}
|
|
97669
|
+
const droppedByCalls = codeForMatcherScan.match(/\.get(?:Role|Text|Label|Placeholder|TestId|AltText|Title)\s*\(/g) ?? [];
|
|
97670
|
+
for (const call of droppedByCalls) {
|
|
97671
|
+
const methodName = call.replace(/[\s(]+$/, "").slice(1);
|
|
97672
|
+
logs2?.push(` \u2717 Rejected "${t.name}": "${methodName}" is not a real Playwright method \u2014 likely "${methodName.replace("get", "getBy")}" with "By" dropped`);
|
|
97673
|
+
return false;
|
|
97674
|
+
}
|
|
97649
97675
|
if (code.includes("// TODO")) {
|
|
97650
97676
|
logs2?.push(` \u26A0 "${t.name}" contains TODO comment \u2014 marking as unverified`);
|
|
97651
97677
|
t.tags = t.tags.filter((tag) => tag !== "@verified");
|
|
@@ -353039,7 +353065,7 @@ var require_package4 = __commonJS({
|
|
|
353039
353065
|
"package.json"(exports, module) {
|
|
353040
353066
|
module.exports = {
|
|
353041
353067
|
name: "@validate.qa/runner",
|
|
353042
|
-
version: "1.0.
|
|
353068
|
+
version: "1.0.78",
|
|
353043
353069
|
description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
|
|
353044
353070
|
bin: {
|
|
353045
353071
|
"validate-runner": "dist/cli.js"
|
package/package.json
CHANGED