qualty 0.1.27 → 0.1.29

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.
@@ -1374,8 +1374,9 @@ async function runLocalSingleCombination({
1374
1374
  explicitAuthProfile: String(authProfile || "").trim(),
1375
1375
  noAuthState: Boolean(noAuthState),
1376
1376
  });
1377
+ const explicitAuthProfile = String(authProfile || "").trim();
1377
1378
  const claimProfile = localProfileLabel(claimSavedLogin);
1378
- const effectiveProfile = String(authProfile || "").trim() || setupFromClaim?.profile || claimProfile;
1379
+ const effectiveProfile = explicitAuthProfile || setupFromClaim?.profile || claimProfile;
1379
1380
  const resolvedStoragePath =
1380
1381
  !noAuthState && effectiveProfile
1381
1382
  ? localAuthStatePath({
@@ -1387,17 +1388,20 @@ async function runLocalSingleCombination({
1387
1388
  const finalStoragePath =
1388
1389
  !noAuthState && setupFromClaim?.path && existsSync(setupFromClaim.path)
1389
1390
  ? setupFromClaim.path
1390
- : !noAuthState && storageStatePath && existsSync(storageStatePath)
1391
- ? storageStatePath
1392
- : !noAuthState && resolvedStoragePath && existsSync(resolvedStoragePath)
1393
- ? resolvedStoragePath
1394
- : null;
1391
+ : !noAuthState &&
1392
+ explicitAuthProfile &&
1393
+ storageStatePath &&
1394
+ existsSync(storageStatePath)
1395
+ ? storageStatePath
1396
+ : !noAuthState && resolvedStoragePath && existsSync(resolvedStoragePath)
1397
+ ? resolvedStoragePath
1398
+ : null;
1395
1399
 
1396
1400
  let authSource = "none";
1397
1401
  if (!noAuthState && finalStoragePath) {
1398
1402
  if (setupFromClaim?.path && finalStoragePath === setupFromClaim.path) {
1399
1403
  authSource = "interactive setup during run";
1400
- } else if (storageStatePath && finalStoragePath === storageStatePath) {
1404
+ } else if (explicitAuthProfile && storageStatePath && finalStoragePath === storageStatePath) {
1401
1405
  authSource = "--auth-profile flag";
1402
1406
  } else if (resolvedStoragePath && finalStoragePath === resolvedStoragePath) {
1403
1407
  authSource = claimProfile ? "dashboard saved login profile" : "resolved profile path";
package/bin/qualty.js CHANGED
@@ -124,6 +124,11 @@ function authProfileFromConfig(projectCfg, fallback = "") {
124
124
  return String(fallback || projectCfg.default_auth_profile || "").trim();
125
125
  }
126
126
 
127
+ /** Only --auth-profile on the CLI; config default is not a run-wide override. */
128
+ function explicitAuthProfileFromArgs(args) {
129
+ return String(args["auth-profile"] || "").trim();
130
+ }
131
+
127
132
  function readProjectConfig() {
128
133
  const configPath = findProjectConfigPath();
129
134
  if (!configPath) return {};
@@ -269,7 +274,7 @@ function usage() {
269
274
  " QUALTY_BASE_URL API base URL when --url is not set (default: production)",
270
275
  " QUALTY_LOCAL_CONCURRENCY Local parallel workers for --local runs (default: 4)",
271
276
  "",
272
- "Config (.qualty.json): default_org_id, default_project_id, default_auth_profile",
277
+ "Config (.qualty.json): default_org_id, default_project_id, default_auth_profile (ci/auth setup only; local runs use each test's saved login profile unless --auth-profile is set)",
273
278
  " CLI flags (--org, --project, --profile, --url) override config values.",
274
279
  ].join("\n")
275
280
  );
@@ -2498,8 +2503,7 @@ async function maybePromptProjectIdForLocalRun({ args, apiUrl, token, orgId }) {
2498
2503
 
2499
2504
  function resolveLocalAuthStateForRun({ args, orgId, projectId }) {
2500
2505
  if (parseBoolean(args["no-auth-state"], false)) return null;
2501
- const projectCfg = readProjectConfig();
2502
- const profile = authProfileFromConfig(projectCfg, args["auth-profile"]);
2506
+ const profile = explicitAuthProfileFromArgs(args);
2503
2507
  if (!profile) return null;
2504
2508
  const path = localAuthStatePath({ orgId, projectId, profile });
2505
2509
  const summary = summarizeStorageStateFile(path);
@@ -2513,12 +2517,10 @@ function resolveLocalAuthStateForRun({ args, orgId, projectId }) {
2513
2517
 
2514
2518
  async function maybePromptAuthProfileForLocalRun({ args, orgId, projectId }) {
2515
2519
  const projectCfg = readProjectConfig();
2516
- const requestedProfile = authProfileFromConfig(projectCfg, args["auth-profile"]);
2520
+ const requestedProfile = explicitAuthProfileFromArgs(args);
2517
2521
  if (requestedProfile) return { authProfile: requestedProfile, noAuthState: false };
2518
2522
  if (parseBoolean(args["no-auth-state"], false)) return { authProfile: "", noAuthState: true };
2519
2523
  if (!process.stdin.isTTY || !process.stdout.isTTY) {
2520
- const defaultProfile = authProfileFromConfig(projectCfg);
2521
- if (defaultProfile) return { authProfile: defaultProfile, noAuthState: false };
2522
2524
  return { authProfile: "", noAuthState: false };
2523
2525
  }
2524
2526
  if (!projectId) return { authProfile: "", noAuthState: false };
@@ -2831,7 +2833,7 @@ async function main() {
2831
2833
  projectId,
2832
2834
  })
2833
2835
  : {
2834
- authProfile: String(args["auth-profile"] || "").trim(),
2836
+ authProfile: explicitAuthProfileFromArgs(args),
2835
2837
  noAuthState: parseBoolean(args["no-auth-state"], false),
2836
2838
  };
2837
2839
  const localAuthArgs = {
@@ -2854,9 +2856,9 @@ async function main() {
2854
2856
  device: args.device ? String(args.device).trim() : undefined,
2855
2857
  headless: !parseBoolean(args.headed, false),
2856
2858
  localConcurrency: resolveLocalConcurrency(args),
2857
- authProfile: localAuth?.profile || authChoice.authProfile || "",
2859
+ authProfile: authChoice.authProfile || "",
2858
2860
  noAuthState: Boolean(authChoice.noAuthState || parseBoolean(args["no-auth-state"], false)),
2859
- storageStatePath: localAuth?.path,
2861
+ storageStatePath: authChoice.authProfile ? localAuth?.path : undefined,
2860
2862
  };
2861
2863
  if (suiteId && explicitIds.length === 0) {
2862
2864
  await runLocalSuiteWithSequences(localRunArgs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qualty",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "Qualty CLI for localhost and CI test runs",
5
5
  "bin": {
6
6
  "qualty": "bin/qualty.js"