testlens-playwright-reporter 0.3.0 → 0.3.1

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/index.js CHANGED
@@ -497,7 +497,11 @@ class TestLensReporter {
497
497
 
498
498
  async sendToApi(payload) {
499
499
  try {
500
- const response = await this.axiosInstance.post('', payload);
500
+ const response = await this.axiosInstance.post('', payload, {
501
+ headers: {
502
+ 'X-API-Key': this.config.apiKey
503
+ }
504
+ });
501
505
  } catch (error) {
502
506
  console.error(`❌ Failed to send ${payload.type} event to TestLens:`, {
503
507
  message: error?.message || 'Unknown error',
@@ -822,7 +826,7 @@ class TestLensReporter {
822
826
  },
823
827
  maxContentLength: Infinity,
824
828
  maxBodyLength: Infinity,
825
- timeout: Math.max(300000, Math.ceil(fileSize / (1024 * 1024)) * 5000), // 5s per MB, min 5 minutes
829
+ timeout: Math.max(600000, Math.ceil(fileSize / (1024 * 1024)) * 10000), // 10s per MB, min 10 minutes - increased for large trace files
826
830
  // Don't use custom HTTPS agent for S3 uploads
827
831
  httpsAgent: undefined
828
832
  });
package/index.ts CHANGED
@@ -673,7 +673,11 @@ export class TestLensReporter implements Reporter {
673
673
  private async sendToApi(payload: any): Promise<void> {
674
674
  try {
675
675
  console.log(`📤 Sending ${payload.type} event to ${this.config.apiEndpoint}`);
676
- const response = await this.axiosInstance.post('', payload);
676
+ const response = await this.axiosInstance.post('', payload, {
677
+ headers: {
678
+ 'X-API-Key': this.config.apiKey
679
+ }
680
+ });
677
681
  if (this.config.enableRealTimeStream) {
678
682
  console.log(`✅ Sent ${payload.type} event to TestLens (HTTP ${response.status})`);
679
683
  }
@@ -996,7 +1000,7 @@ export class TestLensReporter implements Reporter {
996
1000
  },
997
1001
  maxContentLength: Infinity,
998
1002
  maxBodyLength: Infinity,
999
- timeout: Math.max(300000, Math.ceil(fileSize / (1024 * 1024)) * 5000), // 5s per MB, min 5 minutes
1003
+ timeout: Math.max(600000, Math.ceil(fileSize / (1024 * 1024)) * 10000), // 10s per MB, min 10 minutes - increased for large trace files
1000
1004
  // Don't use custom HTTPS agent for S3 uploads
1001
1005
  httpsAgent: undefined
1002
1006
  });
package/lib/index.js CHANGED
@@ -493,7 +493,11 @@ class TestLensReporter {
493
493
  async sendToApi(payload) {
494
494
  try {
495
495
  console.log(`📤 Sending ${payload.type} event to ${this.config.apiEndpoint}`);
496
- const response = await this.axiosInstance.post('', payload);
496
+ const response = await this.axiosInstance.post('', payload, {
497
+ headers: {
498
+ 'X-API-Key': this.config.apiKey
499
+ }
500
+ });
497
501
  if (this.config.enableRealTimeStream) {
498
502
  console.log(`✅ Sent ${payload.type} event to TestLens (HTTP ${response.status})`);
499
503
  }
@@ -781,7 +785,7 @@ class TestLensReporter {
781
785
  },
782
786
  maxContentLength: Infinity,
783
787
  maxBodyLength: Infinity,
784
- timeout: Math.max(300000, Math.ceil(fileSize / (1024 * 1024)) * 5000), // 5s per MB, min 5 minutes
788
+ timeout: Math.max(600000, Math.ceil(fileSize / (1024 * 1024)) * 10000), // 10s per MB, min 10 minutes - increased for large trace files
785
789
  // Don't use custom HTTPS agent for S3 uploads
786
790
  httpsAgent: undefined
787
791
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testlens-playwright-reporter",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",