donobu 5.60.2 → 5.60.4
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/donobu-cli.js +8 -4
- package/dist/esm/cli/donobu-cli.js +8 -4
- package/dist/esm/lib/test/healRerunGate.d.ts +38 -6
- package/dist/esm/lib/test/healRerunGate.js +40 -10
- package/dist/esm/managers/DonobuStack.d.ts +19 -19
- package/dist/esm/utils/BrowserUtils.d.ts +4 -4
- package/dist/lib/test/healRerunGate.d.ts +38 -6
- package/dist/lib/test/healRerunGate.js +40 -10
- package/dist/managers/DonobuStack.d.ts +19 -19
- package/dist/utils/BrowserUtils.d.ts +4 -4
- package/package.json +4 -4
package/dist/cli/donobu-cli.js
CHANGED
|
@@ -1378,10 +1378,14 @@ async function attemptAutoHealRun(params) {
|
|
|
1378
1378
|
envOverrides.DONOBU_PAGE_AI_CLEAR_CACHE_FILES =
|
|
1379
1379
|
JSON.stringify(clearCacheFiles);
|
|
1380
1380
|
}
|
|
1381
|
-
// The rerun plan drives the
|
|
1382
|
-
// only the heal targets (and their declared
|
|
1383
|
-
// execute; every other collected test
|
|
1384
|
-
// dependency projects still run in full —
|
|
1381
|
+
// The rerun plan drives the runtime gate in the test wrapper: within the
|
|
1382
|
+
// target projects, only the heal targets (and their declared
|
|
1383
|
+
// `describe.serial` siblings) execute; every other collected test skips.
|
|
1384
|
+
// Declared dependency (setup) projects still run in full — the gate
|
|
1385
|
+
// exempts any test whose project is not a heal-target project, so the
|
|
1386
|
+
// storage-state auth and fixture seeding the targets rely on are produced
|
|
1387
|
+
// (see healRerunGate). Each target carries its `projectName` so the gate
|
|
1388
|
+
// can tell a target project apart from a dependency one.
|
|
1385
1389
|
const healPlanPath = path.join(staging.rootDir, 'heal-rerun-plan.json');
|
|
1386
1390
|
await fs_1.promises.writeFile(healPlanPath, JSON.stringify({ targets: healTargets }), 'utf8');
|
|
1387
1391
|
envOverrides.DONOBU_AUTO_HEAL_PLAN_PATH = healPlanPath;
|
|
@@ -1378,10 +1378,14 @@ async function attemptAutoHealRun(params) {
|
|
|
1378
1378
|
envOverrides.DONOBU_PAGE_AI_CLEAR_CACHE_FILES =
|
|
1379
1379
|
JSON.stringify(clearCacheFiles);
|
|
1380
1380
|
}
|
|
1381
|
-
// The rerun plan drives the
|
|
1382
|
-
// only the heal targets (and their declared
|
|
1383
|
-
// execute; every other collected test
|
|
1384
|
-
// dependency projects still run in full —
|
|
1381
|
+
// The rerun plan drives the runtime gate in the test wrapper: within the
|
|
1382
|
+
// target projects, only the heal targets (and their declared
|
|
1383
|
+
// `describe.serial` siblings) execute; every other collected test skips.
|
|
1384
|
+
// Declared dependency (setup) projects still run in full — the gate
|
|
1385
|
+
// exempts any test whose project is not a heal-target project, so the
|
|
1386
|
+
// storage-state auth and fixture seeding the targets rely on are produced
|
|
1387
|
+
// (see healRerunGate). Each target carries its `projectName` so the gate
|
|
1388
|
+
// can tell a target project apart from a dependency one.
|
|
1385
1389
|
const healPlanPath = path.join(staging.rootDir, 'heal-rerun-plan.json');
|
|
1386
1390
|
await fs_1.promises.writeFile(healPlanPath, JSON.stringify({ targets: healTargets }), 'utf8');
|
|
1387
1391
|
envOverrides.DONOBU_AUTO_HEAL_PLAN_PATH = healPlanPath;
|
|
@@ -22,7 +22,15 @@
|
|
|
22
22
|
* `expandTargetsWithSerialCompanions`) using the `serialScoped` flags the
|
|
23
23
|
* Donobu reporter recorded during the initial run — the runner process
|
|
24
24
|
* sees the suite tree; the worker (where this gate runs) does not.
|
|
25
|
-
* - Declared dependency projects,
|
|
25
|
+
* - Declared dependency (setup) projects, in full. Playwright schedules them
|
|
26
|
+
* because a target project lists them in `dependencies`, and the rerun
|
|
27
|
+
* command only ever passes `--project=<target>`, so any project that runs
|
|
28
|
+
* and is NOT a heal-target project is, by construction, such a dependency
|
|
29
|
+
* project. The gate exempts every test whose project is not a target
|
|
30
|
+
* project, so the auth/storage-state and fixture seeding those projects
|
|
31
|
+
* perform actually runs. (A prior version skipped them too — every test
|
|
32
|
+
* not literally in the plan — which broke targets that depend on the
|
|
33
|
+
* `.auth` storage state a setup project produces.)
|
|
26
34
|
*
|
|
27
35
|
* Implicit ordering (checkpoint files between plain tests, cross-file state
|
|
28
36
|
* with `workers: 1`) is deliberately NOT honored: tests relying on it will
|
|
@@ -45,18 +53,42 @@ export interface HealRerunPlan {
|
|
|
45
53
|
projectName?: string;
|
|
46
54
|
}>;
|
|
47
55
|
}
|
|
48
|
-
/**
|
|
49
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Heal-rerun targets indexed for O(1) per-test decisions.
|
|
58
|
+
*
|
|
59
|
+
* `byFile` maps an absolute spec path to the heal-target titles in that file.
|
|
60
|
+
* `targetProjects` is the set of projects that own those targets; the rerun is
|
|
61
|
+
* launched with `--project=<target>` only, so any project Playwright also runs
|
|
62
|
+
* is there purely as a declared dependency (setup) project — see
|
|
63
|
+
* `shouldRunDuringHealRerun`. Empty when no target carries a project name, in
|
|
64
|
+
* which case the gate degrades to pure file+title matching.
|
|
65
|
+
*/
|
|
66
|
+
export interface HealRerunPlanIndex {
|
|
67
|
+
byFile: Map<string, Set<string>>;
|
|
68
|
+
targetProjects: Set<string>;
|
|
69
|
+
}
|
|
50
70
|
export declare function buildPlanIndex(plan: HealRerunPlan): HealRerunPlanIndex;
|
|
51
71
|
/**
|
|
52
|
-
* Pure decision: should the test in `file` with `title`
|
|
53
|
-
* during the heal rerun? The plan is fully
|
|
54
|
-
* already expanded into it by the
|
|
72
|
+
* Pure decision: should the test in `file` with `title` (owned by project
|
|
73
|
+
* `projectName`) actually execute during the heal rerun? The plan is fully
|
|
74
|
+
* explicit — serial companions were already expanded into it by the
|
|
75
|
+
* orchestrator.
|
|
76
|
+
*
|
|
77
|
+
* Dependency/setup projects (auth login, fixture seeding, …) are pulled in by
|
|
78
|
+
* Playwright because a target project declares them in `dependencies`. They
|
|
79
|
+
* are never themselves heal targets, but their tests MUST run so the state the
|
|
80
|
+
* targets depend on (storage-state auth files, seeded documents) is in place
|
|
81
|
+
* before the rerun. The rerun command only ever passes `--project=<target>`,
|
|
82
|
+
* so any project Playwright runs that is not a target project is, by
|
|
83
|
+
* construction, such a dependency project — run it in full. Guarded on a
|
|
84
|
+
* non-empty target-project set so the gate degrades to pure file+title
|
|
85
|
+
* matching when project names are unavailable.
|
|
55
86
|
*/
|
|
56
87
|
export declare function shouldRunDuringHealRerun(params: {
|
|
57
88
|
index: HealRerunPlanIndex;
|
|
58
89
|
file: string;
|
|
59
90
|
title: string;
|
|
91
|
+
projectName?: string;
|
|
60
92
|
}): boolean;
|
|
61
93
|
/**
|
|
62
94
|
* Expand heal targets with their `describe.serial` siblings, using the
|
|
@@ -23,7 +23,15 @@
|
|
|
23
23
|
* `expandTargetsWithSerialCompanions`) using the `serialScoped` flags the
|
|
24
24
|
* Donobu reporter recorded during the initial run — the runner process
|
|
25
25
|
* sees the suite tree; the worker (where this gate runs) does not.
|
|
26
|
-
* - Declared dependency projects,
|
|
26
|
+
* - Declared dependency (setup) projects, in full. Playwright schedules them
|
|
27
|
+
* because a target project lists them in `dependencies`, and the rerun
|
|
28
|
+
* command only ever passes `--project=<target>`, so any project that runs
|
|
29
|
+
* and is NOT a heal-target project is, by construction, such a dependency
|
|
30
|
+
* project. The gate exempts every test whose project is not a target
|
|
31
|
+
* project, so the auth/storage-state and fixture seeding those projects
|
|
32
|
+
* perform actually runs. (A prior version skipped them too — every test
|
|
33
|
+
* not literally in the plan — which broke targets that depend on the
|
|
34
|
+
* `.auth` storage state a setup project produces.)
|
|
27
35
|
*
|
|
28
36
|
* Implicit ordering (checkpoint files between plain tests, cross-file state
|
|
29
37
|
* with `workers: 1`) is deliberately NOT honored: tests relying on it will
|
|
@@ -51,26 +59,47 @@ const envVars_1 = require("../../envVars");
|
|
|
51
59
|
const model_1 = require("../../reporter/model");
|
|
52
60
|
const Logger_1 = require("../../utils/Logger");
|
|
53
61
|
function buildPlanIndex(plan) {
|
|
54
|
-
const
|
|
62
|
+
const byFile = new Map();
|
|
63
|
+
const targetProjects = new Set();
|
|
55
64
|
for (const target of plan.targets ?? []) {
|
|
56
65
|
if (!target?.file || !target?.title) {
|
|
57
66
|
continue;
|
|
58
67
|
}
|
|
59
68
|
const file = path_1.default.resolve(target.file);
|
|
60
|
-
if (!
|
|
61
|
-
|
|
69
|
+
if (!byFile.has(file)) {
|
|
70
|
+
byFile.set(file, new Set());
|
|
71
|
+
}
|
|
72
|
+
byFile.get(file).add(target.title);
|
|
73
|
+
if (target.projectName) {
|
|
74
|
+
targetProjects.add(target.projectName);
|
|
62
75
|
}
|
|
63
|
-
index.get(file).add(target.title);
|
|
64
76
|
}
|
|
65
|
-
return
|
|
77
|
+
return { byFile, targetProjects };
|
|
66
78
|
}
|
|
67
79
|
/**
|
|
68
|
-
* Pure decision: should the test in `file` with `title`
|
|
69
|
-
* during the heal rerun? The plan is fully
|
|
70
|
-
* already expanded into it by the
|
|
80
|
+
* Pure decision: should the test in `file` with `title` (owned by project
|
|
81
|
+
* `projectName`) actually execute during the heal rerun? The plan is fully
|
|
82
|
+
* explicit — serial companions were already expanded into it by the
|
|
83
|
+
* orchestrator.
|
|
84
|
+
*
|
|
85
|
+
* Dependency/setup projects (auth login, fixture seeding, …) are pulled in by
|
|
86
|
+
* Playwright because a target project declares them in `dependencies`. They
|
|
87
|
+
* are never themselves heal targets, but their tests MUST run so the state the
|
|
88
|
+
* targets depend on (storage-state auth files, seeded documents) is in place
|
|
89
|
+
* before the rerun. The rerun command only ever passes `--project=<target>`,
|
|
90
|
+
* so any project Playwright runs that is not a target project is, by
|
|
91
|
+
* construction, such a dependency project — run it in full. Guarded on a
|
|
92
|
+
* non-empty target-project set so the gate degrades to pure file+title
|
|
93
|
+
* matching when project names are unavailable.
|
|
71
94
|
*/
|
|
72
95
|
function shouldRunDuringHealRerun(params) {
|
|
73
|
-
const
|
|
96
|
+
const { index, projectName } = params;
|
|
97
|
+
if (projectName !== undefined &&
|
|
98
|
+
index.targetProjects.size > 0 &&
|
|
99
|
+
!index.targetProjects.has(projectName)) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
const titles = index.byFile.get(path_1.default.resolve(params.file));
|
|
74
103
|
return titles?.has(params.title) ?? false;
|
|
75
104
|
}
|
|
76
105
|
/**
|
|
@@ -173,6 +202,7 @@ function maybeSkipForHealRerun(testInfo, options) {
|
|
|
173
202
|
index,
|
|
174
203
|
file: testInfo.file,
|
|
175
204
|
title: testInfo.title,
|
|
205
|
+
projectName: testInfo.project?.name,
|
|
176
206
|
});
|
|
177
207
|
if (shouldRun) {
|
|
178
208
|
return;
|
|
@@ -43,25 +43,25 @@ export type DonobuStack = {
|
|
|
43
43
|
* environment variables.
|
|
44
44
|
*/
|
|
45
45
|
export declare function setupDonobuStack(donobuDeploymentEnvironment: DonobuDeploymentEnvironment, controlPanelFactory: ControlPanelFactory, envPersistenceVolatile?: EnvPersistenceVolatile, environ?: import("env-struct").Env<{
|
|
46
|
-
BASE64_GPT_CONFIG: import("zod
|
|
47
|
-
BROWSERBASE_API_KEY: import("zod
|
|
48
|
-
BROWSERBASE_PROJECT_ID: import("zod
|
|
49
|
-
DONOBU_API_BASE_URL: import("zod
|
|
50
|
-
ANTHROPIC_API_KEY: import("zod
|
|
51
|
-
ANTHROPIC_MODEL_NAME: import("zod
|
|
52
|
-
GOOGLE_GENERATIVE_AI_API_KEY: import("zod
|
|
53
|
-
GOOGLE_GENERATIVE_AI_MODEL_NAME: import("zod
|
|
54
|
-
OLLAMA_MODEL_NAME: import("zod
|
|
55
|
-
OLLAMA_API_URL: import("zod
|
|
56
|
-
OPENAI_API_KEY: import("zod
|
|
57
|
-
OPENAI_API_MODEL_NAME: import("zod
|
|
58
|
-
PERSISTENCE_PRIORITY: import("zod
|
|
59
|
-
AWS_BEDROCK_MODEL_NAME: import("zod
|
|
60
|
-
AWS_ACCESS_KEY_ID: import("zod
|
|
61
|
-
AWS_SECRET_ACCESS_KEY: import("zod
|
|
62
|
-
DONOBU_API_KEY: import("zod
|
|
63
|
-
DONOBU_PERSISTENCE_API_KEY: import("zod
|
|
64
|
-
DONOBU_UPLOADS_OWNED_BY_PARENT: import("zod
|
|
46
|
+
BASE64_GPT_CONFIG: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
BROWSERBASE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
BROWSERBASE_PROJECT_ID: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
DONOBU_API_BASE_URL: import("zod").ZodDefault<import("zod").ZodString>;
|
|
50
|
+
ANTHROPIC_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
ANTHROPIC_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
GOOGLE_GENERATIVE_AI_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
GOOGLE_GENERATIVE_AI_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
OLLAMA_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
OLLAMA_API_URL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
OPENAI_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
OPENAI_API_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
PERSISTENCE_PRIORITY: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
59
|
+
AWS_BEDROCK_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
AWS_ACCESS_KEY_ID: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
+
AWS_SECRET_ACCESS_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
DONOBU_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
DONOBU_PERSISTENCE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
DONOBU_UPLOADS_OWNED_BY_PARENT: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
65
65
|
}, {
|
|
66
66
|
BASE64_GPT_CONFIG?: string | undefined;
|
|
67
67
|
BROWSERBASE_API_KEY?: string | undefined;
|
|
@@ -71,10 +71,10 @@ export declare class BrowserUtils {
|
|
|
71
71
|
* @throws {InvalidParamValueException} When an invalid browser type is specified.
|
|
72
72
|
*/
|
|
73
73
|
static create(browserConfig: BrowserConfig, videoDir?: string, storageState?: BrowserStorageState, environ?: import("env-struct").Env<{
|
|
74
|
-
BROWSERBASE_API_KEY: import("zod
|
|
75
|
-
PROXY_SERVER: import("zod
|
|
76
|
-
PROXY_USERNAME: import("zod
|
|
77
|
-
PROXY_PASSWORD: import("zod
|
|
74
|
+
BROWSERBASE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
|
+
PROXY_SERVER: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
+
PROXY_USERNAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
+
PROXY_PASSWORD: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
78
|
}, {
|
|
79
79
|
BROWSERBASE_API_KEY?: string | undefined;
|
|
80
80
|
PROXY_SERVER?: string | undefined;
|
|
@@ -22,7 +22,15 @@
|
|
|
22
22
|
* `expandTargetsWithSerialCompanions`) using the `serialScoped` flags the
|
|
23
23
|
* Donobu reporter recorded during the initial run — the runner process
|
|
24
24
|
* sees the suite tree; the worker (where this gate runs) does not.
|
|
25
|
-
* - Declared dependency projects,
|
|
25
|
+
* - Declared dependency (setup) projects, in full. Playwright schedules them
|
|
26
|
+
* because a target project lists them in `dependencies`, and the rerun
|
|
27
|
+
* command only ever passes `--project=<target>`, so any project that runs
|
|
28
|
+
* and is NOT a heal-target project is, by construction, such a dependency
|
|
29
|
+
* project. The gate exempts every test whose project is not a target
|
|
30
|
+
* project, so the auth/storage-state and fixture seeding those projects
|
|
31
|
+
* perform actually runs. (A prior version skipped them too — every test
|
|
32
|
+
* not literally in the plan — which broke targets that depend on the
|
|
33
|
+
* `.auth` storage state a setup project produces.)
|
|
26
34
|
*
|
|
27
35
|
* Implicit ordering (checkpoint files between plain tests, cross-file state
|
|
28
36
|
* with `workers: 1`) is deliberately NOT honored: tests relying on it will
|
|
@@ -45,18 +53,42 @@ export interface HealRerunPlan {
|
|
|
45
53
|
projectName?: string;
|
|
46
54
|
}>;
|
|
47
55
|
}
|
|
48
|
-
/**
|
|
49
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Heal-rerun targets indexed for O(1) per-test decisions.
|
|
58
|
+
*
|
|
59
|
+
* `byFile` maps an absolute spec path to the heal-target titles in that file.
|
|
60
|
+
* `targetProjects` is the set of projects that own those targets; the rerun is
|
|
61
|
+
* launched with `--project=<target>` only, so any project Playwright also runs
|
|
62
|
+
* is there purely as a declared dependency (setup) project — see
|
|
63
|
+
* `shouldRunDuringHealRerun`. Empty when no target carries a project name, in
|
|
64
|
+
* which case the gate degrades to pure file+title matching.
|
|
65
|
+
*/
|
|
66
|
+
export interface HealRerunPlanIndex {
|
|
67
|
+
byFile: Map<string, Set<string>>;
|
|
68
|
+
targetProjects: Set<string>;
|
|
69
|
+
}
|
|
50
70
|
export declare function buildPlanIndex(plan: HealRerunPlan): HealRerunPlanIndex;
|
|
51
71
|
/**
|
|
52
|
-
* Pure decision: should the test in `file` with `title`
|
|
53
|
-
* during the heal rerun? The plan is fully
|
|
54
|
-
* already expanded into it by the
|
|
72
|
+
* Pure decision: should the test in `file` with `title` (owned by project
|
|
73
|
+
* `projectName`) actually execute during the heal rerun? The plan is fully
|
|
74
|
+
* explicit — serial companions were already expanded into it by the
|
|
75
|
+
* orchestrator.
|
|
76
|
+
*
|
|
77
|
+
* Dependency/setup projects (auth login, fixture seeding, …) are pulled in by
|
|
78
|
+
* Playwright because a target project declares them in `dependencies`. They
|
|
79
|
+
* are never themselves heal targets, but their tests MUST run so the state the
|
|
80
|
+
* targets depend on (storage-state auth files, seeded documents) is in place
|
|
81
|
+
* before the rerun. The rerun command only ever passes `--project=<target>`,
|
|
82
|
+
* so any project Playwright runs that is not a target project is, by
|
|
83
|
+
* construction, such a dependency project — run it in full. Guarded on a
|
|
84
|
+
* non-empty target-project set so the gate degrades to pure file+title
|
|
85
|
+
* matching when project names are unavailable.
|
|
55
86
|
*/
|
|
56
87
|
export declare function shouldRunDuringHealRerun(params: {
|
|
57
88
|
index: HealRerunPlanIndex;
|
|
58
89
|
file: string;
|
|
59
90
|
title: string;
|
|
91
|
+
projectName?: string;
|
|
60
92
|
}): boolean;
|
|
61
93
|
/**
|
|
62
94
|
* Expand heal targets with their `describe.serial` siblings, using the
|
|
@@ -23,7 +23,15 @@
|
|
|
23
23
|
* `expandTargetsWithSerialCompanions`) using the `serialScoped` flags the
|
|
24
24
|
* Donobu reporter recorded during the initial run — the runner process
|
|
25
25
|
* sees the suite tree; the worker (where this gate runs) does not.
|
|
26
|
-
* - Declared dependency projects,
|
|
26
|
+
* - Declared dependency (setup) projects, in full. Playwright schedules them
|
|
27
|
+
* because a target project lists them in `dependencies`, and the rerun
|
|
28
|
+
* command only ever passes `--project=<target>`, so any project that runs
|
|
29
|
+
* and is NOT a heal-target project is, by construction, such a dependency
|
|
30
|
+
* project. The gate exempts every test whose project is not a target
|
|
31
|
+
* project, so the auth/storage-state and fixture seeding those projects
|
|
32
|
+
* perform actually runs. (A prior version skipped them too — every test
|
|
33
|
+
* not literally in the plan — which broke targets that depend on the
|
|
34
|
+
* `.auth` storage state a setup project produces.)
|
|
27
35
|
*
|
|
28
36
|
* Implicit ordering (checkpoint files between plain tests, cross-file state
|
|
29
37
|
* with `workers: 1`) is deliberately NOT honored: tests relying on it will
|
|
@@ -51,26 +59,47 @@ const envVars_1 = require("../../envVars");
|
|
|
51
59
|
const model_1 = require("../../reporter/model");
|
|
52
60
|
const Logger_1 = require("../../utils/Logger");
|
|
53
61
|
function buildPlanIndex(plan) {
|
|
54
|
-
const
|
|
62
|
+
const byFile = new Map();
|
|
63
|
+
const targetProjects = new Set();
|
|
55
64
|
for (const target of plan.targets ?? []) {
|
|
56
65
|
if (!target?.file || !target?.title) {
|
|
57
66
|
continue;
|
|
58
67
|
}
|
|
59
68
|
const file = path_1.default.resolve(target.file);
|
|
60
|
-
if (!
|
|
61
|
-
|
|
69
|
+
if (!byFile.has(file)) {
|
|
70
|
+
byFile.set(file, new Set());
|
|
71
|
+
}
|
|
72
|
+
byFile.get(file).add(target.title);
|
|
73
|
+
if (target.projectName) {
|
|
74
|
+
targetProjects.add(target.projectName);
|
|
62
75
|
}
|
|
63
|
-
index.get(file).add(target.title);
|
|
64
76
|
}
|
|
65
|
-
return
|
|
77
|
+
return { byFile, targetProjects };
|
|
66
78
|
}
|
|
67
79
|
/**
|
|
68
|
-
* Pure decision: should the test in `file` with `title`
|
|
69
|
-
* during the heal rerun? The plan is fully
|
|
70
|
-
* already expanded into it by the
|
|
80
|
+
* Pure decision: should the test in `file` with `title` (owned by project
|
|
81
|
+
* `projectName`) actually execute during the heal rerun? The plan is fully
|
|
82
|
+
* explicit — serial companions were already expanded into it by the
|
|
83
|
+
* orchestrator.
|
|
84
|
+
*
|
|
85
|
+
* Dependency/setup projects (auth login, fixture seeding, …) are pulled in by
|
|
86
|
+
* Playwright because a target project declares them in `dependencies`. They
|
|
87
|
+
* are never themselves heal targets, but their tests MUST run so the state the
|
|
88
|
+
* targets depend on (storage-state auth files, seeded documents) is in place
|
|
89
|
+
* before the rerun. The rerun command only ever passes `--project=<target>`,
|
|
90
|
+
* so any project Playwright runs that is not a target project is, by
|
|
91
|
+
* construction, such a dependency project — run it in full. Guarded on a
|
|
92
|
+
* non-empty target-project set so the gate degrades to pure file+title
|
|
93
|
+
* matching when project names are unavailable.
|
|
71
94
|
*/
|
|
72
95
|
function shouldRunDuringHealRerun(params) {
|
|
73
|
-
const
|
|
96
|
+
const { index, projectName } = params;
|
|
97
|
+
if (projectName !== undefined &&
|
|
98
|
+
index.targetProjects.size > 0 &&
|
|
99
|
+
!index.targetProjects.has(projectName)) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
const titles = index.byFile.get(path_1.default.resolve(params.file));
|
|
74
103
|
return titles?.has(params.title) ?? false;
|
|
75
104
|
}
|
|
76
105
|
/**
|
|
@@ -173,6 +202,7 @@ function maybeSkipForHealRerun(testInfo, options) {
|
|
|
173
202
|
index,
|
|
174
203
|
file: testInfo.file,
|
|
175
204
|
title: testInfo.title,
|
|
205
|
+
projectName: testInfo.project?.name,
|
|
176
206
|
});
|
|
177
207
|
if (shouldRun) {
|
|
178
208
|
return;
|
|
@@ -43,25 +43,25 @@ export type DonobuStack = {
|
|
|
43
43
|
* environment variables.
|
|
44
44
|
*/
|
|
45
45
|
export declare function setupDonobuStack(donobuDeploymentEnvironment: DonobuDeploymentEnvironment, controlPanelFactory: ControlPanelFactory, envPersistenceVolatile?: EnvPersistenceVolatile, environ?: import("env-struct").Env<{
|
|
46
|
-
BASE64_GPT_CONFIG: import("zod
|
|
47
|
-
BROWSERBASE_API_KEY: import("zod
|
|
48
|
-
BROWSERBASE_PROJECT_ID: import("zod
|
|
49
|
-
DONOBU_API_BASE_URL: import("zod
|
|
50
|
-
ANTHROPIC_API_KEY: import("zod
|
|
51
|
-
ANTHROPIC_MODEL_NAME: import("zod
|
|
52
|
-
GOOGLE_GENERATIVE_AI_API_KEY: import("zod
|
|
53
|
-
GOOGLE_GENERATIVE_AI_MODEL_NAME: import("zod
|
|
54
|
-
OLLAMA_MODEL_NAME: import("zod
|
|
55
|
-
OLLAMA_API_URL: import("zod
|
|
56
|
-
OPENAI_API_KEY: import("zod
|
|
57
|
-
OPENAI_API_MODEL_NAME: import("zod
|
|
58
|
-
PERSISTENCE_PRIORITY: import("zod
|
|
59
|
-
AWS_BEDROCK_MODEL_NAME: import("zod
|
|
60
|
-
AWS_ACCESS_KEY_ID: import("zod
|
|
61
|
-
AWS_SECRET_ACCESS_KEY: import("zod
|
|
62
|
-
DONOBU_API_KEY: import("zod
|
|
63
|
-
DONOBU_PERSISTENCE_API_KEY: import("zod
|
|
64
|
-
DONOBU_UPLOADS_OWNED_BY_PARENT: import("zod
|
|
46
|
+
BASE64_GPT_CONFIG: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
BROWSERBASE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
BROWSERBASE_PROJECT_ID: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
DONOBU_API_BASE_URL: import("zod").ZodDefault<import("zod").ZodString>;
|
|
50
|
+
ANTHROPIC_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
ANTHROPIC_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
GOOGLE_GENERATIVE_AI_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
53
|
+
GOOGLE_GENERATIVE_AI_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
54
|
+
OLLAMA_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
OLLAMA_API_URL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
+
OPENAI_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
OPENAI_API_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
PERSISTENCE_PRIORITY: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
59
|
+
AWS_BEDROCK_MODEL_NAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
AWS_ACCESS_KEY_ID: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
+
AWS_SECRET_ACCESS_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
DONOBU_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
DONOBU_PERSISTENCE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
DONOBU_UPLOADS_OWNED_BY_PARENT: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
65
65
|
}, {
|
|
66
66
|
BASE64_GPT_CONFIG?: string | undefined;
|
|
67
67
|
BROWSERBASE_API_KEY?: string | undefined;
|
|
@@ -71,10 +71,10 @@ export declare class BrowserUtils {
|
|
|
71
71
|
* @throws {InvalidParamValueException} When an invalid browser type is specified.
|
|
72
72
|
*/
|
|
73
73
|
static create(browserConfig: BrowserConfig, videoDir?: string, storageState?: BrowserStorageState, environ?: import("env-struct").Env<{
|
|
74
|
-
BROWSERBASE_API_KEY: import("zod
|
|
75
|
-
PROXY_SERVER: import("zod
|
|
76
|
-
PROXY_USERNAME: import("zod
|
|
77
|
-
PROXY_PASSWORD: import("zod
|
|
74
|
+
BROWSERBASE_API_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
|
+
PROXY_SERVER: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
+
PROXY_USERNAME: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
+
PROXY_PASSWORD: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
78
|
}, {
|
|
79
79
|
BROWSERBASE_API_KEY?: string | undefined;
|
|
80
80
|
PROXY_SERVER?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "donobu",
|
|
3
|
-
"version": "5.60.
|
|
3
|
+
"version": "5.60.4",
|
|
4
4
|
"description": "Create browser automations with an LLM agent and replay them as Playwright scripts.",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"module": "dist/esm/main.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"license": "UNLICENSED",
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/js": "^10.0.1",
|
|
49
|
-
"@playwright/test": "^1.
|
|
49
|
+
"@playwright/test": "^1.60.0",
|
|
50
50
|
"@types/better-sqlite3": "^7.6.13",
|
|
51
51
|
"@types/express": "^5.0.6",
|
|
52
52
|
"@types/node": "^22.10.5",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
60
60
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
61
61
|
"globals": "^16.0.0",
|
|
62
|
-
"playwright": "^1.
|
|
63
|
-
"playwright-core": "^1.
|
|
62
|
+
"playwright": "^1.60.0",
|
|
63
|
+
"playwright-core": "^1.60.0",
|
|
64
64
|
"typescript-eslint": "^8.47.0",
|
|
65
65
|
"vitest": "^4.0.17",
|
|
66
66
|
"winston-transport": "^4.9.0"
|