@testomatio/reporter 2.3.7-beta.7-stack-artifacts → 2.3.7-beta.9-stack-artifacts

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/client.js CHANGED
@@ -195,7 +195,7 @@ class Client {
195
195
  if (stackArtifactsEnabled) {
196
196
  const timestamp = +new Date;
197
197
  uploadedFiles.push(this.uploader.uploadFileAsBuffer(Buffer.from(stripColors(fullLogs), 'utf8'), [this.runId, rid, `logs_${timestamp}.log`]));
198
- fullLogs = null;
198
+ fullLogs = '';
199
199
  }
200
200
  if (!this.pipes || !this.pipes.length)
201
201
  this.pipes = await (0, index_js_1.pipesFactory)(this.paramsForPipesFactory || {}, this.pipeStore);
@@ -471,10 +471,14 @@ function transformEnvVarToBoolean(value) {
471
471
  return Boolean(value);
472
472
  }
473
473
  function truncate(s, size = 255) {
474
- if (s.toString().trim().length < size) {
475
- return s.toString();
474
+ if (s === undefined || s === null) {
475
+ return '';
476
+ }
477
+ const str = s.toString();
478
+ if (str.trim().length < size) {
479
+ return str;
476
480
  }
477
- return `${s.toString().substring(0, size)}...`;
481
+ return `${str.substring(0, size)}...`;
478
482
  }
479
483
 
480
484
  module.exports.getPackageVersion = getPackageVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "2.3.7-beta.7-stack-artifacts",
3
+ "version": "2.3.7-beta.9-stack-artifacts",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "engines": {
6
6
  "node": ">=18"
package/src/client.js CHANGED
@@ -218,7 +218,7 @@ class Client {
218
218
  [this.runId, rid, `logs_${timestamp}.log`]
219
219
  )
220
220
  );
221
- fullLogs = null;
221
+ fullLogs = '';
222
222
  }
223
223
 
224
224
 
@@ -429,10 +429,14 @@ function transformEnvVarToBoolean(value) {
429
429
  }
430
430
 
431
431
  function truncate(s, size = 255) {
432
- if (s.toString().trim().length < size) {
433
- return s.toString();
432
+ if (s === undefined || s === null) {
433
+ return '';
434
434
  }
435
- return `${s.toString().substring(0, size)}...`;
435
+ const str = s.toString();
436
+ if (str.trim().length < size) {
437
+ return str;
438
+ }
439
+ return `${str.substring(0, size)}...`;
436
440
  }
437
441
 
438
442
  export {