@stanterprise/playwright-reporter 0.1.3 → 1.0.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.
|
@@ -40,7 +40,10 @@ const debugLogger_1 = require("../utils/debugLogger");
|
|
|
40
40
|
function getClient(options) {
|
|
41
41
|
try {
|
|
42
42
|
const maxMessageSize = options.grpcMaxMessageSize || 104857600; // 100MB default
|
|
43
|
-
|
|
43
|
+
const credentials = options.tls
|
|
44
|
+
? grpc.credentials.createSsl()
|
|
45
|
+
: grpc.credentials.createInsecure();
|
|
46
|
+
return new grpc.Client(options.grpcAddress, credentials, {
|
|
44
47
|
"grpc.max_send_message_length": maxMessageSize,
|
|
45
48
|
"grpc.max_receive_message_length": maxMessageSize,
|
|
46
49
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -76,6 +76,11 @@ export interface StanterpriseReporterOptions {
|
|
|
76
76
|
* @default "stanterprise-debug.jsonl" or process.env.STANTERPRISE_DEBUG_FILE
|
|
77
77
|
*/
|
|
78
78
|
debugFile?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to use TLS for gRPC connections. If true, the client will attempt to establish a secure connection.
|
|
81
|
+
* @default true or process.env.STANTERPRISE_GRPC_TLS === "true"
|
|
82
|
+
*/
|
|
83
|
+
tls?: boolean;
|
|
79
84
|
}
|
|
80
85
|
/**
|
|
81
86
|
* Internal type for managing test execution state
|
|
@@ -25,6 +25,9 @@ function defineOptions(providedOptions) {
|
|
|
25
25
|
providedOptions.debugFile ||
|
|
26
26
|
process.env.STANTERPRISE_DEBUG_FILE ||
|
|
27
27
|
"stanterprise-debug.jsonl";
|
|
28
|
+
result.tls =
|
|
29
|
+
providedOptions.tls ??
|
|
30
|
+
(process.env.STANTERPRISE_GRPC_TLS || "true").toLowerCase() === "true";
|
|
28
31
|
return result;
|
|
29
32
|
}
|
|
30
33
|
function identifyAddress(providedOptions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stanterprise/playwright-reporter",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Custom Playwright test reporter that sends test results to Stanterprise via gRPC",
|
|
5
5
|
"homepage": "https://github.com/stanterprise/stanterprise-playwright-reporter#readme",
|
|
6
6
|
"bugs": {
|