@empiricalrun/playwright-utils 0.43.1 → 0.44.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/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incremental-blob-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/incremental-blob-reporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"incremental-blob-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/incremental-blob-reporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAcnC;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,cAAM,uBAAwB,YAAW,QAAQ;IAC/C,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,WAAW,CAIjB;IACF,OAAO,CAAC,UAAU,CAGhB;IACF,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,iBAAiB,CAA+B;IACxD,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,UAAU,CAAsB;;IAexC,OAAO,CAAC,cAAc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Ae,uBAAuB,CAAC"}
|
|
@@ -13,6 +13,9 @@ const os_1 = __importDefault(require("os"));
|
|
|
13
13
|
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const uploader_1 = require("./uploader");
|
|
15
15
|
const BLOB_REPORT_VERSION = 2;
|
|
16
|
+
function isLocalTesting() {
|
|
17
|
+
return process.env.LOCAL_TEST === "true";
|
|
18
|
+
}
|
|
16
19
|
class IncrementalBlobReporter {
|
|
17
20
|
_currentWorkingDir = process.cwd();
|
|
18
21
|
_stagingDir = path_1.default.join(this._currentWorkingDir, "blob-report-incremental", "staging");
|
|
@@ -48,7 +51,8 @@ class IncrementalBlobReporter {
|
|
|
48
51
|
console.log("[IncrementalBlobReporter] SIGINT received, flushing and uploading...");
|
|
49
52
|
this._flushAndUpload()
|
|
50
53
|
.then(() => {
|
|
51
|
-
console.log("[IncrementalBlobReporter] Flush and upload complete on SIGINT");
|
|
54
|
+
console.log("[IncrementalBlobReporter] Flush and upload complete on SIGINT, exiting");
|
|
55
|
+
process.exit(0);
|
|
52
56
|
})
|
|
53
57
|
.catch((err) => {
|
|
54
58
|
console.error("[IncrementalBlobReporter] Flush/upload failed on SIGINT:", err);
|
|
@@ -80,7 +84,7 @@ class IncrementalBlobReporter {
|
|
|
80
84
|
await this._uploader.uploadFile(this._zipPath, `blobs/incremental-report-${this._shardIndex}.zip`);
|
|
81
85
|
await this._uploader.waitForUploads();
|
|
82
86
|
console.log("[IncrementalBlobReporter] Flush and upload complete on SIGINT");
|
|
83
|
-
if (
|
|
87
|
+
if (isLocalTesting()) {
|
|
84
88
|
await this._mergeForLocalTest();
|
|
85
89
|
}
|
|
86
90
|
}
|
|
@@ -127,6 +131,9 @@ class IncrementalBlobReporter {
|
|
|
127
131
|
_embedAttachment(attachmentPath, resultId) {
|
|
128
132
|
if (!attachmentPath || !fs_1.default.existsSync(attachmentPath))
|
|
129
133
|
return null;
|
|
134
|
+
if (!isLocalTesting()) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
130
137
|
const ext = path_1.default.extname(attachmentPath);
|
|
131
138
|
const uniqueName = `${resultId}-${this._generateId()}${ext}`;
|
|
132
139
|
const destPath = path_1.default.join(this._stagingDir, uniqueName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"rimraf": "^6.0.1",
|
|
45
45
|
"ts-morph": "^23.0.0",
|
|
46
46
|
"@empiricalrun/llm": "^0.26.0",
|
|
47
|
-
"@empiricalrun/r2-uploader": "^0.9.1",
|
|
48
|
-
"@empiricalrun/reporter": "^0.28.0",
|
|
49
47
|
"@empiricalrun/cua": "^0.3.0",
|
|
50
|
-
"@empiricalrun/dashboard-client": "^0.2.0"
|
|
48
|
+
"@empiricalrun/dashboard-client": "^0.2.0",
|
|
49
|
+
"@empiricalrun/reporter": "^0.28.0",
|
|
50
|
+
"@empiricalrun/r2-uploader": "^0.9.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"dev": "tsc --build --watch",
|