@piwitests/reporter 0.48.0 → 0.50.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/dist/global-setup-module.js +13 -6
- package/dist/index.d.ts +3 -1
- package/dist/index.js +665 -227
- package/dist/internal/capture/capture-fixtures.js +445 -100
- package/dist/internal/capture/inspect-on-failure.d.ts +3 -1
- package/dist/internal/capture/inspect-on-failure.js +2 -0
- package/dist/internal/capture/pick-on-failure.d.ts +15 -7
- package/dist/internal/capture/pick-on-failure.js +36 -30
- package/package.json +1 -1
- package/templates/skills/investigate-failure/SKILL.md +1 -1
|
@@ -648,11 +648,17 @@ function wildcard(pattern) {
|
|
|
648
648
|
const escaped = pattern.split("*").map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
649
649
|
return new RegExp(`^${escaped.join(".*")}$`, "i");
|
|
650
650
|
}
|
|
651
|
-
function selectedProjects(projects, argv = process.argv) {
|
|
652
|
-
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
-
|
|
651
|
+
function selectedProjects(projects, argv = process.argv, filtered) {
|
|
652
|
+
let chosen;
|
|
653
|
+
if (Array.isArray(filtered)) {
|
|
654
|
+
const names = new Set(filtered.map((p) => p.name).filter(Boolean));
|
|
655
|
+
chosen = new Set(projects.filter((p) => filtered.includes(p) || !!p.name && names.has(p.name)));
|
|
656
|
+
} else {
|
|
657
|
+
const names = cliProjectNames(argv);
|
|
658
|
+
if (!names || names.length === 0) return projects;
|
|
659
|
+
const patterns = names.map(wildcard);
|
|
660
|
+
chosen = new Set(projects.filter((p) => patterns.some((re) => re.test(p.name ?? ""))));
|
|
661
|
+
}
|
|
656
662
|
if (!argv.includes("--no-deps")) {
|
|
657
663
|
const byName = new Map(projects.map((p) => [p.name ?? "", p]));
|
|
658
664
|
const queue = [...chosen];
|
|
@@ -674,8 +680,9 @@ function asProxy(value) {
|
|
|
674
680
|
}
|
|
675
681
|
function baseUrlTargets(config, argv = process.argv) {
|
|
676
682
|
const projects = config.projects?.length ? config.projects : [{ name: "", use: config.use }];
|
|
683
|
+
const filtered = config.projects?.length ? config.filteredProjects : void 0;
|
|
677
684
|
const targets = /* @__PURE__ */ new Map();
|
|
678
|
-
for (const project of selectedProjects(projects, argv)) {
|
|
685
|
+
for (const project of selectedProjects(projects, argv, filtered)) {
|
|
679
686
|
const url = project.use?.baseURL;
|
|
680
687
|
if (typeof url !== "string" || !/^https?:\/\//i.test(url)) continue;
|
|
681
688
|
const target = targets.get(url);
|
package/dist/index.d.ts
CHANGED
|
@@ -175,7 +175,9 @@ interface PiwiDashboardOptions {
|
|
|
175
175
|
* runs no test and reaches no dashboard. The check runs in the reporter's
|
|
176
176
|
* global setup, after `webServer` has started and before the config's own
|
|
177
177
|
* `globalSetup`, so leave it off when that setup is what starts the app. Only
|
|
178
|
-
* the projects
|
|
178
|
+
* the projects the run selects are checked, with their dependencies: the ones
|
|
179
|
+
* `--project` names, or every project but those declared `default: false`
|
|
180
|
+
* (Playwright 1.64+). **Defaults to `false`**. Can
|
|
179
181
|
* also be set with `PIWI_CHECK_BASE_URL=true`.
|
|
180
182
|
*/
|
|
181
183
|
checkBaseUrl?: boolean;
|