flakiness 0.204.0 → 0.206.0

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/lib/cli/cli.js CHANGED
@@ -748,7 +748,7 @@ import path6 from "path";
748
748
  // ../package.json
749
749
  var package_default = {
750
750
  name: "flakiness",
751
- version: "0.204.0",
751
+ version: "0.206.0",
752
752
  type: "module",
753
753
  private: true,
754
754
  scripts: {
@@ -1455,6 +1455,7 @@ async function cmdUpload(relativePaths, options) {
1455
1455
  const total = relativePaths.length;
1456
1456
  const spinner = total > 1 ? ora("Uploading reports:").start() : void 0;
1457
1457
  let uploaded = 0;
1458
+ const session2 = await FlakinessSession.load();
1458
1459
  for (const relativePath of relativePaths) {
1459
1460
  const fullPath = path5.resolve(relativePath);
1460
1461
  if (!await fs5.access(fullPath, fs5.constants.F_OK).then(() => true).catch(() => false)) {
@@ -1466,8 +1467,8 @@ async function cmdUpload(relativePaths, options) {
1466
1467
  if (missingAttachments.length)
1467
1468
  warn(`Missing ${missingAttachments.length} attachments`);
1468
1469
  const status = await uploadReport(report, attachments, {
1469
- flakinessAccessToken: options.accessToken,
1470
- flakinessEndpoint: options.endpoint
1470
+ flakinessAccessToken: options.accessToken ?? session2?.sessionToken(),
1471
+ flakinessEndpoint: options.endpoint ?? session2?.endpoint()
1471
1472
  });
1472
1473
  if (status.status === "failed" || status.status === "skipped") {
1473
1474
  spinner?.stop();
@@ -1504,6 +1505,7 @@ async function runCommand(callback) {
1504
1505
  if (!(e instanceof Error))
1505
1506
  throw e;
1506
1507
  log2(e);
1508
+ console.error(e.message);
1507
1509
  process.exit(1);
1508
1510
  }
1509
1511
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flakiness",
3
- "version": "0.204.0",
3
+ "version": "0.206.0",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "flakiness": "./lib/cli/cli.js"
@@ -22,12 +22,12 @@
22
22
  "@playwright/test": "^1.57.0",
23
23
  "@types/debug": "^4.1.12",
24
24
  "@types/express": "^4.17.20",
25
- "@flakiness/server": "0.204.0",
26
- "@flakiness/shared": "0.204.0"
25
+ "@flakiness/server": "0.206.0",
26
+ "@flakiness/shared": "0.206.0"
27
27
  },
28
28
  "dependencies": {
29
29
  "@flakiness/flakiness-report": "^0.25.0",
30
- "@flakiness/sdk": "^2.0.0",
30
+ "@flakiness/sdk": "^2.1.0",
31
31
  "@rgrove/parse-xml": "^4.2.0",
32
32
  "chalk": "^5.6.2",
33
33
  "commander": "^14.0.0",