@xera-ai/core 0.11.5 → 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.
@@ -8853,11 +8853,14 @@ async function authSetupCmd(argv) {
8853
8853
  const mod = await import(pathToFileURL2(authSetupScript).href);
8854
8854
  let exitCode = 0;
8855
8855
  if ((opts.shape === "all" || opts.shape === "web") && config.web && typeof mod.web === "function") {
8856
+ const webConfig = config.web;
8857
+ const envName = process.env.XERA_ENV ?? webConfig.defaultEnv;
8858
+ const baseURL = process.env.XERA_BASE_URL ?? webConfig.baseUrl[envName] ?? webConfig.baseUrl[webConfig.defaultEnv];
8856
8859
  const { runAuthSetup } = await import("@xera-ai/web");
8857
8860
  const { chromium } = await import("@playwright/test");
8858
8861
  const browser = await chromium.launch();
8859
8862
  try {
8860
- for (const [roleName, roleCreds] of Object.entries(config.web.auth.roles)) {
8863
+ for (const [roleName, roleCreds] of Object.entries(webConfig.auth.roles)) {
8861
8864
  if (opts.role && roleName !== opts.role)
8862
8865
  continue;
8863
8866
  const email = process.env[roleCreds.envEmail];
@@ -8873,7 +8876,8 @@ async function authSetupCmd(argv) {
8873
8876
  creds: { email, password },
8874
8877
  setupScriptPath: authSetupScript,
8875
8878
  authDir: join5(cwd, ".xera", ".auth"),
8876
- browser
8879
+ browser,
8880
+ ...baseURL ? { baseURL } : {}
8877
8881
  });
8878
8882
  console.log(`[xera:auth-setup] \u2713 ${roleName}.json (web)`);
8879
8883
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xera-ai/core",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "zod": "4.4.3",
34
- "@xera-ai/web": "^0.11.5",
35
- "@xera-ai/http": "^0.11.5",
34
+ "@xera-ai/web": "^0.11.6",
35
+ "@xera-ai/http": "^0.11.6",
36
36
  "@playwright/test": "1.60.0",
37
37
  "dotenv": "^16.0.0",
38
38
  "fflate": "0.8.3",
@@ -50,11 +50,17 @@ export async function authSetupCmd(argv: string[]): Promise<number> {
50
50
  config.web &&
51
51
  typeof mod.web === 'function'
52
52
  ) {
53
+ const webConfig = config.web;
54
+ const envName = process.env.XERA_ENV ?? webConfig.defaultEnv;
55
+ const baseURL =
56
+ process.env.XERA_BASE_URL ??
57
+ webConfig.baseUrl[envName] ??
58
+ webConfig.baseUrl[webConfig.defaultEnv];
53
59
  const { runAuthSetup } = await import('@xera-ai/web');
54
60
  const { chromium } = await import('@playwright/test');
55
61
  const browser = await chromium.launch();
56
62
  try {
57
- for (const [roleName, roleCreds] of Object.entries(config.web.auth.roles)) {
63
+ for (const [roleName, roleCreds] of Object.entries(webConfig.auth.roles)) {
58
64
  if (opts.role && roleName !== opts.role) continue;
59
65
  const email = process.env[roleCreds.envEmail];
60
66
  const password = process.env[roleCreds.envPassword];
@@ -72,6 +78,7 @@ export async function authSetupCmd(argv: string[]): Promise<number> {
72
78
  setupScriptPath: authSetupScript,
73
79
  authDir: join(cwd, '.xera', '.auth'),
74
80
  browser,
81
+ ...(baseURL ? { baseURL } : {}),
75
82
  });
76
83
  console.log(`[xera:auth-setup] ✓ ${roleName}.json (web)`);
77
84
  } catch (e) {