@studyportals/fawkes 2.0.1-20 → 2.0.1-21
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.d.ts +1 -8
- package/dist/index.js +1 -3
- package/dist/scholarships-seo/index.d.ts +7 -7
- package/dist/scholarships-seo/index.js +2 -2
- package/dist/sitemap-generator-seo/index.d.ts +5 -0
- package/dist/sitemap-generator-seo/index.js +2 -1
- package/dist/src/common/BaseSeoIndexabilityPolicy.d.ts +13 -9
- package/dist/src/common/BaseSeoIndexabilityPolicy.js +18 -8
- package/dist/src/common/ICustomRule.d.ts +6 -0
- package/dist/src/common/IDependencies.d.ts +4 -0
- package/dist/src/common/IFilterKeyValues.d.ts +6 -0
- package/dist/src/common/IFilterKeyValues.js +1 -0
- package/dist/src/common/IIndexabilityPolicyDependencies.d.ts +8 -0
- package/dist/src/common/ISitemapUrlGenerator.d.ts +5 -0
- package/dist/src/common/ISitemapUrlGenerator.js +1 -0
- package/dist/src/common/RuleBasedIndexabilityPolicy.d.ts +10 -0
- package/dist/src/common/RuleBasedIndexabilityPolicy.js +12 -0
- package/dist/src/enums/DependencyTypes.d.ts +4 -0
- package/dist/src/enums/DependencyTypes.js +5 -0
- package/dist/src/enums/FilterCombinations.d.ts +9 -0
- package/dist/src/enums/FilterCombinations.js +10 -0
- package/dist/src/organisations/ISeoInfoBaseOrganisations.d.ts +1 -1
- package/dist/src/organisations/SearchIndexabilityManager.d.ts +2 -2
- package/dist/src/organisations/SeoIndexabilityPolicy.d.ts +3 -4
- package/dist/src/organisations/SeoIndexabilityPolicy.js +2 -2
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.d.ts +7 -8
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.js +4 -3
- package/dist/src/presenters/AreaPresenter.d.ts +9 -0
- package/dist/src/presenters/AreaPresenter.js +33 -0
- package/dist/src/presenters/CountryPresenter.d.ts +9 -0
- package/dist/src/presenters/CountryPresenter.js +36 -0
- package/dist/src/presenters/DisciplinePresenter.d.ts +9 -0
- package/dist/src/presenters/DisciplinePresenter.js +31 -0
- package/dist/src/presenters/fragments/IAreaFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IAreaFragment.js +1 -0
- package/dist/src/presenters/fragments/ICountryFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/ICountryFragment.js +1 -0
- package/dist/src/presenters/fragments/IFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IFragment.js +1 -0
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +6 -5
- package/dist/src/scholarships/SearchIndexabilityManager.js +14 -11
- package/dist/src/scholarships/index.d.ts +0 -1
- package/dist/src/scholarships/index.js +0 -1
- package/dist/src/scholarships/policies/AreaPolicy.d.ts +10 -9
- package/dist/src/scholarships/policies/AreaPolicy.js +36 -16
- package/dist/src/scholarships/policies/CountryPolicy.d.ts +10 -6
- package/dist/src/scholarships/policies/CountryPolicy.js +32 -10
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.d.ts +10 -9
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.js +43 -15
- package/dist/src/scholarships/policies/DisciplinePolicy.d.ts +10 -6
- package/dist/src/scholarships/policies/DisciplinePolicy.js +33 -10
- package/dist/src/scholarships/policies/UnfilteredPolicy.d.ts +6 -5
- package/dist/src/scholarships/policies/UnfilteredPolicy.js +11 -6
- package/dist/src/scholarships/policies/UniversityCountryPolicy.d.ts +6 -5
- package/dist/src/scholarships/policies/UniversityCountryPolicy.js +35 -9
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +14 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +45 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +34 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +34 -0
- package/dist/src/scholarships/rules/SearchVolumeCountryDisciplineRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeCountryDisciplineRule.js +37 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +38 -0
- package/dist/src/scholarships/rules/files/search-volume.json +39334 -0
- package/dist/src/sitemap-generator/IOrganisation.d.ts +6 -0
- package/dist/src/sitemap-generator/IOrganisation.js +1 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.d.ts +4 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.js +1 -0
- package/dist/src/sitemap-generator/ISearchApiClient.d.ts +3 -0
- package/dist/src/sitemap-generator/ISearchApiClient.js +1 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorDependencies.d.ts +9 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorDependencies.js +1 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +4 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.js +1 -0
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.d.ts +8 -0
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.js +20 -0
- package/dist/src/sitemap-generator/index.d.ts +0 -2
- package/dist/src/sitemap-generator/index.js +1 -2
- package/dist/src/types/SeoDependencies.d.ts +3 -0
- package/dist/src/types/SeoDependencies.js +1 -0
- package/package.json +16 -6
- package/dist/fawkes.js +0 -2
- package/dist/fawkes.js.map +0 -1
- package/dist/organisations-seo.js +0 -0
- package/dist/scholarships-seo.js +0 -2
- package/dist/scholarships-seo.js.map +0 -1
- package/dist/sitemap-generator-seo.js +0 -0
- package/dist/src/common/DisciplinePresenter.d.ts +0 -5
- package/dist/src/common/DisciplinePresenter.js +0 -48
- package/dist/src/common/IPrettyPathGenerator.d.ts +0 -3
- package/dist/src/common/fragments/Fragment.d.ts +0 -6
- package/dist/src/common/fragments/Fragment.js +0 -8
- package/dist/src/common/fragments/IFragment.d.ts +0 -4
- package/dist/src/scholarships/CustomRules.d.ts +0 -6
- package/dist/src/scholarships/CustomRules.js +0 -18
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.d.ts +0 -12
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.js +0 -34
- package/dist/src/sitemap-generator/CombinationType.d.ts +0 -2
- package/dist/src/sitemap-generator/CombinationType.js +0 -3
- package/dist/src/sitemap-generator/ISitemapPathGeneratorChain.d.ts +0 -4
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.d.ts +0 -7
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.js +0 -9
- /package/dist/src/common/{IPrettyPathGenerator.js → ICustomRule.js} +0 -0
- /package/dist/src/common/{fragments/IFragment.js → IDependencies.js} +0 -0
- /package/dist/src/{sitemap-generator/ISitemapPathGeneratorChain.js → common/IIndexabilityPolicyDependencies.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PortalType } from "@studyportals/domain-client";
|
|
2
|
+
import { IDependencies } from "../common/IDependencies";
|
|
3
|
+
import { ISearchApiClient } from "./ISearchApiClient";
|
|
4
|
+
import { IOrganisationsClient } from "./IOrganisationsClient";
|
|
5
|
+
export interface ISitemapUrlGeneratorDependencies extends IDependencies {
|
|
6
|
+
portalType: PortalType;
|
|
7
|
+
searchApiClient?: ISearchApiClient;
|
|
8
|
+
organisationsClient?: IOrganisationsClient;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PortalType } from "@studyportals/domain-client";
|
|
2
|
+
import { ISitemapUrlGeneratorManager } from "./ISitemapUrlGeneratorManager";
|
|
3
|
+
import { FilterCombinations } from "../enums/FilterCombinations";
|
|
4
|
+
export declare class SitemapUrlGeneratorManager implements ISitemapUrlGeneratorManager {
|
|
5
|
+
private policies;
|
|
6
|
+
constructor(portalType: PortalType);
|
|
7
|
+
generateUrls(): Promise<Map<FilterCombinations, string[]>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AreaPolicy } from "../scholarships/policies/AreaPolicy";
|
|
2
|
+
import { DependencyTypes } from "../enums/DependencyTypes";
|
|
3
|
+
export class SitemapUrlGeneratorManager {
|
|
4
|
+
policies;
|
|
5
|
+
constructor(portalType) {
|
|
6
|
+
const dependencyType = DependencyTypes.SITEMAP_GENERATOR;
|
|
7
|
+
this.policies = [
|
|
8
|
+
new AreaPolicy({ dependencyType, portalType }),
|
|
9
|
+
];
|
|
10
|
+
}
|
|
11
|
+
async generateUrls() {
|
|
12
|
+
const map = new Map();
|
|
13
|
+
await Promise.all(this.policies.map(async (policy) => {
|
|
14
|
+
const filterCombination = policy.filterCombination;
|
|
15
|
+
const urls = await policy.generateSitemapUrls();
|
|
16
|
+
map.set(filterCombination, urls);
|
|
17
|
+
}));
|
|
18
|
+
return map;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './ISitemapPathGeneratorChain';
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IIndexabilityPolicyDependencies } from "../common/IIndexabilityPolicyDependencies";
|
|
2
|
+
import { ISitemapUrlGeneratorDependencies } from "../sitemap-generator/ISitemapUrlGeneratorDependencies";
|
|
3
|
+
export type SeoDependencies = IIndexabilityPolicyDependencies | ISitemapUrlGeneratorDependencies;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/fawkes",
|
|
3
|
-
"version": "2.0.1-
|
|
3
|
+
"version": "2.0.1-21",
|
|
4
4
|
"description": "A package to centralize SEO related logic for SBLP and Sitemap Generator.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"prepush": "npm run test",
|
|
11
11
|
"precommit": "npm run lint",
|
|
12
|
-
"compile": "npx tsc && rm -r ./dist/tests",
|
|
13
|
-
"build": "npm run clean && npm run compile
|
|
12
|
+
"compile": "npx tsc && tsc-alias && rm -r ./dist/tests",
|
|
13
|
+
"build": "npm run clean && npm run compile",
|
|
14
14
|
"clean": "rimraf \"!(node_modules)/**/dist\"",
|
|
15
15
|
"prepare-deployment": "npm run test && npm run build",
|
|
16
16
|
"publish-major": "npm version major && npm publish",
|
|
@@ -23,8 +23,16 @@
|
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./organisations-search-seo": "./dist/organisations-seo.js",
|
|
26
|
-
"./scholarships-search-seo":
|
|
27
|
-
|
|
26
|
+
"./scholarships-search-seo": {
|
|
27
|
+
"import": "./dist/scholarships-seo/index.js",
|
|
28
|
+
"require": "./dist/scholarships-seo/index.js",
|
|
29
|
+
"types": "./dist/scholarships-seo/index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./sitemap-generator-seo": {
|
|
32
|
+
"import": "./dist/sitemap-generator-seo/index.js",
|
|
33
|
+
"require": "./dist/sitemap-generator-seo/index.js",
|
|
34
|
+
"types": "./dist/sitemap-generator-seo/index.d.ts"
|
|
35
|
+
}
|
|
28
36
|
},
|
|
29
37
|
"typesVersions": {
|
|
30
38
|
"*": {
|
|
@@ -45,13 +53,15 @@
|
|
|
45
53
|
"husky": "^8.0.3",
|
|
46
54
|
"jsdom": "^26.0.0",
|
|
47
55
|
"typemoq": "^2.1.0",
|
|
56
|
+
"tsc-alias": "^1.8.11",
|
|
48
57
|
"typescript": "^5.7.3",
|
|
49
58
|
"vitest": "^2.1.8"
|
|
50
59
|
},
|
|
51
60
|
"dependencies": {
|
|
61
|
+
"@studyportals/domain-client": "^4.17.0",
|
|
52
62
|
"@studyportals/ranking-api-interface": "^1.3.12",
|
|
53
63
|
"@studyportals/search-filters": "^4.9.1",
|
|
54
|
-
"@studyportals/static-domain-data": "^6.1.
|
|
64
|
+
"@studyportals/static-domain-data": "^6.1.0",
|
|
55
65
|
"ts-loader": "^9.5.2"
|
|
56
66
|
},
|
|
57
67
|
"engines": {
|