From 5d4d586bee3a4a95da0f5613bdeb094916221b1e Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 16:14:55 +0100 Subject: [PATCH 01/23] change DATABASE_URL back to DB_URI for consistency and less confusion between mongo and postgres later on --- .env.sample | 9 ++++----- db.js | 2 +- readme.md | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.env.sample b/.env.sample index bfed6d1..d22833f 100644 --- a/.env.sample +++ b/.env.sample @@ -1,14 +1,13 @@ # ----- MONGO CONFIG # -- using docker development env -DATABASE_URL=mongodb://mongo/outpost_api_development +DB_URI=mongodb://mongo/outpost_api_development # -- running mongo locally -#DATABASE_URL=mongodb://localhost:27017/outpost_api_development +#DB_URI=mongodb://localhost:27017/outpost_api_development # -- running with docker and connecting to db on host -#DATABASE_URL=mongodb://host.docker.internal:27017/outpost_development - +#DB_URI=mongodb://host.docker.internal:27017/outpost_development # ----- GEOCODING -GOOGLE_API_KEY= \ No newline at end of file +GOOGLE_API_KEY= diff --git a/db.js b/db.js index 025ce38..b09b374 100644 --- a/db.js +++ b/db.js @@ -1,5 +1,5 @@ const { MongoClient } = require("mongodb") -const uri = process.env.DATABASE_URL +const uri = process.env.DB_URI let db diff --git a/readme.md b/readme.md index 7fb0e9c..0f32a9c 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ To run it on your machine you need Node.js, npm, nvm (https://github.com/nvm-sh/ It expects a few environment variables. -`DATABASE_URL` +`DB_URI` - MongoDB connection URI nb if you're running in a docker container and want to connect to your local db use `host.docker.internal` instead of `localhost` From 79f940869fbd3937b4c44f74d7146dcc7e62cab5 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 16:22:33 +0100 Subject: [PATCH 02/23] add a little health check end point --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.js b/index.js index da08e5e..bcb2035 100644 --- a/index.js +++ b/index.js @@ -32,6 +32,15 @@ server.use( ) server.use(cors()) +server.get("/health", (req, res) => { + const data = { + uptime: process.uptime(), + message: "Ok", + date: new Date(), + } + + res.status(200).send(data) +}) server.use("/api/v1/", routes) server.listen(port, () => console.log(`✅ Listening on port ${port}`)) From 2c8c20a6c339b943f28d7678bb4372fa109aa284 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 16:22:53 +0100 Subject: [PATCH 03/23] set the db environment for the dev container --- docker-compose.development.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.development.yml b/docker-compose.development.yml index 1779337..b49ad84 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -14,6 +14,7 @@ services: - ./:/app:cached environment: NODE_ENV: development + DB_URI: mongodb://mongo:27017/outpost_api_development networks: - external_network - internal_network From 2354b2c1e9b20fcffd23d38e7792103495db87e4 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 18:20:39 +0100 Subject: [PATCH 04/23] health checks and image improvemenrts --- Dockerfile | 37 ++++++++++++++++++++-------------- docker-compose.development.yml | 13 +++++++++--- docker-compose.yml | 14 ++++++++++--- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75afcd5..66164ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,25 +3,32 @@ # base_image > build_frontend > (development | production) FROM node:16-alpine3.17 as base_image +WORKDIR /usr/build/app +COPY ./package.json /usr/build/app/package.json +COPY ./package-lock.json /usr/build/app/package-lock.json +EXPOSE 3001 + +FROM base_image as development_base +RUN npm ci +FROM base_image as production_base +RUN npm ci --omit=dev -# copy node files and install -FROM base_image as build_frontend -COPY ./package.json ./tmp/package.json -COPY ./package-lock.json ./tmp/package-lock.json -RUN cd /tmp && \ - npm i -WORKDIR /app # build and install all the things for the development env -FROM build_frontend as development -COPY --from=build_frontend ./tmp ./app -EXPOSE 3001 +FROM development_base as development +ENV NODE_ENV development +WORKDIR /usr/src/app +COPY --chown=node:node --from=development_base /usr/build/app/node_modules ./ +USER node CMD ["npm", "run", "dev" ] -FROM build_frontend as production -COPY --from=build_frontend ./tmp ./ -COPY . /app -EXPOSE 3001 -CMD ["npm", "run", "start" ] \ No newline at end of file + +FROM production_base as production +ENV NODE_ENV production +WORKDIR /usr/src/app +COPY --chown=node:node --from=production_base /usr/build/app/node_modules /usr/src/app +COPY --chown=node:node . /usr/src/app +USER node +CMD ["npm", "run", "start" ] diff --git a/docker-compose.development.yml b/docker-compose.development.yml index b49ad84..d97d6af 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -4,14 +4,21 @@ services: stdin_open: true image: "outpost-api:development" container_name: outpost-api-dev + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/health"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 40s depends_on: - mongo build: target: development ports: - - "3001" + - 3001:3001 volumes: - - ./:/app:cached + - ./:/usr/src/app:cached environment: NODE_ENV: development DB_URI: mongodb://mongo:27017/outpost_api_development @@ -21,12 +28,12 @@ services: mongo: image: mongo:6 container_name: outpost-api-mongo + restart: unless-stopped ports: - 27017:27017 volumes: - outpost-api-mongo-volume:/data/db networks: - - internal_network - external_network volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 7015417..21702d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,28 +4,36 @@ services: image: "outpost-api:production" container_name: outpost-api restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/health"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 40s depends_on: - mongo build: target: production ports: - - "3001" + - 3001:3001 volumes: - - ./:/app + - ./:/usr/src/app environment: NODE_ENV: production + DB_URI: mongodb://mongo:27017/outpost_api_development networks: - internal_network + - external_network mongo: image: mongo:6 container_name: outpost-api-mongo + restart: unless-stopped ports: - 27017:27017 volumes: - outpost-api-mongo-volume:/data/db networks: - - internal_network - external_network volumes: From ba25b57b5e833cbe0c991e0aeed6d2ec4e3efc6f Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 18:40:14 +0100 Subject: [PATCH 05/23] fix app not starting correctly in dev container --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c8a4eb..eb442a1 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "start": "node index", - "dev": "NODE_ENV=development nodemon index", + "start": "node index.js", + "dev": "NODE_ENV=development nodemon index.js", "test": "jest", "prepare-indices": "node lib/prepare-indices" }, From 7d141e79fa4bba1e14bd991aede4fc0fd3beca40 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 18:44:01 +0100 Subject: [PATCH 06/23] rename networks --- docker-compose.development.yml | 10 +++++----- docker-compose.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.development.yml b/docker-compose.development.yml index d97d6af..441ecd5 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -23,8 +23,8 @@ services: NODE_ENV: development DB_URI: mongodb://mongo:27017/outpost_api_development networks: - - external_network - - internal_network + - outpos_api_external_network + - outpos_api_internal_network mongo: image: mongo:6 container_name: outpost-api-mongo @@ -34,12 +34,12 @@ services: volumes: - outpost-api-mongo-volume:/data/db networks: - - external_network + - outpos_api_external_network volumes: outpost-api-mongo-volume: networks: - external_network: - internal_network: + outpos_api_external_network: + outpos_api_internal_network: internal: true diff --git a/docker-compose.yml b/docker-compose.yml index 21702d9..4a31abd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,8 +22,8 @@ services: NODE_ENV: production DB_URI: mongodb://mongo:27017/outpost_api_development networks: - - internal_network - - external_network + - outpos_api_internal_network + - outpos_api_external_network mongo: image: mongo:6 @@ -34,12 +34,12 @@ services: volumes: - outpost-api-mongo-volume:/data/db networks: - - external_network + - outpos_api_external_network volumes: outpost-api-mongo-volume: networks: - external_network: - internal_network: + outpos_api_external_network: + outpos_api_internal_network: internal: true From 6229752498e9b658919398578fe758fae41ecd54 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 19:18:01 +0100 Subject: [PATCH 07/23] init mongodb with data on dev (and run indices on prod) --- docker-compose.development.yml | 3 ++ docker-compose.yml | 3 +- setup-mongodb-development.js | 95 ++++++++++++++++++++++++++++++++++ setup-mongodb-production.js | 22 ++++++++ 4 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 setup-mongodb-development.js create mode 100644 setup-mongodb-production.js diff --git a/docker-compose.development.yml b/docker-compose.development.yml index 441ecd5..878b95d 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -33,6 +33,9 @@ services: - 27017:27017 volumes: - outpost-api-mongo-volume:/data/db + - ./setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + environment: + MONGO_INITDB_DATABASE: outpost_api_development networks: - outpos_api_external_network diff --git a/docker-compose.yml b/docker-compose.yml index 4a31abd..35cf144 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: - ./:/usr/src/app environment: NODE_ENV: production - DB_URI: mongodb://mongo:27017/outpost_api_development + DB_URI: mongodb://mongo:27017/outpost_api networks: - outpos_api_internal_network - outpos_api_external_network @@ -33,6 +33,7 @@ services: - 27017:27017 volumes: - outpost-api-mongo-volume:/data/db + - ./setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro networks: - outpos_api_external_network diff --git a/setup-mongodb-development.js b/setup-mongodb-development.js new file mode 100644 index 0000000..12556d4 --- /dev/null +++ b/setup-mongodb-development.js @@ -0,0 +1,95 @@ +db = db.getSiblingDB("outpost_api_development") + +db.createCollection("indexed_services") + +db.indexed_services.createIndex( + { + name: "text", + description: "text", + }, + { + weights: { + name: 5, + description: 1, + }, + } +) +db.indexed_services.createIndex({ + "locations.geometry": "2dsphere", +}) +db.indexed_services.createIndex({ + "taxonomies.slug": 1, +}) + +db.indexed_services.insertMany([ + { + id: 1, + updated_at: { + $date: "2022-07-01T20:14:55.847Z", + }, + name: "Ligula Mattis Dolor", + description: + "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.", + url: "http://outpost-platform.wearefuturegov.com/", + min_age: 0, + max_age: 100, + age_band_under_2: null, + age_band_2: null, + age_band_3_4: null, + age_band_5_7: null, + age_band_8_plus: null, + age_band_all: null, + needs_referral: true, + free: null, + created_at: { + $date: "2022-07-01T20:14:54.546Z", + }, + status: "published", + target_directories: [], + locations: [ + { + id: 1, + name: "Location 1", + address_1: null, + city: "London", + state_province: "", + postal_code: "EC1", + country: "GB", + geometry: { + type: "Point", + coordinates: [-0.2664017, 51.5285262], + }, + mask_exact_address: true, + accessibilities: [], + }, + ], + contacts: [], + meta: [], + organisation: { + id: 1, + name: "Organisation 1", + description: null, + email: null, + url: null, + }, + taxonomies: [ + { + id: 1, + name: "Taxonomy 1", + slug: "taxonomy-1", + parent_id: null, + }, + ], + regular_schedules: [], + cost_options: [], + links: [ + { + label: "Facebook", + url: "https://www.facebook.com", + }, + ], + send_needs: [], + suitabilities: [], + local_offer: null, + }, +]) diff --git a/setup-mongodb-production.js b/setup-mongodb-production.js new file mode 100644 index 0000000..5251fb7 --- /dev/null +++ b/setup-mongodb-production.js @@ -0,0 +1,22 @@ +db = db.getSiblingDB("outpost_api") + +db.createCollection("indexed_services") + +db.indexed_services.createIndex( + { + name: "text", + description: "text", + }, + { + weights: { + name: 5, + description: 1, + }, + } +) +db.indexed_services.createIndex({ + "locations.geometry": "2dsphere", +}) +db.indexed_services.createIndex({ + "taxonomies.slug": 1, +}) From 62a6f782f89e280c4ffd7907170362ffe8742eb9 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 19:20:53 +0100 Subject: [PATCH 08/23] readme updates --- TODO.md | 2 +- readme.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 7857a45..9e4a37b 100644 --- a/TODO.md +++ b/TODO.md @@ -2,4 +2,4 @@ - [ ] Automate tests with docker and github actions - [ ] Automatic linter on commit and PR's -- [ ] An option to push some dummy data to the API +- [x] An option to push some dummy data to the API diff --git a/readme.md b/readme.md index 0f32a9c..dfc3c40 100644 --- a/readme.md +++ b/readme.md @@ -97,13 +97,13 @@ docker compose -f docker-compose.development.yml build docker compose -f docker-compose.development.yml up -d # setup indices -docker compose -f docker-compose.development.yml exec outpost-api-dev npm run prepare-indices; +docker compose -f docker-compose.development.yml exec outpost-api npm run prepare-indices; # open shell in container -docker compose -f docker-compose.development.yml exec outpost-api-dev /bin/ash; +docker compose -f docker-compose.development.yml exec outpost-api /bin/ash; # run tests -docker compose -f docker-compose.development.yml exec outpost-api-dev npm run test +docker compose -f docker-compose.development.yml exec outpost-api npm run test # stop the container docker compose -f docker-compose.development.yml stop From 5d9a67edd7462aa4086e3b878af2df2c0291d354 Mon Sep 17 00:00:00 2001 From: Han Date: Sat, 19 Aug 2023 21:37:52 +0100 Subject: [PATCH 09/23] Update documentation --- Dockerfile | 4 +- docker-compose.development.yml | 16 +++--- docker-compose.yml | 10 ++-- package.json | 3 +- readme.md | 102 +++++++++++++++++---------------- 5 files changed, 69 insertions(+), 66 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66164ae..184e7c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN npm ci --omit=dev FROM development_base as development ENV NODE_ENV development WORKDIR /usr/src/app -COPY --chown=node:node --from=development_base /usr/build/app/node_modules ./ +COPY --chown=node:node --from=development_base /usr/build/app/node_modules ./node_modules USER node CMD ["npm", "run", "dev" ] @@ -28,7 +28,7 @@ CMD ["npm", "run", "dev" ] FROM production_base as production ENV NODE_ENV production WORKDIR /usr/src/app -COPY --chown=node:node --from=production_base /usr/build/app/node_modules /usr/src/app +COPY --chown=node:node --from=production_base /usr/build/app/node_modules ./node_modules COPY --chown=node:node . /usr/src/app USER node CMD ["npm", "run", "start" ] diff --git a/docker-compose.development.yml b/docker-compose.development.yml index 878b95d..d981ad7 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -1,6 +1,6 @@ version: "3.7" services: - outpost-api: + outpost-api-dev: stdin_open: true image: "outpost-api:development" container_name: outpost-api-dev @@ -23,8 +23,8 @@ services: NODE_ENV: development DB_URI: mongodb://mongo:27017/outpost_api_development networks: - - outpos_api_external_network - - outpos_api_internal_network + - outpost_api_dev_external_network + - outpost_api_dev_internal_network mongo: image: mongo:6 container_name: outpost-api-mongo @@ -32,17 +32,17 @@ services: ports: - 27017:27017 volumes: - - outpost-api-mongo-volume:/data/db + - outpost-api-dev-mongo-volume:/data/db - ./setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro environment: MONGO_INITDB_DATABASE: outpost_api_development networks: - - outpos_api_external_network + - outpost_api_dev_external_network volumes: - outpost-api-mongo-volume: + outpost-api-dev-mongo-volume: networks: - outpos_api_external_network: - outpos_api_internal_network: + outpost_api_dev_external_network: + outpost_api_dev_internal_network: internal: true diff --git a/docker-compose.yml b/docker-compose.yml index 35cf144..2c43d02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,8 +22,8 @@ services: NODE_ENV: production DB_URI: mongodb://mongo:27017/outpost_api networks: - - outpos_api_internal_network - - outpos_api_external_network + - outpost_api_internal_network + - outpost_api_external_network mongo: image: mongo:6 @@ -35,12 +35,12 @@ services: - outpost-api-mongo-volume:/data/db - ./setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro networks: - - outpos_api_external_network + - outpost_api_external_network volumes: outpost-api-mongo-volume: networks: - outpos_api_external_network: - outpos_api_internal_network: + outpost_api_external_network: + outpost_api_internal_network: internal: true diff --git a/package.json b/package.json index eb442a1..1ca8254 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "api_service", + "name": "@outpost_platform/api_service", "version": "1.0.0", "description": "", "main": "index.js", @@ -9,6 +9,7 @@ "test": "jest", "prepare-indices": "node lib/prepare-indices" }, + "test": "exit 0", "keywords": [], "author": "", "license": "ISC", diff --git a/readme.md b/readme.md index dfc3c40..7b5f2f4 100644 --- a/readme.md +++ b/readme.md @@ -30,8 +30,6 @@ It's not useful by itself — it depends on a public index built by [Outpost](ht It's a simple Node.js app which queries information from a MongoDB collection and publishes it as a read-only, rate-limited REST API. -To run it on your machine you need Node.js, npm, nvm (https://github.com/nvm-sh/nvm) and a working MongoDB database [with the right indices](#indices) available on `localhost:27017`. - ## 🧬 Configure Outpost API It expects a few environment variables. @@ -55,79 +53,55 @@ Other environmental variables: ## 💻 Getting started -### Using docker +To get up and running quickly with some data use docker compose. ```sh git clone git@github.com:wearefuturegov/outpost-api-service.git && cd outpost-api-service -# build the image - if using for the first time -docker build --tag outpost-api-service:development --target development . - -# run the image in local environment -docker run -p 3001:3001 --name outpost-api-service -v $(pwd):/app:cached -i -d outpost-api-service:development - -# setup indices -docker exec -it outpost-api-service npm run prepare-indices +# build the image +docker compose -f docker-compose.development.yml build -# access the site -open http://localhost:3001/api/v1/services +# run the container +docker compose -f docker-compose.development.yml up -d # open shell in container -docker exec -it outpost-api-service /bin/ash; +docker compose -f docker-compose.development.yml exec outpost-api-dev /bin/ash; -# run tests -docker exec -it outpost-api-service npm run test +# run the tests +docker compose -f docker-compose.development.yml exec outpost-api-dev npm run test # stop the container -docker stop outpost-api-service - -# start again -docker start outpost-api-service +docker compose -f docker-compose.development.yml stop ``` -### Using docker-compose +If you want to use it in conjunction with a local mongodb database, for example you are using [Outpost](https://github.com/wearefuturegov/outpost/) you could also run it using just docker. ```sh git clone git@github.com:wearefuturegov/outpost-api-service.git && cd outpost-api-service -# build the image -docker compose -f docker-compose.development.yml build +# build the image - if using for the first time +docker build --tag outpost-api-dev --target development . -# run the container -docker compose -f docker-compose.development.yml up -d +# run the image in local environment +docker run -p 3001:3001 --name outpost-api-dev -v $(pwd):/usr/src/app:cached -i -d outpost-api-dev # setup indices -docker compose -f docker-compose.development.yml exec outpost-api npm run prepare-indices; +docker exec -it outpost-api-dev npm run prepare-indices + +# access the site +open http://localhost:3001/api/v1/services # open shell in container -docker compose -f docker-compose.development.yml exec outpost-api /bin/ash; +docker exec -it outpost-api-dev /bin/ash; # run tests -docker compose -f docker-compose.development.yml exec outpost-api npm run test +docker exec -it outpost-api-dev npm run test # stop the container -docker compose -f docker-compose.development.yml stop - -``` - -### On your machine - -To run it on your machine you need Node.js, npm, nvm (https://github.com/nvm-sh/nvm) and a working MongoDB database [with the right indices](#indices) available on `localhost:27017`. - -``` -# use the right node version -nvm use - -# install npm packages -npm i - -# if this is your first time installing it prepare the database -npm run prepare-indices +docker stop outpost-api-dev -# start the local development server -npm run dev - -# outpost api is running on http://localhost:3001 +# start again +docker start outpost-api-dev ``` ## Deploying it @@ -140,7 +114,7 @@ It's suitable for 12-factor hosting like Heroku. It has a [Procfile](https://dev npm start ``` -You can also deploy via docker +You can also deploy via docker compose ```sh # build the image @@ -150,13 +124,41 @@ docker compose build docker compose up -d ``` +and docker + +```sh +# build the image +docker build --tag outpost-api --target production . + +# run the container +docker run -p 3001:3001/tcp --name outpost-api -i -d outpost-api +``` + +## Mongodb container running in docker + +```sh +docker run -p 27017:27017/tcp \ +--name outpost-api-mongo \ +-e MONGO_INITDB_DATABASE=outpost_api \ +--volume outpost-api-mongo-volume:/data/db \ +--volume $(pwd)/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro -i -d mongo:6 +``` + +-v $(pwd):/usr/src/app + ## Indices It needs the right indices on the MongoDB collection to enable full-text and geo search. Something like: ``` + db.indexed_services.createIndex({ name: "text", description: "text" }) db.indexed_services.createIndex({ "locations.coordinates": "2dsphere" }) + ``` You can create these two, plus an index of taxonomy slugs, automatically with the `npm run prepare-indices` command. + +``` + +``` From 87d0f0f1ef9ca5d93e9ca8c5e79d4ea826442b32 Mon Sep 17 00:00:00 2001 From: Han Date: Sun, 20 Aug 2023 17:29:12 +0100 Subject: [PATCH 10/23] move mongo init files to environment folder --- docker-compose.development.yml | 2 +- docker-compose.yml | 2 +- environment/containers/mongo/Dockerfile | 4 ---- .../containers/mongo/setup-mongodb-development.js | 0 .../containers/mongo/setup-mongodb-production.js | 0 5 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 environment/containers/mongo/Dockerfile rename setup-mongodb-development.js => environment/containers/mongo/setup-mongodb-development.js (100%) rename setup-mongodb-production.js => environment/containers/mongo/setup-mongodb-production.js (100%) diff --git a/docker-compose.development.yml b/docker-compose.development.yml index d981ad7..99e2a93 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -33,7 +33,7 @@ services: - 27017:27017 volumes: - outpost-api-dev-mongo-volume:/data/db - - ./setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + - ./environment/containers/mongo/setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro environment: MONGO_INITDB_DATABASE: outpost_api_development networks: diff --git a/docker-compose.yml b/docker-compose.yml index 2c43d02..ab9dc13 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: - 27017:27017 volumes: - outpost-api-mongo-volume:/data/db - - ./setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + - ./environment/containers/mongo/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro networks: - outpost_api_external_network diff --git a/environment/containers/mongo/Dockerfile b/environment/containers/mongo/Dockerfile deleted file mode 100644 index b9f72da..0000000 --- a/environment/containers/mongo/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM mongo:latest as base_image - -FROM base_image as development - diff --git a/setup-mongodb-development.js b/environment/containers/mongo/setup-mongodb-development.js similarity index 100% rename from setup-mongodb-development.js rename to environment/containers/mongo/setup-mongodb-development.js diff --git a/setup-mongodb-production.js b/environment/containers/mongo/setup-mongodb-production.js similarity index 100% rename from setup-mongodb-production.js rename to environment/containers/mongo/setup-mongodb-production.js From e2085df5ae1644183fb745bd53144f3d332e003c Mon Sep 17 00:00:00 2001 From: Han Date: Fri, 25 Aug 2023 20:29:14 +0100 Subject: [PATCH 11/23] Publish package --- .dockerignore | 54 ++++++++++++++++++++++++++++------ .github/workflows/ghcr.yml | 28 ++++++++++++++++++ docker-compose.development.yml | 48 ------------------------------ docker-compose.production.yml | 46 +++++++++++++++++++++++++++++ docker-compose.yml | 34 +++++++++++---------- readme.md | 10 +++---- 6 files changed, 142 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/ghcr.yml delete mode 100644 docker-compose.development.yml create mode 100644 docker-compose.production.yml diff --git a/.dockerignore b/.dockerignore index e24bcb7..9b6194b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,13 +1,49 @@ +Procfile +makefile + +# git .git +.gitattributes +.gitignore +.github + +# docker +docker-compose.yml +docker-compose.* +Dockerfile .dockerignore +environment/ + +# environment and secretsss .env -.vscode + +# Common +README.md +CHANGELOG.md + +# logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +/log/* +!/log/.keep + +# tmp +/tmp/* +!/tmp/.keep +*.swp +*~ +.DS_Store + +# Dependencies and dependency managers node_modules/ -bundle/ -tmp/ -environment/ -docker-compose* -Dockerfile -Procfile -makefile -.DS_Store \ No newline at end of file +# Ignore yarn files +/yarn-error.log +yarn-debug.log* +.yarn-integrity + +# ides +.idea +.vscode diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml new file mode 100644 index 0000000..0d745b3 --- /dev/null +++ b/.github/workflows/ghcr.yml @@ -0,0 +1,28 @@ +name: Deploy Images to GHCR + +# temporarily run on push for this branch +on: [push] +# on: +# push: +# branches: +# - main +# workflow_dispatch: + +jobs: + push-store-image: + runs-on: ubuntu-latest + steps: + - name: "Checkout GitHub Action" + uses: actions/checkout@main + + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: "Build Inventory Image" + run: | + docker build . --tag ghcr.io/wearefuturegov/outpost-api-service:latest + docker push ghcr.io/wearefuturegov/outpost-api-service:latest diff --git a/docker-compose.development.yml b/docker-compose.development.yml deleted file mode 100644 index 99e2a93..0000000 --- a/docker-compose.development.yml +++ /dev/null @@ -1,48 +0,0 @@ -version: "3.7" -services: - outpost-api-dev: - stdin_open: true - image: "outpost-api:development" - container_name: outpost-api-dev - restart: unless-stopped - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3001/health"] - interval: 1m30s - timeout: 10s - retries: 3 - start_period: 40s - depends_on: - - mongo - build: - target: development - ports: - - 3001:3001 - volumes: - - ./:/usr/src/app:cached - environment: - NODE_ENV: development - DB_URI: mongodb://mongo:27017/outpost_api_development - networks: - - outpost_api_dev_external_network - - outpost_api_dev_internal_network - mongo: - image: mongo:6 - container_name: outpost-api-mongo - restart: unless-stopped - ports: - - 27017:27017 - volumes: - - outpost-api-dev-mongo-volume:/data/db - - ./environment/containers/mongo/setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro - environment: - MONGO_INITDB_DATABASE: outpost_api_development - networks: - - outpost_api_dev_external_network - -volumes: - outpost-api-dev-mongo-volume: - -networks: - outpost_api_dev_external_network: - outpost_api_dev_internal_network: - internal: true diff --git a/docker-compose.production.yml b/docker-compose.production.yml new file mode 100644 index 0000000..ab9dc13 --- /dev/null +++ b/docker-compose.production.yml @@ -0,0 +1,46 @@ +version: "3.7" +services: + outpost-api: + image: "outpost-api:production" + container_name: outpost-api + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/health"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 40s + depends_on: + - mongo + build: + target: production + ports: + - 3001:3001 + volumes: + - ./:/usr/src/app + environment: + NODE_ENV: production + DB_URI: mongodb://mongo:27017/outpost_api + networks: + - outpost_api_internal_network + - outpost_api_external_network + + mongo: + image: mongo:6 + container_name: outpost-api-mongo + restart: unless-stopped + ports: + - 27017:27017 + volumes: + - outpost-api-mongo-volume:/data/db + - ./environment/containers/mongo/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + networks: + - outpost_api_external_network + +volumes: + outpost-api-mongo-volume: + +networks: + outpost_api_external_network: + outpost_api_internal_network: + internal: true diff --git a/docker-compose.yml b/docker-compose.yml index ab9dc13..99e2a93 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,9 @@ version: "3.7" services: - outpost-api: - image: "outpost-api:production" - container_name: outpost-api + outpost-api-dev: + stdin_open: true + image: "outpost-api:development" + container_name: outpost-api-dev restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3001/health"] @@ -13,18 +14,17 @@ services: depends_on: - mongo build: - target: production + target: development ports: - 3001:3001 volumes: - - ./:/usr/src/app + - ./:/usr/src/app:cached environment: - NODE_ENV: production - DB_URI: mongodb://mongo:27017/outpost_api + NODE_ENV: development + DB_URI: mongodb://mongo:27017/outpost_api_development networks: - - outpost_api_internal_network - - outpost_api_external_network - + - outpost_api_dev_external_network + - outpost_api_dev_internal_network mongo: image: mongo:6 container_name: outpost-api-mongo @@ -32,15 +32,17 @@ services: ports: - 27017:27017 volumes: - - outpost-api-mongo-volume:/data/db - - ./environment/containers/mongo/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + - outpost-api-dev-mongo-volume:/data/db + - ./environment/containers/mongo/setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + environment: + MONGO_INITDB_DATABASE: outpost_api_development networks: - - outpost_api_external_network + - outpost_api_dev_external_network volumes: - outpost-api-mongo-volume: + outpost-api-dev-mongo-volume: networks: - outpost_api_external_network: - outpost_api_internal_network: + outpost_api_dev_external_network: + outpost_api_dev_internal_network: internal: true diff --git a/readme.md b/readme.md index 7b5f2f4..1d050e0 100644 --- a/readme.md +++ b/readme.md @@ -59,19 +59,19 @@ To get up and running quickly with some data use docker compose. git clone git@github.com:wearefuturegov/outpost-api-service.git && cd outpost-api-service # build the image -docker compose -f docker-compose.development.yml build +docker compose build # run the container -docker compose -f docker-compose.development.yml up -d +docker compose up -d # open shell in container -docker compose -f docker-compose.development.yml exec outpost-api-dev /bin/ash; +docker compose exec outpost-api-dev /bin/ash; # run the tests -docker compose -f docker-compose.development.yml exec outpost-api-dev npm run test +docker compose exec outpost-api-dev npm run test # stop the container -docker compose -f docker-compose.development.yml stop +docker compose stop ``` If you want to use it in conjunction with a local mongodb database, for example you are using [Outpost](https://github.com/wearefuturegov/outpost/) you could also run it using just docker. From 03c3c98622b57b189fe7f23bb9632a9898220926 Mon Sep 17 00:00:00 2001 From: Han Date: Wed, 25 Oct 2023 14:17:41 +0100 Subject: [PATCH 12/23] Add new script to create the collection without using docker init commands --- lib/prepare-collection.js | 24 ++++++++++++++++++++++++ package.json | 1 + 2 files changed, 25 insertions(+) create mode 100644 lib/prepare-collection.js diff --git a/lib/prepare-collection.js b/lib/prepare-collection.js new file mode 100644 index 0000000..5f55931 --- /dev/null +++ b/lib/prepare-collection.js @@ -0,0 +1,24 @@ +require("dotenv").config() +const { connect } = require("../db") + +connect(async db => { + const collections = await db + .listCollections({ name: "indexed_services" }, { nameOnly: true }) + .toArray() + + const indexedServicesDb = collections.some(a => a.name === "indexed_services") + + if (!indexedServicesDb) { + try { + await db.createCollection("indexed_services") + console.log("✅ 'indexed_services' Collection created successfully") + process.exit() + } catch (e) { + console.log(e) + throw e + } + } else { + console.log("✅ 'indexed_services' Collection already exists") + process.exit() + } +}) diff --git a/package.json b/package.json index 1ca8254..64feb1e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "node index.js", "dev": "NODE_ENV=development nodemon index.js", "test": "jest", + "prepare-collection": "node lib/prepare-collection", "prepare-indices": "node lib/prepare-indices" }, "test": "exit 0", From 3bb2e576869a0f2cdc51aafe4679d3c6b1588b78 Mon Sep 17 00:00:00 2001 From: Han Date: Tue, 2 Jan 2024 16:39:04 +0000 Subject: [PATCH 13/23] add in FORCE_SSL env var --- docker-compose.production.yml | 1 + index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index ab9dc13..77911b4 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -21,6 +21,7 @@ services: environment: NODE_ENV: production DB_URI: mongodb://mongo:27017/outpost_api + FORCE_SSL: true networks: - outpost_api_internal_network - outpost_api_external_network diff --git a/index.js b/index.js index bcb2035..6e2dc00 100644 --- a/index.js +++ b/index.js @@ -21,9 +21,13 @@ connect(() => server.set("trust proxy", 1) +// outside of dev environment if we send FORCE_SSL then SSL is forced if (!isDevelopment) { - server.use(forceSSL) + if (process.env.FORCE_SSL && process.env.FORCE_SSL.toLowerCase() === "true") { + server.use(forceSSL) + } } + server.use( rateLimit({ windowMs: 15 * 60 * 1000, From e8a4d876b3aa16ae5b381a9aba3cd384c438a06a Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 18 Apr 2024 16:59:56 +0100 Subject: [PATCH 14/23] Standardising things a little bit accross the platform --- .docker/services/mongo/mongo.yml | 19 +++ .docker/services/mongo/setup-mongodb.js | 35 ++++ .dockerignore | 46 ++--- .env.sample | 13 -- .github/workflows/ci.yml | 2 +- .github/workflows/ghcr.yml | 28 ---- .github/workflows/outpost-api-image.yml | 47 ++++++ Dockerfile | 48 +++--- Dockerfile.production | 36 ++++ db.js | 2 +- docker-compose.production.yml | 47 ------ docker-compose.yml | 65 ++++---- .../logo-icon-outpost-api-main.png | Bin .../screenshot-outpost-api-output.png | Bin .../mongo/setup-mongodb-development.js | 95 ----------- .../mongo/setup-mongodb-production.js | 22 --- index.js | 2 +- lib/dummy-data.js | 96 +++++++++++ lib/prepare-collection.js | 1 + package.json | 3 +- readme.md | 157 +++++++++++------- sample.env | 6 + 22 files changed, 410 insertions(+), 360 deletions(-) create mode 100644 .docker/services/mongo/mongo.yml create mode 100644 .docker/services/mongo/setup-mongodb.js delete mode 100644 .env.sample delete mode 100644 .github/workflows/ghcr.yml create mode 100644 .github/workflows/outpost-api-image.yml create mode 100644 Dockerfile.production delete mode 100644 docker-compose.production.yml rename logo-icon-outpost-api-main.png => docs/logo-icon-outpost-api-main.png (100%) rename screenshot-outpost-api-output.png => docs/screenshot-outpost-api-output.png (100%) delete mode 100644 environment/containers/mongo/setup-mongodb-development.js delete mode 100644 environment/containers/mongo/setup-mongodb-production.js create mode 100644 lib/dummy-data.js create mode 100644 sample.env diff --git a/.docker/services/mongo/mongo.yml b/.docker/services/mongo/mongo.yml new file mode 100644 index 0000000..a746f1c --- /dev/null +++ b/.docker/services/mongo/mongo.yml @@ -0,0 +1,19 @@ +version: "3.7" +services: + mongo: + image: mongo:6 + container_name: mongo + ports: + - 27018:27017 + volumes: + - mongo-volume:/data/db + - ./setup-mongodb.js:/docker-entrypoint-initdb.d/mongo-init.js:ro + environment: + MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-outpost} + MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-password} + MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE:-outpost_api_development} + networks: + - internal_network + +volumes: + mongo-volume: diff --git a/.docker/services/mongo/setup-mongodb.js b/.docker/services/mongo/setup-mongodb.js new file mode 100644 index 0000000..2e58827 --- /dev/null +++ b/.docker/services/mongo/setup-mongodb.js @@ -0,0 +1,35 @@ +db = db.getSiblingDB( + process.env.MONGO_INITDB_DATABASE || "outpost_api_development" +); + +db.createUser({ + user: process.env.MONGO_INITDB_ROOT_USERNAME || "outpost", + pwd: process.env.MONGO_INITDB_ROOT_PASSWORD || "password", + roles: [ + { + role: "readWrite", + db: process.env.MONGO_INITDB_DATABASE || "outpost_api_development", + }, + ], +}); + +db.createCollection("indexed_services"); + +db.indexed_services.createIndex( + { + name: "text", + description: "text", + }, + { + weights: { + name: 5, + description: 1, + }, + } +); +db.indexed_services.createIndex({ + "locations.geometry": "2dsphere", +}); +db.indexed_services.createIndex({ + "taxonomies.slug": 1, +}); diff --git a/.dockerignore b/.dockerignore index 9b6194b..7999bc7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,49 +1,33 @@ -Procfile -makefile - # git .git .gitattributes .gitignore .github -# docker -docker-compose.yml -docker-compose.* -Dockerfile -.dockerignore -environment/ - -# environment and secretsss +# env .env +.env.* + +# node +node_modules -# Common -README.md -CHANGELOG.md +# misc +.DS_Store +*.swp +*~ # logs -logs +log/* *.log npm-debug.log* yarn-debug.log* yarn-error.log* -/log/* -!/log/.keep - -# tmp -/tmp/* -!/tmp/.keep -*.swp -*~ -.DS_Store - -# Dependencies and dependency managers -node_modules/ -# Ignore yarn files -/yarn-error.log -yarn-debug.log* .yarn-integrity -# ides +# Added in case image is built locally without fresh checkout .idea .vscode +.ruby-lsp + +# heroku +Procfile diff --git a/.env.sample b/.env.sample deleted file mode 100644 index d22833f..0000000 --- a/.env.sample +++ /dev/null @@ -1,13 +0,0 @@ -# ----- MONGO CONFIG - -# -- using docker development env -DB_URI=mongodb://mongo/outpost_api_development - -# -- running mongo locally -#DB_URI=mongodb://localhost:27017/outpost_api_development - -# -- running with docker and connecting to db on host -#DB_URI=mongodb://host.docker.internal:27017/outpost_development - -# ----- GEOCODING -GOOGLE_API_KEY= diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1680e44..2617ad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Run tests on: push jobs: test: diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml deleted file mode 100644 index 0d745b3..0000000 --- a/.github/workflows/ghcr.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy Images to GHCR - -# temporarily run on push for this branch -on: [push] -# on: -# push: -# branches: -# - main -# workflow_dispatch: - -jobs: - push-store-image: - runs-on: ubuntu-latest - steps: - - name: "Checkout GitHub Action" - uses: actions/checkout@main - - - name: "Login to GitHub Container Registry" - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - - name: "Build Inventory Image" - run: | - docker build . --tag ghcr.io/wearefuturegov/outpost-api-service:latest - docker push ghcr.io/wearefuturegov/outpost-api-service:latest diff --git a/.github/workflows/outpost-api-image.yml b/.github/workflows/outpost-api-image.yml new file mode 100644 index 0000000..588b7ea --- /dev/null +++ b/.github/workflows/outpost-api-image.yml @@ -0,0 +1,47 @@ +# This action pre-builds the dev-base image and pushes it to the GitHub Container Registry (GHCR) + +name: Deploy outpost api image to github container registry + +on: + push: + # branches: [develop, staging, production] + branches: [feature/docker-package] + +jobs: + push-outpost-api-image: + runs-on: ubuntu-latest + steps: + - name: "Checkout GitHub Action" + uses: actions/checkout@main + + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: Set Docker Image Tag + id: vars + run: | + BRANCH_NAME=${GITHUB_REF#refs/heads/} + if [[ "$BRANCH_NAME" == "develop" ]]; then + echo "::set-output name=tag::development" + elif [[ "$BRANCH_NAME" == "staging" ]]; then + echo "::set-output name=tag::staging" + elif [[ "$BRANCH_NAME" == "production" ]]; then + echo "::set-output name=tag::latest" + elif [[ "$BRANCH_NAME" == "feature/docker-package" ]]; then + echo "::set-output name=tag::docker-package" + fi + + - name: Build and push outpost api docker image + uses: docker/build-push-action@v5 + with: + context: . + tags: ghcr.io/wearefuturegov/outpost-api-service:${{ steps.vars.outputs.tag }} + file: Dockerfile.production + platforms: ${{ matrix.platforms }} + push: true + outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Outpost API Service image + labels: org.opencontainers.image.source=https://github.com/wearefuturegov/outpost-api-service diff --git a/Dockerfile b/Dockerfile index 184e7c1..aaa90f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,32 @@ -# using docker image layers to save waiting for things to rebuild all the time +ARG NODE_ENV=development -# base_image > build_frontend > (development | production) +# ---------------------------------------------------------------- +FROM node:16-alpine3.17 as build_frontend +ARG NODE_ENV +ENV NODE_ENV $NODE_ENV -FROM node:16-alpine3.17 as base_image -WORKDIR /usr/build/app -COPY ./package.json /usr/build/app/package.json -COPY ./package-lock.json /usr/build/app/package-lock.json -EXPOSE 3001 +COPY ./package.json ./tmp/package.json +COPY ./package-lock.json ./tmp/package-lock.json -FROM base_image as development_base -RUN npm ci +WORKDIR /tmp -FROM base_image as production_base -RUN npm ci --omit=dev +RUN if [ "${NODE_ENV}" = "development" ] || [ -z "${NODE_ENV}" ]; then \ + npm install; fi +RUN if [ "${NODE_ENV}" = "production" ]; then \ + npm ci && npm cache clean --force; fi +WORKDIR /app -# build and install all the things for the development env -FROM development_base as development -ENV NODE_ENV development -WORKDIR /usr/src/app -COPY --chown=node:node --from=development_base /usr/build/app/node_modules ./node_modules -USER node -CMD ["npm", "run", "dev" ] +# ---------------------------------------------------------------- +FROM build_frontend +ARG NODE_ENV +ENV NODE_ENV $NODE_ENV +COPY --from=build_frontend /tmp/package.json ./package.json +COPY --from=build_frontend /tmp/package-lock.json ./package-lock.json +COPY --from=build_frontend /tmp/node_modules ./node_modules -FROM production_base as production -ENV NODE_ENV production -WORKDIR /usr/src/app -COPY --chown=node:node --from=production_base /usr/build/app/node_modules ./node_modules -COPY --chown=node:node . /usr/src/app -USER node -CMD ["npm", "run", "start" ] +EXPOSE 3000 +ENTRYPOINT ["npm", "run"] +CMD ["dev"] diff --git a/Dockerfile.production b/Dockerfile.production new file mode 100644 index 0000000..0ac86c4 --- /dev/null +++ b/Dockerfile.production @@ -0,0 +1,36 @@ +ARG NODE_ENV=production +ARG FORCE_SSL=true + +# ---------------------------------------------------------------- +FROM node:16-alpine3.17 as build_frontend +ARG NODE_ENV +ARG FORCE_SSL +ENV NODE_ENV $NODE_ENV +RUN adduser -D outpost-user + +COPY ./package.json ./tmp/package.json +COPY ./package-lock.json ./tmp/package-lock.json + +WORKDIR /tmp + +RUN if [ "${NODE_ENV}" = "development" ] || [ -z "${NODE_ENV}" ]; then \ + npm install; fi +RUN if [ "${NODE_ENV}" = "production" ]; then \ + npm ci --omit=dev && npm cache clean --force; fi + +WORKDIR /app + +# ---------------------------------------------------------------- +FROM build_frontend +ARG NODE_ENV +ARG FORCE_SSL +ENV NODE_ENV $NODE_ENV +ENV FORCE_SSL $FORCE_SSL + +COPY --from=build_frontend --chown=outpost-user:outpost-user /tmp/node_modules /app/node_modules +COPY . /app + +USER outpost-user +EXPOSE 3000 +ENTRYPOINT ["npm", "run"] +CMD ["start"] diff --git a/db.js b/db.js index b09b374..025ce38 100644 --- a/db.js +++ b/db.js @@ -1,5 +1,5 @@ const { MongoClient } = require("mongodb") -const uri = process.env.DB_URI +const uri = process.env.DATABASE_URL let db diff --git a/docker-compose.production.yml b/docker-compose.production.yml deleted file mode 100644 index 77911b4..0000000 --- a/docker-compose.production.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: "3.7" -services: - outpost-api: - image: "outpost-api:production" - container_name: outpost-api - restart: unless-stopped - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3001/health"] - interval: 1m30s - timeout: 10s - retries: 3 - start_period: 40s - depends_on: - - mongo - build: - target: production - ports: - - 3001:3001 - volumes: - - ./:/usr/src/app - environment: - NODE_ENV: production - DB_URI: mongodb://mongo:27017/outpost_api - FORCE_SSL: true - networks: - - outpost_api_internal_network - - outpost_api_external_network - - mongo: - image: mongo:6 - container_name: outpost-api-mongo - restart: unless-stopped - ports: - - 27017:27017 - volumes: - - outpost-api-mongo-volume:/data/db - - ./environment/containers/mongo/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro - networks: - - outpost_api_external_network - -volumes: - outpost-api-mongo-volume: - -networks: - outpost_api_external_network: - outpost_api_internal_network: - internal: true diff --git a/docker-compose.yml b/docker-compose.yml index 99e2a93..3566358 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,28 @@ version: "3.7" services: - outpost-api-dev: - stdin_open: true - image: "outpost-api:development" - container_name: outpost-api-dev - restart: unless-stopped + # Outpost api + + app: + image: "outpost_api:development" + build: + context: . + # uncomment for 'prod' like env locally + # NODE_ENV: production + container_name: outpost-api-service + # use if you just want to keep the container running + # entrypoint: ["tail"] + # command: ["-f", "/dev/null"] + environment: + DATABASE_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME:-outpost}:${MONGO_INITDB_ROOT_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development}?retryWrites=true&w=majority + platform: linux/amd64 + volumes: + - ./:/app:cached + - /app/node_modules + ports: + - 3001:3000 + networks: + - internal_network + - external_network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3001/health"] interval: 1m30s @@ -13,36 +31,21 @@ services: start_period: 40s depends_on: - mongo - build: - target: development - ports: - - 3001:3001 - volumes: - - ./:/usr/src/app:cached - environment: - NODE_ENV: development - DB_URI: mongodb://mongo:27017/outpost_api_development - networks: - - outpost_api_dev_external_network - - outpost_api_dev_internal_network + + # Databases + mongo: - image: mongo:6 - container_name: outpost-api-mongo - restart: unless-stopped - ports: - - 27017:27017 - volumes: - - outpost-api-dev-mongo-volume:/data/db - - ./environment/containers/mongo/setup-mongodb-development.js:/docker-entrypoint-initdb.d/mongo-init.js:ro - environment: - MONGO_INITDB_DATABASE: outpost_api_development + extends: + file: ./.docker/services/mongo/mongo.yml + service: mongo networks: - - outpost_api_dev_external_network + - external_network + - internal_network volumes: - outpost-api-dev-mongo-volume: + mongo-volume: networks: - outpost_api_dev_external_network: - outpost_api_dev_internal_network: + external_network: + internal_network: internal: true diff --git a/logo-icon-outpost-api-main.png b/docs/logo-icon-outpost-api-main.png similarity index 100% rename from logo-icon-outpost-api-main.png rename to docs/logo-icon-outpost-api-main.png diff --git a/screenshot-outpost-api-output.png b/docs/screenshot-outpost-api-output.png similarity index 100% rename from screenshot-outpost-api-output.png rename to docs/screenshot-outpost-api-output.png diff --git a/environment/containers/mongo/setup-mongodb-development.js b/environment/containers/mongo/setup-mongodb-development.js deleted file mode 100644 index 12556d4..0000000 --- a/environment/containers/mongo/setup-mongodb-development.js +++ /dev/null @@ -1,95 +0,0 @@ -db = db.getSiblingDB("outpost_api_development") - -db.createCollection("indexed_services") - -db.indexed_services.createIndex( - { - name: "text", - description: "text", - }, - { - weights: { - name: 5, - description: 1, - }, - } -) -db.indexed_services.createIndex({ - "locations.geometry": "2dsphere", -}) -db.indexed_services.createIndex({ - "taxonomies.slug": 1, -}) - -db.indexed_services.insertMany([ - { - id: 1, - updated_at: { - $date: "2022-07-01T20:14:55.847Z", - }, - name: "Ligula Mattis Dolor", - description: - "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.", - url: "http://outpost-platform.wearefuturegov.com/", - min_age: 0, - max_age: 100, - age_band_under_2: null, - age_band_2: null, - age_band_3_4: null, - age_band_5_7: null, - age_band_8_plus: null, - age_band_all: null, - needs_referral: true, - free: null, - created_at: { - $date: "2022-07-01T20:14:54.546Z", - }, - status: "published", - target_directories: [], - locations: [ - { - id: 1, - name: "Location 1", - address_1: null, - city: "London", - state_province: "", - postal_code: "EC1", - country: "GB", - geometry: { - type: "Point", - coordinates: [-0.2664017, 51.5285262], - }, - mask_exact_address: true, - accessibilities: [], - }, - ], - contacts: [], - meta: [], - organisation: { - id: 1, - name: "Organisation 1", - description: null, - email: null, - url: null, - }, - taxonomies: [ - { - id: 1, - name: "Taxonomy 1", - slug: "taxonomy-1", - parent_id: null, - }, - ], - regular_schedules: [], - cost_options: [], - links: [ - { - label: "Facebook", - url: "https://www.facebook.com", - }, - ], - send_needs: [], - suitabilities: [], - local_offer: null, - }, -]) diff --git a/environment/containers/mongo/setup-mongodb-production.js b/environment/containers/mongo/setup-mongodb-production.js deleted file mode 100644 index 5251fb7..0000000 --- a/environment/containers/mongo/setup-mongodb-production.js +++ /dev/null @@ -1,22 +0,0 @@ -db = db.getSiblingDB("outpost_api") - -db.createCollection("indexed_services") - -db.indexed_services.createIndex( - { - name: "text", - description: "text", - }, - { - weights: { - name: 5, - description: 1, - }, - } -) -db.indexed_services.createIndex({ - "locations.geometry": "2dsphere", -}) -db.indexed_services.createIndex({ - "taxonomies.slug": 1, -}) diff --git a/index.js b/index.js index 6e2dc00..428f6aa 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const { connect } = require("./db") const routes = require("./routes") const server = express() -const port = process.env.NODE_PORT || 3001 +const port = process.env.NODE_PORT || 3000 const environment = process.env.NODE_ENV const isDevelopment = environment === "development" diff --git a/lib/dummy-data.js b/lib/dummy-data.js new file mode 100644 index 0000000..145099c --- /dev/null +++ b/lib/dummy-data.js @@ -0,0 +1,96 @@ +require("dotenv").config() +const { connect } = require("../db") + +connect(async db => { + // @TODO make sure when we do this we do it on the right db! + const collections = await db + .listCollections({ name: "indexed_services" }, { nameOnly: true }) + .toArray() + + const indexedServicesDb = collections.some(a => a.name === "indexed_services") + + if (indexedServicesDb) { + try { + await db.collection("indexed_services").insertMany([ + { + id: 1, + updated_at: { + $date: "2022-07-01T20:14:55.847Z", + }, + name: "Ligula Mattis Dolor", + description: + "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.", + url: "http://outpost-platform.wearefuturegov.com/", + min_age: 0, + max_age: 100, + age_band_under_2: null, + age_band_2: null, + age_band_3_4: null, + age_band_5_7: null, + age_band_8_plus: null, + age_band_all: null, + needs_referral: true, + free: null, + created_at: { + $date: "2022-07-01T20:14:54.546Z", + }, + status: "published", + target_directories: [], + locations: [ + { + id: 1, + name: "Location 1", + address_1: null, + city: "London", + state_province: "", + postal_code: "EC1", + country: "GB", + geometry: { + type: "Point", + coordinates: [-0.2664017, 51.5285262], + }, + mask_exact_address: true, + accessibilities: [], + }, + ], + contacts: [], + meta: [], + organisation: { + id: 1, + name: "Organisation 1", + description: null, + email: null, + url: null, + }, + taxonomies: [ + { + id: 1, + name: "Taxonomy 1", + slug: "taxonomy-1", + parent_id: null, + }, + ], + regular_schedules: [], + cost_options: [], + links: [ + { + label: "Facebook", + url: "https://www.facebook.com", + }, + ], + send_needs: [], + suitabilities: [], + local_offer: null, + }, + ]) + console.log("✅ Added dummy data to 'indexed_services' collection") + process.exit() + } catch (e) { + console.log(e) + throw e + } + } else { + console.log("🚫 'indexed_services' collection doesn't exist yet") + process.exit() + } +}) diff --git a/lib/prepare-collection.js b/lib/prepare-collection.js index 5f55931..4ae9d34 100644 --- a/lib/prepare-collection.js +++ b/lib/prepare-collection.js @@ -2,6 +2,7 @@ require("dotenv").config() const { connect } = require("../db") connect(async db => { + // @TODO make sure when we do this we do it on the right db! const collections = await db .listCollections({ name: "indexed_services" }, { nameOnly: true }) .toArray() diff --git a/package.json b/package.json index 64feb1e..49175da 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "dev": "NODE_ENV=development nodemon index.js", "test": "jest", "prepare-collection": "node lib/prepare-collection", - "prepare-indices": "node lib/prepare-indices" + "prepare-indices": "node lib/prepare-indices", + "dummy-data": "node lib/dummy-data" }, "test": "exit 0", "keywords": [], diff --git a/readme.md b/readme.md index 1d050e0..7116a6c 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@

- +

@@ -11,7 +11,7 @@ ---

- +

@@ -30,13 +30,15 @@ It's not useful by itself — it depends on a public index built by [Outpost](ht It's a simple Node.js app which queries information from a MongoDB collection and publishes it as a read-only, rate-limited REST API. +To run it on your machine you need Node.js, npm, nvm (https://github.com/nvm-sh/nvm) and a working MongoDB database [with the right indices](#indices) available on `localhost:27017`. + ## 🧬 Configure Outpost API It expects a few environment variables. -`DB_URI` +`DATABASE_URL` -- MongoDB connection URI nb if you're running in a docker container and want to connect to your local db use `host.docker.internal` instead of `localhost` +- MongoDB connection URI `GOOGLE_API_KEY` @@ -51,114 +53,141 @@ Other environmental variables: --- -## 💻 Getting started - -To get up and running quickly with some data use docker compose. +## 💻 Running it locally ```sh +# get the code git clone git@github.com:wearefuturegov/outpost-api-service.git && cd outpost-api-service -# build the image -docker compose build +# make sure your using the correct node version +nvm use + +# setup env and database variables +# see setting up database below +cp sample.env .env + +# Setup your database locally (see below) or start up a database using docker +# NB this runs mongo on a non-standard port `27018` in case you have mongo already running, you can change it to `27017` if you would like to +# connect with compass or mongosh with: mongodb://outpost:password@localhost:27018 +docker compose up -d mongo -# run the container -docker compose up -d +# once its setup you can just use this to restart it +docker start outpost-api-db -# open shell in container -docker compose exec outpost-api-dev /bin/ash; +# install dependencies +npm install -# run the tests -docker compose exec outpost-api-dev npm run test +# run development mode +npm run dev -# stop the container + +# add some dummy data (if required) +npm run dummy-data + +# stop your database docker compose stop + +# delete your database image +docker compose down + ``` -If you want to use it in conjunction with a local mongodb database, for example you are using [Outpost](https://github.com/wearefuturegov/outpost/) you could also run it using just docker. +### Setting up database locally ```sh -git clone git@github.com:wearefuturegov/outpost-api-service.git && cd outpost-api-service +# create the database on your localhost and run +mongosh .docker/services/mongo/setup-mongodb.js -# build the image - if using for the first time -docker build --tag outpost-api-dev --target development . +# you can also run the following to use add the indices on to an existing database +npm run prepare-indices +``` -# run the image in local environment -docker run -p 3001:3001 --name outpost-api-dev -v $(pwd):/usr/src/app:cached -i -d outpost-api-dev +or you can use the following commands to create your indices -# setup indices -docker exec -it outpost-api-dev npm run prepare-indices +# 🧬 Configuration -# access the site -open http://localhost:3001/api/v1/services +## Environmental Variables -# open shell in container -docker exec -it outpost-api-dev /bin/ash; +You can provide config with a `.env` file. Run `cp sample.env .env` to create a fresh one. -# run tests -docker exec -it outpost-api-dev npm run test +The following environmental variables are required. -# stop the container -docker stop outpost-api-dev +| Variable | Description | Example | Required? | +| ---------------- | ------------------ | -------------------------------------------------------------------- | --------- | +| `DATABASE_URL` | Mongo database url | `mongodb://outpost:password@localhost:27018/outpost_api_development` | Yes | +| `GOOGLE_API_KEY` | Google API Key | `1234` | Yes | -# start again -docker start outpost-api-dev -``` +# ✨ Features + +## Geocoding + +It is recommended to have an API for each environment, `outpost_api_service_geocode_dev`, `outpost_api_service_geocode_staging` and `outpost_api_service_geocode_prod`. + +You will need to enable the `Geocode API`, no restrictions are needed. -## Deploying it +## 🌎 Running it on the web + +### Deploying using heroku (recommended) [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) It's suitable for 12-factor hosting like Heroku. It has a [Procfile](https://devcenter.heroku.com/articles/procfile) that will make sure the proper MongoDB indices are set up. -``` -npm start -``` +### Deploying using docker -You can also deploy via docker compose +We also provide a Docker image if you would like to host the application in a container -```sh -# build the image -docker compose build +We provide scripts to initialise the database once its been created. -# run the container -docker compose up -d +```sh +docker run -it --rm \ +--env-file .env \ +-e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +outpost-api-service:production prepare-collection + +docker run -it --rm \ +--env-file .env \ +-e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +outpost-api-service:production prepare-indices + +docker run -it --rm \ +--env-file .env \ +-e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +outpost-api-service:production dummy-data ``` -and docker - ```sh -# build the image -docker build --tag outpost-api --target production . +docker build --pull --rm --no-cache --progress plain -f Dockerfile.production -t outpost-api-service:production . -# run the container -docker run -p 3001:3001/tcp --name outpost-api -i -d outpost-api -``` +docker run \ +-e FORCE_SSL=false \ +-e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ +--env-file .env \ +-p 3002:3000 \ +--name outpost-api-production \ +-d outpost-api-service:production -## Mongodb container running in docker +docker stop outpost-api-production && docker rm outpost-api-production -```sh -docker run -p 27017:27017/tcp \ ---name outpost-api-mongo \ --e MONGO_INITDB_DATABASE=outpost_api \ ---volume outpost-api-mongo-volume:/data/db \ ---volume $(pwd)/setup-mongodb-production.js:/docker-entrypoint-initdb.d/mongo-init.js:ro -i -d mongo:6 +docker image rm outpost-api-service:production ``` --v $(pwd):/usr/src/app - ## Indices It needs the right indices on the MongoDB collection to enable full-text and geo search. Something like: ``` - db.indexed_services.createIndex({ name: "text", description: "text" }) db.indexed_services.createIndex({ "locations.coordinates": "2dsphere" }) - ``` You can create these two, plus an index of taxonomy slugs, automatically with the `npm run prepare-indices` command. -``` +# 🧪 Tests + +```sh +npm run test +# or +docker compose exec app npm run test ``` diff --git a/sample.env b/sample.env new file mode 100644 index 0000000..072a5ef --- /dev/null +++ b/sample.env @@ -0,0 +1,6 @@ +# ----- MONGO CONFIG + +DATABASE_URL=mongodb://localhost:27018/outpost_api_development + +# ----- GEOCODING +GOOGLE_API_KEY= From 033fa0db7f2a86eb3a4a95a4134aab8e63dfeb47 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 18 Apr 2024 17:01:43 +0100 Subject: [PATCH 15/23] Update docker build to be dev, staging and production --- .github/workflows/outpost-api-image.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/outpost-api-image.yml b/.github/workflows/outpost-api-image.yml index 588b7ea..1fcebb9 100644 --- a/.github/workflows/outpost-api-image.yml +++ b/.github/workflows/outpost-api-image.yml @@ -4,8 +4,7 @@ name: Deploy outpost api image to github container registry on: push: - # branches: [develop, staging, production] - branches: [feature/docker-package] + branches: [develop, staging, production] jobs: push-outpost-api-image: @@ -31,8 +30,6 @@ jobs: echo "::set-output name=tag::staging" elif [[ "$BRANCH_NAME" == "production" ]]; then echo "::set-output name=tag::latest" - elif [[ "$BRANCH_NAME" == "feature/docker-package" ]]; then - echo "::set-output name=tag::docker-package" fi - name: Build and push outpost api docker image From eedf70d754b927495209838b01d6597377b03a6f Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 18 Apr 2024 17:26:08 +0100 Subject: [PATCH 16/23] Initial node update and test coverage --- .dockerignore | 1 + .github/workflows/ci.yml | 17 - .github/workflows/test.yml | 23 + .gitignore | 3 +- .nvmrc | 2 +- Dockerfile | 2 +- Dockerfile.production | 2 +- TODO.md | 2 +- db.js | 2 +- package-lock.json | 4073 ++++++++++++++++++++---------------- package.json | 18 +- 11 files changed, 2326 insertions(+), 1819 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/test.yml diff --git a/.dockerignore b/.dockerignore index 7999bc7..b2c116a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -28,6 +28,7 @@ yarn-error.log* .idea .vscode .ruby-lsp +coverage # heroku Procfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 2617ad6..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Run tests -on: push -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm run test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a5181b3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Run tests +on: push +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v4 + with: + node-version: lts/Iron + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm run test + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: wearefuturegov/outpost-api-service diff --git a/.gitignore b/.gitignore index 338851b..94474eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules .env /environment/artifacts -.DS_Store \ No newline at end of file +.DS_Store +coverage diff --git a/.nvmrc b/.nvmrc index 50e4b92..c6489e5 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.18.0 +lts/Iron \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index aaa90f3..e41bbf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG NODE_ENV=development # ---------------------------------------------------------------- -FROM node:16-alpine3.17 as build_frontend +FROM node:iron-alpine as build_frontend ARG NODE_ENV ENV NODE_ENV $NODE_ENV diff --git a/Dockerfile.production b/Dockerfile.production index 0ac86c4..873144d 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -2,7 +2,7 @@ ARG NODE_ENV=production ARG FORCE_SSL=true # ---------------------------------------------------------------- -FROM node:16-alpine3.17 as build_frontend +FROM node:iron-alpine as build_frontend ARG NODE_ENV ARG FORCE_SSL ENV NODE_ENV $NODE_ENV diff --git a/TODO.md b/TODO.md index 9e4a37b..1aa3af4 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,5 @@ # TODO -- [ ] Automate tests with docker and github actions +- [x] Automate tests with docker and github actions - [ ] Automatic linter on commit and PR's - [x] An option to push some dummy data to the API diff --git a/db.js b/db.js index 025ce38..6883b3e 100644 --- a/db.js +++ b/db.js @@ -5,7 +5,7 @@ let db module.exports = { connect: cb => { - MongoClient.connect(uri, { useUnifiedTopology: true }) + MongoClient.connect(uri) .then(client => { db = client.db() cb(db) diff --git a/package-lock.json b/package-lock.json index d92c5fb..dff9dfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,84 +1,85 @@ { - "name": "api_service", + "name": "@outpost_platform/api_service", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "api_service", + "name": "@outpost_platform/api_service", "version": "1.0.0", "license": "ISC", "dependencies": { "cors": "^2.8.5", - "dotenv": "^16.0.3", - "express": "^4.18.2", + "dotenv": "^16.4.5", + "express": "^4.19.2", "express-force-ssl": "^0.3.2", - "express-rate-limit": "^6.6.0", + "express-rate-limit": "^7.2.0", "haversine": "^1.1.1", - "heroku-ssl-redirect": "0.0.4", - "isomorphic-unfetch": "^3.1.0", - "mongodb": "^4.10.0" + "heroku-ssl-redirect": "0.1.1", + "isomorphic-unfetch": "^4.0.2", + "mongodb": "^6.5.0" }, "devDependencies": { - "jest": "^29.2.1", - "nodemon": "^2.0.20" + "jest": "^29.7.0", + "nodemon": "^3.1.0" } }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz", - "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -112,199 +113,185 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.19.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz", - "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { - "@babel/types": "^7.19.4", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", - "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.19.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz", - "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.4", - "@babel/types": "^7.19.4" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -382,9 +369,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz", - "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -454,12 +441,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -556,12 +543,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -571,34 +558,34 @@ } }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz", - "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.4", - "@babel/types": "^7.19.4", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -629,13 +616,13 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz", - "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -674,16 +661,16 @@ } }, "node_modules/@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -691,37 +678,37 @@ } }, "node_modules/@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -738,89 +725,89 @@ } }, "node_modules/@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.2.1" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "dependencies": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0" + "jest-get-type": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -828,13 +815,13 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -853,24 +840,24 @@ } }, "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -879,13 +866,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -894,14 +881,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "dependencies": { - "@jest/test-result": "^29.2.1", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -909,38 +896,38 @@ } }, "node_modules/@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -952,102 +939,111 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.5.tgz", + "integrity": "sha512-XLNOMH66KhJzUJNwT/qlMnS4WsNDWD5ASdyaSH3EtK+F4r/CFGa3jT4GNi4mfOitGvWXtdLgQJkQjxSVrio+jA==", + "dependencies": { + "sparse-bitfield": "^3.0.3" } }, "node_modules/@sinclair/typebox": { - "version": "0.24.47", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.47.tgz", - "integrity": "sha512-J4Xw0xYK4h7eC34MNOPQi6IkNxGRck6n4VJpWDzXIFVTW8I/D43Gf+NfWz/v/7NHlzWOPd3+T4PJ4OqklQ2u7A==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1055,91 +1051,88 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/node": { - "version": "18.11.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.2.tgz", - "integrity": "sha512-BWN3M23gLO2jVG8g/XHIRFWiiV4/GckeFIqbU/C4V3xpoBBWSMk4OZomouN0wCkfQFPqgZikyLr7DOYDysIkkw==" - }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "node_modules/@types/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" }, "node_modules/@types/whatwg-url": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", - "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", + "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", "dependencies": { - "@types/node": "*", "@types/webidl-conversions": "*" } }, "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "node_modules/abbrev": { @@ -1227,15 +1220,15 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "@jest/transform": "^29.2.1", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.2.0", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -1263,10 +1256,26 @@ "node": ">=8" } }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz", - "integrity": "sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -1302,12 +1311,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz", - "integrity": "sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.2.0", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1323,25 +1332,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1352,12 +1342,12 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -1365,7 +1355,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -1397,9 +1387,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -1409,13 +1399,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -1434,37 +1428,11 @@ } }, "node_modules/bson": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", - "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", - "dependencies": { - "buffer": "^5.6.0" - }, + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.6.0.tgz", + "integrity": "sha512-BVINv2SgcMjL4oYbBuCQTpE3/VKOSxrOA8Cj/wQP7izSzlBGVomdm+TcUd0Pzy0ytLSSDweCKQ6X3f5veM5LQA==", "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node": ">=16.20.1" } }, "node_modules/buffer-from": { @@ -1482,12 +1450,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1512,9 +1486,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001422", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001422.tgz", - "integrity": "sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==", + "version": "1.0.30001611", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz", + "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==", "dev": true, "funding": [ { @@ -1524,6 +1498,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -1580,15 +1558,24 @@ } }, "node_modules/ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "node_modules/cliui": { @@ -1616,9 +1603,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "node_modules/color-convert": { @@ -1657,23 +1644,23 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -1695,6 +1682,27 @@ "node": ">= 0.10" } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1709,6 +1717,14 @@ "node": ">= 8" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1718,26 +1734,42 @@ } }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, "engines": { - "node": ">=0.10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/depd": { @@ -1767,20 +1799,23 @@ } }, "node_modules/diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, "node_modules/ee-first": { @@ -1789,15 +1824,15 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.741", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.741.tgz", + "integrity": "sha512-AyTBZqDoS7/mvQK22gOQpjxbeV8iPeUBTvYlEh/1S9dKAHgQdxuF49g9rLbj0cRKtqH8PzLJzqT3nAdl+qoZTA==", "dev": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { "node": ">=12" @@ -1829,10 +1864,29 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -1906,32 +1960,32 @@ } }, "node_modules/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -1974,14 +2028,17 @@ } }, "node_modules/express-rate-limit": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.6.0.tgz", - "integrity": "sha512-HFN2+4ZGdkQOS8Qli4z6knmJFnw6lZed67o6b7RGplWeb1Z0s8VXaj3dUgPIdm9hrhZXTRpCTHXA0/2Eqex0vA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.2.0.tgz", + "integrity": "sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg==", "engines": { - "node": ">= 12.9.0" + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" }, "peerDependencies": { - "express": "^4 || ^5" + "express": "4 || 5 || ^5.0.0-beta.1" } }, "node_modules/fast-json-stable-stringify": { @@ -1999,6 +2056,28 @@ "bser": "2.1.1" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -2041,6 +2120,17 @@ "node": ">=8" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -2078,9 +2168,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -2101,13 +2194,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2175,23 +2273,23 @@ "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" }, - "engines": { - "node": ">= 0.4.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2201,6 +2299,28 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -2212,15 +2332,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/haversine": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/haversine/-/haversine-1.1.1.tgz", "integrity": "sha512-KW4MS8+krLIeiw8bF5z532CptG0ZyGGFj0UbKMxx25lKnnJ1hMUbuzQl+PXQjNiDLnl1bOyz23U6hSK10r4guw==" }, "node_modules/heroku-ssl-redirect": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/heroku-ssl-redirect/-/heroku-ssl-redirect-0.0.4.tgz", - "integrity": "sha512-eZ5bzgayDTYdsUBlokulVfdCcENqTeKACwEEZ+aIPPaASA8v77nDHDtz61uU/keWXX+aljC8SUSuabHB33jIOg==" + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/heroku-ssl-redirect/-/heroku-ssl-redirect-0.1.1.tgz", + "integrity": "sha512-kL/DvLR2J53iB3TXasQlo5JwF/j2L2zkala6Ddk9o6JwIPeDvbTGT9Aty8WElxcF389ObICCeyf2m7RKpCg5Bg==" }, "node_modules/html-escaper": { "version": "2.0.2", @@ -2263,25 +2394,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", @@ -2334,7 +2446,9 @@ "node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "optional": true, + "peer": true }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -2363,12 +2477,12 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2441,51 +2555,84 @@ "dev": true }, "node_modules/isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", + "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", "dependencies": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" + "node-fetch": "^3.2.0", + "unfetch": "^5.0.0" } }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -2526,9 +2673,9 @@ "dev": true }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -2539,15 +2686,15 @@ } }, "node_modules/jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.2.1.tgz", - "integrity": "sha512-K0N+7rx+fv3Us3KhuwRSJt55MMpZPs9Q3WSO/spRZSnsalX8yEYOTQ1PiSN7OvqzoRX4JEUXCbOJRlP4n8m5LA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/core": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.2.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -2565,12 +2712,13 @@ } }, "node_modules/jest-changed-files": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.2.0.tgz", - "integrity": "sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "dependencies": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, "engines": { @@ -2578,28 +2726,29 @@ } }, "node_modules/jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2608,22 +2757,21 @@ } }, "node_modules/jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "bin": { @@ -2642,31 +2790,31 @@ } }, "node_modules/jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -2687,24 +2835,24 @@ } }, "node_modules/jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -2714,62 +2862,62 @@ } }, "node_modules/jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -2781,46 +2929,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2829,23 +2977,23 @@ } }, "node_modules/jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.2.1" + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { "node": ">=6" @@ -2860,28 +3008,28 @@ } }, "node_modules/jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { @@ -2889,43 +3037,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -2934,31 +3082,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -2967,44 +3115,52 @@ } }, "node_modules/jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.2.1", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3016,13 +3172,19 @@ "node": ">=10" } }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3034,17 +3196,17 @@ } }, "node_modules/jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.2.1" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3063,18 +3225,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { @@ -3082,13 +3244,13 @@ } }, "node_modules/jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", - "jest-util": "^29.2.1", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -3149,9 +3311,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -3271,6 +3433,30 @@ "integrity": "sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==" }, "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", @@ -3282,21 +3468,27 @@ "node": ">=10" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "lru-cache": "^6.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "semver": "bin/semver.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10" } }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -3317,8 +3509,7 @@ "node_modules/memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "node_modules/merge-descriptors": { "version": "1.0.1", @@ -3404,29 +3595,57 @@ } }, "node_modules/mongodb": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", - "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.5.0.tgz", + "integrity": "sha512-Fozq68InT+JKABGLqctgtb8P56pRrJFkbhW0ux+x1mdHeyinor8oNzJqwLjV/t5X5nJGfTlluxfyMnOXNggIUA==", "dependencies": { - "bson": "^4.7.0", - "denque": "^2.1.0", - "mongodb-connection-string-url": "^2.5.3", - "socks": "^2.7.0" + "@mongodb-js/saslprep": "^1.1.5", + "bson": "^6.4.0", + "mongodb-connection-string-url": "^3.0.0" }, "engines": { - "node": ">=12.9.0" + "node": ">=16.20.1" }, - "optionalDependencies": { - "saslprep": "^1.0.3" + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } } }, "node_modules/mongodb-connection-string-url": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.4.tgz", - "integrity": "sha512-SeAxuWs0ez3iI3vvmLk/j2y+zHwigTDKQhtdxTgt5ZCOQQS5+HW4g45/Xw5vzzbn7oQXCNQ24Z40AkJsizEy7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", "dependencies": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^11.0.0" + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" } }, "node_modules/ms": { @@ -3448,42 +3667,39 @@ "node": ">= 0.6" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { - "whatwg-url": "^5.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/node-int64": { @@ -3493,24 +3709,24 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", + "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", "dev": true, "dependencies": { "chokidar": "^3.5.2", - "debug": "^3.2.7", + "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", "supports-color": "^5.5.0", "touch": "^3.1.0", "undefsafe": "^2.0.5" @@ -3519,7 +3735,7 @@ "nodemon": "bin/nodemon.js" }, "engines": { - "node": ">=8.10.0" + "node": ">=10" }, "funding": { "type": "opencollective", @@ -3527,12 +3743,20 @@ } }, "node_modules/nodemon/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/nodemon/node_modules/has-flag": { @@ -3544,19 +3768,37 @@ "node": ">=4" } }, + "node_modules/nodemon/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nodemon/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/nodemon/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/nodemon/node_modules/supports-color": { @@ -3571,6 +3813,12 @@ "node": ">=4" } }, + "node_modules/nodemon/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", @@ -3616,9 +3864,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3792,9 +4040,9 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" @@ -3813,12 +4061,12 @@ } }, "node_modules/pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3870,13 +4118,29 @@ "dev": true }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -3900,9 +4164,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -3941,12 +4205,12 @@ } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -3979,9 +4243,9 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" @@ -4011,22 +4275,10 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "dependencies": { - "sparse-bitfield": "^3.0.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4074,6 +4326,22 @@ "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -4101,13 +4369,17 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4120,26 +4392,50 @@ "dev": true }, "node_modules/simple-update-notifier": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", - "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "dependencies": { - "semver": "~7.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8.10.0" + "node": ">=10" + } + }, + "node_modules/simple-update-notifier/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, + "node_modules/simple-update-notifier/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -4159,6 +4455,8 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "optional": true, + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -4168,6 +4466,8 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "optional": true, + "peer": true, "dependencies": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" @@ -4200,7 +4500,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", - "optional": true, "dependencies": { "memory-pager": "^1.0.2" } @@ -4212,9 +4511,9 @@ "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -4386,14 +4685,14 @@ } }, "node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", "dependencies": { - "punycode": "^2.1.1" + "punycode": "^2.3.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/type-detect": { @@ -4435,10 +4734,19 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", + "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==", + "workspaces": [ + "./packages/isomorphic-unfetch" + ] }, "node_modules/unpipe": { "version": "1.0.0", @@ -4449,9 +4757,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -4461,6 +4769,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -4468,7 +4780,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -4483,14 +4795,14 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" @@ -4513,6 +4825,14 @@ "makeerror": "1.0.12" } }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "engines": { + "node": ">= 8" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -4522,15 +4842,15 @@ } }, "node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", "dependencies": { - "tr46": "^3.0.0", + "tr46": "^4.1.1", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=12" + "node": ">=16" } }, "node_modules/which": { @@ -4594,15 +4914,15 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "node_modules/yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { "cliui": "^8.0.1", @@ -4611,7 +4931,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" @@ -4641,51 +4961,52 @@ }, "dependencies": { "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz", - "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true }, "@babel/core": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", - "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.3", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.3", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.3", - "@babel/types": "^7.19.3", - "convert-source-map": "^1.7.0", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "dependencies": { "debug": { @@ -4706,153 +5027,140 @@ } }, "@babel/generator": { - "version": "7.19.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz", - "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "requires": { - "@babel/types": "^7.19.4", - "@jridgewell/gen-mapping": "^0.3.2", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.3", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.24.0" } }, "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true }, "@babel/helper-simple-access": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", - "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "requires": { - "@babel/types": "^7.19.4" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true }, "@babel/helpers": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz", - "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.4", - "@babel/types": "^7.19.4" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "dependencies": { "ansi-styles": { @@ -4914,9 +5222,9 @@ } }, "@babel/parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz", - "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -4965,12 +5273,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.24.0" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -5037,40 +5345,40 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.24.0" } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" } }, "@babel/traverse": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz", - "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.4", - "@babel/types": "^7.19.4", - "debug": "^4.1.0", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "dependencies": { @@ -5092,13 +5400,13 @@ } }, "@babel/types": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz", - "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -5128,124 +5436,124 @@ "dev": true }, "@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, "@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.2.1" + "jest-mock": "^29.7.0" } }, "@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "requires": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" } }, "@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "requires": { - "jest-get-type": "^29.2.0" + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^29.2.1", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -5253,13 +5561,13 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -5267,79 +5575,79 @@ } }, "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.2.0.tgz", - "integrity": "sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^29.2.1", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -5348,93 +5656,102 @@ } }, "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" } }, "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@mongodb-js/saslprep": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.5.tgz", + "integrity": "sha512-XLNOMH66KhJzUJNwT/qlMnS4WsNDWD5ASdyaSH3EtK+F4r/CFGa3jT4GNi4mfOitGvWXtdLgQJkQjxSVrio+jA==", + "requires": { + "sparse-bitfield": "^3.0.3" } }, "@sinclair/typebox": { - "version": "0.24.47", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.47.tgz", - "integrity": "sha512-J4Xw0xYK4h7eC34MNOPQi6IkNxGRck6n4VJpWDzXIFVTW8I/D43Gf+NfWz/v/7NHlzWOPd3+T4PJ4OqklQ2u7A==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -5442,91 +5759,88 @@ } }, "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { "@types/node": "*" } }, "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" } }, "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "requires": { "@types/istanbul-lib-report": "*" } }, "@types/node": { - "version": "18.11.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.2.tgz", - "integrity": "sha512-BWN3M23gLO2jVG8g/XHIRFWiiV4/GckeFIqbU/C4V3xpoBBWSMk4OZomouN0wCkfQFPqgZikyLr7DOYDysIkkw==" - }, - "@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } }, "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "@types/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" }, "@types/whatwg-url": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", - "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", + "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", "requires": { - "@types/node": "*", "@types/webidl-conversions": "*" } }, "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "abbrev": { @@ -5593,15 +5907,15 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^29.2.1", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.2.0", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -5618,12 +5932,27 @@ "@istanbuljs/schema": "^0.1.2", "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + } } }, "babel-plugin-jest-hoist": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz", - "integrity": "sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -5653,12 +5982,12 @@ } }, "babel-preset-jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz", - "integrity": "sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.2.0", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -5668,11 +5997,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -5680,12 +6004,12 @@ "dev": true }, "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -5693,7 +6017,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" } @@ -5718,15 +6042,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" } }, "bser": { @@ -5739,21 +6063,9 @@ } }, "bson": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.0.tgz", - "integrity": "sha512-VrlEE4vuiO1WTpfof4VmaVolCVYkYTgB9iWgYNOrVlnifpME/06fhFRmONgBhClD5pFC1t9ZWqFUQEQAzY43bA==", - "requires": { - "buffer": "^5.6.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.6.0.tgz", + "integrity": "sha512-BVINv2SgcMjL4oYbBuCQTpE3/VKOSxrOA8Cj/wQP7izSzlBGVomdm+TcUd0Pzy0ytLSSDweCKQ6X3f5veM5LQA==" }, "buffer-from": { "version": "1.1.2", @@ -5767,12 +6079,15 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "callsites": { @@ -5788,9 +6103,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001422", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001422.tgz", - "integrity": "sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==", + "version": "1.0.30001611", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz", + "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==", "dev": true }, "chalk": { @@ -5826,15 +6141,15 @@ } }, "ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true }, "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "cliui": { @@ -5855,9 +6170,9 @@ "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-convert": { @@ -5890,20 +6205,20 @@ } }, "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" }, "cookie-signature": { "version": "1.0.6", @@ -5919,6 +6234,21 @@ "vary": "^1" } }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5930,6 +6260,11 @@ "which": "^2.0.1" } }, + "data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -5939,21 +6274,27 @@ } }, "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "requires": {} }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, - "denque": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } }, "depd": { "version": "2.0.0", @@ -5972,15 +6313,15 @@ "dev": true }, "diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, "dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "ee-first": { "version": "1.1.1", @@ -5988,15 +6329,15 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.741", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.741.tgz", + "integrity": "sha512-AyTBZqDoS7/mvQK22gOQpjxbeV8iPeUBTvYlEh/1S9dKAHgQdxuF49g9rLbj0cRKtqH8PzLJzqT3nAdl+qoZTA==", "dev": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -6019,10 +6360,23 @@ "is-arrayish": "^0.2.1" } }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true }, "escape-html": { @@ -6071,29 +6425,29 @@ "dev": true }, "expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "@jest/expect-utils": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -6130,9 +6484,9 @@ } }, "express-rate-limit": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.6.0.tgz", - "integrity": "sha512-HFN2+4ZGdkQOS8Qli4z6knmJFnw6lZed67o6b7RGplWeb1Z0s8VXaj3dUgPIdm9hrhZXTRpCTHXA0/2Eqex0vA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.2.0.tgz", + "integrity": "sha512-T7nul1t4TNyfZMJ7pKRKkdeVJWa2CqB8NA1P8BwYaoDI5QSBZARv5oMS43J7b7I5P+4asjVXjb7ONuwDKucahg==", "requires": {} }, "fast-json-stable-stringify": { @@ -6150,6 +6504,15 @@ "bser": "2.1.1" } }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6183,6 +6546,14 @@ "path-exists": "^4.0.0" } }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -6207,9 +6578,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "gensync": { "version": "1.0.0-beta.2", @@ -6224,13 +6595,15 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "get-package-type": { @@ -6274,40 +6647,61 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "requires": { - "function-bind": "^1.1.1" + "get-intrinsic": "^1.1.3" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "requires": { + "es-define-property": "^1.0.0" + } + }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, "haversine": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/haversine/-/haversine-1.1.1.tgz", "integrity": "sha512-KW4MS8+krLIeiw8bF5z532CptG0ZyGGFj0UbKMxx25lKnnJ1hMUbuzQl+PXQjNiDLnl1bOyz23U6hSK10r4guw==" }, "heroku-ssl-redirect": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/heroku-ssl-redirect/-/heroku-ssl-redirect-0.0.4.tgz", - "integrity": "sha512-eZ5bzgayDTYdsUBlokulVfdCcENqTeKACwEEZ+aIPPaASA8v77nDHDtz61uU/keWXX+aljC8SUSuabHB33jIOg==" + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/heroku-ssl-redirect/-/heroku-ssl-redirect-0.1.1.tgz", + "integrity": "sha512-kL/DvLR2J53iB3TXasQlo5JwF/j2L2zkala6Ddk9o6JwIPeDvbTGT9Aty8WElxcF389ObICCeyf2m7RKpCg5Bg==" }, "html-escaper": { "version": "2.0.2", @@ -6341,11 +6735,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, "ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", @@ -6386,7 +6775,9 @@ "ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "optional": true, + "peer": true }, "ipaddr.js": { "version": "1.9.1", @@ -6409,12 +6800,12 @@ } }, "is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "requires": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "is-extglob": { @@ -6463,41 +6854,67 @@ "dev": true }, "isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", + "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", "requires": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" + "node-fetch": "^3.2.0", + "unfetch": "^5.0.0" } }, "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true }, "istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "semver": "^7.5.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, @@ -6530,9 +6947,9 @@ } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -6540,377 +6957,389 @@ } }, "jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.2.1.tgz", - "integrity": "sha512-K0N+7rx+fv3Us3KhuwRSJt55MMpZPs9Q3WSO/spRZSnsalX8yEYOTQ1PiSN7OvqzoRX4JEUXCbOJRlP4n8m5LA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.2.1" + "jest-cli": "^29.7.0" } }, "jest-changed-files": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.2.0.tgz", - "integrity": "sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" } }, "jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" } }, "jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true }, "jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-util": "^29.2.1" + "jest-util": "^29.7.0" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true }, "jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "requires": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" } }, "jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.2.1", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, "jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -6919,17 +7348,17 @@ } }, "jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.2.1" + "pretty-format": "^29.7.0" }, "dependencies": { "camelcase": { @@ -6941,29 +7370,29 @@ } }, "jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", - "jest-util": "^29.2.1", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -7008,9 +7437,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kleur": { @@ -7115,21 +7544,47 @@ "integrity": "sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==" }, "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "yallist": "^4.0.0" + "yallist": "^3.0.2" } }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "semver": "^6.0.0" + "semver": "^7.5.3" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "makeerror": { @@ -7149,8 +7604,7 @@ "memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, "merge-descriptors": { "version": "1.0.1", @@ -7212,24 +7666,22 @@ } }, "mongodb": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.10.0.tgz", - "integrity": "sha512-My2QxLTw0Cc1O9gih0mz4mqo145Jq4rLAQx0Glk/Ha9iYBzYpt4I2QFNRIh35uNFNfe8KFQcdwY1/HKxXBkinw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.5.0.tgz", + "integrity": "sha512-Fozq68InT+JKABGLqctgtb8P56pRrJFkbhW0ux+x1mdHeyinor8oNzJqwLjV/t5X5nJGfTlluxfyMnOXNggIUA==", "requires": { - "bson": "^4.7.0", - "denque": "^2.1.0", - "mongodb-connection-string-url": "^2.5.3", - "saslprep": "^1.0.3", - "socks": "^2.7.0" + "@mongodb-js/saslprep": "^1.1.5", + "bson": "^6.4.0", + "mongodb-connection-string-url": "^3.0.0" } }, "mongodb-connection-string-url": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.4.tgz", - "integrity": "sha512-SeAxuWs0ez3iI3vvmLk/j2y+zHwigTDKQhtdxTgt5ZCOQQS5+HW4g45/Xw5vzzbn7oQXCNQ24Z40AkJsizEy7w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", "requires": { - "@types/whatwg-url": "^8.2.1", - "whatwg-url": "^11.0.0" + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" } }, "ms": { @@ -7248,33 +7700,19 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" } }, "node-int64": { @@ -7284,36 +7722,36 @@ "dev": true }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", + "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", "dev": true, "requires": { "chokidar": "^3.5.2", - "debug": "^3.2.7", + "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", "supports-color": "^5.5.0", "touch": "^3.1.0", "undefsafe": "^2.0.5" }, "dependencies": { "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "has-flag": { @@ -7322,17 +7760,29 @@ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "supports-color": { "version": "5.5.0", @@ -7342,6 +7792,12 @@ "requires": { "has-flag": "^3.0.0" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -7375,9 +7831,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" }, "on-finished": { "version": "2.4.1", @@ -7499,9 +7955,9 @@ "dev": true }, "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true }, "pkg-dir": { @@ -7514,12 +7970,12 @@ } }, "pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -7558,9 +8014,15 @@ "dev": true }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" + }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true }, "qs": { "version": "6.11.0", @@ -7576,9 +8038,9 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -7608,12 +8070,12 @@ "dev": true }, "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "requires": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -7634,9 +8096,9 @@ "dev": true }, "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, "safe-buffer": { @@ -7649,19 +8111,10 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "send": { @@ -7702,6 +8155,19 @@ "send": "0.18.0" } }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -7723,13 +8189,14 @@ "dev": true }, "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" } }, "signal-exit": { @@ -7739,18 +8206,36 @@ "dev": true }, "simple-update-notifier": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz", - "integrity": "sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "requires": { - "semver": "~7.0.0" + "semver": "^7.5.3" }, "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } @@ -7770,12 +8255,16 @@ "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "optional": true, + "peer": true }, "socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "optional": true, + "peer": true, "requires": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" @@ -7801,7 +8290,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", - "optional": true, "requires": { "memory-pager": "^1.0.2" } @@ -7813,9 +8301,9 @@ "dev": true }, "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -7936,11 +8424,11 @@ } }, "tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", "requires": { - "punycode": "^2.1.1" + "punycode": "^2.3.0" } }, "type-detect": { @@ -7970,10 +8458,16 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", + "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==" }, "unpipe": { "version": "1.0.0", @@ -7981,9 +8475,9 @@ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -7996,14 +8490,14 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" } }, "vary": { @@ -8020,17 +8514,22 @@ "makeerror": "1.0.12" } }, + "web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==" + }, "webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" }, "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", "requires": { - "tr46": "^3.0.0", + "tr46": "^4.1.1", "webidl-conversions": "^7.0.0" } }, @@ -8077,15 +8576,15 @@ "dev": true }, "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { "cliui": "^8.0.1", @@ -8094,7 +8593,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { diff --git a/package.json b/package.json index 49175da..943f003 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "node index.js", "dev": "NODE_ENV=development nodemon index.js", - "test": "jest", + "test": "jest --coverage", "prepare-collection": "node lib/prepare-collection", "prepare-indices": "node lib/prepare-indices", "dummy-data": "node lib/dummy-data" @@ -17,17 +17,17 @@ "license": "ISC", "dependencies": { "cors": "^2.8.5", - "dotenv": "^16.0.3", - "express": "^4.18.2", + "dotenv": "^16.4.5", + "express": "^4.19.2", "express-force-ssl": "^0.3.2", - "express-rate-limit": "^6.6.0", + "express-rate-limit": "^7.2.0", "haversine": "^1.1.1", - "heroku-ssl-redirect": "0.0.4", - "isomorphic-unfetch": "^3.1.0", - "mongodb": "^4.10.0" + "heroku-ssl-redirect": "0.1.1", + "isomorphic-unfetch": "^4.0.2", + "mongodb": "^6.5.0" }, "devDependencies": { - "jest": "^29.2.1", - "nodemon": "^2.0.20" + "jest": "^29.7.0", + "nodemon": "^3.1.0" } } From d5c462fae2ce96aa9b94285c22f7de34c40cc7c6 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 18 Apr 2024 18:45:58 +0100 Subject: [PATCH 17/23] Add some more tests --- __tests__/mocks/index-geocode.json | 64 +++++++++++++++++++++ __tests__/unit/lib/index.test.js | 15 +++++ __tests__/unit/lib/queries.test.js | 90 ++++++++++++++++++++---------- jest.config.js | 17 ++++++ lib/index.js | 60 +++++++++++--------- package.json | 2 +- 6 files changed, 193 insertions(+), 55 deletions(-) create mode 100644 __tests__/mocks/index-geocode.json create mode 100644 __tests__/unit/lib/index.test.js create mode 100644 jest.config.js diff --git a/__tests__/mocks/index-geocode.json b/__tests__/mocks/index-geocode.json new file mode 100644 index 0000000..1cdaea4 --- /dev/null +++ b/__tests__/mocks/index-geocode.json @@ -0,0 +1,64 @@ +{ + "results": [ + { + "address_components": [ + { + "long_name": "London", + "short_name": "London", + "types": ["locality", "political"] + }, + { + "long_name": "London", + "short_name": "London", + "types": ["postal_town"] + }, + { + "long_name": "Greater London", + "short_name": "Greater London", + "types": ["administrative_area_level_2", "political"] + }, + { + "long_name": "England", + "short_name": "England", + "types": ["administrative_area_level_1", "political"] + }, + { + "long_name": "United Kingdom", + "short_name": "GB", + "types": ["country", "political"] + } + ], + "formatted_address": "London, UK", + "geometry": { + "bounds": { + "northeast": { + "lat": 51.6723432, + "lng": 0.148271 + }, + "southwest": { + "lat": 51.38494009999999, + "lng": -0.3514683 + } + }, + "location": { + "lat": 51.5072178, + "lng": -0.1275862 + }, + "location_type": "APPROXIMATE", + "viewport": { + "northeast": { + "lat": 51.6723432, + "lng": 0.148271 + }, + "southwest": { + "lat": 51.38494009999999, + "lng": -0.3514683 + } + } + }, + "place_id": "ChIJdd4hrwug2EcRmSrV3Vo6llI", + "types": ["locality", "political"] + } + ], + "status": "OK" +} diff --git a/__tests__/unit/lib/index.test.js b/__tests__/unit/lib/index.test.js new file mode 100644 index 0000000..e4b1139 --- /dev/null +++ b/__tests__/unit/lib/index.test.js @@ -0,0 +1,15 @@ +const Index = require("../../../lib/index") + +describe("Calling calculateDistance", () => { + it("should return the minimum distance between the query and the locations", () => { + const query = { lat: 0, lng: 0 } + const locations = [ + { geometry: { coordinates: [0, 1] } }, + { geometry: { coordinates: [0, 2] } }, + ] + const distance = Index.calculateDistance(query, locations) + + // Check if the distance is the minimum distance + expect(distance).toBeCloseTo(69.1, 1) // The distance between (0, 0) and (0, 1) is approximately 69.1 miles + }) +}) diff --git a/__tests__/unit/lib/queries.test.js b/__tests__/unit/lib/queries.test.js index df5e35b..17591e8 100644 --- a/__tests__/unit/lib/queries.test.js +++ b/__tests__/unit/lib/queries.test.js @@ -1,25 +1,49 @@ const Queries = require("../../../lib/queries") -describe('Calling filterAges ', () => { - it('should return an empty result if called with no query', () => { +describe("Calling visibleNow", () => { + it("should return a query that checks if a document is visible now", () => { + const query = Queries.visibleNow({}) + + // Check if the query contains the correct conditions + expect(query).toEqual({ + $and: [ + { + $or: [ + { visible_from: null }, + { visible_from: { $lte: expect.any(Date) } }, + ], + }, + { + $or: [ + { visible_to: null }, + { visible_to: { $gte: expect.any(Date) } }, + ], + }, + ], + }) + }) +}) + +describe("Calling filterAges ", () => { + it("should return an empty result if called with no query", () => { const query = Queries.filterAges({}, { query: {} }) - expect(query).toStrictEqual({ "$and": [] }) + expect(query).toStrictEqual({ $and: [] }) }) - describe('with only a min_age supplied', () => { + describe("with only a min_age supplied", () => { const query = Queries.filterAges({}, { query: { min_age: 16 } }) - it('should return a query containing a max_age gte the min_age supplied', () => { + it("should return a query containing a max_age gte the min_age supplied", () => { expect(query).toStrictEqual({ - "$and": [ + $and: [ { - "$or": [ + $or: [ { - "max_age": null, + max_age: null, }, { - "max_age": { - "$gte": 16, + max_age: { + $gte: 16, }, }, ], @@ -29,20 +53,20 @@ describe('Calling filterAges ', () => { }) }) - describe('with only a max_age supplied', () => { + describe("with only a max_age supplied", () => { const query = Queries.filterAges({}, { query: { max_age: 12 } }) - it('should return a query containing min_age lte the max_age supplied', () => { + it("should return a query containing min_age lte the max_age supplied", () => { expect(query).toStrictEqual({ - "$and": [ + $and: [ { - "$or": [ + $or: [ { - "min_age": null, + min_age: null, }, { - "min_age": { - "$lte": 12, + min_age: { + $lte: 12, }, }, ], @@ -52,32 +76,32 @@ describe('Calling filterAges ', () => { }) }) - describe('with a min_age and a max_age supplied', () => { + describe("with a min_age and a max_age supplied", () => { const query = Queries.filterAges({}, { query: { min_age: 8, max_age: 14 } }) - it('should return a query containing max_age gte the min_age and min_age lte the max_age supplied', () => { + it("should return a query containing max_age gte the min_age and min_age lte the max_age supplied", () => { expect(query).toStrictEqual({ - "$and": [ + $and: [ { - "$or": [ + $or: [ { - "max_age": null, + max_age: null, }, { - "max_age": { - "$gte": 8, + max_age: { + $gte: 8, }, }, ], }, { - "$or": [ + $or: [ { - "min_age": null, + min_age: null, }, { - "min_age": { - "$lte": 14, + min_age: { + $lte: 14, }, }, ], @@ -86,4 +110,14 @@ describe('Calling filterAges ', () => { }) }) }) + + describe("Calling filterOnly", () => { + it("should return a query that checks if a document is free", () => { + const req = { query: { only: ["free"] } } + const query = Queries.filterOnly({}, req) + + // Check if the query contains the correct condition + expect(query).toEqual({ free: true }) + }) + }) }) diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..ac58e1a --- /dev/null +++ b/jest.config.js @@ -0,0 +1,17 @@ +/** @type {import('jest').Config} */ +const config = { + verbose: true, + collectCoverage: true, + coverageReporters: ["clover", "json", "lcov", "html", "text"], + collectCoverageFrom: [ + "**/*.{js,jsx}", + "!**/node_modules/**", + "!**/vendor/**", + "!**/coverage/**", + "!**/.docker/**", + "!.prettierrc.js", + "!jest.config.js", + ], +} + +module.exports = config diff --git a/lib/index.js b/lib/index.js index 8a4c540..12a4481 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,32 +1,40 @@ +require("dotenv").config() const haversine = require("haversine") const fetch = require("isomorphic-unfetch") module.exports = { - calculateDistance: (query, locations) => { - let distances = [] - locations.forEach(location => { - distances.push(haversine({ - latitude: query.lat, - longitude: query.lng - },{ - latitude: location.geometry.coordinates[1], - longitude: location.geometry.coordinates[0] - }, - { - unit: "mile" - })) - }) - return Math.min(...distances) - }, + calculateDistance: (query, locations) => { + let distances = [] + locations.forEach(location => { + distances.push( + haversine( + { + latitude: query.lat, + longitude: query.lng, + }, + { + latitude: location.geometry.coordinates[1], + longitude: location.geometry.coordinates[0], + }, + { + unit: "mile", + } + ) + ) + }) + return Math.min(...distances) + }, - geocode: async location => { - const response = await fetch(`https://maps.googleapis.com/maps/api/geocode/json?address=${location}®ion=uk&key=${process.env.GOOGLE_API_KEY}`) - return await response.json() - }, + geocode: async location => { + const response = await fetch( + `https://maps.googleapis.com/maps/api/geocode/json?address=${location}®ion=uk&key=${process.env.GOOGLE_API_KEY}` + ) + return await response.json() + }, - projection: { - _id: 0, - visible_from: 0, - visible_to: 0 - } -} \ No newline at end of file + projection: { + _id: 0, + visible_from: 0, + visible_to: 0, + }, +} diff --git a/package.json b/package.json index 943f003..1d80602 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "node index.js", "dev": "NODE_ENV=development nodemon index.js", - "test": "jest --coverage", + "test": "jest", "prepare-collection": "node lib/prepare-collection", "prepare-indices": "node lib/prepare-indices", "dummy-data": "node lib/dummy-data" From b1a782441b90f1968f3bd5307120cb41516c3f9f Mon Sep 17 00:00:00 2001 From: Han Date: Wed, 24 Apr 2024 18:46:13 +0100 Subject: [PATCH 18/23] logging and error checking also tests --- .gitignore | 1 + controllers/index.js | 193 ------- db.js | 16 - docker-compose.yml | 2 +- index.js | 93 +++- lib/queries.js | 51 -- package-lock.json | 526 +++++++++++++++++- package.json | 4 +- readme.md | 12 +- routes/index.js | 27 - sample.env | 19 +- .prettierrc.js => src/.prettierrc.js | 0 src/controllers/v1/index.js | 5 + src/controllers/v1/services/index.js | 87 +++ .../v1/services/routes/get-service.js | 33 ++ .../v1/services/routes/get-services.js | 241 ++++++++ src/controllers/v1/services/routes/index.js | 4 + src/db.js | 40 ++ src/lib/filters.js | 227 ++++++++ {lib => src/lib}/index.js | 6 +- src/middleware/morgan.middleware.js | 23 + {lib => src/utils}/dummy-data.js | 7 +- src/utils/logger.js | 78 +++ {lib => src/utils}/prepare-collection.js | 7 +- {lib => src/utils}/prepare-indices.js | 5 +- 25 files changed, 1369 insertions(+), 338 deletions(-) delete mode 100644 controllers/index.js delete mode 100644 db.js delete mode 100644 lib/queries.js delete mode 100644 routes/index.js rename .prettierrc.js => src/.prettierrc.js (100%) create mode 100644 src/controllers/v1/index.js create mode 100644 src/controllers/v1/services/index.js create mode 100644 src/controllers/v1/services/routes/get-service.js create mode 100644 src/controllers/v1/services/routes/get-services.js create mode 100644 src/controllers/v1/services/routes/index.js create mode 100644 src/db.js create mode 100644 src/lib/filters.js rename {lib => src/lib}/index.js (87%) create mode 100644 src/middleware/morgan.middleware.js rename {lib => src/utils}/dummy-data.js (93%) create mode 100644 src/utils/logger.js rename {lib => src/utils}/prepare-collection.js (74%) rename {lib => src/utils}/prepare-indices.js (83%) diff --git a/.gitignore b/.gitignore index 94474eb..1027b64 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules /environment/artifacts .DS_Store coverage +logs diff --git a/controllers/index.js b/controllers/index.js deleted file mode 100644 index c9bdfa3..0000000 --- a/controllers/index.js +++ /dev/null @@ -1,193 +0,0 @@ -const { calculateDistance, geocode, projection } = require("../lib") -const { db } = require("../db") -const Queries = require("../lib/queries") - -module.exports = { - index: async (req, res, next) => { - try { - const Service = db().collection("indexed_services") - const perPage = parseInt(req.query.per_page) || 50 - const page = parseInt(req.query.page) || 1 - - let query = {} - - // keywords=word - /** - * full text search - * if we have a location, lng or lat: - * - it searches for the text first, and - * then the rest of the query only looks in those - * _ids nb fuzzy search not supported - * - if location || lng || lat -> - * query += _id {$in ['array of ids that matched results']} - * - if not - search for the keyword - */ - - if (req.query.keywords) { - if (req.query.location || req.query.lng || req.query.lat) { - const docs = await Service.find({ - $text: { $search: req.query.keywords }, - }).toArray() - query._id = { $in: docs.map(doc => doc._id) } - } else { - query.$text = { $search: req.query.keywords } - } - } - - query.$and = [] - - // only get services for the specific scout instance - // targetDirectories=bod,bfis - // targetDirectories=bod - if (req.query.targetDirectories) { - let targetDirectoriesArray = [].concat(req.query.targetDirectories) - targetDirectoriesArray.forEach(cluster => - query.$and.push({ - "target_directories.label": { $in: [].concat(cluster.split(",")) }, - }) - ) - } - - // taxonomies - // taxonomies=advice-and-support&taxonomies=health-and-wellbeing - if (req.query.taxonomies) { - let taxonomiesArray = [].concat(req.query.taxonomies) - taxonomiesArray.forEach(cluster => - query.$and.push({ - "taxonomies.slug": { $in: [].concat(cluster.split(",")) }, - }) - ) - } - - // send needs - // send_needs=autism&send_needs=social-emotional-and-mental-health-difficulties - if (req.query.needs) { - let needsArray = [].concat(req.query.needs) - needsArray.forEach(cluster => - query.$and.push({ - "send_needs.slug": { $in: [].concat(cluster.split(",")) }, - }) - ) - } - - // accessibility - // accessibilities=accessible-toilet-facilities&accessibilities=wheelchair-accessible-entrance - if (req.query.accessibilities) { - let accessibilitiesArray = [].concat(req.query.accessibilities) - accessibilitiesArray.forEach(cluster => - query.$and.push({ - "locations.accessibilities.slug": { - $in: [].concat(cluster.split(",")), - }, - }) - ) - } - - // suitabilities - // suitabilities=physical-disabilities&suitabilities=mental-health-acquired-brain-injury - if (req.query.suitabilities) { - let suitabilitiesArray = [].concat(req.query.suitabilities) - suitabilitiesArray.forEach(cluster => - query.$and.push({ - "suitabilities.slug": { $in: [].concat(cluster.split(",")) }, - }) - ) - } - - // days - // days=Tuesday&days=Wednesday - if (req.query.days) { - let daysArray = [].concat(req.query.days) - daysArray.forEach(cluster => - query.$and.push({ - "regular_schedules.weekday": { $in: [].concat(cluster.split(",")) }, - }) - ) - } - - // geocoding - // location=HP5%201AG - let interpreted_location - if (req.query.location && !(req.query.lat && req.query.lng)) { - let { results } = await geocode(req.query.location) - if (results[0]) { - interpreted_location = results[0].formatted_address - req.query.lng = results[0].geometry.location.lng - req.query.lat = results[0].geometry.location.lat - } - } - - // apply visibility filtering - query = Queries.visibleNow(query) - - // apply age filtering - query = Queries.filterAges(query, req) - - // apply only filters - query = Queries.filterOnly(query, req) - - // geo sort - // lat=-0.609669&lng=51.706335 - if (req.query.lat && req.query.lng) { - query["locations.geometry"] = { - $nearSphere: { - $geometry: { - type: "Point", - coordinates: [ - parseFloat(req.query.lng), - parseFloat(req.query.lat), - ], - }, - }, - } - } - - Promise.all([ - Service.find(query) - .project({ - ...projection, - }) - .sort(query.$text ? { score: { $meta: "textScore" } } : {}) - .limit(perPage) - .skip((page - 1) * perPage) - .toArray(), - Service.countDocuments(query), - ]) - .then(([results, count]) => { - const currentPage = parseInt(req.query.page) || 1 - const totalPages = Math.ceil(count / perPage) - - res.json({ - number: currentPage, - size: results.length, - totalPages: totalPages, - totalElements: count, - first: currentPage === 1, - last: currentPage === totalPages, - interpreted_location, - content: results.map(result => ({ - ...result, - distance_away: calculateDistance(req.query, result.locations), - })), - }) - }) - .catch(e => next(e)) - } catch (e) { - next(e) - } - }, - - show: async (req, res, next) => { - try { - let query = { id: parseInt(req.params.id) } - query = Queries.visibleNow(query) - let result = await db() - .collection("indexed_services") - .findOne(query, projection) - if (!result) throw new Error("No matching document") - res.json(result) - } catch (err) { - next(err) - } - }, -} diff --git a/db.js b/db.js deleted file mode 100644 index 6883b3e..0000000 --- a/db.js +++ /dev/null @@ -1,16 +0,0 @@ -const { MongoClient } = require("mongodb") -const uri = process.env.DATABASE_URL - -let db - -module.exports = { - connect: cb => { - MongoClient.connect(uri) - .then(client => { - db = client.db() - cb(db) - }) - .catch(err => console.error(err)) - }, - db: () => db, -} diff --git a/docker-compose.yml b/docker-compose.yml index 3566358..8fb902d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: # entrypoint: ["tail"] # command: ["-f", "/dev/null"] environment: - DATABASE_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME:-outpost}:${MONGO_INITDB_ROOT_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development}?retryWrites=true&w=majority + DB_URI: mongodb://${MONGO_INITDB_ROOT_USERNAME:-outpost}:${MONGO_INITDB_ROOT_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development}?retryWrites=true&w=majority platform: linux/amd64 volumes: - ./:/app:cached diff --git a/index.js b/index.js index 428f6aa..8cfad1b 100644 --- a/index.js +++ b/index.js @@ -1,30 +1,39 @@ -require("dotenv").config() -const express = require("express") -const forceSSL = require("express-force-ssl") -const rateLimit = require("express-rate-limit") -const cors = require("cors") -const { connect } = require("./db") -const routes = require("./routes") - -const server = express() -const port = process.env.NODE_PORT || 3000 -const environment = process.env.NODE_ENV -const isDevelopment = environment === "development" +require("dotenv").config(); +const express = require("express"); +const forceSSL = require("express-force-ssl"); +const rateLimit = require("express-rate-limit"); +const cors = require("cors"); +const morganMiddleware = require("./src/middleware/morgan.middleware"); +const logger = require("./src/utils/logger"); +const { connect } = require("./src/db"); +const v1 = require("./src/controllers/v1"); +const router = express.Router(); +const server = express(); +const port = process.env.NODE_PORT || 3000; +const environment = process.env.NODE_ENV || "production"; +const isDevelopment = environment === "development"; + +/** + * Create the initial database connection here + */ connect(() => - console.log( + logger.info( `📡 Database connection established http${ !isDevelopment ? "s" : "" }://localhost:${port}/api/v1/services` ) -) +); -server.set("trust proxy", 1) +/** + * Settings & middleware + */ +server.set("trust proxy", 1); // outside of dev environment if we send FORCE_SSL then SSL is forced if (!isDevelopment) { if (process.env.FORCE_SSL && process.env.FORCE_SSL.toLowerCase() === "true") { - server.use(forceSSL) + server.use(forceSSL); } } @@ -33,18 +42,56 @@ server.use( windowMs: 15 * 60 * 1000, max: 100, }) -) +); + +server.use(cors()); +server.use(morganMiddleware); + +/** + * Routes + */ + +server.get("/api/v1/services", v1.services.index); +server.get("/api/v1/services/:id", v1.services.show); -server.use(cors()) server.get("/health", (req, res) => { const data = { uptime: process.uptime(), message: "Ok", date: new Date(), - } + }; + + res.status(200).send(data); +}); - res.status(200).send(data) -}) -server.use("/api/v1/", routes) +// 404 +server.use("*", (req, res, next) => { + res.status(404).json({ + error: "No route matches your request", + }); +}); + +// Error handling +server.use((err, req, res, next) => { + logger.error(err.stack); + if (err.message === "No matching document") { + res.status(404).json({ + error: "No matching document", + }); + } else { + res.status(500).json({ + error: + process.env.NODE_ENV === "production" + ? "There was an internal server error. Please try again later" + : err.message, + }); + } +}); -server.listen(port, () => console.log(`✅ Listening on port ${port}`)) +/** + * Start the server + */ +server.listen(port, () => { + logger.info(`Server is running on port ${port}`); + logger.info(`Logging level is set to ${logger.level}`); +}); diff --git a/lib/queries.js b/lib/queries.js deleted file mode 100644 index 1e42e20..0000000 --- a/lib/queries.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = { - - visibleNow: query => { - query.$and = query.$and || [] - query.$and.push({ $or: [ - { visible_from: null }, - { visible_from: { $lte: new Date } } - ]}) - query.$and.push({ $or: [ - { visible_to: null }, - { visible_to: { $gte: new Date } } - ]}) - return query - }, - - // This filter returns all services with an age range overlapping with the - // range supplied by the user. - filterAges: (query, req) => { - query.$and = query.$and || [] - - const min_age = req.query.min_age - const max_age = req.query.max_age - - if(min_age){ - query.$and.push({ $or: [ - { max_age: null }, - { max_age: { $gte: parseInt(min_age) } } - ]}) - } - - if(max_age){ - query.$and.push({ $or: [ - { min_age: null }, - { min_age: { $lte: parseInt(max_age) } } - ]}) - } - - return query - }, - - filterOnly: (query, req) => { - let { only } = req.query - if(only){ - if(only.includes("free")) query.free = true - // if(only.includes("open-weekends")) query["regular_schedules.weekday"] = { $in: [ "Saturday", "Sunday"] } - // if(only.includes("open-after-six")) query["regular_schedules.closes_at"] = { $gte: "18:00"} - } - return query - } - -} diff --git a/package-lock.json b/package-lock.json index dff9dfe..4908dec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,9 @@ "haversine": "^1.1.1", "heroku-ssl-redirect": "0.1.1", "isomorphic-unfetch": "^4.0.2", - "mongodb": "^6.5.0" + "mongodb": "^6.5.0", + "morgan": "^1.10.0", + "winston": "^3.13.0" }, "devDependencies": { "jest": "^29.7.0", @@ -635,6 +637,24 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1107,6 +1127,11 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" + }, "node_modules/@types/webidl-conversions": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", @@ -1219,6 +1244,11 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -1332,6 +1362,22 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1608,6 +1654,15 @@ "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1623,8 +1678,38 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } }, "node_modules/concat-map": { "version": "0.0.1", @@ -1847,6 +1932,11 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -2056,6 +2146,11 @@ "bser": "2.1.1" } }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" + }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -2120,6 +2215,11 @@ "node": ">=8" } }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -2540,7 +2640,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, "engines": { "node": ">=8" }, @@ -3331,6 +3430,11 @@ "node": ">=6" } }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -3432,6 +3536,27 @@ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", "integrity": "sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==" }, + "node_modules/logform": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", + "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/logform/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -3648,6 +3773,32 @@ "whatwg-url": "^13.0.0" } }, + "node_modules/morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -3882,6 +4033,14 @@ "node": ">= 0.8" } }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3891,6 +4050,14 @@ "wrappy": "1" } }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dependencies": { + "fn.name": "1.x.x" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -4183,6 +4350,19 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4270,6 +4450,14 @@ } ] }, + "node_modules/safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -4391,6 +4579,19 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -4510,6 +4711,14 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "engines": { + "node": "*" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -4530,6 +4739,14 @@ "node": ">= 0.8" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -4637,6 +4854,11 @@ "node": ">=8" } }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -4695,6 +4917,14 @@ "node": ">=14" } }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -4786,6 +5016,11 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -4868,6 +5103,40 @@ "node": ">= 8" } }, + "node_modules/winston": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.0.tgz", + "integrity": "sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.4.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.7.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", + "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "dependencies": { + "logform": "^2.3.2", + "readable-stream": "^3.6.0", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -5416,6 +5685,21 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==" + }, + "@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5815,6 +6099,11 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" + }, "@types/webidl-conversions": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", @@ -5906,6 +6195,11 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, "babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -5997,6 +6291,21 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -6175,6 +6484,30 @@ "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, + "color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "requires": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + } + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -6187,8 +6520,25 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "requires": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } }, "concat-map": { "version": "0.0.1", @@ -6346,6 +6696,11 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -6504,6 +6859,11 @@ "bser": "2.1.1" } }, + "fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" + }, "fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -6546,6 +6906,11 @@ "path-exists": "^4.0.0" } }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -6844,8 +7209,7 @@ "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" }, "isexe": { "version": "2.0.0", @@ -7448,6 +7812,11 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -7543,6 +7912,26 @@ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", "integrity": "sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==" }, + "logform": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", + "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "requires": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -7684,6 +8073,28 @@ "whatwg-url": "^13.0.0" } }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "dependencies": { + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "requires": { + "ee-first": "1.1.1" + } + } + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -7843,6 +8254,11 @@ "ee-first": "1.1.1" } }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7852,6 +8268,14 @@ "wrappy": "1" } }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "requires": { + "fn.name": "1.x.x" + } + }, "onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -8054,6 +8478,16 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -8106,6 +8540,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "safe-stable-stringify": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -8205,6 +8644,21 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + } + } + }, "simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -8300,6 +8754,11 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" + }, "stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -8314,6 +8773,14 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -8388,6 +8855,11 @@ "minimatch": "^3.0.4" } }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -8431,6 +8903,11 @@ "punycode": "^2.3.0" } }, + "triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==" + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -8484,6 +8961,11 @@ "picocolors": "^1.0.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -8542,6 +9024,34 @@ "isexe": "^2.0.0" } }, + "winston": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.0.tgz", + "integrity": "sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==", + "requires": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.4.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.7.0" + } + }, + "winston-transport": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", + "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "requires": { + "logform": "^2.3.2", + "readable-stream": "^3.6.0", + "triple-beam": "^1.3.0" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 1d80602..69bb353 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,9 @@ "haversine": "^1.1.1", "heroku-ssl-redirect": "0.1.1", "isomorphic-unfetch": "^4.0.2", - "mongodb": "^6.5.0" + "mongodb": "^6.5.0", + "morgan": "^1.10.0", + "winston": "^3.13.0" }, "devDependencies": { "jest": "^29.7.0", diff --git a/readme.md b/readme.md index 7116a6c..6ced1a9 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ To run it on your machine you need Node.js, npm, nvm (https://github.com/nvm-sh/ It expects a few environment variables. -`DATABASE_URL` +`DB_URI` - MongoDB connection URI @@ -114,7 +114,7 @@ The following environmental variables are required. | Variable | Description | Example | Required? | | ---------------- | ------------------ | -------------------------------------------------------------------- | --------- | -| `DATABASE_URL` | Mongo database url | `mongodb://outpost:password@localhost:27018/outpost_api_development` | Yes | +| `DB_URI` | Mongo database url | `mongodb://outpost:password@localhost:27018/outpost_api_development` | Yes | | `GOOGLE_API_KEY` | Google API Key | `1234` | Yes | # ✨ Features @@ -142,17 +142,17 @@ We provide scripts to initialise the database once its been created. ```sh docker run -it --rm \ --env-file .env \ --e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ outpost-api-service:production prepare-collection docker run -it --rm \ --env-file .env \ --e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ outpost-api-service:production prepare-indices docker run -it --rm \ --env-file .env \ --e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ outpost-api-service:production dummy-data ``` @@ -161,7 +161,7 @@ docker build --pull --rm --no-cache --progress plain -f Dockerfile.production -t docker run \ -e FORCE_SSL=false \ --e DATABASE_URL=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ --env-file .env \ -p 3002:3000 \ --name outpost-api-production \ diff --git a/routes/index.js b/routes/index.js deleted file mode 100644 index 799cc5d..0000000 --- a/routes/index.js +++ /dev/null @@ -1,27 +0,0 @@ -const { Router } = require("express") -const router = Router() -const controller = require("../controllers") - -router.get("/services", controller.index) -router.get("/services/:id", controller.show) - -router.use((err, req, res, next) => { - console.error(err) - if(err.message === "No matching document"){ - res.status(404).json({ - error: "No matching document" - }) - } else { - res.status(500).json({ - error: process.env.NODE_ENV === "production" ? "There was an internal server error. Please try again later" : err.message - }) - } -}) - -router.use("*", (req, res, next)=>{ - res.status(404).json({ - error: "No route matches your request" - }) -}) - -module.exports = router \ No newline at end of file diff --git a/sample.env b/sample.env index 072a5ef..2a17834 100644 --- a/sample.env +++ b/sample.env @@ -1,6 +1,23 @@ +# ----- APP CONFIG + +# doesn't apply in development env +# FORCE_SSL=true + # ----- MONGO CONFIG -DATABASE_URL=mongodb://localhost:27018/outpost_api_development +DB_URI=mongodb://localhost:27018/outpost_api_development # ----- GEOCODING GOOGLE_API_KEY= + + +# ----- DEBUGGING + +#error: 0, +#warn: 1, +#info: 2, +#http: 3, +#debug: 4, +#DEBUG_LEVEL=debug + + diff --git a/.prettierrc.js b/src/.prettierrc.js similarity index 100% rename from .prettierrc.js rename to src/.prettierrc.js diff --git a/src/controllers/v1/index.js b/src/controllers/v1/index.js new file mode 100644 index 0000000..96cb694 --- /dev/null +++ b/src/controllers/v1/index.js @@ -0,0 +1,5 @@ +const services = require("./services") + +module.exports = { + services, +} diff --git a/src/controllers/v1/services/index.js b/src/controllers/v1/services/index.js new file mode 100644 index 0000000..226a5a8 --- /dev/null +++ b/src/controllers/v1/services/index.js @@ -0,0 +1,87 @@ +const logger = require("../../../utils/logger") +const { getServices, getService } = require("./routes") + +module.exports = { + /** + * Handles the api/v1/services route. + * @async + * @function + * @param {Object} req - Express request object. + * @param {Object} req.query - Query parameters for the request. + * @param {number} [req.query.per_page=50] - Number of items per page. + * @param {number} [req.query.page=1] - Current page number. + * @param {string} [req.query.keywords] - Keywords for full text search. + * @param {string} [req.query.location] - Location for geospatial search. + * @param {number} [req.query.lat] - Latitude for geospatial search. + * @param {number} [req.query.lng] - Longitude for geospatial search. + * @param {string|string[]} [req.query.targetDirectories] - Target directories to filter services. + * @param {string|string[]} [req.query.taxonomies] - Taxonomies to filter services. + * @param {string|string[]} [req.query.needs] - Needs to filter services. + * @param {string|string[]} [req.query.suitabilities] - Suitabilities to filter services. + * @param {string|string[]} [req.query.days] - Days to filter services. + * @param {string|string[]} [req.query.accessibilities] - Accessibilities to filter services. + * @param {string|string[]} [req.query.only] - Only free, open-weekends, open-after-six. + * @param {number} [req.query.min_age] - Minimum age for age range filtering. + * @param {number} [req.query.max_age] - Maximum age for age range filtering + * @param {Object} res - Express response object. + * @param {function} next - Express next middleware function. + * @returns {Promise} Promise representing the operation status. + * @throws {Error} If an error occurs during execution. + */ + index: async (req, res, next) => { + try { + const parameters = await getServices.parseRequestParameters(req) + logger.http(parameters) + + const query = await getServices.buildQuery(parameters) + + const { results, count } = await getServices.executeQuery( + query, + parameters.perPage, + parameters.page + ) + const content = getServices.buildContent( + results, + parameters.lat, + parameters.lng + ) + const response = getServices.buildResponse( + { results, count }, + parameters.perPage, + parameters.page, + content, + parameters.interpreted_location + ) + + res.json(response) + } catch (e) { + next(e) + } + }, + + /** + * Handles the api/v1/services/:id route. + * @async + * @function + * @param {Object} req - Express request object. + * @param {Object} req.params - Route parameters for the request. + * @param {number} req.params.id - ID of the service to retrieve. + * @param {Object} res - Express response object. + * @param {function} next - Express next middleware function. + * @returns {Promise} Promise representing the operation status. + * @throws {Error} If an error occurs during execution or no matching document is found. + */ + show: async (req, res, next) => { + try { + const query = getService.buildQuery(req.params) + const result = await getService.executeQuery(query) + // let result = await db() + // .collection("indexed_services") + // .findOne(query, projection) + if (!result) throw new Error("No matching document") + res.json(result) + } catch (err) { + next(err) + } + }, +} diff --git a/src/controllers/v1/services/routes/get-service.js b/src/controllers/v1/services/routes/get-service.js new file mode 100644 index 0000000..8211ac2 --- /dev/null +++ b/src/controllers/v1/services/routes/get-service.js @@ -0,0 +1,33 @@ +const filters = require("../../../../lib/filters") +const { projection } = require("../../../../lib") +const { db } = require("../../../../db") + +module.exports = { + /** + * + * @param {*} parameters + * @returns + */ + buildQuery: async parameters => { + let query = { id: parseInt(parameters.id) } + query.$and = [] + + const visibleNow = filters.visibleNow() + query.$and.push(...visibleNow) + + return query + }, + + /** + * + * @param {*} query + * @returns + */ + async executeQuery(query) { + let result = await db() + .collection("indexed_services") + .findOne(query, projection) + + return result + }, +} diff --git a/src/controllers/v1/services/routes/get-services.js b/src/controllers/v1/services/routes/get-services.js new file mode 100644 index 0000000..c3666ef --- /dev/null +++ b/src/controllers/v1/services/routes/get-services.js @@ -0,0 +1,241 @@ +const filters = require("../../../../lib/filters") +const { calculateDistance, geocode, projection } = require("../../../../lib") +const { db } = require("../../../../db") +const logger = require("../../../../utils/logger") + +module.exports = { + /** + * + * @param {*} req + * @returns + */ + parseRequestParameters: async req => { + const perPage = parseInt(req.query.per_page) || 50 + const page = parseInt(req.query.page) || 1 + const keywords = req.query.keywords + const location = req.query.location + let lat = req.query.lat + let lng = req.query.lng + let targetDirectories = req.query?.targetDirectories + ? [].concat(req.query.targetDirectories) + : [] + let taxonomies = req.query?.taxonomies + ? [].concat(req.query.taxonomies) + : [] + let needs = req.query?.needs ? [].concat(req.query.needs) : [] + let suitabilities = req.query?.suitabilities + ? [].concat(req.query.suitabilities) + : [] + let accessibilities = req.query?.accessibilities + ? [].concat(req.query.accessibilities) + : [] + let days = req.query?.days ? [].concat(req.query.days) : [] + const only = req.query.only + const minAge = req.query.min_age + const maxAge = req.query.max_age + + // not a param but we want to save on requests + let interpreted_location + + // Validate parameters here... + // if the query param is used more than once for these fields + // combine them and make sure they are unique + // so ?suitabilities=a&suitabilities=b,a becomes suitabilities=[a,b] + targetDirectories = [ + ...new Set(targetDirectories.flatMap(str => str.split(","))), + ] + needs = [...new Set(needs.flatMap(str => str.split(",")))] + suitabilities = [...new Set(suitabilities.flatMap(str => str.split(",")))] + accessibilities = [ + ...new Set(accessibilities.flatMap(str => str.split(","))), + ] + days = [...new Set(days.flatMap(str => str.split(",")))] + + // if we have a location then we can find lat lng + if (location && !(lat && lng)) { + let { results } = await geocode(req.query.location) + if (results[0]) { + interpreted_location = results[0].formatted_address + lng = results[0].geometry.location.lng + lat = results[0].geometry.location.lat + } + } + + return { + perPage, + page, + keywords, + location, + lat, + lng, + targetDirectories, + taxonomies, + needs, + suitabilities, + days, + accessibilities, + only, + minAge, + maxAge, + interpreted_location, + } + }, + /** + * + * @param {*} parameters + * @returns + */ + buildQuery: async parameters => { + let query = {} + query.$and = [] + + const filterKeywords = await filters.filterKeywords( + parameters.keywords, + parameters.location, + parameters.lat, + parameters.lng + ) + query = { ...filterKeywords, ...query } + + const locationGeometry = filters.locationGeometry( + parameters.lat, + parameters.lng + ) + query = { ...locationGeometry, ...query } + + // add filtering for taxonomies + const taxonomies = filters.filterTaxonomies(parameters.taxonomies) + query.$and.push(...taxonomies) + + // add filtering for ages + const ages = filters.filterAges(parameters.minAge, parameters.maxAge) + query.$and.push(...ages) + + // apply only filters + const only = filters.filterOnly(parameters.only) + query.$and.push(...only) + + // apply visibility filtering + const visibleNow = filters.visibleNow() + query.$and.push(...visibleNow) + + // add filtering + query.$and.push( + filters.filterTargetDirectories(parameters.targetDirectories), + filters.filterNeeds(parameters.needs), + filters.filterSuitabilities(parameters.suitabilities), + filters.filterAccessibilities(parameters.accessibilities), + filters.filterDays(parameters.days) + ) + + // clear empty values + query.$and = query.$and.filter(obj => Object.keys(obj).length !== 0) + + return query + }, + + /** + * this is done because of the $nearSphere method in locationGeometry. + * This is because The $nearSphere operator cannot be used with the + * countDocuments() method in MongoDB because countDocuments() + * uses an aggregation pipeline under the hood, and $nearSphere is not + * allowed in an aggregation pipeline. + * so as a workaround if we're using nearsphere we update the count + * query to prevent errors + * the result of nearsphere will include all services with a location + * so this query is a good substitute to get the totalElements value + * @TODO test this doesn't affect query object + * http://localhost:3001/api/v1/services?lat=51.2107714&lng=0.31105&per_page=10&suitabilities=physical-disabilities + * @param {*} query + * @returns + */ + createCountQuery: query => { + // "budget deep clone" we spread $and so can modify it for countQuery only + const countQuery = { ...query, $and: [...query.$and] } + if ("locations.geometry" in countQuery) { + delete countQuery["locations.geometry"] + + countQuery["$and"].push({ + "locations.geometry": { + $exists: true, + $ne: null, + }, + }) + } + return countQuery + }, + + /** + * + * @param {*} query + * @param {*} perPage + * @param {*} page + * @returns + */ + async executeQuery(query, perPage, page) { + const Service = db().collection("indexed_services") + const countQuery = this.createCountQuery(query) + + logger.debug(query) + logger.debug(countQuery) + + const [results, count] = await Promise.all([ + Service.find(query) + .project({ + ...projection, + }) + .sort(query.$text ? { score: { $meta: "textScore" } } : {}) + .limit(perPage) + .skip((page - 1) * perPage) + .toArray(), + Service.countDocuments(countQuery), + ]) + + return { results, count } + }, + + /** + * + * @param {*} results + * @param {*} lat + * @param {*} lng + * @returns + */ + buildContent(results, lat, lng) { + return results.map(result => ({ + ...result, + distance_away: calculateDistance(lat, lng, result.locations), + })) + }, + + /** + * + * @param {*} param0 + * @param {*} perPage + * @param {*} page + * @param {*} content + * @param {*} interpreted_location + * @returns + */ + buildResponse( + { results, count }, + perPage, + page, + content, + interpreted_location + ) { + const currentPage = parseInt(page) || 1 + const totalPages = Math.ceil(count / perPage) + + return { + number: currentPage, + size: results.length, + totalPages: totalPages, + totalElements: count, + first: currentPage === 1, + last: currentPage === totalPages, + interpreted_location, + content: content, + } + }, +} diff --git a/src/controllers/v1/services/routes/index.js b/src/controllers/v1/services/routes/index.js new file mode 100644 index 0000000..ab035bf --- /dev/null +++ b/src/controllers/v1/services/routes/index.js @@ -0,0 +1,4 @@ +module.exports = { + getServices: require("./get-services"), + getService: require("./get-service"), +} diff --git a/src/db.js b/src/db.js new file mode 100644 index 0000000..d177fd5 --- /dev/null +++ b/src/db.js @@ -0,0 +1,40 @@ +const { MongoClient } = require("mongodb") +const logger = require("./utils/logger") +const uri = process.env.DB_URI + +// @TODO test mongodb://outpost:password@mongo/outpost_api_development?retryWrites=true&w=majority +// @TODO test mongodb://outpost:password@mongo/?retryWrites=true&w=majority +// @TODO test mongodb://outpost:password@mongo + +let db + +module.exports = { + connect: async cb => { + MongoClient.connect(uri) + .then(async client => { + // const ping = await client.db().command({ ping: 1 }) + db = client.db() + const dbName = db.databaseName + if (dbName === "test" || !dbName) { + logger.warn( + 'You are connected to the default "test" database, you might not get any results' + ) + } else { + logger.info(`Connected to the "${dbName}" database`) + } + cb(db) + }) + .catch(err => { + logger.error(err) + // throw new Error(err) + }) + }, + db: () => { + if (!db) { + throw new Error( + `db() called without being connected to the database. Please connect first, see application logs for more details.` + ) + } + return db + }, +} diff --git a/src/lib/filters.js b/src/lib/filters.js new file mode 100644 index 0000000..9ff3d0a --- /dev/null +++ b/src/lib/filters.js @@ -0,0 +1,227 @@ +const { db } = require("../db") + +module.exports = { + locationGeometry: (lat, lng) => { + let query = {} + if (lat && lng) { + query["locations.geometry"] = { + // remember if you take out nearsphere to update the executeQuery function! + // this lets us get accurate result counts + // $geoWithin: { + // $centerSphere: [ + // [parseFloat(lng), parseFloat(lat)], + // 10 / 3963.2, // 10 miles radius + // ], + // }, + // but this is how its always been done so we will keep this for now + $nearSphere: { + $geometry: { + type: "Point", + coordinates: [parseFloat(lng), parseFloat(lat)], + }, + }, + } + } + return query + }, + + visibleNow: () => { + let query = [] + query.push({ + $or: [{ visible_from: null }, { visible_from: { $lte: new Date() } }], + }) + query.push({ + $or: [{ visible_to: null }, { visible_to: { $gte: new Date() } }], + }) + return query + }, + + /** + * if there is a location or lat or lng value then we do a search first for keyword to refine the location search query + * $text performs a text search on the content of the fields indexed with a text index. + * In this case it will search the name_text_description_text index + * @TODO test http://localhost:3001/api/v1/services + * @TODO test http://localhost:3001/api/v1/services?location=London + * @TODO test http://localhost:3001/api/v1/services?lat=51.2107714&lng=0.31105&per_page=10 + * @param {*} keywords + * @param {...any} args + * @returns + */ + filterKeywords: async (keywords, ...args) => { + let query = {} + if (keywords) { + if (args.filter(n => n).length > 0) { + const Service = db().collection("indexed_services") + const docs = await Service.find({ + $text: { $search: keywords }, + }).toArray() + query._id = { $in: docs.map(doc => doc._id) } + } else { + query.$text = { $search: keywords } + } + } + return query + }, + + // This filter returns all services with an age range overlapping with the + // range supplied by the user. + // min_age=0&max_age=18 + filterAges: (min_age, max_age) => { + let query = [] + + if (min_age) { + query.push({ + $or: [{ max_age: null }, { max_age: { $gte: parseInt(min_age) } }], + }) + } + + if (max_age) { + query.push({ + $or: [{ min_age: null }, { min_age: { $lte: parseInt(max_age) } }], + }) + } + + return query + }, + + // filters by only + // only=free + filterOnly: only => { + let query = [] + if (only) { + if (only.includes("free")) query.push({ free: true }) + // if(only.includes("open-weekends")) query["regular_schedules.weekday"] = { $in: [ "Saturday", "Sunday"] } + // if(only.includes("open-after-six")) query["regular_schedules.closes_at"] = { $gte: "18:00"} + } + return query + }, + + /** + * Specify the taxonomies to search for services + * We are using $in to match any of the taxonomies + * Since we are using tags/hierarchies we need to make sure that we are including the bottom level of a tree in each level after it appears + * { + * "$and": [ + * { + * "taxonomies.slug": { + * "$in": ["things-to-do"] + * } + * }, + * { + * "taxonomies.slug": { + * "$in": ["clubs-and-groups","holiday-activities", "dance-drama-and-music"] + * } + * }, + * { + * "taxonomies.slug": { + * "$in": ["youth-clubs", "gaming", "sports-courses-and-camps", "dance-drama-and-music"] + * } + * }, + * ] + *} + * taxonomies=taxonomies=advice-and-support&taxonomies=health-and-wellbeing + * targetDirectories=bod + * { "target_directories.label": { "$in": ["bfis", "bod"] } } + * [ 'fis', 'bod' ] + * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-do + * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-dotaxonomies=parks-and-outdoor-spaces + * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-do&taxonomies=things-to-do&taxonomies=parks-and-outdoor-spaces + * @param {*} targetDirectories + */ + filterTaxonomies: taxonomies => { + let query = [] + if (taxonomies) { + taxonomies.forEach(cluster => { + query.push({ + "taxonomies.slug": { $in: [].concat(cluster.split(",")) }, + }) + }) + } + return query + }, + + /** + * Specify the directory to search for services + * targetDirectories=bod,bfis + * targetDirectories=bod + * { "target_directories.label": { "$in": ["bfis", "bod"] } } + * [ 'fis', 'bod' ] + * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis,bod&targetDirectories=bfis,bod + * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis,bod + * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis + * @param {*} targetDirectories + */ + filterTargetDirectories: targetDirectories => { + if (targetDirectories?.length > 0) { + return { + "target_directories.label": { $in: targetDirectories }, + } + } + return {} + }, + + /** + * Send needs + * @TODO test http://localhost:3001/api/v1/services?needs=visual + * @TODO test http://localhost:3001/api/v1/services?needs=visual&needs=autism + * @param {*} needs + * @returns + */ + filterNeeds: needs => { + if (needs?.length > 0) { + return { + "send_needs.slug": { $in: needs }, + } + } + return {} + }, + + /** + * Suitabilitieies + * @TODO test http://localhost:3001/api/v1/services?suitabilities=physical-disabilities + * @TODO test http://localhost:3001/api/v1/services?suitabilities=physical-disabilities&suitabilities=mental-health-acquired-brain-injury + * @param {*} needs + * @returns + */ + filterSuitabilities: suitabilities => { + if (suitabilities?.length > 0) { + return { + "suitabilities.slug": { $in: suitabilities }, + } + } + return {} + }, + + /** + * Accessibilities + * @TODO test http://localhost:3001/api/v1/services?accessibilities=accessible-toilet-facilities + * @TODO test http://localhost:3001/api/v1/services?accessibilities=accessible-toilet-facilities&accessibilities=wheelchair-accessible-entrance + * @param {*} needs + * @returns + */ + filterAccessibilities: accessibilities => { + if (accessibilities?.length > 0) { + return { + "locations.accessibilities.slug": { $in: accessibilities }, + } + } + return {} + }, + + /** + * Days + * this has changed from previous iterations since the results returned wouldn't be accurate + * @TODO test http://localhost:3001/api/v1/services?accessibilities=accessible-toilet-facilities + * @TODO test http://localhost:3001/api/v1/services?accessibilities=accessible-toilet-facilities&accessibilities=wheelchair-accessible-entrance + * @param {*} needs + * @returns + */ + filterDays: days => { + if (days?.length > 0) { + return { + "regular_schedules.weekday": { $in: days }, + } + } + return {} + }, +} diff --git a/lib/index.js b/src/lib/index.js similarity index 87% rename from lib/index.js rename to src/lib/index.js index 12a4481..bfa2a50 100644 --- a/lib/index.js +++ b/src/lib/index.js @@ -3,14 +3,14 @@ const haversine = require("haversine") const fetch = require("isomorphic-unfetch") module.exports = { - calculateDistance: (query, locations) => { + calculateDistance: (lat, lng, locations) => { let distances = [] locations.forEach(location => { distances.push( haversine( { - latitude: query.lat, - longitude: query.lng, + latitude: lat, + longitude: lng, }, { latitude: location.geometry.coordinates[1], diff --git a/src/middleware/morgan.middleware.js b/src/middleware/morgan.middleware.js new file mode 100644 index 0000000..0c37930 --- /dev/null +++ b/src/middleware/morgan.middleware.js @@ -0,0 +1,23 @@ +const morgan = require("morgan") +const logger = require("../utils/logger") + +const stream = { + // Use the http severity + write: message => logger.http(message), +} + +const skip = () => { + const env = process.env.NODE_ENV || "development" + return env !== "development" +} + +const morganMiddleware = morgan( + // Define message format string (this is the default one). + // The message format is made from tokens, and each token is + // defined inside the Morgan library. + // You can create your custom token to show what do you want from a request. + ":remote-addr :method :url :status :res[content-length] - :response-time ms", + { stream, skip } +) + +module.exports = morganMiddleware diff --git a/lib/dummy-data.js b/src/utils/dummy-data.js similarity index 93% rename from lib/dummy-data.js rename to src/utils/dummy-data.js index 145099c..66476da 100644 --- a/lib/dummy-data.js +++ b/src/utils/dummy-data.js @@ -1,5 +1,6 @@ require("dotenv").config() const { connect } = require("../db") +const logger = require("./logger") connect(async db => { // @TODO make sure when we do this we do it on the right db! @@ -83,14 +84,14 @@ connect(async db => { local_offer: null, }, ]) - console.log("✅ Added dummy data to 'indexed_services' collection") + logger.info("✅ Added dummy data to 'indexed_services' collection") process.exit() } catch (e) { - console.log(e) + logger.error(e) throw e } } else { - console.log("🚫 'indexed_services' collection doesn't exist yet") + logger.warn("🚫 'indexed_services' collection doesn't exist yet") process.exit() } }) diff --git a/src/utils/logger.js b/src/utils/logger.js new file mode 100644 index 0000000..e7a3c41 --- /dev/null +++ b/src/utils/logger.js @@ -0,0 +1,78 @@ +const winston = require("winston") +// Define your severity levels. +// With them, You can create log files, +// see or hide levels based on the running ENV. +const levels = { + error: 0, + warn: 1, + info: 2, + http: 3, + debug: 4, +} + +// This method set the current severity based on +// the current NODE_ENV: show all the log levels +// if the server was run in development mode; otherwise, +// if it was run in production, show only warn and error messages. +const level = () => { + const environment = process.env.NODE_ENV || "production" + const isDevelopment = environment === "development" + const default_debug_level = process.env.DEBUG_LEVEL || "warn" + const development_debug_level = process.env.DEBUG_LEVEL || "debug" + return isDevelopment ? development_debug_level : default_debug_level +} + +// Define different colors for each level. +// Colors make the log message more visible, +// adding the ability to focus or ignore messages. +const colors = { + error: "red", + warn: "yellow", + info: "green", + http: "magenta", + debug: "white", +} + +// Tell winston that you want to link the colors +// defined above to the severity levels. +winston.addColors(colors) + +// Chose the aspect of your log customizing the log format. +const format = winston.format.combine( + // Add the message timestamp with the preferred format + winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss:ms" }), + // Tell Winston that the logs must be colored + winston.format.colorize({ all: true }), + // Define the format of the message showing the timestamp, the level and the message + winston.format.printf( + info => `${info.timestamp} ${info.level}: ${info.message}` + ), + // show stack trace with errors + winston.format.errors({ stack: true }) +) + +// Define which transports the logger must use to print out messages. +// In this example, we are using three different transports +const transports = [ + // Allow the use the console to print the messages + new winston.transports.Console(), + // Allow to print all the error level messages inside the error.log file + new winston.transports.File({ + filename: "logs/error.log", + level: "error", + }), + // Allow to print all the error message inside the all.log file + // (also the error log that are also printed inside the error.log( + new winston.transports.File({ filename: "logs/all.log" }), +] + +// Create the logger instance that has to be exported +// and used to log messages. +const logger = winston.createLogger({ + level: level(), + levels, + format, + transports, +}) + +module.exports = logger diff --git a/lib/prepare-collection.js b/src/utils/prepare-collection.js similarity index 74% rename from lib/prepare-collection.js rename to src/utils/prepare-collection.js index 4ae9d34..a8084d0 100644 --- a/lib/prepare-collection.js +++ b/src/utils/prepare-collection.js @@ -1,5 +1,6 @@ require("dotenv").config() const { connect } = require("../db") +const logger = require("./logger") connect(async db => { // @TODO make sure when we do this we do it on the right db! @@ -12,14 +13,14 @@ connect(async db => { if (!indexedServicesDb) { try { await db.createCollection("indexed_services") - console.log("✅ 'indexed_services' Collection created successfully") + logger.info("✅ 'indexed_services' Collection created successfully") process.exit() } catch (e) { - console.log(e) + logger.error(e) throw e } } else { - console.log("✅ 'indexed_services' Collection already exists") + logger.warn("✅ 'indexed_services' Collection already exists") process.exit() } }) diff --git a/lib/prepare-indices.js b/src/utils/prepare-indices.js similarity index 83% rename from lib/prepare-indices.js rename to src/utils/prepare-indices.js index 0b4692d..ddae81c 100644 --- a/lib/prepare-indices.js +++ b/src/utils/prepare-indices.js @@ -1,5 +1,6 @@ require("dotenv").config() const { connect } = require("../db") +const logger = require("./logger") connect(async db => { try { @@ -21,9 +22,9 @@ connect(async db => { await db.collection("indexed_services").createIndex({ "taxonomies.slug": 1, }) - console.log("✅ Indices created successfully") + logger.info("✅ Indices created successfully") process.exit() } catch (e) { - console.log(e) + logger.error(e) } }) From ade9cb0345161bd794605bfb10bd954f67afd0c0 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 25 Apr 2024 00:04:02 +0100 Subject: [PATCH 19/23] . --- src/.prettierrc.js => .prettierrc.js | 0 __tests__/unit/db.test.js | 47 +++ __tests__/unit/lib/filters.test.js | 244 ++++++++++++ __tests__/unit/lib/index.test.js | 19 +- __tests__/unit/lib/queries.test.js | 123 ------ __tests__/unit/v1/index.test.js | 10 + __tests__/unit/v1/services/index.test.js | 114 ++++++ .../v1/services/routes/get-service.test.js | 43 +++ .../v1/services/routes/get-services.test.js | 356 ++++++++++++++++++ .../unit/v1/services/routes/index.test.js | 13 + index.js | 68 ++-- jest.config.js | 2 +- .../morgan.middleware.js | 2 +- package.json | 7 +- src/controllers/v1/services/index.js | 4 +- .../v1/services/routes/get-services.js | 68 ++-- src/db.js | 2 +- src/lib/filters.js | 4 +- src/lib/index.js | 6 + {src/utils => utils}/dummy-data.js | 30 +- {src/utils => utils}/logger.js | 0 {src/utils => utils}/prepare-collection.js | 0 {src/utils => utils}/prepare-indices.js | 0 23 files changed, 949 insertions(+), 213 deletions(-) rename src/.prettierrc.js => .prettierrc.js (100%) create mode 100644 __tests__/unit/db.test.js create mode 100644 __tests__/unit/lib/filters.test.js delete mode 100644 __tests__/unit/lib/queries.test.js create mode 100644 __tests__/unit/v1/index.test.js create mode 100644 __tests__/unit/v1/services/index.test.js create mode 100644 __tests__/unit/v1/services/routes/get-service.test.js create mode 100644 __tests__/unit/v1/services/routes/get-services.test.js create mode 100644 __tests__/unit/v1/services/routes/index.test.js rename {src/middleware => middleware}/morgan.middleware.js (93%) rename {src/utils => utils}/dummy-data.js (87%) rename {src/utils => utils}/logger.js (100%) rename {src/utils => utils}/prepare-collection.js (100%) rename {src/utils => utils}/prepare-indices.js (100%) diff --git a/src/.prettierrc.js b/.prettierrc.js similarity index 100% rename from src/.prettierrc.js rename to .prettierrc.js diff --git a/__tests__/unit/db.test.js b/__tests__/unit/db.test.js new file mode 100644 index 0000000..7821d00 --- /dev/null +++ b/__tests__/unit/db.test.js @@ -0,0 +1,47 @@ +const { MongoClient } = require("mongodb") +const { connect, db } = require("./../../src/db") +const logger = require("./../../utils/logger") + +jest.mock("mongodb") +jest.mock("./../../utils/logger") + +describe("db", () => { + describe("connect", () => { + it.todo("should connect to the database and call the callback with the db") + // it("should connect to the database and call the callback with the db", async () => { + // const mockDb = { databaseName: "outpost_api_development" } + // const mockClient = { db: jest.fn().mockReturnValue(mockDb) } + // MongoClient.connect.mockResolvedValue(mockClient) + + // const cb = jest.fn() + // await connect(cb) + + // expect(MongoClient.connect).toHaveBeenCalledWith(process.env.DB_URI) + // expect(mockClient.db).toHaveBeenCalled() + // expect(cb).toHaveBeenCalledWith(mockDb) + // }) + + it.todo("should log an error if the connection fails") + // it("should log an error if the connection fails", async () => { + // const error = new Error("Connection failed") + // MongoClient.connect.mockRejectedValue(error) + + // const cb = jest.fn() + // await connect(cb) + + // expect(logger.error).toHaveBeenCalledWith(error) + // }) + + it.todo("should warn you if it connects but the database is 'test'") + }) + + describe("db", () => { + it("should throw an error if not connected", () => { + expect(() => db()).toThrow( + "db() called without being connected to the database. Please connect first, see application logs for more details." + ) + }) + + it.todo("should return the db if connected") + }) +}) diff --git a/__tests__/unit/lib/filters.test.js b/__tests__/unit/lib/filters.test.js new file mode 100644 index 0000000..b556ced --- /dev/null +++ b/__tests__/unit/lib/filters.test.js @@ -0,0 +1,244 @@ +const filters = require("./../../../src/lib/filters") + +describe("locationGeometry", () => { + it("should return an empty object if lat and lng are not provided", () => { + expect(filters.locationGeometry()).toEqual({}) + }) + + it("should return a query object if lat and lng are provided", () => { + const lat = "40.7128" + const lng = "-74.0060" + const expectedQuery = { + "locations.geometry": { + $nearSphere: { + $geometry: { + type: "Point", + coordinates: [parseFloat(lng), parseFloat(lat)], + }, + }, + }, + } + expect(filters.locationGeometry(lat, lng)).toEqual(expectedQuery) + }) +}) + +describe("Calling visibleNow", () => { + it("should return a query that checks if a document is visible now", () => { + const query = filters.visibleNow() + + // Check if the query contains the correct conditions + expect(query).toEqual([ + { + $or: [ + { visible_from: null }, + { visible_from: { $lte: expect.any(Date) } }, + ], + }, + { + $or: [{ visible_to: null }, { visible_to: { $gte: expect.any(Date) } }], + }, + ]) + }) +}) + +describe("filterKeywords", () => { + it("should return an empty object if keywords are not provided", async () => { + const result = await filters.filterKeywords() + expect(result).toEqual({}) + }) + + it("should return a query object with $text if no locationInQuery is provided", async () => { + const keywords = "test" + const expectedQuery = { $text: { $search: keywords } } + const result = await filters.filterKeywords(keywords) + expect(result).toEqual(expectedQuery) + }) + + it.todo("should return a query object with _id if locationInQuery is true") + // it("should return a query object with _id if locationInQuery is true", async () => { + // const keywords = "test" + // const args = ["arg1", "arg2"] + // const expectedQuery = { + // _id: { $in: [new ObjectId("60d5ec9af682fbd39a892fb6")] }, + // } + // const result = await filters.filterKeywords(keywords, ...args) + // expect(result).toEqual(expectedQuery) + // }) +}) + +describe("filterAges", () => { + it("should return an empty array if min_age and max_age are not provided", () => { + expect(filters.filterAges()).toEqual([]) + }) + + it("should return a query object with max_age if min_age is provided", () => { + const min_age = "10" + const expectedQuery = [ + { + $or: [{ max_age: null }, { max_age: { $gte: parseInt(min_age) } }], + }, + ] + expect(filters.filterAges(min_age)).toEqual(expectedQuery) + }) + + it("should return a query object with min_age if max_age is provided", () => { + const max_age = "20" + const expectedQuery = [ + { + $or: [{ min_age: null }, { min_age: { $lte: parseInt(max_age) } }], + }, + ] + expect(filters.filterAges(undefined, max_age)).toEqual(expectedQuery) + }) + + it("should return a query object with min_age and max_age if both are provided", () => { + const min_age = "10" + const max_age = "20" + const expectedQuery = [ + { + $or: [{ max_age: null }, { max_age: { $gte: parseInt(min_age) } }], + }, + { + $or: [{ min_age: null }, { min_age: { $lte: parseInt(max_age) } }], + }, + ] + expect(filters.filterAges(min_age, max_age)).toEqual(expectedQuery) + }) +}) + +describe("filterOnly", () => { + it("should return an empty array if only is not provided", () => { + expect(filters.filterOnly()).toEqual([]) + }) + + it('should return a query object with free: true if only includes "free"', () => { + const only = ["free"] + const expectedQuery = [{ free: true }] + expect(filters.filterOnly(only)).toEqual(expectedQuery) + }) +}) + +describe("filterTaxonomies", () => { + it("should return an empty array if taxonomies is not provided", () => { + expect(filters.filterTaxonomies()).toEqual([]) + }) + + it("should return a query array if taxonomies is provided", () => { + const taxonomies = [ + "things-to-do", + "clubs-and-groups,holiday-activities,dance-drama-and-music", + "youth-clubs,gaming,sports-courses-and-camps,dance-drama-and-music", + ] + const expectedQuery = [ + { "taxonomies.slug": { $in: ["things-to-do"] } }, + { + "taxonomies.slug": { + $in: [ + "clubs-and-groups", + "holiday-activities", + "dance-drama-and-music", + ], + }, + }, + { + "taxonomies.slug": { + $in: [ + "youth-clubs", + "gaming", + "sports-courses-and-camps", + "dance-drama-and-music", + ], + }, + }, + ] + expect(filters.filterTaxonomies(taxonomies)).toEqual(expectedQuery) + }) +}) + +describe("filterTargetDirectories", () => { + it("should return an empty object if targetDirectories is not provided", () => { + expect(filters.filterTargetDirectories()).toEqual({}) + }) + + it("should return an empty object if targetDirectories is an empty array", () => { + expect(filters.filterTargetDirectories([])).toEqual({}) + }) + + it("should return a query object if targetDirectories is provided", () => { + const targetDirectories = ["bfis", "bod"] + const expectedQuery = { + "target_directories.label": { $in: targetDirectories }, + } + expect(filters.filterTargetDirectories(targetDirectories)).toEqual( + expectedQuery + ) + }) +}) + +describe("filterSuitabilities", () => { + it("should return an empty object if suitabilities is not provided", () => { + expect(filters.filterSuitabilities()).toEqual({}) + }) + + it("should return a query object if suitabilities is provided", () => { + const suitabilities = [ + "physical-disabilities", + "mental-health-acquired-brain-injury", + ] + const expectedQuery = { + "suitabilities.slug": { $in: suitabilities }, + } + expect(filters.filterSuitabilities(suitabilities)).toEqual(expectedQuery) + }) +}) + +describe("filterNeeds", () => { + it("should return an empty object if needs is not provided", () => { + expect(filters.filterNeeds()).toEqual({}) + }) + + it("should return a query object if needs is provided", () => { + const needs = ["visual", "autism"] + const expectedQuery = { + "send_needs.slug": { $in: needs }, + } + expect(filters.filterNeeds(needs)).toEqual(expectedQuery) + }) +}) + +describe("filterAccessibilities", () => { + it("should return an empty object if accessibilities is not provided", () => { + expect(filters.filterAccessibilities()).toEqual({}) + }) + + it("should return a query object if accessibilities is provided", () => { + const accessibilities = [ + "accessible-toilet-facilities", + "wheelchair-accessible-entrance", + ] + const expectedQuery = { + "locations.accessibilities.slug": { $in: accessibilities }, + } + expect(filters.filterAccessibilities(accessibilities)).toEqual( + expectedQuery + ) + }) +}) + +describe("filterDays", () => { + it("should return an empty object if days is not provided", () => { + expect(filters.filterDays()).toEqual({}) + }) + + it("should return an empty object if days is an empty array", () => { + expect(filters.filterDays([])).toEqual({}) + }) + + it("should return a query object if days is provided", () => { + const days = ["Monday", "Tuesday"] + const expectedQuery = { + "regular_schedules.weekday": { $in: days }, + } + expect(filters.filterDays(days)).toEqual(expectedQuery) + }) +}) diff --git a/__tests__/unit/lib/index.test.js b/__tests__/unit/lib/index.test.js index e4b1139..c8e6638 100644 --- a/__tests__/unit/lib/index.test.js +++ b/__tests__/unit/lib/index.test.js @@ -1,15 +1,28 @@ -const Index = require("../../../lib/index") +const Index = require("./../../../src/lib/index") describe("Calling calculateDistance", () => { it("should return the minimum distance between the query and the locations", () => { - const query = { lat: 0, lng: 0 } const locations = [ { geometry: { coordinates: [0, 1] } }, { geometry: { coordinates: [0, 2] } }, ] - const distance = Index.calculateDistance(query, locations) + const distance = Index.calculateDistance(0, 0, locations) // Check if the distance is the minimum distance expect(distance).toBeCloseTo(69.1, 1) // The distance between (0, 0) and (0, 1) is approximately 69.1 miles }) }) + +describe("Calling geocode", () => { + it.todo("should return a json object") + it.todo("should throw an error if GOOGLE_API_KEY or location is not set") +}) + +describe("Calling projection", () => { + it("should return the projection object", () => { + const projection = Index.projection + + // Check if the projection object is correct + expect(projection).toEqual({ _id: 0, visible_from: 0, visible_to: 0 }) + }) +}) diff --git a/__tests__/unit/lib/queries.test.js b/__tests__/unit/lib/queries.test.js deleted file mode 100644 index 17591e8..0000000 --- a/__tests__/unit/lib/queries.test.js +++ /dev/null @@ -1,123 +0,0 @@ -const Queries = require("../../../lib/queries") - -describe("Calling visibleNow", () => { - it("should return a query that checks if a document is visible now", () => { - const query = Queries.visibleNow({}) - - // Check if the query contains the correct conditions - expect(query).toEqual({ - $and: [ - { - $or: [ - { visible_from: null }, - { visible_from: { $lte: expect.any(Date) } }, - ], - }, - { - $or: [ - { visible_to: null }, - { visible_to: { $gte: expect.any(Date) } }, - ], - }, - ], - }) - }) -}) - -describe("Calling filterAges ", () => { - it("should return an empty result if called with no query", () => { - const query = Queries.filterAges({}, { query: {} }) - expect(query).toStrictEqual({ $and: [] }) - }) - - describe("with only a min_age supplied", () => { - const query = Queries.filterAges({}, { query: { min_age: 16 } }) - - it("should return a query containing a max_age gte the min_age supplied", () => { - expect(query).toStrictEqual({ - $and: [ - { - $or: [ - { - max_age: null, - }, - { - max_age: { - $gte: 16, - }, - }, - ], - }, - ], - }) - }) - }) - - describe("with only a max_age supplied", () => { - const query = Queries.filterAges({}, { query: { max_age: 12 } }) - - it("should return a query containing min_age lte the max_age supplied", () => { - expect(query).toStrictEqual({ - $and: [ - { - $or: [ - { - min_age: null, - }, - { - min_age: { - $lte: 12, - }, - }, - ], - }, - ], - }) - }) - }) - - describe("with a min_age and a max_age supplied", () => { - const query = Queries.filterAges({}, { query: { min_age: 8, max_age: 14 } }) - - it("should return a query containing max_age gte the min_age and min_age lte the max_age supplied", () => { - expect(query).toStrictEqual({ - $and: [ - { - $or: [ - { - max_age: null, - }, - { - max_age: { - $gte: 8, - }, - }, - ], - }, - { - $or: [ - { - min_age: null, - }, - { - min_age: { - $lte: 14, - }, - }, - ], - }, - ], - }) - }) - }) - - describe("Calling filterOnly", () => { - it("should return a query that checks if a document is free", () => { - const req = { query: { only: ["free"] } } - const query = Queries.filterOnly({}, req) - - // Check if the query contains the correct condition - expect(query).toEqual({ free: true }) - }) - }) -}) diff --git a/__tests__/unit/v1/index.test.js b/__tests__/unit/v1/index.test.js new file mode 100644 index 0000000..ceabdea --- /dev/null +++ b/__tests__/unit/v1/index.test.js @@ -0,0 +1,10 @@ +const index = require("./../../../src/controllers/v1/index") +const services = require("./../../../src/controllers/v1/services/index") + +jest.mock("./../../../src/controllers/v1/services/index") + +describe("index", () => { + it("should export services", () => { + expect(index.services).toBe(services) + }) +}) diff --git a/__tests__/unit/v1/services/index.test.js b/__tests__/unit/v1/services/index.test.js new file mode 100644 index 0000000..903b080 --- /dev/null +++ b/__tests__/unit/v1/services/index.test.js @@ -0,0 +1,114 @@ +const { + index, + show, +} = require("./../../../../src/controllers/v1/services/index") +const getServices = require("./../../../../src/controllers/v1/services/routes/get-services") +const getService = require("./../../../../src/controllers/v1/services/routes/get-service") + +jest.mock("./../../../../src/controllers/v1/services/routes/get-services") +jest.mock("./../../../../src/controllers/v1/services/routes/get-service") + +describe("index", () => { + it("should parse request parameters, build and execute query, build content and response, and send the response", async () => { + const req = { query: {} } + const res = { json: jest.fn() } + const next = jest.fn() + + const parameters = { perPage: 10, page: 2 } + const query = { id: 123 } + const results = [{ id: 123, name: "Test Service" }] + const count = 1 + const content = "Test Content" + const response = { results, count, content } + + getServices.parseRequestParameters.mockResolvedValue(parameters) + getServices.buildQuery.mockResolvedValue(query) + getServices.executeQuery.mockResolvedValue({ results, count }) + getServices.buildContent.mockReturnValue(content) + getServices.buildResponse.mockReturnValue(response) + + await index(req, res, next) + + expect(getServices.parseRequestParameters).toHaveBeenCalledWith(req.query) + + expect(getServices.buildQuery).toHaveBeenCalledWith(parameters) + expect(getServices.executeQuery).toHaveBeenCalledWith( + query, + parameters.perPage, + parameters.page + ) + expect(getServices.buildContent).toHaveBeenCalledWith( + results, + parameters.lat, + parameters.lng + ) + expect(getServices.buildResponse).toHaveBeenCalledWith( + { results, count }, + parameters.perPage, + parameters.page, + content, + parameters.interpreted_location + ) + expect(res.json).toHaveBeenCalledWith(response) + }) + + it("should call next with the error if an error occurs", async () => { + const req = { query: {} } + const res = { json: jest.fn() } + const next = jest.fn() + const error = new Error("Test Error") + + getServices.parseRequestParameters.mockRejectedValue(error) + + await index(req, res, next) + + expect(next).toHaveBeenCalledWith(error) + }) + + describe("show", () => { + it("should build and execute query, and send the result", async () => { + const req = { params: { id: "123" } } + const res = { json: jest.fn() } + const next = jest.fn() + + const query = { id: 123 } + const result = { id: 123, name: "Test Service" } + + getService.buildQuery.mockReturnValue(query) + getService.executeQuery.mockResolvedValue(result) + + await show(req, res, next) + + expect(getService.buildQuery).toHaveBeenCalledWith(req.params) + expect(getService.executeQuery).toHaveBeenCalledWith(query) + expect(res.json).toHaveBeenCalledWith(result) + }) + + it("should call next with the error if an error occurs", async () => { + const req = { params: { id: "123" } } + const res = { json: jest.fn() } + const next = jest.fn() + const error = new Error("Test Error") + + getService.buildQuery.mockReturnValue({}) + getService.executeQuery.mockRejectedValue(error) + + await show(req, res, next) + + expect(next).toHaveBeenCalledWith(error) + }) + + it("should call next with an error if no matching document is found", async () => { + const req = { params: { id: "123" } } + const res = { json: jest.fn() } + const next = jest.fn() + + getService.buildQuery.mockReturnValue({}) + getService.executeQuery.mockResolvedValue(null) + + await show(req, res, next) + + expect(next).toHaveBeenCalledWith(new Error("No matching document")) + }) + }) +}) diff --git a/__tests__/unit/v1/services/routes/get-service.test.js b/__tests__/unit/v1/services/routes/get-service.test.js new file mode 100644 index 0000000..7344307 --- /dev/null +++ b/__tests__/unit/v1/services/routes/get-service.test.js @@ -0,0 +1,43 @@ +const { + buildQuery, + executeQuery, +} = require("./../../../../../src/controllers/v1/services/routes/get-service") +const filters = require("./../../../../../src/lib/filters") +const Index = require("./../../../../../src/lib") +const { db } = require("./../../../../../src/db") + +jest.mock("./../../../../../src/lib/filters") +jest.mock("./../../../../../src/db") + +describe("get-service", () => { + describe("buildQuery", () => { + it("should build a query with the provided parameters", async () => { + const parameters = { id: "123" } + const visibleNow = [{ visible: true }] + filters.visibleNow.mockReturnValue(visibleNow) + + const expectedQuery = { id: 123, $and: visibleNow } + const query = await buildQuery(parameters) + + expect(query).toEqual(expectedQuery) + }) + }) + + describe("executeQuery", () => { + it("should execute the provided query and return the result", async () => { + const query = { id: 123, $and: [{ visible: true }] } + const result = { id: 123, name: "Test Service" } + const mockDb = { + collection: jest.fn().mockReturnThis(), + findOne: jest.fn().mockResolvedValue(result), + } + db.mockReturnValue(mockDb) + + const returnedResult = await executeQuery(query) + + expect(mockDb.collection).toHaveBeenCalledWith("indexed_services") + expect(mockDb.findOne).toHaveBeenCalledWith(query, Index.projection) + expect(returnedResult).toEqual(result) + }) + }) +}) diff --git a/__tests__/unit/v1/services/routes/get-services.test.js b/__tests__/unit/v1/services/routes/get-services.test.js new file mode 100644 index 0000000..87f973f --- /dev/null +++ b/__tests__/unit/v1/services/routes/get-services.test.js @@ -0,0 +1,356 @@ +const { + buildQuery, + executeQuery, +} = require("./../../../../../src/controllers/v1/services/routes/get-service") +const { geocode } = require("./../../../../../src/lib") +const filters = require("./../../../../../src/lib/filters") +const Index = require("./../../../../../src/lib") +const { db } = require("./../../../../../src/db") +const { + parseRequestParameters, +} = require("./../../../../../src/controllers/v1/services/routes/get-services") + +jest.mock("./../../../../../src/lib/index") +jest.mock("./../../../../../src/db") + +describe("get-services", () => { + describe("parseRequestParameters", () => { + it("should return thes parameters when no query parameters are provided", async () => { + const expectedResults = { + perPage: 50, + page: 1, + keywords: undefined, + location: undefined, + lat: undefined, + lng: undefined, + targetDirectories: [], + taxonomies: [], + needs: [], + suitabilities: [], + days: [], + accessibilities: [], + only: [], + minAge: undefined, + maxAge: undefined, + interpreted_location: undefined, + } + + const results = await parseRequestParameters({}) + + expect(results).toEqual(expectedResults) + }) + + describe("perPage", () => { + it("should return 50 if perPage is not provided", async () => { + const { perPage } = await parseRequestParameters({}) + expect(perPage).toEqual(50) + }) + it("should return a number if a string is passed through", async () => { + const { perPage } = await parseRequestParameters({ per_page: "100" }) + expect(perPage).toEqual(100) + }) + it("should return a number if a number is passed through", async () => { + const { perPage } = await parseRequestParameters({ per_page: 100 }) + expect(perPage).toEqual(100) + }) + }) + + describe("page", () => { + it("should return 1 if page is not provided", async () => { + const { page } = await parseRequestParameters({}) + expect(page).toEqual(1) + }) + it("should return a number if a string is passed through", async () => { + const { page } = await parseRequestParameters({ page: "1" }) + expect(page).toEqual(1) + }) + it("should return a number if a number is passed through", async () => { + const { page } = await parseRequestParameters({ page: 1 }) + expect(page).toEqual(1) + }) + }) + + describe("keywords", () => { + it("should return undefined if keywords are not provided", async () => { + const { keywords } = await parseRequestParameters({}) + expect(keywords).toBeUndefined() + }) + it("should return a string if a value is passed through", async () => { + const { keywords } = await parseRequestParameters({ keywords: "test" }) + expect(keywords).toEqual("test") + }) + }) + + describe("location", () => { + it("should return undefined if location is not provided", async () => { + const { location } = await parseRequestParameters({}) + expect(location).toBeUndefined() + }) + it("should return a string if a value is passed through", async () => { + const { location } = await parseRequestParameters({ + location: "London", + }) + expect(location).toEqual("London") + }) + + it("should return interpreted_location and the corresponding lat lng if valid location is provided", async () => { + const queryParams = { location: "London" } + const results = [ + { + formatted_address: "London, UK", + geometry: { location: { lat: "2.12", lng: "2.12" } }, + }, + ] + geocode.mockResolvedValue({ results }) + const { interpreted_location, lat, lng } = await parseRequestParameters( + queryParams + ) + expect(geocode).toHaveBeenCalledWith(queryParams.location) + expect(interpreted_location).toEqual(results[0].formatted_address) + expect(lat).toBeCloseTo(parseInt(results[0].geometry.location.lat)) + expect(lng).toBeCloseTo(parseInt(results[0].geometry.location.lng)) + }) + + it("should return undefined if invalid location is provided", async () => { + const queryParams = { location: "Not a real place" } + const results = [] + geocode.mockResolvedValue({ results }) + const { interpreted_location, lat, lng } = await parseRequestParameters( + queryParams + ) + expect(interpreted_location).toBeUndefined() + expect(lat).toBeUndefined() + expect(lng).toBeUndefined() + }) + + it("should return provided lat lng even if location is provided", async () => { + const queryParams = { location: "London", lat: 1.12, lng: 1.12 } + const results = [ + { + formatted_address: "London, UK", + geometry: { location: { lat: "2.12", lng: "2.12" } }, + }, + ] + geocode.mockResolvedValue({ results }) + const { interpreted_location, lat, lng, location } = + await parseRequestParameters(queryParams) + + expect(geocode).toHaveBeenCalledWith(queryParams.location) + expect(interpreted_location).toBeUndefined() + expect(lat).toBeCloseTo(1.12) + expect(lng).toBeCloseTo(1.12) + }) + }) + + describe("lat", () => { + it("should return undefined if lat are not provided", async () => { + const { lat } = await parseRequestParameters({}) + expect(lat).toBeUndefined() + }) + it("should return a float if a string is passed through", async () => { + const { lat } = await parseRequestParameters({ lat: "1.12" }) + expect(lat).toBeCloseTo(1.12) + }) + it("should return a float if a number is passed through", async () => { + const { lat } = await parseRequestParameters({ lat: 1.12 }) + expect(lat).toBeCloseTo(1.12) + }) + }) + + describe("lng", () => { + it("should return undefined if lng are not provided", async () => { + const { lng } = await parseRequestParameters({}) + expect(lng).toBeUndefined() + }) + it("should return a float if a string is passed through", async () => { + const { lng } = await parseRequestParameters({ lng: "1.12" }) + expect(lng).toBeCloseTo(1.12) + }) + it("should return a float if a number is passed through", async () => { + const { lng } = await parseRequestParameters({ lng: 1.12 }) + expect(lng).toBeCloseTo(1.12) + }) + }) + + describe("targetDirectories", () => { + it("should return undefined if targetDirectories are not provided", async () => { + const { targetDirectories } = await parseRequestParameters({}) + expect(targetDirectories).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { targetDirectories } = await parseRequestParameters({ + targetDirectories: ["a", "b,a"], + }) + expect(new Set(targetDirectories)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { targetDirectories } = await parseRequestParameters({ + targetDirectories: ["a,b"], + }) + expect(new Set(targetDirectories)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("taxonomies", () => { + it("should return undefined if taxonomies are not provided", async () => { + const { taxonomies } = await parseRequestParameters({}) + expect(taxonomies).toEqual([]) + }) + it("should return an array multiple targets are passed through", async () => { + const { taxonomies } = await parseRequestParameters({ + taxonomies: ["a", "b,a"], + }) + expect(new Set(taxonomies)).toEqual(new Set(["a", "b,a"])) + }) + it("should return a unique array one target is passed through", async () => { + const { taxonomies } = await parseRequestParameters({ + taxonomies: ["a,b"], + }) + expect(new Set(taxonomies)).toEqual(new Set(["a,b"])) + }) + }) + + describe("needs", () => { + it("should return undefined if needs are not provided", async () => { + const { needs } = await parseRequestParameters({}) + expect(needs).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { needs } = await parseRequestParameters({ + needs: ["a", "b,a"], + }) + expect(new Set(needs)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { needs } = await parseRequestParameters({ + needs: ["a,b"], + }) + expect(new Set(needs)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("suitabilities", () => { + it("should return undefined if suitabilities are not provided", async () => { + const { suitabilities } = await parseRequestParameters({}) + expect(suitabilities).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { suitabilities } = await parseRequestParameters({ + suitabilities: ["a", "b,a"], + }) + expect(new Set(suitabilities)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { suitabilities } = await parseRequestParameters({ + suitabilities: ["a,b"], + }) + expect(new Set(suitabilities)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("accessibilities", () => { + it("should return undefined if accessibilities are not provided", async () => { + const { accessibilities } = await parseRequestParameters({}) + expect(accessibilities).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { accessibilities } = await parseRequestParameters({ + accessibilities: ["a", "b,a"], + }) + expect(new Set(accessibilities)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { accessibilities } = await parseRequestParameters({ + accessibilities: ["a,b"], + }) + expect(new Set(accessibilities)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("days", () => { + it("should return undefined if days are not provided", async () => { + const { days } = await parseRequestParameters({}) + expect(days).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { days } = await parseRequestParameters({ + days: ["a", "b,a"], + }) + expect(new Set(days)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { days } = await parseRequestParameters({ + days: ["a,b"], + }) + expect(new Set(days)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("only", () => { + it("should return undefined if only are not provided", async () => { + const { only } = await parseRequestParameters({}) + expect(only).toEqual([]) + }) + it("should return a unique array multiple targets are passed through", async () => { + const { only } = await parseRequestParameters({ + only: ["a", "b,a"], + }) + expect(new Set(only)).toEqual(new Set(["a", "b"])) + }) + it("should return a unique array one target is passed through", async () => { + const { only } = await parseRequestParameters({ + only: ["a,b"], + }) + expect(new Set(only)).toEqual(new Set(["a", "b"])) + }) + }) + + describe("minAge", () => { + it("should return undefined if minAge is not provided", async () => { + const { minAge } = await parseRequestParameters({}) + expect(minAge).toBeUndefined() + }) + it("should return a number if a string is passed through", async () => { + const { minAge } = await parseRequestParameters({ min_age: "1" }) + expect(minAge).toEqual(1) + }) + it("should return a number if a number is passed through", async () => { + const { minAge } = await parseRequestParameters({ min_age: 1 }) + expect(minAge).toEqual(1) + }) + }) + + describe("maxAge", () => { + it("should return undefined if page is not provided", async () => { + const { maxAge } = await parseRequestParameters({}) + expect(maxAge).toBeUndefined() + }) + it("should return a number if a string is passed through", async () => { + const { maxAge } = await parseRequestParameters({ max_age: "1" }) + expect(maxAge).toEqual(1) + }) + it("should return a number if a number is passed through", async () => { + const { maxAge } = await parseRequestParameters({ max_age: 1 }) + expect(maxAge).toEqual(1) + }) + }) + + describe("interpreted_location", () => { + it("should return undefined if location is not provided", async () => { + const { interpreted_location } = await parseRequestParameters({}) + expect(interpreted_location).toBeUndefined() + }) + it.todo( + "should return the formatted address if valid location is provided" + ) + it.todo( + "should return the formatted address if invalid location is provided" + ) + }) + }) + describe("buildQuery", () => {}) + describe("createCountQuery", () => {}) + describe("executeQuery", () => {}) + describe("buildContent", () => {}) + describe("buildResponse", () => {}) +}) diff --git a/__tests__/unit/v1/services/routes/index.test.js b/__tests__/unit/v1/services/routes/index.test.js new file mode 100644 index 0000000..a2ce244 --- /dev/null +++ b/__tests__/unit/v1/services/routes/index.test.js @@ -0,0 +1,13 @@ +const index = require("./../../../../../src/controllers/v1/services/routes/index") +const getServices = require("./../../../../../src/controllers/v1/services/routes/get-services") +const getService = require("./../../../../../src/controllers/v1/services/routes/get-service") + +jest.mock("./../../../../../src/controllers/v1/services/routes/get-services") +jest.mock("./../../../../../src/controllers/v1/services/routes/get-service") + +describe("index", () => { + it("should export getServices and getService", () => { + expect(index.getServices).toBe(getServices) + expect(index.getService).toBe(getService) + }) +}) diff --git a/index.js b/index.js index 8cfad1b..1463b0a 100644 --- a/index.js +++ b/index.js @@ -1,18 +1,18 @@ -require("dotenv").config(); -const express = require("express"); -const forceSSL = require("express-force-ssl"); -const rateLimit = require("express-rate-limit"); -const cors = require("cors"); -const morganMiddleware = require("./src/middleware/morgan.middleware"); -const logger = require("./src/utils/logger"); -const { connect } = require("./src/db"); -const v1 = require("./src/controllers/v1"); +require("dotenv").config() +const express = require("express") +const forceSSL = require("express-force-ssl") +const rateLimit = require("express-rate-limit") +const cors = require("cors") +const morganMiddleware = require("./middleware/morgan.middleware") +const logger = require("./utils/logger") +const { connect } = require("./src/db") +const v1 = require("./src/controllers/v1") -const router = express.Router(); -const server = express(); -const port = process.env.NODE_PORT || 3000; -const environment = process.env.NODE_ENV || "production"; -const isDevelopment = environment === "development"; +const router = express.Router() +const server = express() +const port = process.env.NODE_PORT || 3000 +const environment = process.env.NODE_ENV || "production" +const isDevelopment = environment === "development" /** * Create the initial database connection here @@ -23,17 +23,17 @@ connect(() => !isDevelopment ? "s" : "" }://localhost:${port}/api/v1/services` ) -); +) /** * Settings & middleware */ -server.set("trust proxy", 1); +server.set("trust proxy", 1) // outside of dev environment if we send FORCE_SSL then SSL is forced if (!isDevelopment) { if (process.env.FORCE_SSL && process.env.FORCE_SSL.toLowerCase() === "true") { - server.use(forceSSL); + server.use(forceSSL) } } @@ -42,56 +42,56 @@ server.use( windowMs: 15 * 60 * 1000, max: 100, }) -); +) -server.use(cors()); -server.use(morganMiddleware); +server.use(cors()) +server.use(morganMiddleware) /** * Routes */ -server.get("/api/v1/services", v1.services.index); -server.get("/api/v1/services/:id", v1.services.show); +server.get("/api/v1/services", v1.services.index) +server.get("/api/v1/services/:id", v1.services.show) server.get("/health", (req, res) => { const data = { uptime: process.uptime(), message: "Ok", date: new Date(), - }; + } - res.status(200).send(data); -}); + res.status(200).send(data) +}) // 404 server.use("*", (req, res, next) => { res.status(404).json({ error: "No route matches your request", - }); -}); + }) +}) // Error handling server.use((err, req, res, next) => { - logger.error(err.stack); + logger.error(err.stack) if (err.message === "No matching document") { res.status(404).json({ error: "No matching document", - }); + }) } else { res.status(500).json({ error: process.env.NODE_ENV === "production" ? "There was an internal server error. Please try again later" : err.message, - }); + }) } -}); +}) /** * Start the server */ server.listen(port, () => { - logger.info(`Server is running on port ${port}`); - logger.info(`Logging level is set to ${logger.level}`); -}); + logger.info(`Server is running on port ${port}`) + logger.info(`Logging level is set to ${logger.level}`) +}) diff --git a/jest.config.js b/jest.config.js index ac58e1a..57337cb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,7 +4,7 @@ const config = { collectCoverage: true, coverageReporters: ["clover", "json", "lcov", "html", "text"], collectCoverageFrom: [ - "**/*.{js,jsx}", + "src/**/*.{js,jsx}", "!**/node_modules/**", "!**/vendor/**", "!**/coverage/**", diff --git a/src/middleware/morgan.middleware.js b/middleware/morgan.middleware.js similarity index 93% rename from src/middleware/morgan.middleware.js rename to middleware/morgan.middleware.js index 0c37930..2e05497 100644 --- a/src/middleware/morgan.middleware.js +++ b/middleware/morgan.middleware.js @@ -1,5 +1,5 @@ const morgan = require("morgan") -const logger = require("../utils/logger") +const logger = require("./../utils/logger") const stream = { // Use the http severity diff --git a/package.json b/package.json index 69bb353..4791cfb 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,10 @@ "start": "node index.js", "dev": "NODE_ENV=development nodemon index.js", "test": "jest", - "prepare-collection": "node lib/prepare-collection", - "prepare-indices": "node lib/prepare-indices", - "dummy-data": "node lib/dummy-data" + "test-watch": "jest --watchAll --detectOpenHandles", + "prepare-collection": "node utils/prepare-collection", + "prepare-indices": "node utils/prepare-indices", + "dummy-data": "node utils/dummy-data" }, "test": "exit 0", "keywords": [], diff --git a/src/controllers/v1/services/index.js b/src/controllers/v1/services/index.js index 226a5a8..b49693a 100644 --- a/src/controllers/v1/services/index.js +++ b/src/controllers/v1/services/index.js @@ -1,4 +1,4 @@ -const logger = require("../../../utils/logger") +const logger = require("../../../../utils/logger") const { getServices, getService } = require("./routes") module.exports = { @@ -30,7 +30,7 @@ module.exports = { */ index: async (req, res, next) => { try { - const parameters = await getServices.parseRequestParameters(req) + const parameters = await getServices.parseRequestParameters(req.query) logger.http(parameters) const query = await getServices.buildQuery(parameters) diff --git a/src/controllers/v1/services/routes/get-services.js b/src/controllers/v1/services/routes/get-services.js index c3666ef..2fa7ff5 100644 --- a/src/controllers/v1/services/routes/get-services.js +++ b/src/controllers/v1/services/routes/get-services.js @@ -1,7 +1,7 @@ const filters = require("../../../../lib/filters") const { calculateDistance, geocode, projection } = require("../../../../lib") const { db } = require("../../../../db") -const logger = require("../../../../utils/logger") +const logger = require("../../../../../utils/logger") module.exports = { /** @@ -9,30 +9,30 @@ module.exports = { * @param {*} req * @returns */ - parseRequestParameters: async req => { - const perPage = parseInt(req.query.per_page) || 50 - const page = parseInt(req.query.page) || 1 - const keywords = req.query.keywords - const location = req.query.location - let lat = req.query.lat - let lng = req.query.lng - let targetDirectories = req.query?.targetDirectories - ? [].concat(req.query.targetDirectories) + parseRequestParameters: async queryParams => { + const perPage = parseInt(queryParams.per_page) || 50 + const page = parseInt(queryParams.page) || 1 + const keywords = queryParams.keywords + const location = queryParams.location + let lat = parseFloat(queryParams.lat) || undefined + let lng = parseFloat(queryParams.lng) || undefined + let targetDirectories = queryParams?.targetDirectories + ? [].concat(queryParams.targetDirectories) : [] - let taxonomies = req.query?.taxonomies - ? [].concat(req.query.taxonomies) + let taxonomies = queryParams?.taxonomies + ? [].concat(queryParams.taxonomies) : [] - let needs = req.query?.needs ? [].concat(req.query.needs) : [] - let suitabilities = req.query?.suitabilities - ? [].concat(req.query.suitabilities) + let needs = queryParams?.needs ? [].concat(queryParams.needs) : [] + let suitabilities = queryParams?.suitabilities + ? [].concat(queryParams.suitabilities) : [] - let accessibilities = req.query?.accessibilities - ? [].concat(req.query.accessibilities) + let accessibilities = queryParams?.accessibilities + ? [].concat(queryParams.accessibilities) : [] - let days = req.query?.days ? [].concat(req.query.days) : [] - const only = req.query.only - const minAge = req.query.min_age - const maxAge = req.query.max_age + let days = queryParams?.days ? [].concat(queryParams.days) : [] + let only = queryParams?.only ? [].concat(queryParams.only) : [] + const minAge = parseInt(queryParams.min_age) || undefined + const maxAge = parseInt(queryParams.max_age) || undefined // not a param but we want to save on requests let interpreted_location @@ -50,14 +50,20 @@ module.exports = { ...new Set(accessibilities.flatMap(str => str.split(","))), ] days = [...new Set(days.flatMap(str => str.split(",")))] + only = [...new Set(only.flatMap(str => str.split(",")))] // if we have a location then we can find lat lng if (location && !(lat && lng)) { - let { results } = await geocode(req.query.location) - if (results[0]) { - interpreted_location = results[0].formatted_address - lng = results[0].geometry.location.lng - lat = results[0].geometry.location.lat + try { + const { results } = await geocode(queryParams.location) + logger.debug(results) + if (results[0]) { + interpreted_location = results[0].formatted_address + lng = parseInt(results[0].geometry.location.lng) + lat = parseInt(results[0].geometry.location.lat) + } + } catch (error) { + logger.warn(error) } } @@ -89,11 +95,13 @@ module.exports = { let query = {} query.$and = [] + const locationInQuery = + parameters.location !== undefined || + parameters.lat !== undefined || + parameters.lng !== undefined const filterKeywords = await filters.filterKeywords( parameters.keywords, - parameters.location, - parameters.lat, - parameters.lng + locationInQuery ) query = { ...filterKeywords, ...query } @@ -176,7 +184,9 @@ module.exports = { const Service = db().collection("indexed_services") const countQuery = this.createCountQuery(query) + logger.debug("query") logger.debug(query) + logger.debug("countQuery") logger.debug(countQuery) const [results, count] = await Promise.all([ diff --git a/src/db.js b/src/db.js index d177fd5..1655882 100644 --- a/src/db.js +++ b/src/db.js @@ -1,5 +1,5 @@ const { MongoClient } = require("mongodb") -const logger = require("./utils/logger") +const logger = require("../utils/logger") const uri = process.env.DB_URI // @TODO test mongodb://outpost:password@mongo/outpost_api_development?retryWrites=true&w=majority diff --git a/src/lib/filters.js b/src/lib/filters.js index 9ff3d0a..6930a74 100644 --- a/src/lib/filters.js +++ b/src/lib/filters.js @@ -47,10 +47,10 @@ module.exports = { * @param {...any} args * @returns */ - filterKeywords: async (keywords, ...args) => { + filterKeywords: async (keywords, locationInQuery = false) => { let query = {} if (keywords) { - if (args.filter(n => n).length > 0) { + if (locationInQuery) { const Service = db().collection("indexed_services") const docs = await Service.find({ $text: { $search: keywords }, diff --git a/src/lib/index.js b/src/lib/index.js index bfa2a50..6373404 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -26,6 +26,12 @@ module.exports = { }, geocode: async location => { + if (!process.env.GOOGLE_API_KEY || !location) { + throw new Error( + "GOOGLE_API_KEY and or location are not set, unable to geocode locations" + ) + } + const response = await fetch( `https://maps.googleapis.com/maps/api/geocode/json?address=${location}®ion=uk&key=${process.env.GOOGLE_API_KEY}` ) diff --git a/src/utils/dummy-data.js b/utils/dummy-data.js similarity index 87% rename from src/utils/dummy-data.js rename to utils/dummy-data.js index 66476da..0e3e53e 100644 --- a/src/utils/dummy-data.js +++ b/utils/dummy-data.js @@ -1,14 +1,16 @@ -require("dotenv").config() -const { connect } = require("../db") -const logger = require("./logger") +require("dotenv").config(); +const { connect } = require("../src/db"); +const logger = require("./logger"); -connect(async db => { +connect(async (db) => { // @TODO make sure when we do this we do it on the right db! const collections = await db .listCollections({ name: "indexed_services" }, { nameOnly: true }) - .toArray() + .toArray(); - const indexedServicesDb = collections.some(a => a.name === "indexed_services") + const indexedServicesDb = collections.some( + (a) => a.name === "indexed_services" + ); if (indexedServicesDb) { try { @@ -83,15 +85,15 @@ connect(async db => { suitabilities: [], local_offer: null, }, - ]) - logger.info("✅ Added dummy data to 'indexed_services' collection") - process.exit() + ]); + logger.info("✅ Added dummy data to 'indexed_services' collection"); + process.exit(); } catch (e) { - logger.error(e) - throw e + logger.error(e); + throw e; } } else { - logger.warn("🚫 'indexed_services' collection doesn't exist yet") - process.exit() + logger.warn("🚫 'indexed_services' collection doesn't exist yet"); + process.exit(); } -}) +}); diff --git a/src/utils/logger.js b/utils/logger.js similarity index 100% rename from src/utils/logger.js rename to utils/logger.js diff --git a/src/utils/prepare-collection.js b/utils/prepare-collection.js similarity index 100% rename from src/utils/prepare-collection.js rename to utils/prepare-collection.js diff --git a/src/utils/prepare-indices.js b/utils/prepare-indices.js similarity index 100% rename from src/utils/prepare-indices.js rename to utils/prepare-indices.js From 21fb5ee6f4fba19876071586130b3e7d18679a6a Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 25 Apr 2024 00:19:49 +0100 Subject: [PATCH 20/23] fixing some errors --- readme.md | 8 ++++---- utils/dummy-data.js | 30 ++++++++++++++---------------- utils/prepare-collection.js | 2 +- utils/prepare-indices.js | 2 +- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/readme.md b/readme.md index 6ced1a9..84b67a6 100644 --- a/readme.md +++ b/readme.md @@ -114,7 +114,7 @@ The following environmental variables are required. | Variable | Description | Example | Required? | | ---------------- | ------------------ | -------------------------------------------------------------------- | --------- | -| `DB_URI` | Mongo database url | `mongodb://outpost:password@localhost:27018/outpost_api_development` | Yes | +| `DB_URI` | Mongo database url | `mongodb://outpost:password@localhost:27018/outpost_api_development` | Yes | | `GOOGLE_API_KEY` | Google API Key | `1234` | Yes | # ✨ Features @@ -142,17 +142,17 @@ We provide scripts to initialise the database once its been created. ```sh docker run -it --rm \ --env-file .env \ --e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ outpost-api-service:production prepare-collection docker run -it --rm \ --env-file .env \ --e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ outpost-api-service:production prepare-indices docker run -it --rm \ --env-file .env \ --e DB_URI=mongodb://outpost:password@host.docker.internal:27018/ \ +-e DB_URI=mongodb://outpost:password@host.docker.internal:27018/outpost_api_development \ outpost-api-service:production dummy-data ``` diff --git a/utils/dummy-data.js b/utils/dummy-data.js index 0e3e53e..947f33a 100644 --- a/utils/dummy-data.js +++ b/utils/dummy-data.js @@ -1,16 +1,14 @@ -require("dotenv").config(); -const { connect } = require("../src/db"); -const logger = require("./logger"); +require("dotenv").config() +const { connect } = require("../src/db") +const logger = require("./logger") -connect(async (db) => { +connect(async db => { // @TODO make sure when we do this we do it on the right db! const collections = await db .listCollections({ name: "indexed_services" }, { nameOnly: true }) - .toArray(); + .toArray() - const indexedServicesDb = collections.some( - (a) => a.name === "indexed_services" - ); + const indexedServicesDb = collections.some(a => a.name === "indexed_services") if (indexedServicesDb) { try { @@ -85,15 +83,15 @@ connect(async (db) => { suitabilities: [], local_offer: null, }, - ]); - logger.info("✅ Added dummy data to 'indexed_services' collection"); - process.exit(); + ]) + logger.info("✅ Added dummy data to 'indexed_services' collection") + process.exit() } catch (e) { - logger.error(e); - throw e; + logger.error(e) + throw e } } else { - logger.warn("🚫 'indexed_services' collection doesn't exist yet"); - process.exit(); + logger.warn("🚫 'indexed_services' collection doesn't exist yet") + process.exit() } -}); +}) diff --git a/utils/prepare-collection.js b/utils/prepare-collection.js index a8084d0..dbcc290 100644 --- a/utils/prepare-collection.js +++ b/utils/prepare-collection.js @@ -1,5 +1,5 @@ require("dotenv").config() -const { connect } = require("../db") +const { connect } = require("../src/db") const logger = require("./logger") connect(async db => { diff --git a/utils/prepare-indices.js b/utils/prepare-indices.js index ddae81c..0bf933e 100644 --- a/utils/prepare-indices.js +++ b/utils/prepare-indices.js @@ -1,5 +1,5 @@ require("dotenv").config() -const { connect } = require("../db") +const { connect } = require("../src/db") const logger = require("./logger") connect(async db => { From 359361f3a917ea18abc28fe75134c7820d505552 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 25 Apr 2024 14:05:45 +0100 Subject: [PATCH 21/23] Mongo updates --- .docker/services/mongo/mongo.yml | 5 +++-- .docker/services/mongo/setup-mongodb.js | 16 ++++++++-------- docker-compose.yml | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.docker/services/mongo/mongo.yml b/.docker/services/mongo/mongo.yml index a746f1c..f556e2d 100644 --- a/.docker/services/mongo/mongo.yml +++ b/.docker/services/mongo/mongo.yml @@ -2,15 +2,16 @@ version: "3.7" services: mongo: image: mongo:6 - container_name: mongo ports: - 27018:27017 volumes: - mongo-volume:/data/db - ./setup-mongodb.js:/docker-entrypoint-initdb.d/mongo-init.js:ro environment: - MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-outpost} + MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-admin} MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-password} + MONGO_INITDB_USERNAME: ${MONGO_INITDB_USERNAME:-outpost} + MONGO_INITDB_PASSWORD: ${MONGO_INITDB_PASSWORD:-password} MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE:-outpost_api_development} networks: - internal_network diff --git a/.docker/services/mongo/setup-mongodb.js b/.docker/services/mongo/setup-mongodb.js index 2e58827..08a4669 100644 --- a/.docker/services/mongo/setup-mongodb.js +++ b/.docker/services/mongo/setup-mongodb.js @@ -1,19 +1,19 @@ db = db.getSiblingDB( process.env.MONGO_INITDB_DATABASE || "outpost_api_development" -); +) db.createUser({ - user: process.env.MONGO_INITDB_ROOT_USERNAME || "outpost", - pwd: process.env.MONGO_INITDB_ROOT_PASSWORD || "password", + user: process.env.MONGO_INITDB_USERNAME || "outpost", + pwd: process.env.MONGO_INITDB_PASSWORD || "password", roles: [ { role: "readWrite", db: process.env.MONGO_INITDB_DATABASE || "outpost_api_development", }, ], -}); +}) -db.createCollection("indexed_services"); +db.createCollection("indexed_services") db.indexed_services.createIndex( { @@ -26,10 +26,10 @@ db.indexed_services.createIndex( description: 1, }, } -); +) db.indexed_services.createIndex({ "locations.geometry": "2dsphere", -}); +}) db.indexed_services.createIndex({ "taxonomies.slug": 1, -}); +}) diff --git a/docker-compose.yml b/docker-compose.yml index 8fb902d..526230f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: # entrypoint: ["tail"] # command: ["-f", "/dev/null"] environment: - DB_URI: mongodb://${MONGO_INITDB_ROOT_USERNAME:-outpost}:${MONGO_INITDB_ROOT_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development}?retryWrites=true&w=majority + DB_URI: mongodb://${MONGO_INITDB_USERNAME:-outpost}:${MONGO_INITDB_PASSWORD:-password}@mongo/${MONGO_INITDB_DATABASE:-outpost_api_development} platform: linux/amd64 volumes: - ./:/app:cached From aae6c1722f0bb1f28e872713fd17e17abcd82aa3 Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 25 Apr 2024 16:36:09 +0100 Subject: [PATCH 22/23] Update taxonomies logic and directories name --- __tests__/unit/lib/filters.test.js | 54 +++++++------------ .../v1/services/routes/get-services.test.js | 28 +++++----- src/controllers/v1/services/index.js | 4 +- .../v1/services/routes/get-services.js | 20 ++++--- src/lib/filters.js | 38 ++++++------- 5 files changed, 64 insertions(+), 80 deletions(-) diff --git a/__tests__/unit/lib/filters.test.js b/__tests__/unit/lib/filters.test.js index b556ced..716691a 100644 --- a/__tests__/unit/lib/filters.test.js +++ b/__tests__/unit/lib/filters.test.js @@ -119,8 +119,8 @@ describe("filterOnly", () => { }) describe("filterTaxonomies", () => { - it("should return an empty array if taxonomies is not provided", () => { - expect(filters.filterTaxonomies()).toEqual([]) + it("should return an empty object if taxonomies is not provided", () => { + expect(filters.filterTaxonomies()).toEqual({}) }) it("should return a query array if taxonomies is provided", () => { @@ -129,49 +129,35 @@ describe("filterTaxonomies", () => { "clubs-and-groups,holiday-activities,dance-drama-and-music", "youth-clubs,gaming,sports-courses-and-camps,dance-drama-and-music", ] - const expectedQuery = [ - { "taxonomies.slug": { $in: ["things-to-do"] } }, - { - "taxonomies.slug": { - $in: [ - "clubs-and-groups", - "holiday-activities", - "dance-drama-and-music", - ], - }, - }, - { - "taxonomies.slug": { - $in: [ - "youth-clubs", - "gaming", - "sports-courses-and-camps", - "dance-drama-and-music", - ], - }, + const expectedQuery = { + "taxonomies.slug": { + $all: [ + "things-to-do", + "clubs-and-groups,holiday-activities,dance-drama-and-music", + "youth-clubs,gaming,sports-courses-and-camps,dance-drama-and-music", + ], }, - ] + } + expect(filters.filterTaxonomies(taxonomies)).toEqual(expectedQuery) }) }) -describe("filterTargetDirectories", () => { - it("should return an empty object if targetDirectories is not provided", () => { - expect(filters.filterTargetDirectories()).toEqual({}) +describe("filterDirectories", () => { + it("should return an empty object if directories is not provided", () => { + expect(filters.filterDirectories()).toEqual({}) }) - it("should return an empty object if targetDirectories is an empty array", () => { - expect(filters.filterTargetDirectories([])).toEqual({}) + it("should return an empty object if directories is an empty array", () => { + expect(filters.filterDirectories([])).toEqual({}) }) - it("should return a query object if targetDirectories is provided", () => { - const targetDirectories = ["bfis", "bod"] + it("should return a query object if directories is provided", () => { + const directories = ["bfis", "bod"] const expectedQuery = { - "target_directories.label": { $in: targetDirectories }, + "directories.label": { $in: directories }, } - expect(filters.filterTargetDirectories(targetDirectories)).toEqual( - expectedQuery - ) + expect(filters.filterDirectories(directories)).toEqual(expectedQuery) }) }) diff --git a/__tests__/unit/v1/services/routes/get-services.test.js b/__tests__/unit/v1/services/routes/get-services.test.js index 87f973f..ddd3918 100644 --- a/__tests__/unit/v1/services/routes/get-services.test.js +++ b/__tests__/unit/v1/services/routes/get-services.test.js @@ -23,7 +23,7 @@ describe("get-services", () => { location: undefined, lat: undefined, lng: undefined, - targetDirectories: [], + directories: [], taxonomies: [], needs: [], suitabilities: [], @@ -172,22 +172,22 @@ describe("get-services", () => { }) }) - describe("targetDirectories", () => { - it("should return undefined if targetDirectories are not provided", async () => { - const { targetDirectories } = await parseRequestParameters({}) - expect(targetDirectories).toEqual([]) + describe("directories", () => { + it("should return undefined if directories are not provided", async () => { + const { directories } = await parseRequestParameters({}) + expect(directories).toEqual([]) }) it("should return a unique array multiple targets are passed through", async () => { - const { targetDirectories } = await parseRequestParameters({ - targetDirectories: ["a", "b,a"], + const { directories } = await parseRequestParameters({ + directories: ["a", "b,a"], }) - expect(new Set(targetDirectories)).toEqual(new Set(["a", "b"])) + expect(new Set(directories)).toEqual(new Set(["a", "b"])) }) it("should return a unique array one target is passed through", async () => { - const { targetDirectories } = await parseRequestParameters({ - targetDirectories: ["a,b"], + const { directories } = await parseRequestParameters({ + directories: ["a,b"], }) - expect(new Set(targetDirectories)).toEqual(new Set(["a", "b"])) + expect(new Set(directories)).toEqual(new Set(["a", "b"])) }) }) @@ -196,17 +196,17 @@ describe("get-services", () => { const { taxonomies } = await parseRequestParameters({}) expect(taxonomies).toEqual([]) }) - it("should return an array multiple targets are passed through", async () => { + it("should return a unique array multiple targets are passed through", async () => { const { taxonomies } = await parseRequestParameters({ taxonomies: ["a", "b,a"], }) - expect(new Set(taxonomies)).toEqual(new Set(["a", "b,a"])) + expect(new Set(taxonomies)).toEqual(new Set(["a", "b"])) }) it("should return a unique array one target is passed through", async () => { const { taxonomies } = await parseRequestParameters({ taxonomies: ["a,b"], }) - expect(new Set(taxonomies)).toEqual(new Set(["a,b"])) + expect(new Set(taxonomies)).toEqual(new Set(["a", "b"])) }) }) diff --git a/src/controllers/v1/services/index.js b/src/controllers/v1/services/index.js index b49693a..140f086 100644 --- a/src/controllers/v1/services/index.js +++ b/src/controllers/v1/services/index.js @@ -14,7 +14,7 @@ module.exports = { * @param {string} [req.query.location] - Location for geospatial search. * @param {number} [req.query.lat] - Latitude for geospatial search. * @param {number} [req.query.lng] - Longitude for geospatial search. - * @param {string|string[]} [req.query.targetDirectories] - Target directories to filter services. + * @param {string|string[]} [req.query.directories] - Target directories to filter services. * @param {string|string[]} [req.query.taxonomies] - Taxonomies to filter services. * @param {string|string[]} [req.query.needs] - Needs to filter services. * @param {string|string[]} [req.query.suitabilities] - Suitabilities to filter services. @@ -31,7 +31,7 @@ module.exports = { index: async (req, res, next) => { try { const parameters = await getServices.parseRequestParameters(req.query) - logger.http(parameters) + logger.info(parameters) const query = await getServices.buildQuery(parameters) diff --git a/src/controllers/v1/services/routes/get-services.js b/src/controllers/v1/services/routes/get-services.js index 2fa7ff5..3c4e40e 100644 --- a/src/controllers/v1/services/routes/get-services.js +++ b/src/controllers/v1/services/routes/get-services.js @@ -16,8 +16,8 @@ module.exports = { const location = queryParams.location let lat = parseFloat(queryParams.lat) || undefined let lng = parseFloat(queryParams.lng) || undefined - let targetDirectories = queryParams?.targetDirectories - ? [].concat(queryParams.targetDirectories) + let directories = queryParams?.directories + ? [].concat(queryParams.directories) : [] let taxonomies = queryParams?.taxonomies ? [].concat(queryParams.taxonomies) @@ -41,9 +41,8 @@ module.exports = { // if the query param is used more than once for these fields // combine them and make sure they are unique // so ?suitabilities=a&suitabilities=b,a becomes suitabilities=[a,b] - targetDirectories = [ - ...new Set(targetDirectories.flatMap(str => str.split(","))), - ] + directories = [...new Set(directories.flatMap(str => str.split(",")))] + taxonomies = [...new Set(taxonomies.flatMap(str => str.split(",")))] needs = [...new Set(needs.flatMap(str => str.split(",")))] suitabilities = [...new Set(suitabilities.flatMap(str => str.split(",")))] accessibilities = [ @@ -74,7 +73,7 @@ module.exports = { location, lat, lng, - targetDirectories, + directories, taxonomies, needs, suitabilities, @@ -111,10 +110,6 @@ module.exports = { ) query = { ...locationGeometry, ...query } - // add filtering for taxonomies - const taxonomies = filters.filterTaxonomies(parameters.taxonomies) - query.$and.push(...taxonomies) - // add filtering for ages const ages = filters.filterAges(parameters.minAge, parameters.maxAge) query.$and.push(...ages) @@ -129,7 +124,8 @@ module.exports = { // add filtering query.$and.push( - filters.filterTargetDirectories(parameters.targetDirectories), + filters.filterDirectories(parameters.directories), + filters.filterTaxonomies(parameters.taxonomies), filters.filterNeeds(parameters.needs), filters.filterSuitabilities(parameters.suitabilities), filters.filterAccessibilities(parameters.accessibilities), @@ -186,8 +182,10 @@ module.exports = { logger.debug("query") logger.debug(query) + logger.debug(JSON.stringify(query)) logger.debug("countQuery") logger.debug(countQuery) + logger.debug(JSON.stringify(countQuery)) const [results, count] = await Promise.all([ Service.find(query) diff --git a/src/lib/filters.js b/src/lib/filters.js index 6930a74..1be3882 100644 --- a/src/lib/filters.js +++ b/src/lib/filters.js @@ -120,41 +120,41 @@ module.exports = { * ] *} * taxonomies=taxonomies=advice-and-support&taxonomies=health-and-wellbeing - * targetDirectories=bod + * directories=bod * { "target_directories.label": { "$in": ["bfis", "bod"] } } * [ 'fis', 'bod' ] * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-do * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-dotaxonomies=parks-and-outdoor-spaces * @TODO test http://localhost:3001/api/v1/services?taxonomies=things-to-do&taxonomies=things-to-do&taxonomies=parks-and-outdoor-spaces - * @param {*} targetDirectories + * NB previously this was a $in query + * {$and: [{'taxonomies.slug': {$in: ['tax1', 'tax2']}}]} + * which would return services with tax1 or tax2 but ORUK states that all queries are AND queries + * @param {*} directories */ filterTaxonomies: taxonomies => { - let query = [] - if (taxonomies) { - taxonomies.forEach(cluster => { - query.push({ - "taxonomies.slug": { $in: [].concat(cluster.split(",")) }, - }) - }) + if (taxonomies?.length > 0) { + return { + "taxonomies.slug": { $all: taxonomies }, + } } - return query + return {} }, /** * Specify the directory to search for services - * targetDirectories=bod,bfis - * targetDirectories=bod + * directories=bod,bfis + * directories=bod * { "target_directories.label": { "$in": ["bfis", "bod"] } } * [ 'fis', 'bod' ] - * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis,bod&targetDirectories=bfis,bod - * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis,bod - * @TODO test http://localhost:3001/api/v1/services?targetDirectories=bfis - * @param {*} targetDirectories + * @TODO test http://localhost:3001/api/v1/services?directories=bfis,bod&directories=bfis,bod + * @TODO test http://localhost:3001/api/v1/services?directories=bfis,bod + * @TODO test http://localhost:3001/api/v1/services?directories=bfis + * @param {*} directories */ - filterTargetDirectories: targetDirectories => { - if (targetDirectories?.length > 0) { + filterDirectories: directories => { + if (directories?.length > 0) { return { - "target_directories.label": { $in: targetDirectories }, + "directories.label": { $in: directories }, } } return {} From 9bc5db8fabc9a7300508c798ea08b0ec67113a4c Mon Sep 17 00:00:00 2001 From: Han Date: Wed, 1 May 2024 15:22:58 +0100 Subject: [PATCH 23/23] Update to include score in results --- TODO.md | 1 + .../v1/services/routes/get-services.js | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 1aa3af4..7736fd5 100644 --- a/TODO.md +++ b/TODO.md @@ -3,3 +3,4 @@ - [x] Automate tests with docker and github actions - [ ] Automatic linter on commit and PR's - [x] An option to push some dummy data to the API +- [ ] Add support for csv export https://developers.openreferraluk.org/API-Guidance/ diff --git a/src/controllers/v1/services/routes/get-services.js b/src/controllers/v1/services/routes/get-services.js index 3c4e40e..d2bdbc1 100644 --- a/src/controllers/v1/services/routes/get-services.js +++ b/src/controllers/v1/services/routes/get-services.js @@ -187,12 +187,21 @@ module.exports = { logger.debug(countQuery) logger.debug(JSON.stringify(countQuery)) + const queryProjection = query.$text + ? { + ...projection, + score: { $meta: "textScore" }, + } + : { + ...projection, + } + const [results, count] = await Promise.all([ Service.find(query) - .project({ - ...projection, - }) - .sort(query.$text ? { score: { $meta: "textScore" } } : {}) + .project(queryProjection) + .sort( + query.$text ? { score: { $meta: "textScore" } } : { updated_at: -1 } + ) .limit(perPage) .skip((page - 1) * perPage) .toArray(),