testlens-playwright-reporter 0.1.7 → 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/lib/index.js +9 -13
- package/package.json +1 -1
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
|
|
54
|
-
enableGitInfo: options.enableGitInfo
|
|
55
|
-
enableArtifacts: options.enableArtifacts
|
|
56
|
-
batchSize: options.batchSize
|
|
57
|
-
flushInterval: options.flushInterval
|
|
58
|
-
retryAttempts: options.retryAttempts
|
|
59
|
-
timeout: options.timeout
|
|
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