@supatest/cli 0.0.42 → 0.0.43

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5423,7 +5423,9 @@ var init_shared_es = __esm({
5423
5423
  limit: coerce.number().min(1).max(100).default(50),
5424
5424
  status: testResultStatusSchema.optional(),
5425
5425
  isFlaky: coerce.boolean().optional(),
5426
- file: stringType().optional()
5426
+ file: stringType().optional(),
5427
+ groupByTestId: coerce.boolean().optional()
5428
+ // When true, paginate by unique testId (grouped tests)
5427
5429
  });
5428
5430
  runsListResponseSchema = objectType({
5429
5431
  runs: arrayType(runSchema),
@@ -5439,7 +5441,9 @@ var init_shared_es = __esm({
5439
5441
  tests: arrayType(testSchema),
5440
5442
  total: numberType(),
5441
5443
  page: numberType(),
5442
- limit: numberType()
5444
+ limit: numberType(),
5445
+ totalGroups: numberType().optional()
5446
+ // When groupByTestId=true, total unique test groups
5443
5447
  });
5444
5448
  testDetailResponseSchema = testSchema.extend({
5445
5449
  results: arrayType(
@@ -6329,7 +6333,7 @@ var CLI_VERSION;
6329
6333
  var init_version = __esm({
6330
6334
  "src/version.ts"() {
6331
6335
  "use strict";
6332
- CLI_VERSION = "0.0.42";
6336
+ CLI_VERSION = "0.0.43";
6333
6337
  }
6334
6338
  });
6335
6339
 
@@ -9846,6 +9850,9 @@ async function exchangeCodeForToken(code, state) {
9846
9850
  const data = await response.json();
9847
9851
  return { token: data.token, expiresAt: data.expiresAt };
9848
9852
  }
9853
+ function escapeForCmd(value) {
9854
+ return value.replace(/[&^]/g, "^$&");
9855
+ }
9849
9856
  function openBrowser(url) {
9850
9857
  const os3 = platform();
9851
9858
  let command;
@@ -9856,14 +9863,14 @@ function openBrowser(url) {
9856
9863
  args = [url];
9857
9864
  break;
9858
9865
  case "win32":
9859
- command = "start";
9860
- args = ["", url];
9866
+ command = "cmd.exe";
9867
+ args = ["/c", "start", '""', escapeForCmd(url)];
9861
9868
  break;
9862
9869
  default:
9863
9870
  command = "xdg-open";
9864
9871
  args = [url];
9865
9872
  }
9866
- const options = { detached: true, stdio: "ignore", shell: os3 === "win32" };
9873
+ const options = { detached: true, stdio: "ignore" };
9867
9874
  spawn3(command, args, options).unref();
9868
9875
  }
9869
9876
  function startCallbackServer(port, expectedState) {
@@ -10535,6 +10542,13 @@ ${authUrl}
10535
10542
  codeChallenge: hash
10536
10543
  };
10537
10544
  }
10545
+ /**
10546
+ * Escape special characters for Windows cmd.exe
10547
+ * The ^ character is the escape character in cmd.exe
10548
+ */
10549
+ escapeForCmd(value) {
10550
+ return value.replace(/[&^]/g, "^$&");
10551
+ }
10538
10552
  /**
10539
10553
  * Open a URL in the default browser cross-platform
10540
10554
  */
@@ -10548,15 +10562,15 @@ ${authUrl}
10548
10562
  args = [url];
10549
10563
  break;
10550
10564
  case "win32":
10551
- command = "start";
10552
- args = ["", url];
10565
+ command = "cmd.exe";
10566
+ args = ["/c", "start", '""', this.escapeForCmd(url)];
10553
10567
  break;
10554
10568
  default:
10555
10569
  command = "xdg-open";
10556
10570
  args = [url];
10557
10571
  break;
10558
10572
  }
10559
- const options = { detached: true, stdio: "ignore", shell: os3 === "win32" };
10573
+ const options = { detached: true, stdio: "ignore" };
10560
10574
  spawn4(command, args, options).unref();
10561
10575
  }
10562
10576
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supatest/cli",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "Supatest CLI - AI-powered task automation for CI/CD",
5
5
  "type": "module",
6
6
  "bin": {