@browsermation/test 0.0.43 → 0.0.44
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/dist/bin/cli.js +2 -2
- package/dist/index.js +4 -1
- package/dist/reporter.js +3 -3
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -42258,7 +42258,7 @@ var {
|
|
|
42258
42258
|
// package.json
|
|
42259
42259
|
var package_default = {
|
|
42260
42260
|
name: "@browsermation/test",
|
|
42261
|
-
version: "0.0.
|
|
42261
|
+
version: "0.0.44",
|
|
42262
42262
|
description: "The testing platform for Playwright by Browsermation.",
|
|
42263
42263
|
main: "./dist/index.js",
|
|
42264
42264
|
types: "./dist/index.d.ts",
|
|
@@ -46561,7 +46561,7 @@ async function uploadZip(zipBuffer, shardNumber, totalShards, playwrightConfig,
|
|
|
46561
46561
|
}
|
|
46562
46562
|
const headers = {
|
|
46563
46563
|
"Content-Type": "multipart/form-data",
|
|
46564
|
-
Authorization: `Bearer ${process.env.
|
|
46564
|
+
Authorization: `Bearer ${process.env.BM_API_TOKEN}`
|
|
46565
46565
|
};
|
|
46566
46566
|
const response = await axios_default.post(process.env.API_URL, formData, {
|
|
46567
46567
|
responseType: "stream",
|
package/dist/index.js
CHANGED
|
@@ -689,7 +689,10 @@ async function fetchEndpoint2() {
|
|
|
689
689
|
process.env.SERVER_URL,
|
|
690
690
|
"SERVER_URL environment variable is not set"
|
|
691
691
|
);
|
|
692
|
-
invariant(
|
|
692
|
+
invariant(
|
|
693
|
+
process.env.BM_API_TOKEN,
|
|
694
|
+
"BM_API_TOKEN environment variable is not set"
|
|
695
|
+
);
|
|
693
696
|
return new Promise((resolve, reject) => {
|
|
694
697
|
import_node_https2.default.get(process.env.SERVER_URL, (res) => {
|
|
695
698
|
res.on("data", (chunk) => {
|
package/dist/reporter.js
CHANGED
|
@@ -33,20 +33,20 @@ var regex = (({ onlyFirst = false } = {}) => {
|
|
|
33
33
|
var stripAnsi = (str) => str.replace(regex, "");
|
|
34
34
|
var BrowsermationReporter = class {
|
|
35
35
|
log(message) {
|
|
36
|
-
if (process.env.
|
|
36
|
+
if (process.env.BM_REPORTER_LOGS) {
|
|
37
37
|
console.log(message);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async sendData(data) {
|
|
41
41
|
try {
|
|
42
42
|
await fetch(
|
|
43
|
-
process.env.
|
|
43
|
+
process.env.BM_REPORTING_URL || "https://browsermation.com/api/v1/playwright/reporting",
|
|
44
44
|
{
|
|
45
45
|
method: "POST",
|
|
46
46
|
headers: {
|
|
47
47
|
Accept: "application/json",
|
|
48
48
|
"Content-Type": "application/json",
|
|
49
|
-
Authorization: `Bearer ${process.env.
|
|
49
|
+
Authorization: `Bearer ${process.env.BM_API_TOKEN}`
|
|
50
50
|
},
|
|
51
51
|
body: JSON.stringify(data)
|
|
52
52
|
}
|