@studyportals/fawkes 8.7.2-15 → 8.7.2-17
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/src/organisations/policies/our-picks/AreaAttendance.js +16 -14
- package/dist/src/organisations/policies/our-picks/CountryAttendance.js +15 -13
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +15 -13
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +15 -13
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +15 -13
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +15 -13
- package/package.json +1 -1
|
@@ -23,21 +23,23 @@ export class AreaAttendance extends OrganisationsSeoIndexabilityPolicy {
|
|
|
23
23
|
async generateUrls() {
|
|
24
24
|
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
25
25
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
paths.push(this.getPathWithSortingOption(`${attendance.path}/${area.path}`));
|
|
37
|
-
}
|
|
26
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
27
|
+
const promises = areaFragments.flatMap(area => attendanceFragments.map(async (attendance) => {
|
|
28
|
+
const filterKeyValues = new Map([
|
|
29
|
+
[FilterKey.AREA, [area.id]],
|
|
30
|
+
[FilterKey.COUNTRY, [area.countryId]],
|
|
31
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
32
|
+
]);
|
|
33
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
34
|
+
if (result) {
|
|
35
|
+
return this.getPathWithSortingOption(`${attendance.path}/${area.path}`);
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
return null;
|
|
38
|
+
}));
|
|
39
|
+
// Wait for all promises to resolve in parallel
|
|
40
|
+
const results = await Promise.all(promises);
|
|
41
|
+
// Filter out null values and return paths
|
|
42
|
+
return results.filter((path) => path !== null);
|
|
41
43
|
}
|
|
42
44
|
get filterCombination() {
|
|
43
45
|
return FilterCombinations.AREA_ATTENDANCE;
|
|
@@ -25,19 +25,21 @@ export class CountryAttendance extends OrganisationsSeoIndexabilityPolicy {
|
|
|
25
25
|
async generateUrls() {
|
|
26
26
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
27
27
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
paths.push(this.getPathWithSortingOption(`${attendance.path}/${country.path}`));
|
|
38
|
-
}
|
|
28
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
29
|
+
const promises = countryFragments.flatMap(country => attendanceFragments.map(async (attendance) => {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
35
|
+
if (result) {
|
|
36
|
+
return this.getPathWithSortingOption(`${attendance.path}/${country.path}`);
|
|
39
37
|
}
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
return null;
|
|
39
|
+
}));
|
|
40
|
+
// Wait for all promises to resolve in parallel
|
|
41
|
+
const results = await Promise.all(promises);
|
|
42
|
+
// Filter out null values and return paths
|
|
43
|
+
return results.filter((path) => path !== null);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -24,19 +24,21 @@ export class RankedAttendanceDiscipline extends RankedOrganisationsSeoIndexabili
|
|
|
24
24
|
async generateUrls() {
|
|
25
25
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
26
26
|
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
paths.push(this.getPathWithSortingOption(`${attendance.path}/${discipline.path}`));
|
|
37
|
-
}
|
|
27
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
28
|
+
const promises = attendanceFragments.flatMap(attendance => disciplineFragments.map(async (discipline) => {
|
|
29
|
+
const filterKeyValues = new Map([
|
|
30
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
31
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
32
|
+
]);
|
|
33
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
34
|
+
if (result) {
|
|
35
|
+
return this.getPathWithSortingOption(`${attendance.path}/${discipline.path}`);
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
return null;
|
|
38
|
+
}));
|
|
39
|
+
// Wait for all promises to resolve in parallel
|
|
40
|
+
const results = await Promise.all(promises);
|
|
41
|
+
// Filter out null values and return paths
|
|
42
|
+
return results.filter((path) => path !== null);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -23,20 +23,22 @@ export class RankedContinentAttendance extends RankedOrganisationsSeoIndexabilit
|
|
|
23
23
|
async generateUrls() {
|
|
24
24
|
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
25
25
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
paths.push(this.getPathWithSortingOption(`${attendance.path}/${continent.path}`));
|
|
36
|
-
}
|
|
26
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
27
|
+
const promises = continentFragments.flatMap(continent => attendanceFragments.map(async (attendance) => {
|
|
28
|
+
const filterKeyValues = new Map([
|
|
29
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
30
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
31
|
+
]);
|
|
32
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
33
|
+
if (result) {
|
|
34
|
+
return this.getPathWithSortingOption(`${attendance.path}/${continent.path}`);
|
|
37
35
|
}
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
return null;
|
|
37
|
+
}));
|
|
38
|
+
// Wait for all promises to resolve in parallel
|
|
39
|
+
const results = await Promise.all(promises);
|
|
40
|
+
// Filter out null values and return paths
|
|
41
|
+
return results.filter((path) => path !== null);
|
|
40
42
|
}
|
|
41
43
|
get filterCombination() {
|
|
42
44
|
return FilterCombinations.RANKED_CONTINENT_ATTENDANCE;
|
|
@@ -21,20 +21,22 @@ export class RankedCountryAttendance extends RankedOrganisationsSeoIndexabilityP
|
|
|
21
21
|
async generateUrls() {
|
|
22
22
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
23
23
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
paths.push(this.getPathWithSortingOption(`${attendance.path}/${country.path}`));
|
|
34
|
-
}
|
|
24
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
25
|
+
const promises = countryFragments.flatMap(country => attendanceFragments.map(async (attendance) => {
|
|
26
|
+
const filterKeyValues = new Map([
|
|
27
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
28
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
29
|
+
]);
|
|
30
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
31
|
+
if (result) {
|
|
32
|
+
return this.getPathWithSortingOption(`${attendance.path}/${country.path}`);
|
|
35
33
|
}
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
return null;
|
|
35
|
+
}));
|
|
36
|
+
// Wait for all promises to resolve in parallel
|
|
37
|
+
const results = await Promise.all(promises);
|
|
38
|
+
// Filter out null values and return paths
|
|
39
|
+
return results.filter((path) => path !== null);
|
|
38
40
|
}
|
|
39
41
|
get filterCombination() {
|
|
40
42
|
return FilterCombinations.RANKED_COUNTRY_ATTENDANCE;
|
|
@@ -20,20 +20,22 @@ export class RankedCountryDiscipline extends RankedOrganisationsSeoIndexabilityP
|
|
|
20
20
|
try {
|
|
21
21
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
22
22
|
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
paths.push(this.getPathWithSortingOption(`${country.path}/${discipline.path}`));
|
|
33
|
-
}
|
|
23
|
+
// Create array of promises for all combinations to parallelize API calls
|
|
24
|
+
const promises = countryFragments.flatMap(country => disciplineFragments.map(async (discipline) => {
|
|
25
|
+
const filterKeyValues = new Map([
|
|
26
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
27
|
+
[FilterKey.DISCIPLINES, [discipline.id]]
|
|
28
|
+
]);
|
|
29
|
+
const result = await this.checkRulesForSitemap(filterKeyValues);
|
|
30
|
+
if (result) {
|
|
31
|
+
return this.getPathWithSortingOption(`${country.path}/${discipline.path}`);
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
return null;
|
|
34
|
+
}));
|
|
35
|
+
// Wait for all promises to resolve in parallel
|
|
36
|
+
const results = await Promise.all(promises);
|
|
37
|
+
// Filter out null values and return paths
|
|
38
|
+
return results.filter((path) => path !== null);
|
|
37
39
|
}
|
|
38
40
|
catch (error) {
|
|
39
41
|
console.error('Error generating URLs for RankedCountryDiscipline:', error);
|