@studyportals/fawkes 7.3.5 → 7.4.0-beta.0
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/README.md +176 -176
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +1 -1
- package/dist/src/programmes/policies/CountryDurationDegree.js +1 -1
- package/dist/src/programmes/policies/CountryEducationalForm.js +1 -1
- package/dist/src/programmes/policies/DisciplineCountryDegree.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryDegree.js +53 -0
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +1 -1
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +1 -1
- package/dist/src/structured-data/ProgrammeStructuredDataFactory.d.ts +1 -1
- package/dist/src/structured-data/ProgrammeStructuredDataFactory.js +5 -2
- package/dist/src/structured-data/SearchStructuredDataFactory.d.ts +7 -8
- package/dist/src/structured-data/SearchStructuredDataFactory.js +41 -51
- package/package.json +105 -105
- package/dist/structured-data/index.d.ts +0 -1
- package/dist/structured-data/index.js +0 -1
- package/dist/structured-markup-seo/index.d.ts +0 -1
- package/dist/structured-markup-seo/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
# fawkes
|
|
2
|
-
|
|
3
|
-
This project is used to centralize indexability logic for our Search
|
|
4
|
-
microservices and Sitemap Generator. The main purpose is to completely remove
|
|
5
|
-
discrepancies between pages indexed by Search and page URLs stored in Sitemap.
|
|
6
|
-
|
|
7
|
-
Link to documentation: https://studyportals.atlassian.net/wiki/x/BwAdvw
|
|
8
|
-
|
|
9
|
-
## Base structure
|
|
10
|
-
|
|
11
|
-
- organisations-seo (used by Organisation Search)
|
|
12
|
-
- scholarships-seo (used by Scholarship Search)
|
|
13
|
-
- sitemap-generator-seo (used by Sitemap Generator)
|
|
14
|
-
- src
|
|
15
|
-
- common
|
|
16
|
-
- organisations
|
|
17
|
-
- scholarships
|
|
18
|
-
- sitemap-generator
|
|
19
|
-
|
|
20
|
-
# Automatic Documentation System
|
|
21
|
-
|
|
22
|
-
## Overview
|
|
23
|
-
|
|
24
|
-
This system automatically generates and maintains documentation for Fawkes
|
|
25
|
-
indexing rules across multiple projects. It creates a hierarchical structure of
|
|
26
|
-
Confluence pages that document all indexing policies and rules, ensuring that
|
|
27
|
-
the documentation is always up-to-date with the actual codebase.
|
|
28
|
-
|
|
29
|
-
Link to documentation:
|
|
30
|
-
[Fawkes Indexing Rules Documentation](https://studyportals.atlassian.net/wiki/spaces/T/pages/3494969354/Fawkes+Indexing+Rules+Documentation)
|
|
31
|
-
|
|
32
|
-
## Features
|
|
33
|
-
|
|
34
|
-
- **Dynamic Documentation**: Automatically extracts indexing rules and policies
|
|
35
|
-
directly from the codebase
|
|
36
|
-
- **Multi-Page Structure**: Creates a main index page with separate pages for
|
|
37
|
-
each project
|
|
38
|
-
- **Hierarchical Organization**: Structures content as Projects → Policies →
|
|
39
|
-
Rules
|
|
40
|
-
- **Automatic Page Creation**: Intelligently creates or updates pages as needed
|
|
41
|
-
- **Cross-Page Navigation**: Provides intuitive navigation between all pages
|
|
42
|
-
|
|
43
|
-
## Architecture
|
|
44
|
-
|
|
45
|
-
The system follows SOLID design principles to ensure maintainability and
|
|
46
|
-
extensibility:
|
|
47
|
-
|
|
48
|
-
- **Single Responsibility**: Each class has one specific responsibility
|
|
49
|
-
- **Open/Closed**: Easily extendable without modifying existing code
|
|
50
|
-
- **Liskov Substitution**: Interchangeable components through well-defined
|
|
51
|
-
interfaces
|
|
52
|
-
- **Interface Segregation**: Clean, focused interfaces
|
|
53
|
-
- **Dependency Inversion**: High-level modules depend on abstractions
|
|
54
|
-
|
|
55
|
-
### Key Components
|
|
56
|
-
|
|
57
|
-
1. **Content Builder**: Extracts project, policy, and rule data from the Fawkes
|
|
58
|
-
system
|
|
59
|
-
2. **Policy Fetchers**: Project-specific components that fetch and format policy
|
|
60
|
-
data
|
|
61
|
-
3. **Document Builder**: Generates structured HTML content for Confluence pages
|
|
62
|
-
4. **Confluence Updater**: Handles creation and updating of Confluence pages
|
|
63
|
-
5. **Token Retriever**: Securely retrieves API token for Confluence access
|
|
64
|
-
|
|
65
|
-
## How It Works
|
|
66
|
-
|
|
67
|
-
1. The system starts by collecting all project data using the `ContentBuilder`
|
|
68
|
-
2. For each project, it extracts policies and rules using project-specific
|
|
69
|
-
fetchers
|
|
70
|
-
3. The `DocumentBuilder` generates the content for the main index page and each
|
|
71
|
-
project page
|
|
72
|
-
4. The `ConfluenceUpdater` creates or updates pages in Confluence as needed
|
|
73
|
-
5. Each project page links back to the main index, and the main index links to
|
|
74
|
-
all project pages
|
|
75
|
-
|
|
76
|
-
## Setup and Configuration
|
|
77
|
-
|
|
78
|
-
### Environment Variables
|
|
79
|
-
|
|
80
|
-
The system requires the following environment variables:
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
CONFLUENCE_EMAIL=your-email@example.com
|
|
84
|
-
CONFLUENCE_API_TOKEN=your-api-token
|
|
85
|
-
CONFLUENCE_BASE_URL=https://your-instance.atlassian.net
|
|
86
|
-
CONFLUENCE_SPACE_KEY=YOUR_SPACE_KEY
|
|
87
|
-
CONFLUENCE_MAIN_PAGE_TITLE=Fawkes Indexing Rules Documentation
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
> **Important Note on Credentials**: Currently, the system uses personal
|
|
91
|
-
> credentials (email and API token) for Confluence access. This is a temporary
|
|
92
|
-
> solution and should be replaced with a team or service account in the future
|
|
93
|
-
> to avoid dependency on a specific individual's account.
|
|
94
|
-
|
|
95
|
-
### Deployment and Triggering
|
|
96
|
-
|
|
97
|
-
The system runs as an AWS Lambda function and is automatically triggered as part
|
|
98
|
-
of the CI/CD pipeline. This ensures documentation is always updated whenever new
|
|
99
|
-
code is deployed:
|
|
100
|
-
|
|
101
|
-
```yaml
|
|
102
|
-
# buildspec.yml (excerpt)
|
|
103
|
-
post_build:
|
|
104
|
-
commands:
|
|
105
|
-
- |
|
|
106
|
-
if [ -z "$PR_ID" ]; then
|
|
107
|
-
LAMBDA_NAME="FawkesConfluenceUpdater-$STAGE"
|
|
108
|
-
echo "Invoking Lambda function $LAMBDA_NAME"
|
|
109
|
-
echo '{"source":"cicd-pipeline","timestamp":"'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'"}' > payload.json
|
|
110
|
-
aws lambda invoke --function-name $LAMBDA_NAME --invocation-type Event --payload fileb://payload.json response.json || echo "Lambda invocation failed, but continuing"
|
|
111
|
-
fi
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Trigger Flow:**
|
|
115
|
-
|
|
116
|
-
1. When code is pushed to the `main` branch, the CI/CD pipeline is triggered
|
|
117
|
-
2. After successful deployment of a new Fawkes version, the post-build phase
|
|
118
|
-
executes
|
|
119
|
-
3. The Lambda function is invoked with a simple payload containing the source
|
|
120
|
-
and timestamp
|
|
121
|
-
4. The Lambda function authenticates with Confluence and executes the
|
|
122
|
-
documentation generation process
|
|
123
|
-
5. This only happens for production deployments (not PR builds)
|
|
124
|
-
|
|
125
|
-
This automated approach ensures documentation stays in sync with the actual
|
|
126
|
-
codebase without manual intervention.
|
|
127
|
-
|
|
128
|
-
## Scalability and Extension
|
|
129
|
-
|
|
130
|
-
### Adding New Projects
|
|
131
|
-
|
|
132
|
-
To add documentation for a new project:
|
|
133
|
-
|
|
134
|
-
1. Create a new class that implements the `IPolicyFetcher` interface
|
|
135
|
-
2. Implement the `getProjectName()` and `fetchPolicies()` methods
|
|
136
|
-
3. Register the new fetcher in the `ContentBuilder` constructor
|
|
137
|
-
|
|
138
|
-
Example:
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
export class NewProjectPolicyFetcher implements IPolicyFetcher {
|
|
142
|
-
getProjectName(): string {
|
|
143
|
-
return 'New Project Name';
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
fetchPolicies(): IPolicy[] {
|
|
147
|
-
// Implement policy fetching logic
|
|
148
|
-
return [...policies];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Then update ContentBuilder:
|
|
153
|
-
constructor(fetchers?: IPolicyFetcher[]) {
|
|
154
|
-
this.policyFetchers = fetchers || [
|
|
155
|
-
// Existing fetchers
|
|
156
|
-
new NewProjectPolicyFetcher()
|
|
157
|
-
];
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Customizing Page Content
|
|
162
|
-
|
|
163
|
-
The `DocumentBuilder` class contains methods for generating page content. To
|
|
164
|
-
customize the format:
|
|
165
|
-
|
|
166
|
-
1. Modify the `buildMainDocument()` method for changes to the main index page
|
|
167
|
-
2. Modify the `buildProjectDocument()` method for changes to project pages
|
|
168
|
-
3. Modify the `buildPolicySection()` and `buildRulesTable()` methods for changes
|
|
169
|
-
to policy and rule sections
|
|
170
|
-
|
|
171
|
-
## Conclusion
|
|
172
|
-
|
|
173
|
-
This documentation system ensures that Fawkes indexing rules are always
|
|
174
|
-
well-documented and accessible to the team. By automatically generating
|
|
175
|
-
documentation directly from the codebase, it eliminates the risk of
|
|
176
|
-
documentation becoming outdated or inconsistent with the actual implementation.
|
|
1
|
+
# fawkes
|
|
2
|
+
|
|
3
|
+
This project is used to centralize indexability logic for our Search
|
|
4
|
+
microservices and Sitemap Generator. The main purpose is to completely remove
|
|
5
|
+
discrepancies between pages indexed by Search and page URLs stored in Sitemap.
|
|
6
|
+
|
|
7
|
+
Link to documentation: https://studyportals.atlassian.net/wiki/x/BwAdvw
|
|
8
|
+
|
|
9
|
+
## Base structure
|
|
10
|
+
|
|
11
|
+
- organisations-seo (used by Organisation Search)
|
|
12
|
+
- scholarships-seo (used by Scholarship Search)
|
|
13
|
+
- sitemap-generator-seo (used by Sitemap Generator)
|
|
14
|
+
- src
|
|
15
|
+
- common
|
|
16
|
+
- organisations
|
|
17
|
+
- scholarships
|
|
18
|
+
- sitemap-generator
|
|
19
|
+
|
|
20
|
+
# Automatic Documentation System
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
This system automatically generates and maintains documentation for Fawkes
|
|
25
|
+
indexing rules across multiple projects. It creates a hierarchical structure of
|
|
26
|
+
Confluence pages that document all indexing policies and rules, ensuring that
|
|
27
|
+
the documentation is always up-to-date with the actual codebase.
|
|
28
|
+
|
|
29
|
+
Link to documentation:
|
|
30
|
+
[Fawkes Indexing Rules Documentation](https://studyportals.atlassian.net/wiki/spaces/T/pages/3494969354/Fawkes+Indexing+Rules+Documentation)
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- **Dynamic Documentation**: Automatically extracts indexing rules and policies
|
|
35
|
+
directly from the codebase
|
|
36
|
+
- **Multi-Page Structure**: Creates a main index page with separate pages for
|
|
37
|
+
each project
|
|
38
|
+
- **Hierarchical Organization**: Structures content as Projects → Policies →
|
|
39
|
+
Rules
|
|
40
|
+
- **Automatic Page Creation**: Intelligently creates or updates pages as needed
|
|
41
|
+
- **Cross-Page Navigation**: Provides intuitive navigation between all pages
|
|
42
|
+
|
|
43
|
+
## Architecture
|
|
44
|
+
|
|
45
|
+
The system follows SOLID design principles to ensure maintainability and
|
|
46
|
+
extensibility:
|
|
47
|
+
|
|
48
|
+
- **Single Responsibility**: Each class has one specific responsibility
|
|
49
|
+
- **Open/Closed**: Easily extendable without modifying existing code
|
|
50
|
+
- **Liskov Substitution**: Interchangeable components through well-defined
|
|
51
|
+
interfaces
|
|
52
|
+
- **Interface Segregation**: Clean, focused interfaces
|
|
53
|
+
- **Dependency Inversion**: High-level modules depend on abstractions
|
|
54
|
+
|
|
55
|
+
### Key Components
|
|
56
|
+
|
|
57
|
+
1. **Content Builder**: Extracts project, policy, and rule data from the Fawkes
|
|
58
|
+
system
|
|
59
|
+
2. **Policy Fetchers**: Project-specific components that fetch and format policy
|
|
60
|
+
data
|
|
61
|
+
3. **Document Builder**: Generates structured HTML content for Confluence pages
|
|
62
|
+
4. **Confluence Updater**: Handles creation and updating of Confluence pages
|
|
63
|
+
5. **Token Retriever**: Securely retrieves API token for Confluence access
|
|
64
|
+
|
|
65
|
+
## How It Works
|
|
66
|
+
|
|
67
|
+
1. The system starts by collecting all project data using the `ContentBuilder`
|
|
68
|
+
2. For each project, it extracts policies and rules using project-specific
|
|
69
|
+
fetchers
|
|
70
|
+
3. The `DocumentBuilder` generates the content for the main index page and each
|
|
71
|
+
project page
|
|
72
|
+
4. The `ConfluenceUpdater` creates or updates pages in Confluence as needed
|
|
73
|
+
5. Each project page links back to the main index, and the main index links to
|
|
74
|
+
all project pages
|
|
75
|
+
|
|
76
|
+
## Setup and Configuration
|
|
77
|
+
|
|
78
|
+
### Environment Variables
|
|
79
|
+
|
|
80
|
+
The system requires the following environment variables:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
CONFLUENCE_EMAIL=your-email@example.com
|
|
84
|
+
CONFLUENCE_API_TOKEN=your-api-token
|
|
85
|
+
CONFLUENCE_BASE_URL=https://your-instance.atlassian.net
|
|
86
|
+
CONFLUENCE_SPACE_KEY=YOUR_SPACE_KEY
|
|
87
|
+
CONFLUENCE_MAIN_PAGE_TITLE=Fawkes Indexing Rules Documentation
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **Important Note on Credentials**: Currently, the system uses personal
|
|
91
|
+
> credentials (email and API token) for Confluence access. This is a temporary
|
|
92
|
+
> solution and should be replaced with a team or service account in the future
|
|
93
|
+
> to avoid dependency on a specific individual's account.
|
|
94
|
+
|
|
95
|
+
### Deployment and Triggering
|
|
96
|
+
|
|
97
|
+
The system runs as an AWS Lambda function and is automatically triggered as part
|
|
98
|
+
of the CI/CD pipeline. This ensures documentation is always updated whenever new
|
|
99
|
+
code is deployed:
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
# buildspec.yml (excerpt)
|
|
103
|
+
post_build:
|
|
104
|
+
commands:
|
|
105
|
+
- |
|
|
106
|
+
if [ -z "$PR_ID" ]; then
|
|
107
|
+
LAMBDA_NAME="FawkesConfluenceUpdater-$STAGE"
|
|
108
|
+
echo "Invoking Lambda function $LAMBDA_NAME"
|
|
109
|
+
echo '{"source":"cicd-pipeline","timestamp":"'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'"}' > payload.json
|
|
110
|
+
aws lambda invoke --function-name $LAMBDA_NAME --invocation-type Event --payload fileb://payload.json response.json || echo "Lambda invocation failed, but continuing"
|
|
111
|
+
fi
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Trigger Flow:**
|
|
115
|
+
|
|
116
|
+
1. When code is pushed to the `main` branch, the CI/CD pipeline is triggered
|
|
117
|
+
2. After successful deployment of a new Fawkes version, the post-build phase
|
|
118
|
+
executes
|
|
119
|
+
3. The Lambda function is invoked with a simple payload containing the source
|
|
120
|
+
and timestamp
|
|
121
|
+
4. The Lambda function authenticates with Confluence and executes the
|
|
122
|
+
documentation generation process
|
|
123
|
+
5. This only happens for production deployments (not PR builds)
|
|
124
|
+
|
|
125
|
+
This automated approach ensures documentation stays in sync with the actual
|
|
126
|
+
codebase without manual intervention.
|
|
127
|
+
|
|
128
|
+
## Scalability and Extension
|
|
129
|
+
|
|
130
|
+
### Adding New Projects
|
|
131
|
+
|
|
132
|
+
To add documentation for a new project:
|
|
133
|
+
|
|
134
|
+
1. Create a new class that implements the `IPolicyFetcher` interface
|
|
135
|
+
2. Implement the `getProjectName()` and `fetchPolicies()` methods
|
|
136
|
+
3. Register the new fetcher in the `ContentBuilder` constructor
|
|
137
|
+
|
|
138
|
+
Example:
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
export class NewProjectPolicyFetcher implements IPolicyFetcher {
|
|
142
|
+
getProjectName(): string {
|
|
143
|
+
return 'New Project Name';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
fetchPolicies(): IPolicy[] {
|
|
147
|
+
// Implement policy fetching logic
|
|
148
|
+
return [...policies];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Then update ContentBuilder:
|
|
153
|
+
constructor(fetchers?: IPolicyFetcher[]) {
|
|
154
|
+
this.policyFetchers = fetchers || [
|
|
155
|
+
// Existing fetchers
|
|
156
|
+
new NewProjectPolicyFetcher()
|
|
157
|
+
];
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Customizing Page Content
|
|
162
|
+
|
|
163
|
+
The `DocumentBuilder` class contains methods for generating page content. To
|
|
164
|
+
customize the format:
|
|
165
|
+
|
|
166
|
+
1. Modify the `buildMainDocument()` method for changes to the main index page
|
|
167
|
+
2. Modify the `buildProjectDocument()` method for changes to project pages
|
|
168
|
+
3. Modify the `buildPolicySection()` and `buildRulesTable()` methods for changes
|
|
169
|
+
to policy and rule sections
|
|
170
|
+
|
|
171
|
+
## Conclusion
|
|
172
|
+
|
|
173
|
+
This documentation system ensures that Fawkes indexing rules are always
|
|
174
|
+
well-documented and accessible to the team. By automatically generating
|
|
175
|
+
documentation directly from the codebase, it eliminates the risk of
|
|
176
|
+
documentation becoming outdated or inconsistent with the actual implementation.
|
|
@@ -10,7 +10,7 @@ import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
|
10
10
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
11
11
|
export class CountryAttendanceDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
12
12
|
name = 'Country Attendance Degree Policy';
|
|
13
|
-
description = `Determines indexing rules for pages filtered by country,
|
|
13
|
+
description = `Determines indexing rules for pages filtered by country,
|
|
14
14
|
study format (online, on-campus, etc.), and degree type.`;
|
|
15
15
|
filterKeys = [FilterKey.COUNTRY, FilterKey.DELIVERY_METHOD, FilterKey.DEGREE_TYPE];
|
|
16
16
|
rules = [
|
|
@@ -10,7 +10,7 @@ import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
|
10
10
|
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
11
11
|
export class CountryDurationDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
12
12
|
name = 'Country Duration Degree Policy';
|
|
13
|
-
description = `Determines indexing rules for pages filtered by country,
|
|
13
|
+
description = `Determines indexing rules for pages filtered by country,
|
|
14
14
|
duration (1 year, 2 years, etc.), and degree type.`;
|
|
15
15
|
filterKeys = [FilterKey.COUNTRY, FilterKey.DURATION, FilterKey.DEGREE_TYPE];
|
|
16
16
|
rules = [
|
|
@@ -8,7 +8,7 @@ import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
|
8
8
|
import { EducationalFormPresenter } from '../../presenters/EducationalFormPresenter';
|
|
9
9
|
export class CountryEducationalForm extends ProgrammesBaseIndexabilityPolicy {
|
|
10
10
|
name = 'Country Educational Form Policy';
|
|
11
|
-
description = `Determines indexing rules for pages filtered by both country,
|
|
11
|
+
description = `Determines indexing rules for pages filtered by both country,
|
|
12
12
|
and educational form (academic, semester, summer school, etc.).`;
|
|
13
13
|
filterKeys = [FilterKey.COUNTRY, FilterKey.EDUCATIONAL_FORM];
|
|
14
14
|
rules = [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class DisciplineCountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | IndexableDegreeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
9
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
10
|
+
export class DisciplineCountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Discipline Country Degree Policy';
|
|
12
|
+
description = `Determines indexing rules for pages filtered by discipline,
|
|
13
|
+
country, and degree type.`;
|
|
14
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
19
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE]),
|
|
20
|
+
new IndexableDegreeRule()
|
|
21
|
+
];
|
|
22
|
+
constructor(dependencies) {
|
|
23
|
+
super(dependencies);
|
|
24
|
+
this.initateBaseRules();
|
|
25
|
+
}
|
|
26
|
+
async generateUrls() {
|
|
27
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
28
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
29
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
30
|
+
const paths = [];
|
|
31
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
32
|
+
for (const discipline of disciplineFragments) {
|
|
33
|
+
for (const country of countryFragments) {
|
|
34
|
+
for (const degree of degreeFragments) {
|
|
35
|
+
const filterKeyValues = new Map([
|
|
36
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
37
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
38
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
39
|
+
]);
|
|
40
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
+
if (result) {
|
|
42
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return paths;
|
|
49
|
+
}
|
|
50
|
+
get filterCombination() {
|
|
51
|
+
return FilterCombinations.DISCIPLINE_COUNTRY_DEGREE;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -9,7 +9,7 @@ import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
|
9
9
|
import { EducationalFormPresenter } from '../../presenters/EducationalFormPresenter';
|
|
10
10
|
export class DisciplineCountryEducationalForm extends ProgrammesBaseIndexabilityPolicy {
|
|
11
11
|
name = 'Discipline Country Educational Form Policy';
|
|
12
|
-
description = `Determines indexing rules for pages filtered by discipline,
|
|
12
|
+
description = `Determines indexing rules for pages filtered by discipline,
|
|
13
13
|
country, and educational form (academic, semester, summer school, etc.).`;
|
|
14
14
|
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.EDUCATIONAL_FORM];
|
|
15
15
|
rules = [
|
|
@@ -8,7 +8,7 @@ import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
|
8
8
|
import { EducationalFormPresenter } from '../../presenters/EducationalFormPresenter';
|
|
9
9
|
export class DisciplineEducationalForm extends ProgrammesBaseIndexabilityPolicy {
|
|
10
10
|
name = 'Discipline Educational Form Policy';
|
|
11
|
-
description = `Determines indexing rules for pages filtered by both discipline,
|
|
11
|
+
description = `Determines indexing rules for pages filtered by both discipline,
|
|
12
12
|
and educational form (academic, semester, summer school, etc.).`;
|
|
13
13
|
filterKeys = [FilterKey.DISCIPLINES, FilterKey.EDUCATIONAL_FORM];
|
|
14
14
|
rules = [
|
|
@@ -11,7 +11,7 @@ export declare class ProgrammeStructuredDataFactory extends SearchStructuredData
|
|
|
11
11
|
private regionalDataPriority;
|
|
12
12
|
protected getRating(card: IProgrammeCard): ReviewRatingDTO | undefined;
|
|
13
13
|
protected getOfferData(card: IProgrammeCard): Promise<OfferDTO | undefined>;
|
|
14
|
-
protected buildStructuredDataForCard(entity: EntityDTO<IProgrammeCard>): Course;
|
|
14
|
+
protected buildStructuredDataForCard(entity: EntityDTO<IProgrammeCard>): Course | undefined;
|
|
15
15
|
private getCourseMode;
|
|
16
16
|
private getCourseWorkload;
|
|
17
17
|
private getCourseStartDate;
|
|
@@ -35,12 +35,15 @@ export class ProgrammeStructuredDataFactory extends SearchStructuredDataFactory
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
|
-
price: await this.currencyConversionService.convert(tuition.getAmount(), tuition.getCurrency(), 'USD'),
|
|
38
|
+
price: Math.round(await this.currencyConversionService.convert(tuition.getAmount(), tuition.getCurrency(), 'USD')),
|
|
39
39
|
category: 'tuition',
|
|
40
40
|
validFrom: timing ? timing.getStartDate().getDate() : undefined
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
buildStructuredDataForCard(entity) {
|
|
44
|
+
const offer = this.constructOffer(entity.offer);
|
|
45
|
+
if (!offer)
|
|
46
|
+
return undefined;
|
|
44
47
|
const card = entity.card;
|
|
45
48
|
return {
|
|
46
49
|
"@type": "Course",
|
|
@@ -52,7 +55,7 @@ export class ProgrammeStructuredDataFactory extends SearchStructuredDataFactory
|
|
|
52
55
|
"name": card.getUniversityLink().getDescription(),
|
|
53
56
|
"url": `https://${window.location.host}${card.getUniversityLink().getUrl()}`
|
|
54
57
|
},
|
|
55
|
-
"offers":
|
|
58
|
+
"offers": offer,
|
|
56
59
|
"aggregateRating": this.constructAggregateRating(entity.reviewRating),
|
|
57
60
|
"hasCourseInstance": {
|
|
58
61
|
"@type": "CourseInstance",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SearchResultsPage, WithContext, Offer, AggregateRating, Thing, FAQPage } from
|
|
2
|
-
import { ReviewRatingDTO } from
|
|
3
|
-
import { OfferDTO } from
|
|
4
|
-
import { EntityDTO } from
|
|
5
|
-
import { FAQItemDto } from
|
|
6
|
-
import { BreadcrumbDTO } from
|
|
1
|
+
import { SearchResultsPage, WithContext, Offer, AggregateRating, Thing, FAQPage } from 'schema-dts';
|
|
2
|
+
import { ReviewRatingDTO } from './dto/ReviewRatingDTO';
|
|
3
|
+
import { OfferDTO } from './dto/OfferDTO';
|
|
4
|
+
import { EntityDTO } from './dto/EntityDTO';
|
|
5
|
+
import { FAQItemDto } from './dto/FAQItemDto';
|
|
6
|
+
import { BreadcrumbDTO } from './dto/BreadcrumbDTO';
|
|
7
7
|
export declare abstract class SearchStructuredDataFactory<TCard> {
|
|
8
8
|
buildStructuredData(title: string, description: string, cards: TCard[], faqItems?: FAQItemDto[], breadcrumbs?: BreadcrumbDTO[]): Promise<WithContext<SearchResultsPage>>;
|
|
9
|
-
protected abstract buildStructuredDataForCard(entity: EntityDTO<TCard>): Thing;
|
|
9
|
+
protected abstract buildStructuredDataForCard(entity: EntityDTO<TCard>): Thing | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Get the rating for a card.
|
|
12
12
|
* This method should be overridden by subclasses to provide the specific rating logic.
|
|
@@ -25,7 +25,6 @@ export declare abstract class SearchStructuredDataFactory<TCard> {
|
|
|
25
25
|
* @protected
|
|
26
26
|
*/
|
|
27
27
|
protected getOfferData(card: TCard): Promise<OfferDTO | undefined>;
|
|
28
|
-
private constructOptionalPageAggregateRating;
|
|
29
28
|
private constructOptionalPageOffers;
|
|
30
29
|
protected constructOptionalFaqPage(faqItems: FAQItemDto[]): FAQPage | undefined;
|
|
31
30
|
private constructOptionalBreadcrumbs;
|
|
@@ -12,14 +12,16 @@ export class SearchStructuredDataFactory {
|
|
|
12
12
|
offersData.push(offer);
|
|
13
13
|
entities.push({ card, offer, reviewRating });
|
|
14
14
|
}
|
|
15
|
+
const mainEntities = entities
|
|
16
|
+
.map(entity => this.buildStructuredDataForCard(entity))
|
|
17
|
+
.filter(entity => entity !== undefined);
|
|
15
18
|
const data = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
'@context': 'https://schema.org',
|
|
20
|
+
'@type': 'SearchResultsPage',
|
|
21
|
+
'name': title,
|
|
19
22
|
description,
|
|
20
|
-
|
|
23
|
+
'mainEntity': mainEntities
|
|
21
24
|
};
|
|
22
|
-
data.aggregateRating = this.constructOptionalPageAggregateRating(ratings);
|
|
23
25
|
data.offers = this.constructOptionalPageOffers(offersData);
|
|
24
26
|
data.hasPart = this.constructOptionalFaqPage(faqItems);
|
|
25
27
|
data.breadcrumb = this.constructOptionalBreadcrumbs(breadcrumbs);
|
|
@@ -49,18 +51,6 @@ export class SearchStructuredDataFactory {
|
|
|
49
51
|
async getOfferData(card) {
|
|
50
52
|
return undefined;
|
|
51
53
|
}
|
|
52
|
-
constructOptionalPageAggregateRating(ratings) {
|
|
53
|
-
if (ratings.length <= 0)
|
|
54
|
-
return;
|
|
55
|
-
let totalQuantity = 0;
|
|
56
|
-
let totalRatingValue = 0;
|
|
57
|
-
for (const rating of ratings) {
|
|
58
|
-
totalQuantity += rating.quantity;
|
|
59
|
-
totalRatingValue += rating.rating;
|
|
60
|
-
}
|
|
61
|
-
const totalAverageRating = Math.round((totalRatingValue / ratings.length) * 10) / 10;
|
|
62
|
-
return this.constructAggregateRating({ rating: totalAverageRating, quantity: totalQuantity });
|
|
63
|
-
}
|
|
64
54
|
constructOptionalPageOffers(offersData) {
|
|
65
55
|
if (offersData.length <= 0)
|
|
66
56
|
return;
|
|
@@ -77,15 +67,15 @@ export class SearchStructuredDataFactory {
|
|
|
77
67
|
totalPrice += offer.price;
|
|
78
68
|
}
|
|
79
69
|
return {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
'@type': 'AggregateOffer',
|
|
71
|
+
'lowPrice': Math.max(minPrice, 0),
|
|
72
|
+
'highPrice': maxPrice,
|
|
73
|
+
'priceCurrency': 'USD',
|
|
74
|
+
'offerCount': offersData.length,
|
|
75
|
+
'priceSpecification': {
|
|
76
|
+
'@type': 'PriceSpecification',
|
|
77
|
+
'price': Math.round(totalPrice / offersData.length),
|
|
78
|
+
'priceCurrency': 'USD'
|
|
89
79
|
}
|
|
90
80
|
};
|
|
91
81
|
}
|
|
@@ -93,13 +83,13 @@ export class SearchStructuredDataFactory {
|
|
|
93
83
|
if (faqItems.length <= 0)
|
|
94
84
|
return;
|
|
95
85
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
'@type': 'FAQPage',
|
|
87
|
+
'mainEntity': faqItems.map(item => ({
|
|
88
|
+
'@type': 'Question',
|
|
89
|
+
'name': item.question,
|
|
90
|
+
'acceptedAnswer': {
|
|
91
|
+
'@type': 'Answer',
|
|
92
|
+
'text': this.stripHtmlWithListRetain(item.answer)
|
|
103
93
|
}
|
|
104
94
|
}))
|
|
105
95
|
};
|
|
@@ -108,13 +98,13 @@ export class SearchStructuredDataFactory {
|
|
|
108
98
|
if (breadcrumbs.length <= 0)
|
|
109
99
|
return;
|
|
110
100
|
return {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
101
|
+
'@type': 'BreadcrumbList',
|
|
102
|
+
'itemListElement': breadcrumbs.map((breadcrumb) => ({
|
|
103
|
+
'@type': 'ListItem',
|
|
104
|
+
'@id': `${breadcrumb.url}#listitem#thing`,
|
|
105
|
+
'name': breadcrumb.name,
|
|
106
|
+
'position': breadcrumb.position,
|
|
107
|
+
'item': breadcrumb.url
|
|
118
108
|
}))
|
|
119
109
|
};
|
|
120
110
|
}
|
|
@@ -122,23 +112,23 @@ export class SearchStructuredDataFactory {
|
|
|
122
112
|
if (!reviewRating)
|
|
123
113
|
return;
|
|
124
114
|
return {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
'@type': 'AggregateRating',
|
|
116
|
+
'ratingValue': reviewRating.rating,
|
|
117
|
+
'reviewCount': reviewRating.quantity,
|
|
118
|
+
'bestRating': 5,
|
|
119
|
+
'worstRating': 1
|
|
130
120
|
};
|
|
131
121
|
}
|
|
132
122
|
constructOffer(offerData) {
|
|
133
123
|
if (!offerData)
|
|
134
124
|
return;
|
|
135
125
|
return {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
'@type': 'Offer',
|
|
127
|
+
'price': offerData.price,
|
|
128
|
+
'priceCurrency': 'USD',
|
|
129
|
+
'availability': 'https://schema.org/InStock',
|
|
130
|
+
'validFrom': offerData.validFrom ? offerData.validFrom.toISOString().split('T')[0] : undefined,
|
|
131
|
+
'category': 'tuition'
|
|
142
132
|
};
|
|
143
133
|
}
|
|
144
134
|
stripHtmlWithListRetain(html) {
|
package/package.json
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@studyportals/fawkes",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "A package to centralize SEO related logic for SBLP and Sitemap Generator.",
|
|
5
|
-
"files": [
|
|
6
|
-
"./dist"
|
|
7
|
-
],
|
|
8
|
-
"scripts": {
|
|
9
|
-
"prepush": "npm run test",
|
|
10
|
-
"precommit": "npm run lint",
|
|
11
|
-
"compile": "npx tsc && tsc-alias && rm -r ./dist/tests",
|
|
12
|
-
"build": "npm run clean && npm run compile",
|
|
13
|
-
"clean": "rimraf \"!(node_modules)/**/dist\"",
|
|
14
|
-
"prepare-deployment": "npm run test && npm run build",
|
|
15
|
-
"publish-major": "npm run prepare-deployment && npm version major && npm publish",
|
|
16
|
-
"publish-beta": "npm run prepare-deployment && npm
|
|
17
|
-
"publish-patch": "npm run prepare-deployment && npm version patch && npm publish",
|
|
18
|
-
"publish-minor": "npm run prepare-deployment && npm version minor && npm publish",
|
|
19
|
-
"prepare": "husky install",
|
|
20
|
-
"test": "vitest run --coverage",
|
|
21
|
-
"test:dev": "vitest --coverage tests/programmes",
|
|
22
|
-
"lint": "eslint . --ext .ts",
|
|
23
|
-
"lint:fix": "eslint . --ext .ts --fix",
|
|
24
|
-
"prettier:fix": "npx prettier --use-tabs --ignore-path .gitignore --write ."
|
|
25
|
-
},
|
|
26
|
-
"exports": {
|
|
27
|
-
"./organisations-search-seo": {
|
|
28
|
-
"import": "./dist/organisations-seo/index.js",
|
|
29
|
-
"require": "./dist/organisations-seo/index.js",
|
|
30
|
-
"types": "./dist/organisations-seo/index.d.ts"
|
|
31
|
-
},
|
|
32
|
-
"./programmes-search-seo": {
|
|
33
|
-
"import": "./dist/programmes-seo/index.js",
|
|
34
|
-
"require": "./dist/programmes-seo/index.js",
|
|
35
|
-
"types": "./dist/programmes-seo/index.d.ts"
|
|
36
|
-
},
|
|
37
|
-
"./scholarships-search-seo": {
|
|
38
|
-
"import": "./dist/scholarships-seo/index.js",
|
|
39
|
-
"require": "./dist/scholarships-seo/index.js",
|
|
40
|
-
"types": "./dist/scholarships-seo/index.d.ts"
|
|
41
|
-
},
|
|
42
|
-
"./sitemap-generator-seo": {
|
|
43
|
-
"import": "./dist/sitemap-generator-seo/index.js",
|
|
44
|
-
"require": "./dist/sitemap-generator-seo/index.js",
|
|
45
|
-
"types": "./dist/sitemap-generator-seo/index.d.ts"
|
|
46
|
-
},
|
|
47
|
-
"./structured-data-seo": {
|
|
48
|
-
"import": "./dist/structured-data-seo/index.js",
|
|
49
|
-
"require": "./dist/structured-data-seo/index.js",
|
|
50
|
-
"types": "./dist/structured-data-seo/index.d.ts"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"typesVersions": {
|
|
54
|
-
"*": {
|
|
55
|
-
"organisations-search-seo": [
|
|
56
|
-
"dist/organisations-seo/index.d.ts"
|
|
57
|
-
],
|
|
58
|
-
"programmes-search-seo": [
|
|
59
|
-
"dist/programmes-seo/index.d.ts"
|
|
60
|
-
],
|
|
61
|
-
"scholarships-search-seo": [
|
|
62
|
-
"dist/scholarships-seo/index.d.ts"
|
|
63
|
-
],
|
|
64
|
-
"sitemap-generator-seo": [
|
|
65
|
-
"dist/sitemap-generator-seo/index.d.ts"
|
|
66
|
-
],
|
|
67
|
-
"structured-data-seo": [
|
|
68
|
-
"dist/structured-data-seo/index.d.ts"
|
|
69
|
-
],
|
|
70
|
-
"*": [
|
|
71
|
-
"dist/index.d.ts"
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"author": "The Jedi Council",
|
|
76
|
-
"license": "ISC",
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@adobe/structured-data-validator": "^1.4.1",
|
|
79
|
-
"@studyportals/code-style": "^2.2.1",
|
|
80
|
-
"@studyportals/webpack-helper": "^6.0.6",
|
|
81
|
-
"@vitest/coverage-istanbul": "^2.1.8",
|
|
82
|
-
"husky": "^8.0.3",
|
|
83
|
-
"jsdom": "^26.0.0",
|
|
84
|
-
"prettier": "^3.5.3",
|
|
85
|
-
"tsc-alias": "^1.8.11",
|
|
86
|
-
"typemoq": "^2.1.0",
|
|
87
|
-
"typescript": "^5.7.3",
|
|
88
|
-
"vitest": "^2.1.8",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
"dependencies": {
|
|
93
|
-
"@studyportals/domain-client": "^6.2.0",
|
|
94
|
-
"@studyportals/ranking-api-interface": "^1.3.12",
|
|
95
|
-
"@studyportals/search-filters": "
|
|
96
|
-
"@studyportals/static-domain-data": "^6.1.0"
|
|
97
|
-
},
|
|
98
|
-
"optionalDependencies": {
|
|
99
|
-
"@rollup/rollup-linux-x64-gnu": "4.24.0"
|
|
100
|
-
},
|
|
101
|
-
"engines": {
|
|
102
|
-
"node": ">=18 <=22",
|
|
103
|
-
"npm": ">=8 <=10"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@studyportals/fawkes",
|
|
3
|
+
"version": "7.4.0-beta.0",
|
|
4
|
+
"description": "A package to centralize SEO related logic for SBLP and Sitemap Generator.",
|
|
5
|
+
"files": [
|
|
6
|
+
"./dist"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepush": "npm run test",
|
|
10
|
+
"precommit": "npm run lint",
|
|
11
|
+
"compile": "npx tsc && tsc-alias && rm -r ./dist/tests",
|
|
12
|
+
"build": "npm run clean && npm run compile",
|
|
13
|
+
"clean": "rimraf \"!(node_modules)/**/dist\"",
|
|
14
|
+
"prepare-deployment": "npm run test && npm run build",
|
|
15
|
+
"publish-major": "npm run prepare-deployment && npm version major && npm publish",
|
|
16
|
+
"publish-beta": "npm run prepare-deployment && npm publish --tag beta --access=public",
|
|
17
|
+
"publish-patch": "npm run prepare-deployment && npm version patch && npm publish",
|
|
18
|
+
"publish-minor": "npm run prepare-deployment && npm version minor && npm publish",
|
|
19
|
+
"prepare": "husky install",
|
|
20
|
+
"test": "vitest run --coverage",
|
|
21
|
+
"test:dev": "vitest --coverage tests/programmes",
|
|
22
|
+
"lint": "eslint . --ext .ts",
|
|
23
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
24
|
+
"prettier:fix": "npx prettier --use-tabs --ignore-path .gitignore --write ."
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
"./organisations-search-seo": {
|
|
28
|
+
"import": "./dist/organisations-seo/index.js",
|
|
29
|
+
"require": "./dist/organisations-seo/index.js",
|
|
30
|
+
"types": "./dist/organisations-seo/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./programmes-search-seo": {
|
|
33
|
+
"import": "./dist/programmes-seo/index.js",
|
|
34
|
+
"require": "./dist/programmes-seo/index.js",
|
|
35
|
+
"types": "./dist/programmes-seo/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./scholarships-search-seo": {
|
|
38
|
+
"import": "./dist/scholarships-seo/index.js",
|
|
39
|
+
"require": "./dist/scholarships-seo/index.js",
|
|
40
|
+
"types": "./dist/scholarships-seo/index.d.ts"
|
|
41
|
+
},
|
|
42
|
+
"./sitemap-generator-seo": {
|
|
43
|
+
"import": "./dist/sitemap-generator-seo/index.js",
|
|
44
|
+
"require": "./dist/sitemap-generator-seo/index.js",
|
|
45
|
+
"types": "./dist/sitemap-generator-seo/index.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./structured-data-seo": {
|
|
48
|
+
"import": "./dist/structured-data-seo/index.js",
|
|
49
|
+
"require": "./dist/structured-data-seo/index.js",
|
|
50
|
+
"types": "./dist/structured-data-seo/index.d.ts"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"typesVersions": {
|
|
54
|
+
"*": {
|
|
55
|
+
"organisations-search-seo": [
|
|
56
|
+
"dist/organisations-seo/index.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"programmes-search-seo": [
|
|
59
|
+
"dist/programmes-seo/index.d.ts"
|
|
60
|
+
],
|
|
61
|
+
"scholarships-search-seo": [
|
|
62
|
+
"dist/scholarships-seo/index.d.ts"
|
|
63
|
+
],
|
|
64
|
+
"sitemap-generator-seo": [
|
|
65
|
+
"dist/sitemap-generator-seo/index.d.ts"
|
|
66
|
+
],
|
|
67
|
+
"structured-data-seo": [
|
|
68
|
+
"dist/structured-data-seo/index.d.ts"
|
|
69
|
+
],
|
|
70
|
+
"*": [
|
|
71
|
+
"dist/index.d.ts"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"author": "The Jedi Council",
|
|
76
|
+
"license": "ISC",
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@adobe/structured-data-validator": "^1.4.1",
|
|
79
|
+
"@studyportals/code-style": "^2.2.1",
|
|
80
|
+
"@studyportals/webpack-helper": "^6.0.6",
|
|
81
|
+
"@vitest/coverage-istanbul": "^2.1.8",
|
|
82
|
+
"husky": "^8.0.3",
|
|
83
|
+
"jsdom": "^26.0.0",
|
|
84
|
+
"prettier": "^3.5.3",
|
|
85
|
+
"tsc-alias": "^1.8.11",
|
|
86
|
+
"typemoq": "^2.1.0",
|
|
87
|
+
"typescript": "^5.7.3",
|
|
88
|
+
"vitest": "^2.1.8",
|
|
89
|
+
"schema-dts": "^1.1.5",
|
|
90
|
+
"ts-loader": "^9.5.2"
|
|
91
|
+
},
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"@studyportals/domain-client": "^6.2.0",
|
|
94
|
+
"@studyportals/ranking-api-interface": "^1.3.12",
|
|
95
|
+
"@studyportals/search-filters": "5.1.0-beta.0",
|
|
96
|
+
"@studyportals/static-domain-data": "^6.1.0"
|
|
97
|
+
},
|
|
98
|
+
"optionalDependencies": {
|
|
99
|
+
"@rollup/rollup-linux-x64-gnu": "4.24.0"
|
|
100
|
+
},
|
|
101
|
+
"engines": {
|
|
102
|
+
"node": ">=18 <=22",
|
|
103
|
+
"npm": ">=8 <=10"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/structured-data';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/structured-data';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/structured-data';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/structured-data';
|