@flakiness/sdk 0.116.0 → 0.119.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
@@ -745,7 +745,7 @@ import fs2 from "fs";
745
745
  import path2 from "path";
746
746
 
747
747
  // src/utils.ts
748
- import { FlakinessReport } from "@flakiness/report";
748
+ import { ReportUtils } from "@flakiness/report";
749
749
  import assert from "assert";
750
750
  import { spawnSync } from "child_process";
751
751
  import crypto from "crypto";
@@ -938,7 +938,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
938
938
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
939
939
  const attachmentIdToPath = /* @__PURE__ */ new Map();
940
940
  const missingAttachments = /* @__PURE__ */ new Set();
941
- FlakinessReport.visitTests(report, (test) => {
941
+ ReportUtils.visitTests(report, (test) => {
942
942
  for (const attempt of test.attempts) {
943
943
  for (const attachment of attempt.attachments ?? []) {
944
944
  const attachmentPath = filenameToPath.get(attachment.id);
@@ -1158,7 +1158,8 @@ import fs5 from "fs/promises";
1158
1158
  import path5 from "path";
1159
1159
 
1160
1160
  // src/junit.ts
1161
- import { FlakinessReport as FK } from "@flakiness/report";
1161
+ import { FlakinessReport as FK } from "@flakiness/flakiness-report";
1162
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
1162
1163
  import { parseXml, XmlElement, XmlText } from "@rgrove/parse-xml";
1163
1164
  import assert2 from "assert";
1164
1165
  import fs4 from "fs";
@@ -1345,7 +1346,7 @@ async function parseJUnit(xmls, options) {
1345
1346
  await traverseJUnitReport(context, element);
1346
1347
  }
1347
1348
  return {
1348
- report: FK.dedupeSuitesTestsEnvironments(report),
1349
+ report: ReportUtils2.dedupeSuitesTestsEnvironments(report),
1349
1350
  attachments: Array.from(context.attachments.values())
1350
1351
  };
1351
1352
  }
@@ -1772,7 +1773,8 @@ import fs10 from "fs/promises";
1772
1773
  import path8 from "path";
1773
1774
 
1774
1775
  // src/playwrightJSONReport.ts
1775
- import { FlakinessReport as FK2, FlakinessReport as FlakinessReport2 } from "@flakiness/report";
1776
+ import { FlakinessReport } from "@flakiness/flakiness-report";
1777
+ import { ReportUtils as ReportUtils3 } from "@flakiness/report";
1776
1778
  import debug2 from "debug";
1777
1779
  import { posix as posixPath2 } from "path";
1778
1780
  var dlog = debug2("flakiness:json-report");
@@ -1807,7 +1809,7 @@ var PlaywrightJSONReport;
1807
1809
  };
1808
1810
  const configPath = jsonReport.config.configFile ? gitFilePath(context.gitRoot, normalizePath(jsonReport.config.configFile)) : void 0;
1809
1811
  const report = {
1810
- category: FlakinessReport2.CATEGORY_PLAYWRIGHT,
1812
+ category: FlakinessReport.CATEGORY_PLAYWRIGHT,
1811
1813
  commitId: metadata.commitId,
1812
1814
  configPath,
1813
1815
  url: metadata.runURL,
@@ -1825,7 +1827,7 @@ var PlaywrightJSONReport;
1825
1827
  context.projectId2environmentIdx.set(jsonReport.config.projects[envIdx].id, envIdx);
1826
1828
  report.suites = await Promise.all(jsonReport.suites.map((suite) => parseJSONSuite(context, suite)));
1827
1829
  return {
1828
- report: FK2.dedupeSuitesTestsEnvironments(report),
1830
+ report: ReportUtils3.dedupeSuitesTestsEnvironments(report),
1829
1831
  attachments: [...context.attachments.values()],
1830
1832
  unaccessibleAttachmentPaths: context.unaccessibleAttachmentPaths
1831
1833
  };
@@ -5,14 +5,15 @@ import fs3 from "fs/promises";
5
5
  import path2 from "path";
6
6
 
7
7
  // src/junit.ts
8
- import { FlakinessReport as FK } from "@flakiness/report";
8
+ import { FlakinessReport as FK } from "@flakiness/flakiness-report";
9
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
9
10
  import { parseXml, XmlElement, XmlText } from "@rgrove/parse-xml";
10
11
  import assert2 from "assert";
11
12
  import fs2 from "fs";
12
13
  import path from "path";
13
14
 
14
15
  // src/utils.ts
15
- import { FlakinessReport } from "@flakiness/report";
16
+ import { ReportUtils } from "@flakiness/report";
16
17
  import assert from "assert";
17
18
  import { spawnSync } from "child_process";
18
19
  import crypto from "crypto";
@@ -328,7 +329,7 @@ async function parseJUnit(xmls, options) {
328
329
  await traverseJUnitReport(context, element);
329
330
  }
330
331
  return {
331
- report: FK.dedupeSuitesTestsEnvironments(report),
332
+ report: ReportUtils2.dedupeSuitesTestsEnvironments(report),
332
333
  attachments: Array.from(context.attachments.values())
333
334
  };
334
335
  }
@@ -3,7 +3,7 @@ import fs from "fs";
3
3
  import path2 from "path";
4
4
 
5
5
  // src/utils.ts
6
- import { FlakinessReport } from "@flakiness/report";
6
+ import { ReportUtils } from "@flakiness/report";
7
7
  import assert from "assert";
8
8
  import { spawnSync } from "child_process";
9
9
  import http from "http";
@@ -17,7 +17,7 @@ import path from "path";
17
17
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
18
18
 
19
19
  // src/utils.ts
20
- import { FlakinessReport } from "@flakiness/report";
20
+ import { ReportUtils } from "@flakiness/report";
21
21
  import http from "http";
22
22
  import https from "https";
23
23
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
@@ -7,7 +7,7 @@ import path from "path";
7
7
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
8
8
 
9
9
  // src/utils.ts
10
- import { FlakinessReport } from "@flakiness/report";
10
+ import { ReportUtils } from "@flakiness/report";
11
11
  import http from "http";
12
12
  import https from "https";
13
13
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
@@ -8,7 +8,7 @@ import fs2 from "fs";
8
8
  import path2 from "path";
9
9
 
10
10
  // src/utils.ts
11
- import { FlakinessReport } from "@flakiness/report";
11
+ import { ReportUtils } from "@flakiness/report";
12
12
  import assert from "assert";
13
13
  import { spawnSync } from "child_process";
14
14
  import fs from "fs";
@@ -115,7 +115,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
115
115
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
116
116
  const attachmentIdToPath = /* @__PURE__ */ new Map();
117
117
  const missingAttachments = /* @__PURE__ */ new Set();
118
- FlakinessReport.visitTests(report, (test) => {
118
+ ReportUtils.visitTests(report, (test) => {
119
119
  for (const attempt of test.attempts) {
120
120
  for (const attachment of attempt.attachments ?? []) {
121
121
  const attachmentPath = filenameToPath.get(attachment.id);
@@ -3,7 +3,7 @@ import fs from "fs";
3
3
  import path2 from "path";
4
4
 
5
5
  // src/utils.ts
6
- import { FlakinessReport } from "@flakiness/report";
6
+ import { ReportUtils } from "@flakiness/report";
7
7
  import assert from "assert";
8
8
  import { spawnSync } from "child_process";
9
9
  import http from "http";
@@ -3,7 +3,7 @@ import fs from "fs";
3
3
  import path2 from "path";
4
4
 
5
5
  // src/utils.ts
6
- import { FlakinessReport } from "@flakiness/report";
6
+ import { ReportUtils } from "@flakiness/report";
7
7
  import assert from "assert";
8
8
  import { spawnSync } from "child_process";
9
9
  import http from "http";
@@ -5,12 +5,13 @@ import fs3 from "fs/promises";
5
5
  import path2 from "path";
6
6
 
7
7
  // src/playwrightJSONReport.ts
8
- import { FlakinessReport as FK, FlakinessReport as FlakinessReport2 } from "@flakiness/report";
8
+ import { FlakinessReport } from "@flakiness/flakiness-report";
9
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
9
10
  import debug from "debug";
10
11
  import { posix as posixPath2 } from "path";
11
12
 
12
13
  // src/utils.ts
13
- import { FlakinessReport } from "@flakiness/report";
14
+ import { ReportUtils } from "@flakiness/report";
14
15
  import assert from "assert";
15
16
  import { spawnSync } from "child_process";
16
17
  import crypto from "crypto";
@@ -291,7 +292,7 @@ var PlaywrightJSONReport;
291
292
  };
292
293
  const configPath = jsonReport.config.configFile ? gitFilePath(context.gitRoot, normalizePath(jsonReport.config.configFile)) : void 0;
293
294
  const report = {
294
- category: FlakinessReport2.CATEGORY_PLAYWRIGHT,
295
+ category: FlakinessReport.CATEGORY_PLAYWRIGHT,
295
296
  commitId: metadata.commitId,
296
297
  configPath,
297
298
  url: metadata.runURL,
@@ -309,7 +310,7 @@ var PlaywrightJSONReport;
309
310
  context.projectId2environmentIdx.set(jsonReport.config.projects[envIdx].id, envIdx);
310
311
  report.suites = await Promise.all(jsonReport.suites.map((suite) => parseJSONSuite(context, suite)));
311
312
  return {
312
- report: FK.dedupeSuitesTestsEnvironments(report),
313
+ report: ReportUtils2.dedupeSuitesTestsEnvironments(report),
313
314
  attachments: [...context.attachments.values()],
314
315
  unaccessibleAttachmentPaths: context.unaccessibleAttachmentPaths
315
316
  };
@@ -15,7 +15,7 @@ import { URL } from "url";
15
15
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
16
16
 
17
17
  // src/utils.ts
18
- import { FlakinessReport } from "@flakiness/report";
18
+ import { ReportUtils } from "@flakiness/report";
19
19
  import fs from "fs";
20
20
  import http from "http";
21
21
  import https from "https";
@@ -108,7 +108,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
108
108
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
109
109
  const attachmentIdToPath = /* @__PURE__ */ new Map();
110
110
  const missingAttachments = /* @__PURE__ */ new Set();
111
- FlakinessReport.visitTests(report, (test) => {
111
+ ReportUtils.visitTests(report, (test) => {
112
112
  for (const attempt of test.attempts) {
113
113
  for (const attachment of attempt.attachments ?? []) {
114
114
  const attachmentPath = filenameToPath.get(attachment.id);
@@ -9,7 +9,7 @@ import path from "path";
9
9
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
10
10
 
11
11
  // src/utils.ts
12
- import { FlakinessReport } from "@flakiness/report";
12
+ import { ReportUtils } from "@flakiness/report";
13
13
  import http from "http";
14
14
  import https from "https";
15
15
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
@@ -3,7 +3,7 @@ import fs from "fs";
3
3
  import path2 from "path";
4
4
 
5
5
  // src/utils.ts
6
- import { FlakinessReport } from "@flakiness/report";
6
+ import { ReportUtils } from "@flakiness/report";
7
7
  import assert from "assert";
8
8
  import { spawnSync } from "child_process";
9
9
  import http from "http";
@@ -7,7 +7,7 @@ import path from "path";
7
7
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
8
8
 
9
9
  // src/utils.ts
10
- import { FlakinessReport } from "@flakiness/report";
10
+ import { ReportUtils } from "@flakiness/report";
11
11
  import http from "http";
12
12
  import https from "https";
13
13
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
package/lib/junit.js CHANGED
@@ -1,12 +1,13 @@
1
1
  // src/junit.ts
2
- import { FlakinessReport as FK } from "@flakiness/report";
2
+ import { FlakinessReport as FK } from "@flakiness/flakiness-report";
3
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
3
4
  import { parseXml, XmlElement, XmlText } from "@rgrove/parse-xml";
4
5
  import assert from "assert";
5
6
  import fs2 from "fs";
6
7
  import path from "path";
7
8
 
8
9
  // src/utils.ts
9
- import { FlakinessReport } from "@flakiness/report";
10
+ import { ReportUtils } from "@flakiness/report";
10
11
  import crypto from "crypto";
11
12
  import fs from "fs";
12
13
  import http from "http";
@@ -300,7 +301,7 @@ async function parseJUnit(xmls, options) {
300
301
  await traverseJUnitReport(context, element);
301
302
  }
302
303
  return {
303
- report: FK.dedupeSuitesTestsEnvironments(report),
304
+ report: ReportUtils2.dedupeSuitesTestsEnvironments(report),
304
305
  attachments: Array.from(context.attachments.values())
305
306
  };
306
307
  }
@@ -88,7 +88,7 @@ var localReportRouter = {
88
88
  };
89
89
 
90
90
  // src/utils.ts
91
- import { FlakinessReport } from "@flakiness/report";
91
+ import { ReportUtils } from "@flakiness/report";
92
92
  import fs2 from "fs";
93
93
  import http from "http";
94
94
  import https from "https";
@@ -181,7 +181,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
181
181
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
182
182
  const attachmentIdToPath = /* @__PURE__ */ new Map();
183
183
  const missingAttachments = /* @__PURE__ */ new Set();
184
- FlakinessReport.visitTests(report, (test) => {
184
+ ReportUtils.visitTests(report, (test) => {
185
185
  for (const attempt of test.attempts) {
186
186
  for (const attachment of attempt.attachments ?? []) {
187
187
  const attachmentPath = filenameToPath.get(attachment.id);
@@ -1,5 +1,5 @@
1
1
  // src/playwright-test.ts
2
- import { FlakinessReport as FK } from "@flakiness/report";
2
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
3
3
  import { Multimap } from "@flakiness/shared/common/multimap.js";
4
4
  import chalk2 from "chalk";
5
5
  import fs8 from "fs";
@@ -15,7 +15,7 @@ import fs2 from "fs";
15
15
  import path2 from "path";
16
16
 
17
17
  // src/utils.ts
18
- import { FlakinessReport } from "@flakiness/report";
18
+ import { ReportUtils } from "@flakiness/report";
19
19
  import assert from "assert";
20
20
  import { spawnSync } from "child_process";
21
21
  import crypto from "crypto";
@@ -205,7 +205,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
205
205
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
206
206
  const attachmentIdToPath = /* @__PURE__ */ new Map();
207
207
  const missingAttachments = /* @__PURE__ */ new Set();
208
- FlakinessReport.visitTests(report, (test) => {
208
+ ReportUtils.visitTests(report, (test) => {
209
209
  for (const attempt of test.attempts) {
210
210
  for (const attachment of attempt.attachments ?? []) {
211
211
  const attachmentPath = filenameToPath.get(attachment.id);
@@ -1030,7 +1030,7 @@ var FlakinessReporter = class {
1030
1030
  for (let envIdx = 0; envIdx < environments.length; ++envIdx)
1031
1031
  context.project2environmentIdx.set(this._config.projects[envIdx], envIdx);
1032
1032
  const relatedCommitIds = this._options.relatedCommitIds;
1033
- const report = FK.dedupeSuitesTestsEnvironments({
1033
+ const report = ReportUtils2.dedupeSuitesTestsEnvironments({
1034
1034
  category: "playwright",
1035
1035
  commitId,
1036
1036
  relatedCommitIds,
@@ -1,10 +1,11 @@
1
1
  // src/playwrightJSONReport.ts
2
- import { FlakinessReport as FK, FlakinessReport as FlakinessReport2 } from "@flakiness/report";
2
+ import { FlakinessReport } from "@flakiness/flakiness-report";
3
+ import { ReportUtils as ReportUtils2 } from "@flakiness/report";
3
4
  import debug from "debug";
4
5
  import { posix as posixPath2 } from "path";
5
6
 
6
7
  // src/utils.ts
7
- import { FlakinessReport } from "@flakiness/report";
8
+ import { ReportUtils } from "@flakiness/report";
8
9
  import assert from "assert";
9
10
  import { spawnSync } from "child_process";
10
11
  import crypto from "crypto";
@@ -285,7 +286,7 @@ var PlaywrightJSONReport;
285
286
  };
286
287
  const configPath = jsonReport.config.configFile ? gitFilePath(context.gitRoot, normalizePath(jsonReport.config.configFile)) : void 0;
287
288
  const report = {
288
- category: FlakinessReport2.CATEGORY_PLAYWRIGHT,
289
+ category: FlakinessReport.CATEGORY_PLAYWRIGHT,
289
290
  commitId: metadata.commitId,
290
291
  configPath,
291
292
  url: metadata.runURL,
@@ -303,7 +304,7 @@ var PlaywrightJSONReport;
303
304
  context.projectId2environmentIdx.set(jsonReport.config.projects[envIdx].id, envIdx);
304
305
  report.suites = await Promise.all(jsonReport.suites.map((suite) => parseJSONSuite(context, suite)));
305
306
  return {
306
- report: FK.dedupeSuitesTestsEnvironments(report),
307
+ report: ReportUtils2.dedupeSuitesTestsEnvironments(report),
307
308
  attachments: [...context.attachments.values()],
308
309
  unaccessibleAttachmentPaths: context.unaccessibleAttachmentPaths
309
310
  };
@@ -8,7 +8,7 @@ import { URL } from "url";
8
8
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
9
9
 
10
10
  // src/utils.ts
11
- import { FlakinessReport } from "@flakiness/report";
11
+ import { ReportUtils } from "@flakiness/report";
12
12
  import http from "http";
13
13
  import https from "https";
14
14
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
package/lib/serverapi.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { TypedHTTP } from "@flakiness/shared/common/typedHttp.js";
3
3
 
4
4
  // src/utils.ts
5
- import { FlakinessReport } from "@flakiness/report";
5
+ import { ReportUtils } from "@flakiness/report";
6
6
  import http from "http";
7
7
  import https from "https";
8
8
  var FLAKINESS_DBG = !!process.env.FLAKINESS_DBG;
package/lib/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/utils.ts
2
- import { FlakinessReport } from "@flakiness/report";
2
+ import { ReportUtils } from "@flakiness/report";
3
3
  import assert from "assert";
4
4
  import { spawnSync } from "child_process";
5
5
  import crypto from "crypto";
@@ -192,7 +192,7 @@ async function resolveAttachmentPaths(report, attachmentsDir) {
192
192
  const filenameToPath = new Map(attachmentFiles.map((file) => [path.basename(file), file]));
193
193
  const attachmentIdToPath = /* @__PURE__ */ new Map();
194
194
  const missingAttachments = /* @__PURE__ */ new Set();
195
- FlakinessReport.visitTests(report, (test) => {
195
+ ReportUtils.visitTests(report, (test) => {
196
196
  for (const attempt of test.attempts) {
197
197
  for (const attachment of attempt.attachments ?? []) {
198
198
  const attachmentPath = filenameToPath.get(attachment.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flakiness/sdk",
3
- "version": "0.116.0",
3
+ "version": "0.119.0",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "flakiness": "./lib/cli/cli.js"
@@ -10,29 +10,29 @@
10
10
  "types": "./types/src/localReportApi.d.ts"
11
11
  },
12
12
  "./uploader": {
13
+ "types": "./types/src/reportUploader.d.ts",
13
14
  "import": "./lib/reportUploader.js",
14
- "require": "./lib/reportUploader.js",
15
- "types": "./types/src/reportUploader.d.ts"
15
+ "require": "./lib/reportUploader.js"
16
16
  },
17
17
  "./utils": {
18
+ "types": "./types/src/utils.d.ts",
18
19
  "import": "./lib/utils.js",
19
- "require": "./lib/utils.js",
20
- "types": "./types/src/utils.d.ts"
20
+ "require": "./lib/utils.js"
21
21
  },
22
22
  "./playwright": {
23
+ "types": "./types/src/playwrightJSONReport.d.ts",
23
24
  "import": "./lib/playwrightJSONReport.js",
24
- "require": "./lib/playwrightJSONReport.js",
25
- "types": "./types/src/playwrightJSONReport.d.ts"
25
+ "require": "./lib/playwrightJSONReport.js"
26
26
  },
27
27
  "./junit": {
28
+ "types": "./types/src/junit.d.ts",
28
29
  "import": "./lib/junit.js",
29
- "require": "./lib/junit.js",
30
- "types": "./types/src/junit.d.ts"
30
+ "require": "./lib/junit.js"
31
31
  },
32
32
  "./playwright-test": {
33
+ "types": "./types/src/playwright-test.d.ts",
33
34
  "import": "./lib/playwright-test.js",
34
- "require": "./lib/playwright-test.js",
35
- "types": "./types/src/playwright-test.d.ts"
35
+ "require": "./lib/playwright-test.js"
36
36
  }
37
37
  },
38
38
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "author": "Degu Labs, Inc",
46
46
  "license": "Fair Source 100",
47
47
  "devDependencies": {
48
- "@flakiness/server": "0.116.0",
48
+ "@flakiness/server": "0.119.0",
49
49
  "@playwright/test": "^1.54.0",
50
50
  "@types/babel__code-frame": "^7.0.6",
51
51
  "@types/compression": "^1.8.1",
@@ -53,8 +53,9 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@babel/code-frame": "^7.26.2",
56
- "@flakiness/report": "0.116.0",
57
- "@flakiness/shared": "0.116.0",
56
+ "@flakiness/flakiness-report": "^0.11.1",
57
+ "@flakiness/report": "0.119.0",
58
+ "@flakiness/shared": "0.119.0",
58
59
  "@rgrove/parse-xml": "^4.2.0",
59
60
  "body-parser": "^1.20.3",
60
61
  "chalk": "^5.6.2",