@reportportal/client-javascript 5.0.7 → 5.0.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/CHANGELOG.md +7 -0
- package/VERSION +1 -1
- package/lib/report-portal-client.js +20 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [5.0.8] - 2023-01-24
|
|
3
|
+
### Added
|
|
4
|
+
- `mergeOptions` parameter to `mergeLaunches` method.
|
|
5
|
+
- Dynamic page size for launch merge based on launches count, resolves [#86](https://github.com/reportportal/client-javascript/issues/86).
|
|
6
|
+
### Security
|
|
7
|
+
- Updated versions of vulnerable packages (json5, minimist).
|
|
8
|
+
|
|
2
9
|
## [5.0.7] - 2022-12-26
|
|
3
10
|
### Added
|
|
4
11
|
- The ability to see verbose logs in debug mode. To enable the debug mode, the `debug: true` flag should be specified in `params`.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.0.
|
|
1
|
+
5.0.8
|
|
@@ -278,30 +278,41 @@ class RPClient {
|
|
|
278
278
|
*
|
|
279
279
|
* @Returns {Object} - an object which contains a data for merge launches in ReportPortal.
|
|
280
280
|
*/
|
|
281
|
-
getMergeLaunchesRequest(launchIds) {
|
|
281
|
+
getMergeLaunchesRequest(launchIds, mergeOptions = {}) {
|
|
282
282
|
return {
|
|
283
|
-
description: 'Merged launch',
|
|
284
|
-
endTime: this.helpers.now(),
|
|
285
|
-
extendSuitesDescription: true,
|
|
286
283
|
launches: launchIds,
|
|
287
284
|
mergeType: 'BASIC',
|
|
288
|
-
|
|
285
|
+
description: this.config.description || 'Merged launch',
|
|
286
|
+
mode: this.config.mode || 'DEFAULT',
|
|
289
287
|
name: this.config.launch || 'Test launch name',
|
|
290
288
|
attributes: this.config.attributes,
|
|
289
|
+
endTime: this.helpers.now(),
|
|
290
|
+
extendSuitesDescription: true,
|
|
291
|
+
...mergeOptions,
|
|
291
292
|
};
|
|
292
293
|
}
|
|
293
294
|
|
|
294
|
-
|
|
295
|
+
/**
|
|
295
296
|
* This method is used for merge launches in ReportPortal.
|
|
296
|
-
*
|
|
297
|
+
* @param {Object} mergeOptions - options for merge request, can override default options.
|
|
298
|
+
* mergeOptions should look like this
|
|
299
|
+
* {
|
|
300
|
+
* "extendSuitesDescription": boolean,
|
|
301
|
+
* "description": string,
|
|
302
|
+
* "mergeType": 'BASIC' | 'DEEP',
|
|
303
|
+
* "name": string
|
|
304
|
+
* }
|
|
297
305
|
* Please, keep in mind that this method is work only in case
|
|
298
306
|
* the option isLaunchMergeRequired is true.
|
|
307
|
+
*
|
|
308
|
+
* @Returns {Promise}
|
|
299
309
|
*/
|
|
300
|
-
mergeLaunches() {
|
|
310
|
+
mergeLaunches(mergeOptions= {}) {
|
|
301
311
|
if (this.isLaunchMergeRequired) {
|
|
302
312
|
const launchUUIds = helpers.readLaunchesFromFile();
|
|
303
313
|
const params = new URLSearchParams({
|
|
304
314
|
'filter.in.uuid': launchUUIds,
|
|
315
|
+
'page.size': launchUUIds.length,
|
|
305
316
|
});
|
|
306
317
|
const launchSearchUrl = `launch?${params.toString()}`;
|
|
307
318
|
this.logDebug(`Find launches with UUIDs to merge: ${launchUUIds}`);
|
|
@@ -319,7 +330,7 @@ class RPClient {
|
|
|
319
330
|
},
|
|
320
331
|
)
|
|
321
332
|
.then((launchIds) => {
|
|
322
|
-
const request = this.getMergeLaunchesRequest(launchIds);
|
|
333
|
+
const request = this.getMergeLaunchesRequest(launchIds, mergeOptions);
|
|
323
334
|
this.logDebug(`Merge launches with ids: ${launchIds}`, request);
|
|
324
335
|
const mergeURL = 'launch/merge';
|
|
325
336
|
return this.restClient.create(mergeURL, request, { headers: this.headers });
|