testlens-playwright-reporter 0.1.5 → 0.1.7
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 +10 -14
- package/index.ts +10 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
2
|
+
|
|
1
3
|
const { randomUUID } = require('crypto');
|
|
2
4
|
const os = require('os');
|
|
3
5
|
const path = require('path');
|
|
@@ -9,23 +11,17 @@ const FormData = require('form-data');
|
|
|
9
11
|
class TestLensReporter {
|
|
10
12
|
constructor(options = {}) {
|
|
11
13
|
this.config = {
|
|
12
|
-
apiEndpoint:
|
|
14
|
+
apiEndpoint: 'https://testlens.qa-path.com/api/v1/webhook/playwright',
|
|
13
15
|
apiKey: options.apiKey, // API key must come from config file
|
|
14
|
-
enableRealTimeStream: options.enableRealTimeStream
|
|
15
|
-
enableGitInfo: options.enableGitInfo
|
|
16
|
-
enableArtifacts: options.enableArtifacts
|
|
17
|
-
batchSize: options.batchSize
|
|
18
|
-
flushInterval: options.flushInterval
|
|
19
|
-
retryAttempts: options.retryAttempts
|
|
20
|
-
timeout: options.timeout
|
|
21
|
-
rejectUnauthorized: options.rejectUnauthorized !== false, // Default to true for security
|
|
22
|
-
ignoreSslErrors: options.ignoreSslErrors === true // Explicit opt-in to ignore SSL errors
|
|
16
|
+
enableRealTimeStream: options.enableRealTimeStream,
|
|
17
|
+
enableGitInfo: options.enableGitInfo,
|
|
18
|
+
enableArtifacts: options.enableArtifacts,
|
|
19
|
+
batchSize: options.batchSize,
|
|
20
|
+
flushInterval: options.flushInterval,
|
|
21
|
+
retryAttempts: options.retryAttempts,
|
|
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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
2
|
+
|
|
1
3
|
import { randomUUID } from 'crypto';
|
|
2
4
|
import * as os from 'os';
|
|
3
5
|
import * as path from 'path';
|
|
@@ -138,23 +140,17 @@ export class TestLensReporter implements Reporter {
|
|
|
138
140
|
|
|
139
141
|
constructor(options: TestLensReporterOptions) {
|
|
140
142
|
this.config = {
|
|
141
|
-
apiEndpoint: options.apiEndpoint || '',
|
|
143
|
+
apiEndpoint: options.apiEndpoint || 'https://testlens.qa-path.com/api/v1/webhook/playwright',
|
|
142
144
|
apiKey: options.apiKey, // API key must come from config file
|
|
143
|
-
enableRealTimeStream: options.enableRealTimeStream
|
|
144
|
-
enableGitInfo: options.enableGitInfo
|
|
145
|
-
enableArtifacts: options.enableArtifacts
|
|
146
|
-
batchSize: options.batchSize
|
|
147
|
-
flushInterval: options.flushInterval
|
|
148
|
-
retryAttempts: options.retryAttempts
|
|
149
|
-
timeout: options.timeout
|
|
150
|
-
rejectUnauthorized: options.rejectUnauthorized !== false, // Default to true for security
|
|
151
|
-
ignoreSslErrors: options.ignoreSslErrors === true // Explicit opt-in to ignore SSL errors
|
|
145
|
+
enableRealTimeStream: options.enableRealTimeStream,
|
|
146
|
+
enableGitInfo: options.enableGitInfo,
|
|
147
|
+
enableArtifacts: options.enableArtifacts,
|
|
148
|
+
batchSize: options.batchSize,
|
|
149
|
+
flushInterval: options.flushInterval,
|
|
150
|
+
retryAttempts: options.retryAttempts,
|
|
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/package.json
CHANGED