Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating all versions to the highest possible w/o conflicts. The goal is to have the mongodb driver to something > 6.0. * Replacing the 'del' package by the 'rimraf' package to avoid deprication warnings. * Updating the production/.env with some reasonable values. Most important for us is adding the 'COLLECTION_ID=' because sometimes the test data doesn't have the 'doi' as a key and we change it to the '_id' value, which is always available in mongodb. In general we don't understand where the .env is really used in production. When using docker, docker-compose or kubernetes, we would specify all environment variable specifically anyway. Like in '-e' or the environment tag in docker compose. * Updating the dao driver code to comply with mongdb >= 6. - Using then/catch with mongdb.connect. - Using the Promise returned by library calls instead of creating our own Promise. - It seems that MongoClient.filter is no longer used in the 6.0 mongodb library. So we change to 'any'. Is of course less type save. * Using the 'date' substructure of releaseDate. Error otherwise. * TS now requires to use 'const pino ..' instead of 'import pino ..' for the 'pino' package. * Adding an upgrade of npm to [email protected]. * Adding a description of the required variables. Can to to README.md if necessary. Adding an example on how to start the docker container. * Formatting fixed. * a) mongo 'Filter' type replacing 'any' b) Formatting improved * Mongodb already returns Promises, which we forward to the calling functions. * This is to get the test running again. a) Using tsx instead of tsc. Didn't get the mocha to work with tsc. b) Fixing the the expected return from the oai-pmh API calles. - Lower case to the proper answer - Removing date structures before the comparison. c) Reading the dotenv part first before loading the test. Mostly to get the proper LOG_LEVEL value. d) The PUT of the 'test' record into the DB is not defined by the V2 oai-pmh protocol and the return of the insertOne mongodb call changed. That is reflected in the fixtures ... record-doi.ts file. * Run the TEST * Deployment taken from BE * Describing necessary ENV variables * Was moved to README.md * Adding the real update time * Fixing format with XML namespace url * Applying workflow to master instead of the development branch. * Formal Fix: Merging MongoClient, Filter import from mongodb. * Changed default LOG_LEVEL to 'error' in .env and README.md * Putting { id:1 } projection back to identifiersQuery. * Switching back to the node:18-slim version as apline seems to produce errors during the githup workflow * Making the mongoFilter more typesafe with Filter<StatusFilter>), avoiding error message during compilation. * Only pushing output image to ghcr if we push code to master * Changing trigger back to master * Pushing to the GitHub Container Registry only on 'push' not on 'pr' --------- Co-authored-by: Patrick Fuhrmann <[email protected]>
- Loading branch information