@reportportal/client-javascript
Advanced tools
Comparing version 5.0.7 to 5.0.8
## [5.0.8] - 2023-01-24 | ||
### Added | ||
- `mergeOptions` parameter to `mergeLaunches` method. | ||
- Dynamic page size for launch merge based on launches count, resolves [#86](https://github.com/reportportal/client-javascript/issues/86). | ||
### Security | ||
- Updated versions of vulnerable packages (json5, minimist). | ||
## [5.0.7] - 2022-12-26 | ||
@@ -3,0 +10,0 @@ ### Added |
@@ -281,22 +281,32 @@ /* eslint-disable quotes,no-console,class-methods-use-this */ | ||
*/ | ||
getMergeLaunchesRequest(launchIds) { | ||
getMergeLaunchesRequest(launchIds, mergeOptions = {}) { | ||
return { | ||
description: 'Merged launch', | ||
endTime: this.helpers.now(), | ||
extendSuitesDescription: true, | ||
launches: launchIds, | ||
mergeType: 'BASIC', | ||
mode: 'DEFAULT', | ||
description: this.config.description || 'Merged launch', | ||
mode: this.config.mode || 'DEFAULT', | ||
name: this.config.launch || 'Test launch name', | ||
attributes: this.config.attributes, | ||
endTime: this.helpers.now(), | ||
extendSuitesDescription: true, | ||
...mergeOptions, | ||
}; | ||
} | ||
/* | ||
/** | ||
* This method is used for merge launches in ReportPortal. | ||
* | ||
* @param {Object} mergeOptions - options for merge request, can override default options. | ||
* mergeOptions should look like this | ||
* { | ||
* "extendSuitesDescription": boolean, | ||
* "description": string, | ||
* "mergeType": 'BASIC' | 'DEEP', | ||
* "name": string | ||
* } | ||
* Please, keep in mind that this method is work only in case | ||
* the option isLaunchMergeRequired is true. | ||
* | ||
* @Returns {Promise} | ||
*/ | ||
mergeLaunches() { | ||
mergeLaunches(mergeOptions= {}) { | ||
if (this.isLaunchMergeRequired) { | ||
@@ -306,2 +316,3 @@ const launchUUIds = helpers.readLaunchesFromFile(); | ||
'filter.in.uuid': launchUUIds, | ||
'page.size': launchUUIds.length, | ||
}); | ||
@@ -324,3 +335,3 @@ const launchSearchUrl = `launch?${params.toString()}`; | ||
.then((launchIds) => { | ||
const request = this.getMergeLaunchesRequest(launchIds); | ||
const request = this.getMergeLaunchesRequest(launchIds, mergeOptions); | ||
this.logDebug(`Merge launches with ids: ${launchIds}`, request); | ||
@@ -327,0 +338,0 @@ const mergeURL = 'launch/merge'; |
{ | ||
"name": "@reportportal/client-javascript", | ||
"version": "5.0.7", | ||
"version": "5.0.8", | ||
"description": "ReportPortal client for node.js", | ||
@@ -5,0 +5,0 @@ "author": "ReportPortal.io", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65305
1101