@xera-ai/web 0.11.4 → 0.11.6
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/index.js +1 -1
- package/package.json +2 -2
- package/src/auth-setup/runner.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -287,7 +287,7 @@ async function runAuthSetup(input) {
|
|
|
287
287
|
if (typeof fn !== "function") {
|
|
288
288
|
throw new Error(`Auth setup script at ${input.setupScriptPath} must export a defineAuthSetup function as default or named "web" export.`);
|
|
289
289
|
}
|
|
290
|
-
const context = await input.browser.newContext();
|
|
290
|
+
const context = await input.browser.newContext(input.baseURL ? { baseURL: input.baseURL } : {});
|
|
291
291
|
try {
|
|
292
292
|
const page = await context.newPage();
|
|
293
293
|
const result = await fn(page, input.role, input.creds) ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xera-ai/web",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@cucumber/gherkin": "39.1.0",
|
|
25
25
|
"@cucumber/messages": "32.3.1",
|
|
26
26
|
"@playwright/test": "1.60.0",
|
|
27
|
-
"@xera-ai/core": "^0.11.
|
|
27
|
+
"@xera-ai/core": "^0.11.6",
|
|
28
28
|
"fflate": "0.8.3"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/auth-setup/runner.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface RunAuthSetupInput {
|
|
|
9
9
|
setupScriptPath: string;
|
|
10
10
|
authDir: string;
|
|
11
11
|
browser: Browser;
|
|
12
|
+
baseURL?: string;
|
|
12
13
|
now?: Date;
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -22,7 +23,9 @@ export async function runAuthSetup(input: RunAuthSetupInput): Promise<void> {
|
|
|
22
23
|
`Auth setup script at ${input.setupScriptPath} must export a defineAuthSetup function as default or named "web" export.`,
|
|
23
24
|
);
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
// baseURL lets the user write `page.goto('/login')` in shared/auth-setup.ts.
|
|
27
|
+
// playwright.config.ts isn't loaded here — Playwright is launched directly.
|
|
28
|
+
const context = await input.browser.newContext(input.baseURL ? { baseURL: input.baseURL } : {});
|
|
26
29
|
try {
|
|
27
30
|
const page = await context.newPage();
|
|
28
31
|
const result = (await fn(page, input.role, input.creds)) ?? {};
|