@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.cjs.js +20 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/src/lib/services/acc.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15760,7 +15760,7 @@ var transitionalDefaults = {
|
|
|
15760
15760
|
validateStatusUndefinedResolves: true,
|
|
15761
15761
|
};
|
|
15762
15762
|
|
|
15763
|
-
var URLSearchParams = require$$0$2.URLSearchParams;
|
|
15763
|
+
var URLSearchParams$1 = require$$0$2.URLSearchParams;
|
|
15764
15764
|
|
|
15765
15765
|
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
15766
15766
|
|
|
@@ -15787,7 +15787,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
|
15787
15787
|
var platform$1 = {
|
|
15788
15788
|
isNode: true,
|
|
15789
15789
|
classes: {
|
|
15790
|
-
URLSearchParams,
|
|
15790
|
+
URLSearchParams: URLSearchParams$1,
|
|
15791
15791
|
FormData: FormData$2,
|
|
15792
15792
|
Blob: (typeof Blob !== 'undefined' && Blob) || null,
|
|
15793
15793
|
},
|
|
@@ -52521,14 +52521,23 @@ class AccService {
|
|
|
52521
52521
|
*/
|
|
52522
52522
|
async getBundles(filter = '') {
|
|
52523
52523
|
const bundleItems = new Array();
|
|
52524
|
-
|
|
52525
|
-
|
|
52526
|
-
|
|
52527
|
-
|
|
52528
|
-
|
|
52524
|
+
// Both sort keys are required for complete results, mirroring the ACC UI.
|
|
52525
|
+
// Sorting by version alone leaves thousands of ties whose order is unstable
|
|
52526
|
+
// across page requests, so bundles get dropped/duplicated at page
|
|
52527
|
+
// boundaries; the server rejects unique tiebreakers like entityId.
|
|
52528
|
+
// URLSearchParams (not a plain object) because the repeated `sort` key must
|
|
52529
|
+
// serialize as `sort=a&sort=b` — axios' `sort[]=` form is silently ignored.
|
|
52530
|
+
const pageParams = (page) => {
|
|
52531
|
+
const params = new URLSearchParams();
|
|
52532
|
+
params.append('page', page.toString());
|
|
52533
|
+
params.append('size', '2000');
|
|
52534
|
+
params.append('sort', 'displayName,asc');
|
|
52535
|
+
params.append('sort', 'version,desc');
|
|
52536
|
+
params.append('q', filter);
|
|
52537
|
+
return params;
|
|
52529
52538
|
};
|
|
52530
52539
|
return this.dxSaaSService
|
|
52531
|
-
.accGet('apm/acc/private/bundle',
|
|
52540
|
+
.accGet('apm/acc/private/bundle', pageParams(0))
|
|
52532
52541
|
.then(async (response) => {
|
|
52533
52542
|
bundleItems.push(...response.items);
|
|
52534
52543
|
// Collect remaining page indices and fetch them one at a time
|
|
@@ -52545,13 +52554,12 @@ class AccService {
|
|
|
52545
52554
|
this.log.error(`Error downloading bundle page ${item}, some results will be missing.`);
|
|
52546
52555
|
})
|
|
52547
52556
|
.process((pageNumber) => {
|
|
52548
|
-
this.log.
|
|
52549
|
-
params.page = pageNumber;
|
|
52557
|
+
this.log.debug(`downloading bundles page ${pageNumber}`);
|
|
52550
52558
|
return this.dxSaaSService
|
|
52551
|
-
.accGet('apm/acc/private/bundle',
|
|
52559
|
+
.accGet('apm/acc/private/bundle', pageParams(pageNumber))
|
|
52552
52560
|
.then((response) => {
|
|
52553
52561
|
bundleItems.push(...response.items);
|
|
52554
|
-
this.log.
|
|
52562
|
+
this.log.debug(`finished bundles page ${pageNumber}`);
|
|
52555
52563
|
});
|
|
52556
52564
|
});
|
|
52557
52565
|
return bundleItems;
|