Skip to content

Commit aa9ed65

Browse files
Merge remote-tracking branch 'gitHub/main' into task/main/DURACOM-445
2 parents e7b81b2 + b1c4aa4 commit aa9ed65

File tree

201 files changed

+6126
-1403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+6126
-1403
lines changed

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ updates:
9696
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
9797
- dependency-name: "*"
9898
update-types: ["version-update:semver-major"]
99+
# Also automatically update all our GitHub actions on the main branch
100+
- package-ecosystem: "github-actions"
101+
directory: "/"
102+
# Monthly dependency updates
103+
schedule:
104+
interval: "monthly"
105+
time: "05:00"
106+
# Allow updates to be delayed for a configurable number of days to mitigate
107+
# some classes of supply chain attacks
108+
cooldown:
109+
default-days: 7
99110
#####################
100111
## dspace-9_x branch
101112
#####################
@@ -187,6 +198,18 @@ updates:
187198
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
188199
- dependency-name: "*"
189200
update-types: ["version-update:semver-major"]
201+
# Also automatically update all our GitHub actions on the dspace-9_x branch
202+
- package-ecosystem: "github-actions"
203+
directory: "/"
204+
target-branch: dspace-9_x
205+
# Monthly dependency updates
206+
schedule:
207+
interval: "monthly"
208+
time: "05:00"
209+
# Allow updates to be delayed for a configurable number of days to mitigate
210+
# some classes of supply chain attacks
211+
cooldown:
212+
default-days: 7
190213
#####################
191214
## dspace-8_x branch
192215
#####################
@@ -277,6 +300,18 @@ updates:
277300
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
278301
- dependency-name: "*"
279302
update-types: ["version-update:semver-major"]
303+
# Also automatically update all our GitHub actions on the dspace-8_x branch
304+
- package-ecosystem: "github-actions"
305+
directory: "/"
306+
target-branch: dspace-8_x
307+
# Monthly dependency updates
308+
schedule:
309+
interval: "monthly"
310+
time: "05:00"
311+
# Allow updates to be delayed for a configurable number of days to mitigate
312+
# some classes of supply chain attacks
313+
cooldown:
314+
default-days: 7
280315
#####################
281316
## dspace-7_x branch
282317
#####################
@@ -362,3 +397,15 @@ updates:
362397
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
363398
- dependency-name: "*"
364399
update-types: ["version-update:semver-major"]
400+
# Also automatically update all our GitHub actions on the dspace-7_x branch
401+
- package-ecosystem: "github-actions"
402+
directory: "/"
403+
target-branch: dspace-7_x
404+
# Monthly dependency updates
405+
schedule:
406+
interval: "monthly"
407+
time: "05:00"
408+
# Allow updates to be delayed for a configurable number of days to mitigate
409+
# some classes of supply chain attacks
410+
cooldown:
411+
default-days: 7

.github/workflows/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 20+
2525
DSPACE_UI_HOST: 127.0.0.1
2626
DSPACE_UI_PORT: 4000
27+
DSPACE_UI_BASEURL: http://127.0.0.1:4000
2728
# Ensure all SSR caching is disabled in test environment
2829
DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX: 0
2930
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0
@@ -51,11 +52,11 @@ jobs:
5152
steps:
5253
# https://github.com/actions/checkout
5354
- name: Checkout codebase
54-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5556

5657
# https://github.com/actions/setup-node
5758
- name: Install Node.js ${{ matrix.node-version }}
58-
uses: actions/setup-node@v4
59+
uses: actions/setup-node@v6
5960
with:
6061
node-version: ${{ matrix.node-version }}
6162

@@ -80,7 +81,7 @@ jobs:
8081
id: npm-cache-dir
8182
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
8283
- name: Cache NPM dependencies
83-
uses: actions/cache@v4
84+
uses: actions/cache@v5
8485
with:
8586
# Cache entire NPM cache directory (see previous step)
8687
path: ${{ steps.npm-cache-dir.outputs.dir }}
@@ -113,7 +114,7 @@ jobs:
113114
# so that it can be shared with the 'codecov' job (see below)
114115
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
115116
- name: Upload code coverage report to Artifact
116-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v7
117118
if: matrix.node-version == '20.x'
118119
with:
119120
name: coverage-report-${{ matrix.node-version }}
@@ -155,7 +156,7 @@ jobs:
155156
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
156157
# Save those in an Artifact
157158
- name: Upload e2e test videos to Artifacts
158-
uses: actions/upload-artifact@v4
159+
uses: actions/upload-artifact@v7
159160
if: always()
160161
with:
161162
name: e2e-test-videos-${{ matrix.node-version }}
@@ -164,7 +165,7 @@ jobs:
164165
# If e2e tests fail, Cypress creates a screenshot of what happened
165166
# Save those in an Artifact
166167
- name: Upload e2e test failure screenshots to Artifacts
167-
uses: actions/upload-artifact@v4
168+
uses: actions/upload-artifact@v7
168169
if: failure()
169170
with:
170171
name: e2e-test-screenshots-${{ matrix.node-version }}
@@ -316,19 +317,19 @@ jobs:
316317
runs-on: ubuntu-latest
317318
steps:
318319
- name: Checkout
319-
uses: actions/checkout@v4
320+
uses: actions/checkout@v6
320321

321322
# Download artifacts from previous 'tests' job
322323
- name: Download coverage artifacts
323-
uses: actions/download-artifact@v4
324+
uses: actions/download-artifact@v8
324325

325326
# Now attempt upload to Codecov using its action.
326327
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
327328
#
328329
# Retry action: https://github.com/marketplace/actions/retry-action
329330
# Codecov action: https://github.com/codecov/codecov-action
330331
- name: Upload coverage to Codecov.io
331-
uses: Wandalen/wretry.action@v1.3.0
332+
uses: Wandalen/wretry.action@v3.8.0
332333
with:
333334
action: codecov/codecov-action@v4
334335
# Ensure codecov-action throws an error when it fails to upload

.github/workflows/codescan.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ jobs:
3535
steps:
3636
# https://github.com/actions/checkout
3737
- name: Checkout repository
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939

4040
# Initializes the CodeQL tools for scanning.
4141
# https://github.com/github/codeql-action
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v3
43+
uses: github/codeql-action/init@v4
4444
with:
4545
languages: javascript
4646

4747
# Autobuild attempts to build any compiled languages
4848
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v3
49+
uses: github/codeql-action/autobuild@v4
5050

5151
# Perform GitHub Code Scanning.
5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@v3
53+
uses: github/codeql-action/analyze@v4

.github/workflows/docker.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,15 @@ jobs:
7474
DSPACE_REST_HOST: 127.0.0.1
7575
# Override default dspace.ui.url to also use 127.0.0.1.
7676
dspace__P__ui__P__url: http://127.0.0.1:4000
77+
# Override default ui.baseUrl to also use 127.0.0.1. This must match 'dspace.ui.url' for SSR to be enabled.
78+
DSPACE_UI_BASEURL: http://127.0.0.1:4000
7779
steps:
7880
# Checkout our codebase (to get access to Docker Compose scripts)
7981
- name: Checkout codebase
80-
uses: actions/checkout@v4
82+
uses: actions/checkout@v6
8183
# Download Docker image artifacts (which were just built by reusable-docker-build.yml)
8284
- name: Download Docker image artifacts
83-
uses: actions/download-artifact@v4
85+
uses: actions/download-artifact@v8
8486
with:
8587
# Download all amd64 Docker images (TAR files) into the /tmp/docker directory
8688
pattern: docker-image-*-linux-amd64

.github/workflows/issue_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Only add to project board if issue is flagged as "needs triage" or has no labels
1717
# NOTE: By default we flag new issues as "needs triage" in our issue template
1818
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
19-
uses: actions/add-to-project@v1.0.0
19+
uses: actions/add-to-project@v1.0.2
2020
# Note, the authentication token below is an ORG level Secret.
2121
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2222
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

.github/workflows/port_merged_pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: github.event.pull_request.merged
2424
steps:
2525
# Checkout code
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2727
# Port PR to other branch (ONLY if labeled with "port to")
2828
# See https://github.com/korthout/backport-action
2929
- name: Create backport pull requests

.github/workflows/pull_request_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
2222
# See https://github.com/toshimaru/auto-author-assign
2323
- name: Assign PR to creator
24-
uses: toshimaru/auto-author-assign@v2.1.0
24+
uses: toshimaru/auto-author-assign@v3.0.1

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ If you run into odd test errors, see the Angular guide to debugging tests: https
285285

286286
E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Configuration for cypress can be found in the `cypress.json` file in the root directory.
287287

288-
The test files can be found in the `./cypress/integration/` folder.
288+
The test files can be found in the `./cypress/e2e/` folder.
289289

290290
Before you can run e2e tests, two things are REQUIRED:
291291
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
@@ -313,7 +313,7 @@ The `ng e2e` command will start Cypress and allow you to select the browser you
313313
314314
#### Writing E2E Tests
315315
316-
All E2E tests must be created under the `./cypress/integration/` folder, and must end in `.spec.ts`. Subfolders are allowed.
316+
All E2E tests must be created under the `./cypress/e2e/` folder, and must end in `.spec.ts`. Subfolders are allowed.
317317
318318
* The easiest way to start creating new tests is by running `ng e2e`. This builds the app and brings up Cypress.
319319
* From here, if you are editing an existing test file, you can either open it in your IDE or run it first to see what it already does.
@@ -392,9 +392,9 @@ dspace-angular
392392
├── config *
393393
│ └── config.yml * Default app config
394394
├── cypress * Folder for Cypress (https://cypress.io/) / e2e tests
395-
│ ├── downloads *
396-
│ ├── fixtures * Folder for e2e/integration test files
397-
│ ├── integration * Folder for any fixtures needed by e2e tests
395+
│ ├── downloads * (Optional) Folder for files downloaded during e2e tests
396+
│ ├── e2e * Folder for e2e/integration test files
397+
│ ├── fixtures * Folder for reusable static test data (JSON, images, etc.)
398398
│ ├── plugins * Folder for Cypress plugins (if any)
399399
│ ├── support * Folder for global e2e test actions/commands (run for all tests)
400400
│ └── tsconfig.json * TypeScript configuration file for e2e tests

config/config.example.yml

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ ui:
88
ssl: false
99
host: localhost
1010
port: 4000
11+
# Specify the public URL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
12+
# SSR is only enabled when the client's "Host" HTTP header matches this baseUrl. The baseUrl is also used for redirects and SEO links (in robots.txt).
13+
baseUrl: http://localhost:4000
1114
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
1215
nameSpace: /
1316
# The rateLimiter settings limit each IP to a 'limit' of 500 requests per 'windowMs' (1 minute).
@@ -237,7 +240,12 @@ submission:
237240
- value: default
238241
style: text-muted
239242
icon: fa-circle-xmark
240-
243+
# Icons to be displayed next to an authority controlled value, to give indication of the source.
244+
sourceIcons:
245+
# Example of configuration for authority logo based on sources.
246+
# The configured icon will be displayed next to the authority value in submission and on item page or search results.
247+
- source: orcid
248+
- path: assets/images/orcid.logo.icon.svg
241249
# Fallback language in which the UI will be rendered if the user's browser language is not an active language
242250
fallbackLanguage: en
243251

@@ -397,6 +405,31 @@ item:
397405
pageSize: 5
398406
# Show the bitstream access status label on the item page
399407
showAccessStatuses: false
408+
# Configuration of metadata to be displayed in the item metadata link view popover
409+
metadataLinkViewPopoverData:
410+
# Metdadata list to be displayed for entities without a specific configuration
411+
fallbackMetdataList:
412+
- dc.description.abstract
413+
- dc.description.note
414+
# Configuration for each entity type
415+
entityDataConfig:
416+
- entityType: Person
417+
# Descriptive metadata (popover body)
418+
metadataList:
419+
- person.affiliation.name
420+
- person.email
421+
# Title metadata (popover header)
422+
titleMetadataList:
423+
- person.givenName
424+
- person.familyName
425+
# Configuration for identifier subtypes, based on metadata like dc.identifier.ror where ror is the subtype.
426+
# This is used to map the layout of the identifier in the popover and the icon displayed next to the metadata value.
427+
identifierSubtypes:
428+
- name: ror
429+
icon: assets/images/ror.logo.icon.svg
430+
iconPosition: IdentifierSubtypesIconPositionEnum.LEFT
431+
link: https://ror.org
432+
400433
# Enable authority based relations in item page
401434
showAuthorithyRelations: false
402435
# Community Page Config
@@ -646,3 +679,62 @@ geospatialMapViewer:
646679
accessibility:
647680
# The duration in days after which the accessibility settings cookie expires
648681
cookieExpirationDuration: 7
682+
683+
# Configuration for layout customization of metadata rendering in Item page
684+
# Currently only the authority reference config is available, more will follow with the integration of the so called CRIS layout.
685+
layout:
686+
# Configuration of icons and styles to be used for each authority controlled link
687+
authorityRef:
688+
- entityType: DEFAULT
689+
entityStyle:
690+
default:
691+
icon: fa fa-user
692+
style: text-info
693+
- entityType: PERSON
694+
entityStyle:
695+
person:
696+
icon: fa fa-user
697+
style: text-success
698+
default:
699+
icon: fa fa-user
700+
style: text-info
701+
- entityType: ORGUNIT
702+
entityStyle:
703+
default:
704+
icon: fa fa-university
705+
style: text-success
706+
- entityType: PROJECT
707+
entityStyle:
708+
default:
709+
icon: fas fa-project-diagram
710+
style: text-success
711+
712+
# Configuration for customization of search results
713+
searchResults:
714+
# Metadata fields to be displayed in the search results under the standard ones
715+
additionalMetadataFields:
716+
- dc.contributor.author
717+
- dc.date.issued
718+
- dc.type
719+
# Metadata fields to be displayed in the search results for the author section
720+
authorMetadata:
721+
- dc.contributor.author
722+
- dc.creator
723+
- dc.contributor.*
724+
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
725+
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests
726+
# to efficiently display the search results.
727+
followAuthorityMetadata:
728+
- type: Publication
729+
metadata: dc.contributor.author
730+
- type: Product
731+
metadata: dc.contributor.author
732+
733+
# The maximum number of item to process when following authority metadata values.
734+
followAuthorityMaxItemLimit: 100
735+
736+
# The maximum number of metadata values to process for each metadata key
737+
# when following authority metadata values.
738+
followAuthorityMetadataValuesLimit: 5
739+
740+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
describe('Limit public config properties', () => {
2+
it('Should not include cache.serverSide properties in the html source code',
3+
() => {
4+
cy.request('/').its('body').then((text: string) => {
5+
expect(text).to.not.contain('"serverSide":');
6+
});
7+
},
8+
);
9+
it('Should not include cache.serverSide properties in the config.json',
10+
() => {
11+
cy.request('/assets/config.json').its('body').then((obj: any) => {
12+
expect(obj.cache).to.not.haveOwnProperty('serverSide');
13+
});
14+
},
15+
);
16+
});

0 commit comments

Comments
 (0)