@dx-do/client 7.2.0 → 7.2.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.
package/dist/index.esm.js CHANGED
@@ -15738,7 +15738,7 @@ var transitionalDefaults = {
15738
15738
  validateStatusUndefinedResolves: true,
15739
15739
  };
15740
15740
 
15741
- var URLSearchParams = require$$0$2.URLSearchParams;
15741
+ var URLSearchParams$1 = require$$0$2.URLSearchParams;
15742
15742
 
15743
15743
  const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
15744
15744
 
@@ -15765,7 +15765,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
15765
15765
  var platform$1 = {
15766
15766
  isNode: true,
15767
15767
  classes: {
15768
- URLSearchParams,
15768
+ URLSearchParams: URLSearchParams$1,
15769
15769
  FormData: FormData$1,
15770
15770
  Blob: (typeof Blob !== 'undefined' && Blob) || null,
15771
15771
  },
@@ -52499,14 +52499,23 @@ class AccService {
52499
52499
  */
52500
52500
  async getBundles(filter = '') {
52501
52501
  const bundleItems = new Array();
52502
- const params = {
52503
- page: 0,
52504
- size: 2000,
52505
- sort: 'version,desc',
52506
- q: filter,
52502
+ // Both sort keys are required for complete results, mirroring the ACC UI.
52503
+ // Sorting by version alone leaves thousands of ties whose order is unstable
52504
+ // across page requests, so bundles get dropped/duplicated at page
52505
+ // boundaries; the server rejects unique tiebreakers like entityId.
52506
+ // URLSearchParams (not a plain object) because the repeated `sort` key must
52507
+ // serialize as `sort=a&sort=b` — axios' `sort[]=` form is silently ignored.
52508
+ const pageParams = (page) => {
52509
+ const params = new URLSearchParams();
52510
+ params.append('page', page.toString());
52511
+ params.append('size', '2000');
52512
+ params.append('sort', 'displayName,asc');
52513
+ params.append('sort', 'version,desc');
52514
+ params.append('q', filter);
52515
+ return params;
52507
52516
  };
52508
52517
  return this.dxSaaSService
52509
- .accGet('apm/acc/private/bundle', params)
52518
+ .accGet('apm/acc/private/bundle', pageParams(0))
52510
52519
  .then(async (response) => {
52511
52520
  bundleItems.push(...response.items);
52512
52521
  // Collect remaining page indices and fetch them one at a time
@@ -52523,13 +52532,12 @@ class AccService {
52523
52532
  this.log.error(`Error downloading bundle page ${item}, some results will be missing.`);
52524
52533
  })
52525
52534
  .process((pageNumber) => {
52526
- this.log.info(`downloading bundles page ${pageNumber}`);
52527
- params.page = pageNumber;
52535
+ this.log.debug(`downloading bundles page ${pageNumber}`);
52528
52536
  return this.dxSaaSService
52529
- .accGet('apm/acc/private/bundle', params)
52537
+ .accGet('apm/acc/private/bundle', pageParams(pageNumber))
52530
52538
  .then((response) => {
52531
52539
  bundleItems.push(...response.items);
52532
- this.log.info(`finished bundles page ${pageNumber}`);
52540
+ this.log.debug(`finished bundles page ${pageNumber}`);
52533
52541
  });
52534
52542
  });
52535
52543
  return bundleItems;