Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP implement proof of concept for single top-level presenter factory #368

Open
wants to merge 30 commits into
base: integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7aee186
style(coscrad-frontend): update image view components with MUI styled…
yaanahuu2 Mar 16, 2023
1c3f10e
style(coscrad-frontend): add custom header styles to MUI theme and im…
yaanahuu2 Mar 16, 2023
aa01667
feat(coscrad-frontend): support presenters for playlists (#322)
aaron-plahn Mar 27, 2023
5370a12
feat(coscrad-frontend): support a presenter for the term of the day (…
jbambrick Mar 28, 2023
7424010
feat(coscrad-frontend): support a configurable not found presenter (#…
jbambrick Mar 29, 2023
e4ad115
refactor(api): move router to data API (#337)
aaron-plahn Apr 4, 2023
b95a513
style(coscrad-frontend): style vocabulary list detail presenter and f…
jbambrick Apr 4, 2023
67f55d7
fix(coscrad-frontend): tighten up content config validation (#341)
aaron-plahn Apr 5, 2023
4c98686
style(coscrad-frontend): remove css import from audio item presenters…
yaanahuu2 Apr 9, 2023
92ba4cd
style(coscrad-frontend): remove css import in spatial feature index (…
yaanahuu2 Apr 10, 2023
a183cb8
style(coscrad-frontend): remove css import from photograph presenters…
yaanahuu2 Apr 10, 2023
f006eef
style(coscrad-frontend): remove css import and cypress test spatial f…
yaanahuu2 Apr 13, 2023
75604fc
feat(coscrad-frontend): support a configurable loading component (#350)
jbambrick Apr 13, 2023
890e6e2
style(coscrad-frontend): remove css imports and refactor table displa…
yaanahuu2 Apr 14, 2023
3eec011
style(coscrad-frontend): remove css imports from bibliographic refere…
yaanahuu2 Apr 18, 2023
eb54fe2
fix(validation-constraints): remove circular dependency between libs
aaron-plahn Apr 20, 2023
3ea6380
style(coscrad-frontend): remove css from term presenters (#353)
yaanahuu2 Apr 20, 2023
93293c5
style(coscrad-frontend): add copy button icon to presenters (#354)
yaanahuu2 Apr 25, 2023
23acda0
build(cicd): skip nx cache when running tests
aaron-plahn Apr 25, 2023
d1c4109
test(coscrad-frontend): update stale snapshot
aaron-plahn Apr 25, 2023
a5bce17
feat(coscrad-frontend): move audio panel to a drawer (#342)
bsellars Apr 25, 2023
db805d1
feat(coscrad-frontend): move audio panel to a drawer (#358)
bsellars Apr 26, 2023
17e958b
style(coscrad-frontend): add a drawer to the navbar (#359)
jbambrick May 1, 2023
1712074
style(coscrad-frontend): fix display on nav menu icons (#362)
jbambrick May 2, 2023
bdb2caa
feat(cli): introduce first CLI command: domain-dump (#360)
aaron-plahn May 2, 2023
9535eed
build(cicd): move builds to DigitalOcean cloud (#363)
aaron-plahn May 3, 2023
504798a
style(coscrad-frontend): widescreen element negative margin fix (#364)
yaanahuu2 May 4, 2023
645e4bc
feat(cli): introduce data-restore cli command (#365)
aaron-plahn May 5, 2023
b3459a3
style(coscrad-frontend): remove coscrad main content container (#367)
yaanahuu2 May 8, 2023
c5b0345
WIP implement proof of concept for single top-level presenter factory
aaron-plahn May 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ auth_config.json
**content.config.ts
# TODO Be careful not to git-ignore third-party configs
**config.json

# COSCRAD CLI command e2e test dummy files
__cli-command-test-files__
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"trailingComma": "es5",
"tabWidth": 4,
"singleQuote": true
}
}
26 changes: 15 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
def nodeInstallationName = 'NodeJS 18.12.0'

/* groovylint-disable DuplicateStringLiteral */
/* groovylint-disable-next-line CompileStatic */
pipeline {
Expand All @@ -9,11 +11,9 @@ pipeline {
stages {
stage('ci') {
agent {
docker {
image 'node:18-alpine'
args '-u root'
}
label 'jenkins-build-agent'
}
tools { nodejs nodeInstallationName }
environment {
NODE_ENV = 'test'
NODE_PORT = 3131
Expand All @@ -38,6 +38,10 @@ pipeline {
targetLocation: 'apps/coscrad-frontend/src/auth_config.json')]) {
echo 'PR opened or updated...'
echo "NODE ENV: ${NODE_ENV}"
echo 'node version:'
sh 'node -v'
echo 'npm version'
sh 'npm -v'
echo 'Installing dependencies'
sh 'npm ci --legacy-peer-deps'

Expand All @@ -58,7 +62,7 @@ pipeline {
sh 'npm run build:coscrad:prod'

echo 'testing coscrad-frontend'
sh 'npx nx test coscrad-frontend'
sh 'npx nx test coscrad-frontend --skip-nx-cache'

echo 'testing api (coscrad back-end)'

Expand All @@ -72,17 +76,15 @@ pipeline {
/* groovylint-disable-next-line LineLength */
sh 'touch apps/api/src/app/config/test.env'

sh 'npx nx test api'
sh 'npx nx test api --skip-nx-cache'
}
}
}
stage('deploy to staging') {
agent {
docker {
image 'node:18-alpine'
args '-u root'
}
label 'jenkins-build-agent'
}
tools { nodejs nodeInstallationName }
environment {
NODE_ENV = 'staging'
NODE_PORT = 3131
Expand Down Expand Up @@ -123,6 +125,8 @@ pipeline {
sh 'cp apps/coscrad-frontend/src/configurable-front-matter/data/content.config.SAMPLE.ts apps/coscrad-frontend/src/configurable-front-matter/data/content.config.ts'

sh 'npm run build:coscrad:prod'

sh 'npx nx run api:build:cli'
}
}
post {
Expand All @@ -137,6 +141,6 @@ pipeline {
publishers: [sshPublisherDesc(configName: '[email protected]', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'rm -rf archive ; mv build archive; touch archive/dist/apps/api/staging.env; PATH=$PATH://home/coscradmin/.nvm/versions/node/v18.16.0/bin pm2 restart main; echo API restarted', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'build', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'dist/**, node_modules/**')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
}
}
}
}
}
}
13 changes: 13 additions & 0 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@
"with": "apps/api/src/environments/environment.prod.ts"
}
]
},
"cli": {
"outputPath": "dist/apps/coscrad-cli",
"main": "apps/api/src/cli.ts",
"optimization": true,
"extractLicenses": true,
"inspect": false,
"fileReplacements": [
{
"replace": "apps/api/src/environments/environment.ts",
"with": "apps/api/src/environments/environment.prod.ts"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,64 @@ exports[`When querying for edge connections GET /connections/notes should return
"note": "this library book has the lyrics from the song, but we do not have access to the book",
"tags": [],
},
{
"actions": [],
"connectedResources": [
{
"compositeIdentifier": {
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110003",
"type": "bibliographicReference",
},
"context": {
"type": "general",
},
"role": "from",
},
{
"compositeIdentifier": {
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110024",
"type": "book",
},
"context": {
"type": "general",
},
"role": "to",
},
],
"connectionType": "dual",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b113201",
"note": "this is why bibliographic_references/3 is connected to book/24",
"tags": [],
},
{
"actions": [],
"connectedResources": [
{
"compositeIdentifier": {
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110023",
"type": "bibliographicReference",
},
"context": {
"type": "general",
},
"role": "from",
},
{
"compositeIdentifier": {
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110024",
"type": "book",
},
"context": {
"type": "general",
},
"role": "to",
},
],
"connectionType": "dual",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b113202",
"note": "this is why bibliographic_references/23 is connected to book/24",
"tags": [],
},
],
"indexScopedActions": [],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when all of
"entities": [
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110110",
"lengthMilliseconds": 20000,
"mimeType": "audio/mpeg",
Expand All @@ -24,7 +24,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when all of
},
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110111",
"lengthMilliseconds": 23409,
"mimeType": "audio/mpeg",
Expand All @@ -44,7 +44,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when all of
},
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110113",
"lengthMilliseconds": 32989,
"mimeType": "audio/mpeg",
Expand All @@ -71,7 +71,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when some of
"entities": [
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110110",
"lengthMilliseconds": 20000,
"mimeType": "audio/mpeg",
Expand All @@ -90,7 +90,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when some of
},
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110111",
"lengthMilliseconds": 23409,
"mimeType": "audio/mpeg",
Expand All @@ -110,7 +110,7 @@ exports[`When fetching multiple resources GET /resources/audioItems when some of
},
{
"actions": [],
"audioURL": "https://www.metalmondays.com/1.mp3",
"audioURL": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110113",
"lengthMilliseconds": 32989,
"mimeType": "audio/mpeg",
Expand Down Expand Up @@ -144,14 +144,18 @@ exports[`When fetching multiple resources GET /resources/bibliographicReferences
"name": "Alana Duvernay",
"type": "author",
},
{
"name": "James Smith",
"type": "author",
},
],
"isbn": "978-1-895811-34-6",
"numberOfPages": 455,
"place": "Kennebunk Port, Maine",
"publisher": "Atlantic Publishing",
"title": "A Day in the Life",
"type": "book",
"url": "https://atlanticpublishing.com",
"url": "https://atlanticpublishing.com/authors/Duvernay/NewBook/BookInformation/",
"year": 1999,
},
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110001",
Expand Down Expand Up @@ -216,10 +220,10 @@ exports[`When fetching multiple resources GET /resources/bibliographicReferences
{
"actions": [],
"data": {
"abstract": "William, June
- Nemiah Valley
- Qualifying as an expert in Tsilhqot'in written language",
"caseName": "2002-07-08_Tsilhqot'inTitleCase",
"abstract": "Doe, Jane
- Large Valley
- Qualifying as an expert in the written language",
"caseName": "2002-07-08_NationTitleCase",
"court": "Supreme Court of British Columbia",
"dateDecided": "Recorded 2002-07-08",
"pages": "Pages 1-6",
Expand Down Expand Up @@ -261,14 +265,18 @@ exports[`When fetching multiple resources GET /resources/bibliographicReferences
"name": "Alana Duvernay",
"type": "author",
},
{
"name": "James Smith",
"type": "author",
},
],
"isbn": "978-1-895811-34-6",
"numberOfPages": 455,
"place": "Kennebunk Port, Maine",
"publisher": "Atlantic Publishing",
"title": "A Day in the Life",
"type": "book",
"url": "https://atlanticpublishing.com",
"url": "https://atlanticpublishing.com/authors/Duvernay/NewBook/BookInformation/",
"year": 1999,
},
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110001",
Expand Down Expand Up @@ -333,10 +341,10 @@ exports[`When fetching multiple resources GET /resources/bibliographicReferences
{
"actions": [],
"data": {
"abstract": "William, June
- Nemiah Valley
- Qualifying as an expert in Tsilhqot'in written language",
"caseName": "2002-07-08_Tsilhqot'inTitleCase",
"abstract": "Doe, Jane
- Large Valley
- Qualifying as an expert in the written language",
"caseName": "2002-07-08_NationTitleCase",
"court": "Supreme Court of British Columbia",
"dateDecided": "Recorded 2002-07-08",
"pages": "Pages 1-6",
Expand Down Expand Up @@ -682,7 +690,7 @@ exports[`When fetching multiple resources GET /resources/mediaItems when all of
],
"title": "episode title (in language)",
"titleEnglish": "Metal Mondays episode 1",
"url": "https://www.metalmondays.com/1.mp3",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
},
{
"actions": [],
Expand All @@ -694,6 +702,16 @@ exports[`When fetching multiple resources GET /resources/mediaItems when all of
"titleEnglish": "cool video",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=3028_6d3b2a922b.mp4",
},
{
"actions": [],
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110003",
"lengthMilliseconds": 2500,
"mimeType": "audio/mpeg",
"tags": [],
"title": "episode title (in language)",
"titleEnglish": "Metal Mondays episode 2",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
},
],
"indexScopedActions": [],
}
Expand Down Expand Up @@ -741,7 +759,7 @@ exports[`When fetching multiple resources GET /resources/mediaItems when some of
],
"title": "episode title (in language)",
"titleEnglish": "Metal Mondays episode 1",
"url": "https://www.metalmondays.com/1.mp3",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
},
{
"actions": [],
Expand All @@ -753,6 +771,16 @@ exports[`When fetching multiple resources GET /resources/mediaItems when some of
"titleEnglish": "cool video",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=3028_6d3b2a922b.mp4",
},
{
"actions": [],
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110003",
"lengthMilliseconds": 2500,
"mimeType": "audio/mpeg",
"tags": [],
"title": "episode title (in language)",
"titleEnglish": "Metal Mondays episode 2",
"url": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
},
],
"indexScopedActions": [],
}
Expand Down Expand Up @@ -906,7 +934,16 @@ exports[`When fetching multiple resources GET /resources/playlists when all of t
{
"actions": [],
"episodes": [
"audioItem/9b1deb4d-3b7d-4bad-9bdd-2b0d7b110110",
{
"mediaItemUrl": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"mimeType": "audio/mpeg",
"name": "{eng}: The Wooden Boy",
},
{
"mediaItemUrl": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
"mimeType": "audio/mpeg",
"name": "{clc}: Down at the River",
},
],
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110501",
"name": {
Expand Down Expand Up @@ -946,7 +983,16 @@ exports[`When fetching multiple resources GET /resources/playlists when some of
{
"actions": [],
"episodes": [
"audioItem/9b1deb4d-3b7d-4bad-9bdd-2b0d7b110110",
{
"mediaItemUrl": "https://be.tsilhqotinlanguage.ca:3003/download?id=5671983.mp3",
"mimeType": "audio/mpeg",
"name": "{eng}: The Wooden Boy",
},
{
"mediaItemUrl": "https://be.tsilhqotinlanguage.ca:3003/download?id=5670051.mp3",
"mimeType": "audio/mpeg",
"name": "{clc}: Down at the River",
},
],
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b110501",
"name": {
Expand Down
Loading