testlens-playwright-reporter 0.1.6 → 0.1.8

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
@@ -22,10 +22,6 @@ class TestLensReporter {
22
22
  timeout: options.timeout
23
23
  };
24
24
 
25
- if (!this.config.apiEndpoint) {
26
- throw new Error('TEST_API_ENDPOINT is required for TestLensReporter. Set it in environment variable or pass as option.');
27
- }
28
-
29
25
  if (!this.config.apiKey) {
30
26
  throw new Error('API_KEY is required for TestLensReporter. Pass it as apiKey option in your playwright config.');
31
27
  }
package/index.ts CHANGED
@@ -151,10 +151,6 @@ export class TestLensReporter implements Reporter {
151
151
  timeout: options.timeout
152
152
  } as Required<TestLensReporterConfig>;
153
153
 
154
- if (!this.config.apiEndpoint) {
155
- throw new Error('TEST_API_ENDPOINT is required for TestLensReporter. Set it in environment variable or pass as option.');
156
- }
157
-
158
154
  if (!this.config.apiKey) {
159
155
  throw new Error('API_KEY is required for TestLensReporter. Pass it as apiKey option in your playwright config.');
160
156
  }
package/lib/index.js CHANGED
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.TestLensReporter = void 0;
40
+ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
40
41
  const crypto_1 = require("crypto");
41
42
  const os = __importStar(require("os"));
42
43
  const path = __importStar(require("path"));
@@ -48,21 +49,16 @@ const mime = __importStar(require("mime"));
48
49
  class TestLensReporter {
49
50
  constructor(options) {
50
51
  this.config = {
51
- apiEndpoint: options.apiEndpoint || '',
52
+ apiEndpoint: options.apiEndpoint || 'https://testlens.qa-path.com/api/v1/webhook/playwright',
52
53
  apiKey: options.apiKey, // API key must come from config file
53
- enableRealTimeStream: options.enableRealTimeStream !== false,
54
- enableGitInfo: options.enableGitInfo !== false,
55
- enableArtifacts: options.enableArtifacts !== false,
56
- batchSize: options.batchSize || 10,
57
- flushInterval: options.flushInterval || 5000,
58
- retryAttempts: options.retryAttempts || 3,
59
- timeout: options.timeout || 30000,
60
- rejectUnauthorized: options.rejectUnauthorized !== false, // Default to true for security
61
- ignoreSslErrors: options.ignoreSslErrors === true // Explicit opt-in to ignore SSL errors
54
+ enableRealTimeStream: options.enableRealTimeStream,
55
+ enableGitInfo: options.enableGitInfo,
56
+ enableArtifacts: options.enableArtifacts,
57
+ batchSize: options.batchSize,
58
+ flushInterval: options.flushInterval,
59
+ retryAttempts: options.retryAttempts,
60
+ timeout: options.timeout
62
61
  };
63
- if (!this.config.apiEndpoint) {
64
- throw new Error('TEST_API_ENDPOINT is required for TestLensReporter. Set it in environment variable or pass as option.');
65
- }
66
62
  if (!this.config.apiKey) {
67
63
  throw new Error('API_KEY is required for TestLensReporter. Pass it as apiKey option in your playwright config.');
68
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testlens-playwright-reporter",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
5
5
  "main": "lib/index.js",
6
6
  "types": "index.d.ts",